mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2024-12-28 16:53:49 +00:00
Merge branch 'for-linus' into for-next
Pull 6.12-devel branch for cleanup of USB-audio driver code. Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
commit
b22b2e3d94
@ -102,21 +102,21 @@ properties:
|
|||||||
default: 2
|
default: 2
|
||||||
|
|
||||||
interrupts:
|
interrupts:
|
||||||
oneOf:
|
minItems: 1
|
||||||
- minItems: 1
|
maxItems: 2
|
||||||
items:
|
|
||||||
- description: TX interrupt
|
|
||||||
- description: RX interrupt
|
|
||||||
- items:
|
|
||||||
- description: common/combined interrupt
|
|
||||||
|
|
||||||
interrupt-names:
|
interrupt-names:
|
||||||
oneOf:
|
oneOf:
|
||||||
- minItems: 1
|
- description: TX interrupt
|
||||||
|
const: tx
|
||||||
|
- description: RX interrupt
|
||||||
|
const: rx
|
||||||
|
- description: TX and RX interrupts
|
||||||
items:
|
items:
|
||||||
- const: tx
|
- const: tx
|
||||||
- const: rx
|
- const: rx
|
||||||
- const: common
|
- description: Common/combined interrupt
|
||||||
|
const: common
|
||||||
|
|
||||||
fck_parent:
|
fck_parent:
|
||||||
$ref: /schemas/types.yaml#/definitions/string
|
$ref: /schemas/types.yaml#/definitions/string
|
||||||
|
@ -48,6 +48,10 @@ properties:
|
|||||||
- const: mclk_rx
|
- const: mclk_rx
|
||||||
- const: hclk
|
- const: hclk
|
||||||
|
|
||||||
|
port:
|
||||||
|
$ref: audio-graph-port.yaml#
|
||||||
|
unevaluatedProperties: false
|
||||||
|
|
||||||
resets:
|
resets:
|
||||||
maxItems: 1
|
maxItems: 1
|
||||||
|
|
||||||
|
@ -14986,6 +14986,7 @@ F: drivers/spi/spi-at91-usart.c
|
|||||||
|
|
||||||
MICROCHIP AUDIO ASOC DRIVERS
|
MICROCHIP AUDIO ASOC DRIVERS
|
||||||
M: Claudiu Beznea <claudiu.beznea@tuxon.dev>
|
M: Claudiu Beznea <claudiu.beznea@tuxon.dev>
|
||||||
|
M: Andrei Simion <andrei.simion@microchip.com>
|
||||||
L: linux-sound@vger.kernel.org
|
L: linux-sound@vger.kernel.org
|
||||||
S: Supported
|
S: Supported
|
||||||
F: Documentation/devicetree/bindings/sound/atmel*
|
F: Documentation/devicetree/bindings/sound/atmel*
|
||||||
@ -15094,6 +15095,7 @@ F: include/video/atmel_lcdc.h
|
|||||||
|
|
||||||
MICROCHIP MCP16502 PMIC DRIVER
|
MICROCHIP MCP16502 PMIC DRIVER
|
||||||
M: Claudiu Beznea <claudiu.beznea@tuxon.dev>
|
M: Claudiu Beznea <claudiu.beznea@tuxon.dev>
|
||||||
|
M: Andrei Simion <andrei.simion@microchip.com>
|
||||||
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
||||||
S: Supported
|
S: Supported
|
||||||
F: Documentation/devicetree/bindings/regulator/microchip,mcp16502.yaml
|
F: Documentation/devicetree/bindings/regulator/microchip,mcp16502.yaml
|
||||||
@ -15224,6 +15226,7 @@ F: drivers/spi/spi-atmel.*
|
|||||||
|
|
||||||
MICROCHIP SSC DRIVER
|
MICROCHIP SSC DRIVER
|
||||||
M: Claudiu Beznea <claudiu.beznea@tuxon.dev>
|
M: Claudiu Beznea <claudiu.beznea@tuxon.dev>
|
||||||
|
M: Andrei Simion <andrei.simion@microchip.com>
|
||||||
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
||||||
S: Supported
|
S: Supported
|
||||||
F: Documentation/devicetree/bindings/misc/atmel-ssc.txt
|
F: Documentation/devicetree/bindings/misc/atmel-ssc.txt
|
||||||
@ -23143,7 +23146,7 @@ F: Documentation/devicetree/bindings/iio/adc/ti,lmp92064.yaml
|
|||||||
F: drivers/iio/adc/ti-lmp92064.c
|
F: drivers/iio/adc/ti-lmp92064.c
|
||||||
|
|
||||||
TI PCM3060 ASoC CODEC DRIVER
|
TI PCM3060 ASoC CODEC DRIVER
|
||||||
M: Kirill Marinushkin <kmarinushkin@birdec.com>
|
M: Kirill Marinushkin <k.marinushkin@gmail.com>
|
||||||
L: linux-sound@vger.kernel.org
|
L: linux-sound@vger.kernel.org
|
||||||
S: Maintained
|
S: Maintained
|
||||||
F: Documentation/devicetree/bindings/sound/pcm3060.txt
|
F: Documentation/devicetree/bindings/sound/pcm3060.txt
|
||||||
|
@ -376,11 +376,12 @@ static int intel_hw_params(struct snd_pcm_substream *substream,
|
|||||||
static int intel_prepare(struct snd_pcm_substream *substream,
|
static int intel_prepare(struct snd_pcm_substream *substream,
|
||||||
struct snd_soc_dai *dai)
|
struct snd_soc_dai *dai)
|
||||||
{
|
{
|
||||||
|
struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
|
||||||
struct sdw_cdns *cdns = snd_soc_dai_get_drvdata(dai);
|
struct sdw_cdns *cdns = snd_soc_dai_get_drvdata(dai);
|
||||||
struct sdw_intel *sdw = cdns_to_intel(cdns);
|
struct sdw_intel *sdw = cdns_to_intel(cdns);
|
||||||
struct sdw_cdns_dai_runtime *dai_runtime;
|
struct sdw_cdns_dai_runtime *dai_runtime;
|
||||||
|
struct snd_pcm_hw_params *hw_params;
|
||||||
int ch, dir;
|
int ch, dir;
|
||||||
int ret = 0;
|
|
||||||
|
|
||||||
dai_runtime = cdns->dai_runtime_array[dai->id];
|
dai_runtime = cdns->dai_runtime_array[dai->id];
|
||||||
if (!dai_runtime) {
|
if (!dai_runtime) {
|
||||||
@ -389,12 +390,8 @@ static int intel_prepare(struct snd_pcm_substream *substream,
|
|||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hw_params = &rtd->dpcm[substream->stream].hw_params;
|
||||||
if (dai_runtime->suspended) {
|
if (dai_runtime->suspended) {
|
||||||
struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
|
|
||||||
struct snd_pcm_hw_params *hw_params;
|
|
||||||
|
|
||||||
hw_params = &rtd->dpcm[substream->stream].hw_params;
|
|
||||||
|
|
||||||
dai_runtime->suspended = false;
|
dai_runtime->suspended = false;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -415,15 +412,11 @@ static int intel_prepare(struct snd_pcm_substream *substream,
|
|||||||
/* the SHIM will be configured in the callback functions */
|
/* the SHIM will be configured in the callback functions */
|
||||||
|
|
||||||
sdw_cdns_config_stream(cdns, ch, dir, dai_runtime->pdi);
|
sdw_cdns_config_stream(cdns, ch, dir, dai_runtime->pdi);
|
||||||
|
|
||||||
/* Inform DSP about PDI stream number */
|
|
||||||
ret = intel_params_stream(sdw, substream, dai,
|
|
||||||
hw_params,
|
|
||||||
sdw->instance,
|
|
||||||
dai_runtime->pdi->intel_alh_id);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
/* Inform DSP about PDI stream number */
|
||||||
|
return intel_params_stream(sdw, substream, dai, hw_params, sdw->instance,
|
||||||
|
dai_runtime->pdi->intel_alh_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@ -88,7 +88,7 @@
|
|||||||
|
|
||||||
/* ABI version */
|
/* ABI version */
|
||||||
#define SND_SOC_TPLG_ABI_VERSION 0x5 /* current version */
|
#define SND_SOC_TPLG_ABI_VERSION 0x5 /* current version */
|
||||||
#define SND_SOC_TPLG_ABI_VERSION_MIN 0x4 /* oldest version supported */
|
#define SND_SOC_TPLG_ABI_VERSION_MIN 0x5 /* oldest version supported */
|
||||||
|
|
||||||
/* Max size of TLV data */
|
/* Max size of TLV data */
|
||||||
#define SND_SOC_TPLG_TLV_SIZE 32
|
#define SND_SOC_TPLG_TLV_SIZE 32
|
||||||
|
@ -1233,7 +1233,7 @@ static int fill_legacy_mapping(struct snd_ump_endpoint *ump)
|
|||||||
|
|
||||||
num = 0;
|
num = 0;
|
||||||
for (i = 0; i < SNDRV_UMP_MAX_GROUPS; i++)
|
for (i = 0; i < SNDRV_UMP_MAX_GROUPS; i++)
|
||||||
if (group_maps & (1U << i))
|
if ((group_maps & (1U << i)) && ump->groups[i].valid)
|
||||||
ump->legacy_mapping[num++] = i;
|
ump->legacy_mapping[num++] = i;
|
||||||
|
|
||||||
return num;
|
return num;
|
||||||
|
@ -172,6 +172,9 @@ static int apply_constraint_to_size(struct snd_pcm_hw_params *params,
|
|||||||
step = max(step, amdtp_syt_intervals[i]);
|
step = max(step, amdtp_syt_intervals[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (step == 0)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
t.min = roundup(s->min, step);
|
t.min = roundup(s->min, step);
|
||||||
t.max = rounddown(s->max, step);
|
t.max = rounddown(s->max, step);
|
||||||
t.integer = 1;
|
t.integer = 1;
|
||||||
|
@ -238,7 +238,7 @@ int amdtp_tscm_init(struct amdtp_stream *s, struct fw_unit *unit,
|
|||||||
err = amdtp_stream_init(s, unit, dir, flags, fmt,
|
err = amdtp_stream_init(s, unit, dir, flags, fmt,
|
||||||
process_ctx_payloads, sizeof(struct amdtp_tscm));
|
process_ctx_payloads, sizeof(struct amdtp_tscm));
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return 0;
|
return err;
|
||||||
|
|
||||||
if (dir == AMDTP_OUT_STREAM) {
|
if (dir == AMDTP_OUT_STREAM) {
|
||||||
// Use fixed value for FDF field.
|
// Use fixed value for FDF field.
|
||||||
|
@ -721,6 +721,10 @@ static const struct config_entry acpi_config_table[] = {
|
|||||||
#if IS_ENABLED(CONFIG_SND_SST_ATOM_HIFI2_PLATFORM_ACPI) || \
|
#if IS_ENABLED(CONFIG_SND_SST_ATOM_HIFI2_PLATFORM_ACPI) || \
|
||||||
IS_ENABLED(CONFIG_SND_SOC_SOF_BAYTRAIL)
|
IS_ENABLED(CONFIG_SND_SOC_SOF_BAYTRAIL)
|
||||||
/* BayTrail */
|
/* BayTrail */
|
||||||
|
{
|
||||||
|
.flags = FLAG_SST_OR_SOF_BYT,
|
||||||
|
.acpi_hid = "LPE0F28",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.flags = FLAG_SST_OR_SOF_BYT,
|
.flags = FLAG_SST_OR_SOF_BYT,
|
||||||
.acpi_hid = "80860F28",
|
.acpi_hid = "80860F28",
|
||||||
|
@ -198,7 +198,7 @@ config SND_HDA_SCODEC_TAS2781_I2C
|
|||||||
depends on SND_SOC
|
depends on SND_SOC
|
||||||
select SND_SOC_TAS2781_COMLIB
|
select SND_SOC_TAS2781_COMLIB
|
||||||
select SND_SOC_TAS2781_FMWLIB
|
select SND_SOC_TAS2781_FMWLIB
|
||||||
select CRC32_SARWATE
|
select CRC32
|
||||||
help
|
help
|
||||||
Say Y or M here to include TAS2781 I2C HD-audio side codec support
|
Say Y or M here to include TAS2781 I2C HD-audio side codec support
|
||||||
in snd-hda-intel driver, such as ALC287.
|
in snd-hda-intel driver, such as ALC287.
|
||||||
|
@ -205,8 +205,6 @@ static void cx_auto_shutdown(struct hda_codec *codec)
|
|||||||
{
|
{
|
||||||
struct conexant_spec *spec = codec->spec;
|
struct conexant_spec *spec = codec->spec;
|
||||||
|
|
||||||
snd_hda_gen_shutup_speakers(codec);
|
|
||||||
|
|
||||||
/* Turn the problematic codec into D3 to avoid spurious noises
|
/* Turn the problematic codec into D3 to avoid spurious noises
|
||||||
from the internal speaker during (and after) reboot */
|
from the internal speaker during (and after) reboot */
|
||||||
cx_auto_turn_eapd(codec, spec->num_eapds, spec->eapds, false);
|
cx_auto_turn_eapd(codec, spec->num_eapds, spec->eapds, false);
|
||||||
|
@ -3868,20 +3868,18 @@ static void alc_default_init(struct hda_codec *codec)
|
|||||||
|
|
||||||
hp_pin_sense = snd_hda_jack_detect(codec, hp_pin);
|
hp_pin_sense = snd_hda_jack_detect(codec, hp_pin);
|
||||||
|
|
||||||
if (hp_pin_sense)
|
if (hp_pin_sense) {
|
||||||
msleep(2);
|
msleep(2);
|
||||||
|
|
||||||
snd_hda_codec_write(codec, hp_pin, 0,
|
snd_hda_codec_write(codec, hp_pin, 0,
|
||||||
AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
|
AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT);
|
||||||
|
|
||||||
if (hp_pin_sense)
|
msleep(75);
|
||||||
msleep(85);
|
|
||||||
|
|
||||||
snd_hda_codec_write(codec, hp_pin, 0,
|
snd_hda_codec_write(codec, hp_pin, 0,
|
||||||
AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT);
|
AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE);
|
||||||
|
msleep(75);
|
||||||
if (hp_pin_sense)
|
}
|
||||||
msleep(100);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void alc_default_shutup(struct hda_codec *codec)
|
static void alc_default_shutup(struct hda_codec *codec)
|
||||||
@ -3897,22 +3895,20 @@ static void alc_default_shutup(struct hda_codec *codec)
|
|||||||
|
|
||||||
hp_pin_sense = snd_hda_jack_detect(codec, hp_pin);
|
hp_pin_sense = snd_hda_jack_detect(codec, hp_pin);
|
||||||
|
|
||||||
if (hp_pin_sense)
|
if (hp_pin_sense) {
|
||||||
msleep(2);
|
msleep(2);
|
||||||
|
|
||||||
snd_hda_codec_write(codec, hp_pin, 0,
|
|
||||||
AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
|
|
||||||
|
|
||||||
if (hp_pin_sense)
|
|
||||||
msleep(85);
|
|
||||||
|
|
||||||
if (!spec->no_shutup_pins)
|
|
||||||
snd_hda_codec_write(codec, hp_pin, 0,
|
snd_hda_codec_write(codec, hp_pin, 0,
|
||||||
AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0);
|
AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
|
||||||
|
|
||||||
if (hp_pin_sense)
|
msleep(75);
|
||||||
msleep(100);
|
|
||||||
|
|
||||||
|
if (!spec->no_shutup_pins)
|
||||||
|
snd_hda_codec_write(codec, hp_pin, 0,
|
||||||
|
AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0);
|
||||||
|
|
||||||
|
msleep(75);
|
||||||
|
}
|
||||||
alc_auto_setup_eapd(codec, false);
|
alc_auto_setup_eapd(codec, false);
|
||||||
alc_shutup_pins(codec);
|
alc_shutup_pins(codec);
|
||||||
}
|
}
|
||||||
@ -7525,6 +7521,7 @@ enum {
|
|||||||
ALC286_FIXUP_SONY_MIC_NO_PRESENCE,
|
ALC286_FIXUP_SONY_MIC_NO_PRESENCE,
|
||||||
ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT,
|
ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT,
|
||||||
ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
|
ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
|
||||||
|
ALC269_FIXUP_DELL1_LIMIT_INT_MIC_BOOST,
|
||||||
ALC269_FIXUP_DELL2_MIC_NO_PRESENCE,
|
ALC269_FIXUP_DELL2_MIC_NO_PRESENCE,
|
||||||
ALC269_FIXUP_DELL3_MIC_NO_PRESENCE,
|
ALC269_FIXUP_DELL3_MIC_NO_PRESENCE,
|
||||||
ALC269_FIXUP_DELL4_MIC_NO_PRESENCE,
|
ALC269_FIXUP_DELL4_MIC_NO_PRESENCE,
|
||||||
@ -7555,10 +7552,12 @@ enum {
|
|||||||
ALC290_FIXUP_SUBWOOFER_HSJACK,
|
ALC290_FIXUP_SUBWOOFER_HSJACK,
|
||||||
ALC269_FIXUP_THINKPAD_ACPI,
|
ALC269_FIXUP_THINKPAD_ACPI,
|
||||||
ALC269_FIXUP_DMIC_THINKPAD_ACPI,
|
ALC269_FIXUP_DMIC_THINKPAD_ACPI,
|
||||||
|
ALC269VB_FIXUP_INFINIX_ZERO_BOOK_13,
|
||||||
ALC269VB_FIXUP_CHUWI_COREBOOK_XPRO,
|
ALC269VB_FIXUP_CHUWI_COREBOOK_XPRO,
|
||||||
ALC255_FIXUP_ACER_MIC_NO_PRESENCE,
|
ALC255_FIXUP_ACER_MIC_NO_PRESENCE,
|
||||||
ALC255_FIXUP_ASUS_MIC_NO_PRESENCE,
|
ALC255_FIXUP_ASUS_MIC_NO_PRESENCE,
|
||||||
ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
|
ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
|
||||||
|
ALC255_FIXUP_DELL1_LIMIT_INT_MIC_BOOST,
|
||||||
ALC255_FIXUP_DELL2_MIC_NO_PRESENCE,
|
ALC255_FIXUP_DELL2_MIC_NO_PRESENCE,
|
||||||
ALC255_FIXUP_HEADSET_MODE,
|
ALC255_FIXUP_HEADSET_MODE,
|
||||||
ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC,
|
ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC,
|
||||||
@ -7649,6 +7648,7 @@ enum {
|
|||||||
ALC286_FIXUP_ACER_AIO_HEADSET_MIC,
|
ALC286_FIXUP_ACER_AIO_HEADSET_MIC,
|
||||||
ALC256_FIXUP_ASUS_HEADSET_MIC,
|
ALC256_FIXUP_ASUS_HEADSET_MIC,
|
||||||
ALC256_FIXUP_ASUS_MIC_NO_PRESENCE,
|
ALC256_FIXUP_ASUS_MIC_NO_PRESENCE,
|
||||||
|
ALC255_FIXUP_PREDATOR_SUBWOOFER,
|
||||||
ALC299_FIXUP_PREDATOR_SPK,
|
ALC299_FIXUP_PREDATOR_SPK,
|
||||||
ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE,
|
ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE,
|
||||||
ALC289_FIXUP_DELL_SPK1,
|
ALC289_FIXUP_DELL_SPK1,
|
||||||
@ -7929,6 +7929,16 @@ static const struct hda_fixup alc269_fixups[] = {
|
|||||||
.type = HDA_FIXUP_FUNC,
|
.type = HDA_FIXUP_FUNC,
|
||||||
.v.func = alc269_fixup_pincfg_U7x7_headset_mic,
|
.v.func = alc269_fixup_pincfg_U7x7_headset_mic,
|
||||||
},
|
},
|
||||||
|
[ALC269VB_FIXUP_INFINIX_ZERO_BOOK_13] = {
|
||||||
|
.type = HDA_FIXUP_PINS,
|
||||||
|
.v.pins = (const struct hda_pintbl[]) {
|
||||||
|
{ 0x14, 0x90170151 }, /* use as internal speaker (LFE) */
|
||||||
|
{ 0x1b, 0x90170152 }, /* use as internal speaker (back) */
|
||||||
|
{ }
|
||||||
|
},
|
||||||
|
.chained = true,
|
||||||
|
.chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST
|
||||||
|
},
|
||||||
[ALC269VB_FIXUP_CHUWI_COREBOOK_XPRO] = {
|
[ALC269VB_FIXUP_CHUWI_COREBOOK_XPRO] = {
|
||||||
.type = HDA_FIXUP_PINS,
|
.type = HDA_FIXUP_PINS,
|
||||||
.v.pins = (const struct hda_pintbl[]) {
|
.v.pins = (const struct hda_pintbl[]) {
|
||||||
@ -8047,6 +8057,12 @@ static const struct hda_fixup alc269_fixups[] = {
|
|||||||
.chained = true,
|
.chained = true,
|
||||||
.chain_id = ALC269_FIXUP_HEADSET_MODE
|
.chain_id = ALC269_FIXUP_HEADSET_MODE
|
||||||
},
|
},
|
||||||
|
[ALC269_FIXUP_DELL1_LIMIT_INT_MIC_BOOST] = {
|
||||||
|
.type = HDA_FIXUP_FUNC,
|
||||||
|
.v.func = alc269_fixup_limit_int_mic_boost,
|
||||||
|
.chained = true,
|
||||||
|
.chain_id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
|
||||||
|
},
|
||||||
[ALC269_FIXUP_DELL2_MIC_NO_PRESENCE] = {
|
[ALC269_FIXUP_DELL2_MIC_NO_PRESENCE] = {
|
||||||
.type = HDA_FIXUP_PINS,
|
.type = HDA_FIXUP_PINS,
|
||||||
.v.pins = (const struct hda_pintbl[]) {
|
.v.pins = (const struct hda_pintbl[]) {
|
||||||
@ -8327,6 +8343,12 @@ static const struct hda_fixup alc269_fixups[] = {
|
|||||||
.chained = true,
|
.chained = true,
|
||||||
.chain_id = ALC255_FIXUP_HEADSET_MODE
|
.chain_id = ALC255_FIXUP_HEADSET_MODE
|
||||||
},
|
},
|
||||||
|
[ALC255_FIXUP_DELL1_LIMIT_INT_MIC_BOOST] = {
|
||||||
|
.type = HDA_FIXUP_FUNC,
|
||||||
|
.v.func = alc269_fixup_limit_int_mic_boost,
|
||||||
|
.chained = true,
|
||||||
|
.chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
|
||||||
|
},
|
||||||
[ALC255_FIXUP_DELL2_MIC_NO_PRESENCE] = {
|
[ALC255_FIXUP_DELL2_MIC_NO_PRESENCE] = {
|
||||||
.type = HDA_FIXUP_PINS,
|
.type = HDA_FIXUP_PINS,
|
||||||
.v.pins = (const struct hda_pintbl[]) {
|
.v.pins = (const struct hda_pintbl[]) {
|
||||||
@ -8993,6 +9015,13 @@ static const struct hda_fixup alc269_fixups[] = {
|
|||||||
.chained = true,
|
.chained = true,
|
||||||
.chain_id = ALC256_FIXUP_ASUS_HEADSET_MODE
|
.chain_id = ALC256_FIXUP_ASUS_HEADSET_MODE
|
||||||
},
|
},
|
||||||
|
[ALC255_FIXUP_PREDATOR_SUBWOOFER] = {
|
||||||
|
.type = HDA_FIXUP_PINS,
|
||||||
|
.v.pins = (const struct hda_pintbl[]) {
|
||||||
|
{ 0x17, 0x90170151 }, /* use as internal speaker (LFE) */
|
||||||
|
{ 0x1b, 0x90170152 } /* use as internal speaker (back) */
|
||||||
|
}
|
||||||
|
},
|
||||||
[ALC299_FIXUP_PREDATOR_SPK] = {
|
[ALC299_FIXUP_PREDATOR_SPK] = {
|
||||||
.type = HDA_FIXUP_PINS,
|
.type = HDA_FIXUP_PINS,
|
||||||
.v.pins = (const struct hda_pintbl[]) {
|
.v.pins = (const struct hda_pintbl[]) {
|
||||||
@ -10064,6 +10093,8 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
|
|||||||
SND_PCI_QUIRK(0x1025, 0x110e, "Acer Aspire ES1-432", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
|
SND_PCI_QUIRK(0x1025, 0x110e, "Acer Aspire ES1-432", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
|
||||||
SND_PCI_QUIRK(0x1025, 0x1166, "Acer Veriton N4640G", ALC269_FIXUP_LIFEBOOK),
|
SND_PCI_QUIRK(0x1025, 0x1166, "Acer Veriton N4640G", ALC269_FIXUP_LIFEBOOK),
|
||||||
SND_PCI_QUIRK(0x1025, 0x1167, "Acer Veriton N6640G", ALC269_FIXUP_LIFEBOOK),
|
SND_PCI_QUIRK(0x1025, 0x1167, "Acer Veriton N6640G", ALC269_FIXUP_LIFEBOOK),
|
||||||
|
SND_PCI_QUIRK(0x1025, 0x1177, "Acer Predator G9-593", ALC255_FIXUP_PREDATOR_SUBWOOFER),
|
||||||
|
SND_PCI_QUIRK(0x1025, 0x1178, "Acer Predator G9-593", ALC255_FIXUP_PREDATOR_SUBWOOFER),
|
||||||
SND_PCI_QUIRK(0x1025, 0x1246, "Acer Predator Helios 500", ALC299_FIXUP_PREDATOR_SPK),
|
SND_PCI_QUIRK(0x1025, 0x1246, "Acer Predator Helios 500", ALC299_FIXUP_PREDATOR_SPK),
|
||||||
SND_PCI_QUIRK(0x1025, 0x1247, "Acer vCopperbox", ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS),
|
SND_PCI_QUIRK(0x1025, 0x1247, "Acer vCopperbox", ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS),
|
||||||
SND_PCI_QUIRK(0x1025, 0x1248, "Acer Veriton N4660G", ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE),
|
SND_PCI_QUIRK(0x1025, 0x1248, "Acer Veriton N4660G", ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE),
|
||||||
@ -10633,6 +10664,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
|
|||||||
SND_PCI_QUIRK(0x1558, 0x1404, "Clevo N150CU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
SND_PCI_QUIRK(0x1558, 0x1404, "Clevo N150CU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||||
SND_PCI_QUIRK(0x1558, 0x14a1, "Clevo L141MU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
SND_PCI_QUIRK(0x1558, 0x14a1, "Clevo L141MU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||||
SND_PCI_QUIRK(0x1558, 0x2624, "Clevo L240TU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
SND_PCI_QUIRK(0x1558, 0x2624, "Clevo L240TU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||||
|
SND_PCI_QUIRK(0x1558, 0x28c1, "Clevo V370VND", ALC2XX_FIXUP_HEADSET_MIC),
|
||||||
SND_PCI_QUIRK(0x1558, 0x4018, "Clevo NV40M[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
SND_PCI_QUIRK(0x1558, 0x4018, "Clevo NV40M[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||||
SND_PCI_QUIRK(0x1558, 0x4019, "Clevo NV40MZ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
SND_PCI_QUIRK(0x1558, 0x4019, "Clevo NV40MZ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||||
SND_PCI_QUIRK(0x1558, 0x4020, "Clevo NV40MB", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
SND_PCI_QUIRK(0x1558, 0x4020, "Clevo NV40MB", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||||
@ -10894,6 +10926,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
|
|||||||
SND_PCI_QUIRK(0x1d05, 0x115c, "TongFang GMxTGxx", ALC269_FIXUP_NO_SHUTUP),
|
SND_PCI_QUIRK(0x1d05, 0x115c, "TongFang GMxTGxx", ALC269_FIXUP_NO_SHUTUP),
|
||||||
SND_PCI_QUIRK(0x1d05, 0x121b, "TongFang GMxAGxx", ALC269_FIXUP_NO_SHUTUP),
|
SND_PCI_QUIRK(0x1d05, 0x121b, "TongFang GMxAGxx", ALC269_FIXUP_NO_SHUTUP),
|
||||||
SND_PCI_QUIRK(0x1d05, 0x1387, "TongFang GMxIXxx", ALC2XX_FIXUP_HEADSET_MIC),
|
SND_PCI_QUIRK(0x1d05, 0x1387, "TongFang GMxIXxx", ALC2XX_FIXUP_HEADSET_MIC),
|
||||||
|
SND_PCI_QUIRK(0x1d05, 0x1409, "TongFang GMxIXxx", ALC2XX_FIXUP_HEADSET_MIC),
|
||||||
SND_PCI_QUIRK(0x1d17, 0x3288, "Haier Boyue G42", ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS),
|
SND_PCI_QUIRK(0x1d17, 0x3288, "Haier Boyue G42", ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS),
|
||||||
SND_PCI_QUIRK(0x1d72, 0x1602, "RedmiBook", ALC255_FIXUP_XIAOMI_HEADSET_MIC),
|
SND_PCI_QUIRK(0x1d72, 0x1602, "RedmiBook", ALC255_FIXUP_XIAOMI_HEADSET_MIC),
|
||||||
SND_PCI_QUIRK(0x1d72, 0x1701, "XiaomiNotebook Pro", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE),
|
SND_PCI_QUIRK(0x1d72, 0x1701, "XiaomiNotebook Pro", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE),
|
||||||
@ -10901,6 +10934,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
|
|||||||
SND_PCI_QUIRK(0x1d72, 0x1945, "Redmi G", ALC256_FIXUP_ASUS_HEADSET_MIC),
|
SND_PCI_QUIRK(0x1d72, 0x1945, "Redmi G", ALC256_FIXUP_ASUS_HEADSET_MIC),
|
||||||
SND_PCI_QUIRK(0x1d72, 0x1947, "RedmiBook Air", ALC255_FIXUP_XIAOMI_HEADSET_MIC),
|
SND_PCI_QUIRK(0x1d72, 0x1947, "RedmiBook Air", ALC255_FIXUP_XIAOMI_HEADSET_MIC),
|
||||||
SND_PCI_QUIRK(0x2782, 0x0214, "VAIO VJFE-CL", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
|
SND_PCI_QUIRK(0x2782, 0x0214, "VAIO VJFE-CL", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
|
||||||
|
SND_PCI_QUIRK(0x2782, 0x0228, "Infinix ZERO BOOK 13", ALC269VB_FIXUP_INFINIX_ZERO_BOOK_13),
|
||||||
SND_PCI_QUIRK(0x2782, 0x0232, "CHUWI CoreBook XPro", ALC269VB_FIXUP_CHUWI_COREBOOK_XPRO),
|
SND_PCI_QUIRK(0x2782, 0x0232, "CHUWI CoreBook XPro", ALC269VB_FIXUP_CHUWI_COREBOOK_XPRO),
|
||||||
SND_PCI_QUIRK(0x2782, 0x1707, "Vaio VJFE-ADL", ALC298_FIXUP_SPK_VOLUME),
|
SND_PCI_QUIRK(0x2782, 0x1707, "Vaio VJFE-ADL", ALC298_FIXUP_SPK_VOLUME),
|
||||||
SND_PCI_QUIRK(0x8086, 0x2074, "Intel NUC 8", ALC233_FIXUP_INTEL_NUC8_DMIC),
|
SND_PCI_QUIRK(0x8086, 0x2074, "Intel NUC 8", ALC233_FIXUP_INTEL_NUC8_DMIC),
|
||||||
@ -10988,6 +11022,7 @@ static const struct hda_model_fixup alc269_fixup_models[] = {
|
|||||||
{.id = ALC269_FIXUP_DELL2_MIC_NO_PRESENCE, .name = "dell-headset-dock"},
|
{.id = ALC269_FIXUP_DELL2_MIC_NO_PRESENCE, .name = "dell-headset-dock"},
|
||||||
{.id = ALC269_FIXUP_DELL3_MIC_NO_PRESENCE, .name = "dell-headset3"},
|
{.id = ALC269_FIXUP_DELL3_MIC_NO_PRESENCE, .name = "dell-headset3"},
|
||||||
{.id = ALC269_FIXUP_DELL4_MIC_NO_PRESENCE, .name = "dell-headset4"},
|
{.id = ALC269_FIXUP_DELL4_MIC_NO_PRESENCE, .name = "dell-headset4"},
|
||||||
|
{.id = ALC269_FIXUP_DELL4_MIC_NO_PRESENCE_QUIET, .name = "dell-headset4-quiet"},
|
||||||
{.id = ALC283_FIXUP_CHROME_BOOK, .name = "alc283-dac-wcaps"},
|
{.id = ALC283_FIXUP_CHROME_BOOK, .name = "alc283-dac-wcaps"},
|
||||||
{.id = ALC283_FIXUP_SENSE_COMBO_JACK, .name = "alc283-sense-combo"},
|
{.id = ALC283_FIXUP_SENSE_COMBO_JACK, .name = "alc283-sense-combo"},
|
||||||
{.id = ALC292_FIXUP_TPT440_DOCK, .name = "tpt440-dock"},
|
{.id = ALC292_FIXUP_TPT440_DOCK, .name = "tpt440-dock"},
|
||||||
@ -11542,16 +11577,16 @@ static const struct snd_hda_pin_quirk alc269_fallback_pin_fixup_tbl[] = {
|
|||||||
SND_HDA_PIN_QUIRK(0x10ec0289, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE,
|
SND_HDA_PIN_QUIRK(0x10ec0289, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE,
|
||||||
{0x19, 0x40000000},
|
{0x19, 0x40000000},
|
||||||
{0x1b, 0x40000000}),
|
{0x1b, 0x40000000}),
|
||||||
SND_HDA_PIN_QUIRK(0x10ec0295, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE,
|
SND_HDA_PIN_QUIRK(0x10ec0295, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE_QUIET,
|
||||||
{0x19, 0x40000000},
|
{0x19, 0x40000000},
|
||||||
{0x1b, 0x40000000}),
|
{0x1b, 0x40000000}),
|
||||||
SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
|
SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
|
||||||
{0x19, 0x40000000},
|
{0x19, 0x40000000},
|
||||||
{0x1a, 0x40000000}),
|
{0x1a, 0x40000000}),
|
||||||
SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
|
SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC255_FIXUP_DELL1_LIMIT_INT_MIC_BOOST,
|
||||||
{0x19, 0x40000000},
|
{0x19, 0x40000000},
|
||||||
{0x1a, 0x40000000}),
|
{0x1a, 0x40000000}),
|
||||||
SND_HDA_PIN_QUIRK(0x10ec0274, 0x1028, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB,
|
SND_HDA_PIN_QUIRK(0x10ec0274, 0x1028, "Dell", ALC269_FIXUP_DELL1_LIMIT_INT_MIC_BOOST,
|
||||||
{0x19, 0x40000000},
|
{0x19, 0x40000000},
|
||||||
{0x1a, 0x40000000}),
|
{0x1a, 0x40000000}),
|
||||||
SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC2XX_FIXUP_HEADSET_MIC,
|
SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC2XX_FIXUP_HEADSET_MIC,
|
||||||
|
@ -325,6 +325,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = {
|
|||||||
DMI_MATCH(DMI_PRODUCT_NAME, "M6500RC"),
|
DMI_MATCH(DMI_PRODUCT_NAME, "M6500RC"),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.driver_data = &acp6x_card,
|
||||||
|
.matches = {
|
||||||
|
DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."),
|
||||||
|
DMI_MATCH(DMI_PRODUCT_NAME, "E1404FA"),
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.driver_data = &acp6x_card,
|
.driver_data = &acp6x_card,
|
||||||
.matches = {
|
.matches = {
|
||||||
@ -339,6 +346,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = {
|
|||||||
DMI_MATCH(DMI_PRODUCT_NAME, "M7600RE"),
|
DMI_MATCH(DMI_PRODUCT_NAME, "M7600RE"),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.driver_data = &acp6x_card,
|
||||||
|
.matches = {
|
||||||
|
DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."),
|
||||||
|
DMI_MATCH(DMI_PRODUCT_NAME, "M3502RA"),
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.driver_data = &acp6x_card,
|
.driver_data = &acp6x_card,
|
||||||
.matches = {
|
.matches = {
|
||||||
|
@ -656,7 +656,7 @@ static int aw_dev_get_dsp_status(struct aw_device *aw_dev)
|
|||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
if (!(reg_val & (~AW88399_WDT_CNT_MASK)))
|
if (!(reg_val & (~AW88399_WDT_CNT_MASK)))
|
||||||
ret = -EPERM;
|
return -EPERM;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -747,8 +747,10 @@ int cs42l51_probe(struct device *dev, struct regmap *regmap)
|
|||||||
|
|
||||||
cs42l51->reset_gpio = devm_gpiod_get_optional(dev, "reset",
|
cs42l51->reset_gpio = devm_gpiod_get_optional(dev, "reset",
|
||||||
GPIOD_OUT_LOW);
|
GPIOD_OUT_LOW);
|
||||||
if (IS_ERR(cs42l51->reset_gpio))
|
if (IS_ERR(cs42l51->reset_gpio)) {
|
||||||
return PTR_ERR(cs42l51->reset_gpio);
|
ret = PTR_ERR(cs42l51->reset_gpio);
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
if (cs42l51->reset_gpio) {
|
if (cs42l51->reset_gpio) {
|
||||||
dev_dbg(dev, "Release reset gpio\n");
|
dev_dbg(dev, "Release reset gpio\n");
|
||||||
@ -780,6 +782,7 @@ int cs42l51_probe(struct device *dev, struct regmap *regmap)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
|
gpiod_set_value_cansleep(cs42l51->reset_gpio, 1);
|
||||||
regulator_bulk_disable(ARRAY_SIZE(cs42l51->supplies),
|
regulator_bulk_disable(ARRAY_SIZE(cs42l51->supplies),
|
||||||
cs42l51->supplies);
|
cs42l51->supplies);
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -202,12 +202,14 @@
|
|||||||
#define CDC_RX_RXn_RX_PATH_SEC3(rx, n) (0x042c + rx->rxn_reg_stride * n)
|
#define CDC_RX_RXn_RX_PATH_SEC3(rx, n) (0x042c + rx->rxn_reg_stride * n)
|
||||||
#define CDC_RX_RX0_RX_PATH_SEC4 (0x0430)
|
#define CDC_RX_RX0_RX_PATH_SEC4 (0x0430)
|
||||||
#define CDC_RX_RX0_RX_PATH_SEC7 (0x0434)
|
#define CDC_RX_RX0_RX_PATH_SEC7 (0x0434)
|
||||||
#define CDC_RX_RXn_RX_PATH_SEC7(rx, n) (0x0434 + rx->rxn_reg_stride * n)
|
#define CDC_RX_RXn_RX_PATH_SEC7(rx, n) \
|
||||||
|
(0x0434 + (rx->rxn_reg_stride * n) + ((n > 1) ? rx->rxn_reg_stride2 : 0))
|
||||||
#define CDC_RX_DSM_OUT_DELAY_SEL_MASK GENMASK(2, 0)
|
#define CDC_RX_DSM_OUT_DELAY_SEL_MASK GENMASK(2, 0)
|
||||||
#define CDC_RX_DSM_OUT_DELAY_TWO_SAMPLE 0x2
|
#define CDC_RX_DSM_OUT_DELAY_TWO_SAMPLE 0x2
|
||||||
#define CDC_RX_RX0_RX_PATH_MIX_SEC0 (0x0438)
|
#define CDC_RX_RX0_RX_PATH_MIX_SEC0 (0x0438)
|
||||||
#define CDC_RX_RX0_RX_PATH_MIX_SEC1 (0x043C)
|
#define CDC_RX_RX0_RX_PATH_MIX_SEC1 (0x043C)
|
||||||
#define CDC_RX_RXn_RX_PATH_DSM_CTL(rx, n) (0x0440 + rx->rxn_reg_stride * n)
|
#define CDC_RX_RXn_RX_PATH_DSM_CTL(rx, n) \
|
||||||
|
(0x0440 + (rx->rxn_reg_stride * n) + ((n > 1) ? rx->rxn_reg_stride2 : 0))
|
||||||
#define CDC_RX_RXn_DSM_CLK_EN_MASK BIT(0)
|
#define CDC_RX_RXn_DSM_CLK_EN_MASK BIT(0)
|
||||||
#define CDC_RX_RX0_RX_PATH_DSM_CTL (0x0440)
|
#define CDC_RX_RX0_RX_PATH_DSM_CTL (0x0440)
|
||||||
#define CDC_RX_RX0_RX_PATH_DSM_DATA1 (0x0444)
|
#define CDC_RX_RX0_RX_PATH_DSM_DATA1 (0x0444)
|
||||||
@ -645,6 +647,7 @@ struct rx_macro {
|
|||||||
int rx_mclk_cnt;
|
int rx_mclk_cnt;
|
||||||
enum lpass_codec_version codec_version;
|
enum lpass_codec_version codec_version;
|
||||||
int rxn_reg_stride;
|
int rxn_reg_stride;
|
||||||
|
int rxn_reg_stride2;
|
||||||
bool is_ear_mode_on;
|
bool is_ear_mode_on;
|
||||||
bool hph_pwr_mode;
|
bool hph_pwr_mode;
|
||||||
bool hph_hd2_mode;
|
bool hph_hd2_mode;
|
||||||
@ -1929,9 +1932,6 @@ static int rx_macro_digital_mute(struct snd_soc_dai *dai, int mute, int stream)
|
|||||||
CDC_RX_PATH_PGA_MUTE_MASK, 0x0);
|
CDC_RX_PATH_PGA_MUTE_MASK, 0x0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (j == INTERP_AUX)
|
|
||||||
dsm_reg = CDC_RX_RXn_RX_PATH_DSM_CTL(rx, 2);
|
|
||||||
|
|
||||||
int_mux_cfg0 = CDC_RX_INP_MUX_RX_INT0_CFG0 + j * 8;
|
int_mux_cfg0 = CDC_RX_INP_MUX_RX_INT0_CFG0 + j * 8;
|
||||||
int_mux_cfg1 = int_mux_cfg0 + 4;
|
int_mux_cfg1 = int_mux_cfg0 + 4;
|
||||||
int_mux_cfg0_val = snd_soc_component_read(component, int_mux_cfg0);
|
int_mux_cfg0_val = snd_soc_component_read(component, int_mux_cfg0);
|
||||||
@ -2702,9 +2702,6 @@ static int rx_macro_enable_interp_clk(struct snd_soc_component *component,
|
|||||||
|
|
||||||
main_reg = CDC_RX_RXn_RX_PATH_CTL(rx, interp_idx);
|
main_reg = CDC_RX_RXn_RX_PATH_CTL(rx, interp_idx);
|
||||||
dsm_reg = CDC_RX_RXn_RX_PATH_DSM_CTL(rx, interp_idx);
|
dsm_reg = CDC_RX_RXn_RX_PATH_DSM_CTL(rx, interp_idx);
|
||||||
if (interp_idx == INTERP_AUX)
|
|
||||||
dsm_reg = CDC_RX_RXn_RX_PATH_DSM_CTL(rx, 2);
|
|
||||||
|
|
||||||
rx_cfg2_reg = CDC_RX_RXn_RX_PATH_CFG2(rx, interp_idx);
|
rx_cfg2_reg = CDC_RX_RXn_RX_PATH_CFG2(rx, interp_idx);
|
||||||
|
|
||||||
if (SND_SOC_DAPM_EVENT_ON(event)) {
|
if (SND_SOC_DAPM_EVENT_ON(event)) {
|
||||||
@ -3821,6 +3818,7 @@ static int rx_macro_probe(struct platform_device *pdev)
|
|||||||
case LPASS_CODEC_VERSION_2_0:
|
case LPASS_CODEC_VERSION_2_0:
|
||||||
case LPASS_CODEC_VERSION_2_1:
|
case LPASS_CODEC_VERSION_2_1:
|
||||||
rx->rxn_reg_stride = 0x80;
|
rx->rxn_reg_stride = 0x80;
|
||||||
|
rx->rxn_reg_stride2 = 0xc;
|
||||||
def_count = ARRAY_SIZE(rx_defaults) + ARRAY_SIZE(rx_pre_2_5_defaults);
|
def_count = ARRAY_SIZE(rx_defaults) + ARRAY_SIZE(rx_pre_2_5_defaults);
|
||||||
reg_defaults = kmalloc_array(def_count, sizeof(struct reg_default), GFP_KERNEL);
|
reg_defaults = kmalloc_array(def_count, sizeof(struct reg_default), GFP_KERNEL);
|
||||||
if (!reg_defaults)
|
if (!reg_defaults)
|
||||||
@ -3834,6 +3832,7 @@ static int rx_macro_probe(struct platform_device *pdev)
|
|||||||
case LPASS_CODEC_VERSION_2_7:
|
case LPASS_CODEC_VERSION_2_7:
|
||||||
case LPASS_CODEC_VERSION_2_8:
|
case LPASS_CODEC_VERSION_2_8:
|
||||||
rx->rxn_reg_stride = 0xc0;
|
rx->rxn_reg_stride = 0xc0;
|
||||||
|
rx->rxn_reg_stride2 = 0x0;
|
||||||
def_count = ARRAY_SIZE(rx_defaults) + ARRAY_SIZE(rx_2_5_defaults);
|
def_count = ARRAY_SIZE(rx_defaults) + ARRAY_SIZE(rx_2_5_defaults);
|
||||||
reg_defaults = kmalloc_array(def_count, sizeof(struct reg_default), GFP_KERNEL);
|
reg_defaults = kmalloc_array(def_count, sizeof(struct reg_default), GFP_KERNEL);
|
||||||
if (!reg_defaults)
|
if (!reg_defaults)
|
||||||
|
@ -763,6 +763,7 @@ static int max98388_dai_tdm_slot(struct snd_soc_dai *dai,
|
|||||||
addr = MAX98388_R2044_PCM_TX_CTRL1 + (cnt / 8);
|
addr = MAX98388_R2044_PCM_TX_CTRL1 + (cnt / 8);
|
||||||
bits = cnt % 8;
|
bits = cnt % 8;
|
||||||
regmap_update_bits(max98388->regmap, addr, bits, bits);
|
regmap_update_bits(max98388->regmap, addr, bits, bits);
|
||||||
|
slot_found++;
|
||||||
if (slot_found >= MAX_NUM_CH)
|
if (slot_found >= MAX_NUM_CH)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// PCM3060 I2C driver
|
// PCM3060 I2C driver
|
||||||
//
|
//
|
||||||
// Copyright (C) 2018 Kirill Marinushkin <kmarinushkin@birdec.com>
|
// Copyright (C) 2018 Kirill Marinushkin <k.marinushkin@gmail.com>
|
||||||
|
|
||||||
#include <linux/i2c.h>
|
#include <linux/i2c.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
@ -55,5 +55,5 @@ static struct i2c_driver pcm3060_i2c_driver = {
|
|||||||
module_i2c_driver(pcm3060_i2c_driver);
|
module_i2c_driver(pcm3060_i2c_driver);
|
||||||
|
|
||||||
MODULE_DESCRIPTION("PCM3060 I2C driver");
|
MODULE_DESCRIPTION("PCM3060 I2C driver");
|
||||||
MODULE_AUTHOR("Kirill Marinushkin <kmarinushkin@birdec.com>");
|
MODULE_AUTHOR("Kirill Marinushkin <k.marinushkin@gmail.com>");
|
||||||
MODULE_LICENSE("GPL v2");
|
MODULE_LICENSE("GPL v2");
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// PCM3060 SPI driver
|
// PCM3060 SPI driver
|
||||||
//
|
//
|
||||||
// Copyright (C) 2018 Kirill Marinushkin <kmarinushkin@birdec.com>
|
// Copyright (C) 2018 Kirill Marinushkin <k.marinushkin@gmail.com>
|
||||||
|
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/spi/spi.h>
|
#include <linux/spi/spi.h>
|
||||||
@ -55,5 +55,5 @@ static struct spi_driver pcm3060_spi_driver = {
|
|||||||
module_spi_driver(pcm3060_spi_driver);
|
module_spi_driver(pcm3060_spi_driver);
|
||||||
|
|
||||||
MODULE_DESCRIPTION("PCM3060 SPI driver");
|
MODULE_DESCRIPTION("PCM3060 SPI driver");
|
||||||
MODULE_AUTHOR("Kirill Marinushkin <kmarinushkin@birdec.com>");
|
MODULE_AUTHOR("Kirill Marinushkin <k.marinushkin@gmail.com>");
|
||||||
MODULE_LICENSE("GPL v2");
|
MODULE_LICENSE("GPL v2");
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// PCM3060 codec driver
|
// PCM3060 codec driver
|
||||||
//
|
//
|
||||||
// Copyright (C) 2018 Kirill Marinushkin <kmarinushkin@birdec.com>
|
// Copyright (C) 2018 Kirill Marinushkin <k.marinushkin@gmail.com>
|
||||||
|
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <sound/pcm_params.h>
|
#include <sound/pcm_params.h>
|
||||||
@ -343,5 +343,5 @@ int pcm3060_probe(struct device *dev)
|
|||||||
EXPORT_SYMBOL(pcm3060_probe);
|
EXPORT_SYMBOL(pcm3060_probe);
|
||||||
|
|
||||||
MODULE_DESCRIPTION("PCM3060 codec driver");
|
MODULE_DESCRIPTION("PCM3060 codec driver");
|
||||||
MODULE_AUTHOR("Kirill Marinushkin <kmarinushkin@birdec.com>");
|
MODULE_AUTHOR("Kirill Marinushkin <k.marinushkin@gmail.com>");
|
||||||
MODULE_LICENSE("GPL v2");
|
MODULE_LICENSE("GPL v2");
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
/*
|
/*
|
||||||
* PCM3060 codec driver
|
* PCM3060 codec driver
|
||||||
*
|
*
|
||||||
* Copyright (C) 2018 Kirill Marinushkin <kmarinushkin@birdec.com>
|
* Copyright (C) 2018 Kirill Marinushkin <k.marinushkin@gmail.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _SND_SOC_PCM3060_H
|
#ifndef _SND_SOC_PCM3060_H
|
||||||
|
@ -2419,10 +2419,20 @@ static irqreturn_t rt5640_jd_gpio_irq(int irq, void *data)
|
|||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void rt5640_cancel_work(void *data)
|
static void rt5640_disable_irq_and_cancel_work(void *data)
|
||||||
{
|
{
|
||||||
struct rt5640_priv *rt5640 = data;
|
struct rt5640_priv *rt5640 = data;
|
||||||
|
|
||||||
|
if (rt5640->jd_gpio_irq_requested) {
|
||||||
|
free_irq(rt5640->jd_gpio_irq, rt5640);
|
||||||
|
rt5640->jd_gpio_irq_requested = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (rt5640->irq_requested) {
|
||||||
|
free_irq(rt5640->irq, rt5640);
|
||||||
|
rt5640->irq_requested = false;
|
||||||
|
}
|
||||||
|
|
||||||
cancel_delayed_work_sync(&rt5640->jack_work);
|
cancel_delayed_work_sync(&rt5640->jack_work);
|
||||||
cancel_delayed_work_sync(&rt5640->bp_work);
|
cancel_delayed_work_sync(&rt5640->bp_work);
|
||||||
}
|
}
|
||||||
@ -2463,13 +2473,7 @@ static void rt5640_disable_jack_detect(struct snd_soc_component *component)
|
|||||||
if (!rt5640->jack)
|
if (!rt5640->jack)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (rt5640->jd_gpio_irq_requested)
|
rt5640_disable_irq_and_cancel_work(rt5640);
|
||||||
free_irq(rt5640->jd_gpio_irq, rt5640);
|
|
||||||
|
|
||||||
if (rt5640->irq_requested)
|
|
||||||
free_irq(rt5640->irq, rt5640);
|
|
||||||
|
|
||||||
rt5640_cancel_work(rt5640);
|
|
||||||
|
|
||||||
if (rt5640->jack->status & SND_JACK_MICROPHONE) {
|
if (rt5640->jack->status & SND_JACK_MICROPHONE) {
|
||||||
rt5640_disable_micbias1_ovcd_irq(component);
|
rt5640_disable_micbias1_ovcd_irq(component);
|
||||||
@ -2477,8 +2481,6 @@ static void rt5640_disable_jack_detect(struct snd_soc_component *component)
|
|||||||
snd_soc_jack_report(rt5640->jack, 0, SND_JACK_BTN_0);
|
snd_soc_jack_report(rt5640->jack, 0, SND_JACK_BTN_0);
|
||||||
}
|
}
|
||||||
|
|
||||||
rt5640->jd_gpio_irq_requested = false;
|
|
||||||
rt5640->irq_requested = false;
|
|
||||||
rt5640->jd_gpio = NULL;
|
rt5640->jd_gpio = NULL;
|
||||||
rt5640->jack = NULL;
|
rt5640->jack = NULL;
|
||||||
}
|
}
|
||||||
@ -2798,7 +2800,8 @@ static int rt5640_suspend(struct snd_soc_component *component)
|
|||||||
if (rt5640->jack) {
|
if (rt5640->jack) {
|
||||||
/* disable jack interrupts during system suspend */
|
/* disable jack interrupts during system suspend */
|
||||||
disable_irq(rt5640->irq);
|
disable_irq(rt5640->irq);
|
||||||
rt5640_cancel_work(rt5640);
|
cancel_delayed_work_sync(&rt5640->jack_work);
|
||||||
|
cancel_delayed_work_sync(&rt5640->bp_work);
|
||||||
}
|
}
|
||||||
|
|
||||||
snd_soc_component_force_bias_level(component, SND_SOC_BIAS_OFF);
|
snd_soc_component_force_bias_level(component, SND_SOC_BIAS_OFF);
|
||||||
@ -3032,7 +3035,7 @@ static int rt5640_i2c_probe(struct i2c_client *i2c)
|
|||||||
INIT_DELAYED_WORK(&rt5640->jack_work, rt5640_jack_work);
|
INIT_DELAYED_WORK(&rt5640->jack_work, rt5640_jack_work);
|
||||||
|
|
||||||
/* Make sure work is stopped on probe-error / remove */
|
/* Make sure work is stopped on probe-error / remove */
|
||||||
ret = devm_add_action_or_reset(&i2c->dev, rt5640_cancel_work, rt5640);
|
ret = devm_add_action_or_reset(&i2c->dev, rt5640_disable_irq_and_cancel_work, rt5640);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
@ -253,7 +253,7 @@ static int rt722_sdca_read_prop(struct sdw_slave *slave)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* set the timeout values */
|
/* set the timeout values */
|
||||||
prop->clk_stop_timeout = 200;
|
prop->clk_stop_timeout = 900;
|
||||||
|
|
||||||
/* wake-up event */
|
/* wake-up event */
|
||||||
prop->wake_capable = 1;
|
prop->wake_capable = 1;
|
||||||
|
@ -715,12 +715,17 @@ static int wcd937x_codec_enable_aux_pa(struct snd_soc_dapm_widget *w,
|
|||||||
struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
|
struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
|
||||||
struct wcd937x_priv *wcd937x = snd_soc_component_get_drvdata(component);
|
struct wcd937x_priv *wcd937x = snd_soc_component_get_drvdata(component);
|
||||||
int hph_mode = wcd937x->hph_mode;
|
int hph_mode = wcd937x->hph_mode;
|
||||||
|
u8 val;
|
||||||
|
|
||||||
switch (event) {
|
switch (event) {
|
||||||
case SND_SOC_DAPM_PRE_PMU:
|
case SND_SOC_DAPM_PRE_PMU:
|
||||||
|
val = WCD937X_DIGITAL_PDM_WD_CTL2_EN |
|
||||||
|
WCD937X_DIGITAL_PDM_WD_CTL2_TIMEOUT_SEL |
|
||||||
|
WCD937X_DIGITAL_PDM_WD_CTL2_HOLD_OFF;
|
||||||
snd_soc_component_update_bits(component,
|
snd_soc_component_update_bits(component,
|
||||||
WCD937X_DIGITAL_PDM_WD_CTL2,
|
WCD937X_DIGITAL_PDM_WD_CTL2,
|
||||||
BIT(0), BIT(0));
|
WCD937X_DIGITAL_PDM_WD_CTL2_MASK,
|
||||||
|
val);
|
||||||
break;
|
break;
|
||||||
case SND_SOC_DAPM_POST_PMU:
|
case SND_SOC_DAPM_POST_PMU:
|
||||||
usleep_range(1000, 1010);
|
usleep_range(1000, 1010);
|
||||||
@ -741,7 +746,8 @@ static int wcd937x_codec_enable_aux_pa(struct snd_soc_dapm_widget *w,
|
|||||||
hph_mode);
|
hph_mode);
|
||||||
snd_soc_component_update_bits(component,
|
snd_soc_component_update_bits(component,
|
||||||
WCD937X_DIGITAL_PDM_WD_CTL2,
|
WCD937X_DIGITAL_PDM_WD_CTL2,
|
||||||
BIT(0), 0x00);
|
WCD937X_DIGITAL_PDM_WD_CTL2_MASK,
|
||||||
|
0x00);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2049,6 +2055,8 @@ static const struct snd_kcontrol_new wcd937x_snd_controls[] = {
|
|||||||
wcd937x_get_swr_port, wcd937x_set_swr_port),
|
wcd937x_get_swr_port, wcd937x_set_swr_port),
|
||||||
SOC_SINGLE_EXT("HPHR Switch", WCD937X_HPH_R, 0, 1, 0,
|
SOC_SINGLE_EXT("HPHR Switch", WCD937X_HPH_R, 0, 1, 0,
|
||||||
wcd937x_get_swr_port, wcd937x_set_swr_port),
|
wcd937x_get_swr_port, wcd937x_set_swr_port),
|
||||||
|
SOC_SINGLE_EXT("LO Switch", WCD937X_LO, 0, 1, 0,
|
||||||
|
wcd937x_get_swr_port, wcd937x_set_swr_port),
|
||||||
|
|
||||||
SOC_SINGLE_EXT("ADC1 Switch", WCD937X_ADC1, 1, 1, 0,
|
SOC_SINGLE_EXT("ADC1 Switch", WCD937X_ADC1, 1, 1, 0,
|
||||||
wcd937x_get_swr_port, wcd937x_set_swr_port),
|
wcd937x_get_swr_port, wcd937x_set_swr_port),
|
||||||
|
@ -391,6 +391,10 @@
|
|||||||
#define WCD937X_DIGITAL_PDM_WD_CTL0 0x3465
|
#define WCD937X_DIGITAL_PDM_WD_CTL0 0x3465
|
||||||
#define WCD937X_DIGITAL_PDM_WD_CTL1 0x3466
|
#define WCD937X_DIGITAL_PDM_WD_CTL1 0x3466
|
||||||
#define WCD937X_DIGITAL_PDM_WD_CTL2 0x3467
|
#define WCD937X_DIGITAL_PDM_WD_CTL2 0x3467
|
||||||
|
#define WCD937X_DIGITAL_PDM_WD_CTL2_HOLD_OFF BIT(2)
|
||||||
|
#define WCD937X_DIGITAL_PDM_WD_CTL2_TIMEOUT_SEL BIT(1)
|
||||||
|
#define WCD937X_DIGITAL_PDM_WD_CTL2_EN BIT(0)
|
||||||
|
#define WCD937X_DIGITAL_PDM_WD_CTL2_MASK GENMASK(2, 0)
|
||||||
#define WCD937X_DIGITAL_INTR_MODE 0x346A
|
#define WCD937X_DIGITAL_INTR_MODE 0x346A
|
||||||
#define WCD937X_DIGITAL_INTR_MASK_0 0x346B
|
#define WCD937X_DIGITAL_INTR_MASK_0 0x346B
|
||||||
#define WCD937X_DIGITAL_INTR_MASK_1 0x346C
|
#define WCD937X_DIGITAL_INTR_MASK_1 0x346C
|
||||||
|
@ -119,10 +119,10 @@ static irqreturn_t esai_isr(int irq, void *devid)
|
|||||||
dev_dbg(&pdev->dev, "isr: Transmission Initialized\n");
|
dev_dbg(&pdev->dev, "isr: Transmission Initialized\n");
|
||||||
|
|
||||||
if (esr & ESAI_ESR_RFF_MASK)
|
if (esr & ESAI_ESR_RFF_MASK)
|
||||||
dev_warn(&pdev->dev, "isr: Receiving overrun\n");
|
dev_dbg(&pdev->dev, "isr: Receiving overrun\n");
|
||||||
|
|
||||||
if (esr & ESAI_ESR_TFE_MASK)
|
if (esr & ESAI_ESR_TFE_MASK)
|
||||||
dev_warn(&pdev->dev, "isr: Transmission underrun\n");
|
dev_dbg(&pdev->dev, "isr: Transmission underrun\n");
|
||||||
|
|
||||||
if (esr & ESAI_ESR_TLS_MASK)
|
if (esr & ESAI_ESR_TLS_MASK)
|
||||||
dev_dbg(&pdev->dev, "isr: Just transmitted the last slot\n");
|
dev_dbg(&pdev->dev, "isr: Just transmitted the last slot\n");
|
||||||
|
@ -28,6 +28,13 @@
|
|||||||
|
|
||||||
#define MICFIL_OSR_DEFAULT 16
|
#define MICFIL_OSR_DEFAULT 16
|
||||||
|
|
||||||
|
#define MICFIL_NUM_RATES 7
|
||||||
|
#define MICFIL_CLK_SRC_NUM 3
|
||||||
|
/* clock source ids */
|
||||||
|
#define MICFIL_AUDIO_PLL1 0
|
||||||
|
#define MICFIL_AUDIO_PLL2 1
|
||||||
|
#define MICFIL_CLK_EXT3 2
|
||||||
|
|
||||||
enum quality {
|
enum quality {
|
||||||
QUALITY_HIGH,
|
QUALITY_HIGH,
|
||||||
QUALITY_MEDIUM,
|
QUALITY_MEDIUM,
|
||||||
@ -45,9 +52,12 @@ struct fsl_micfil {
|
|||||||
struct clk *mclk;
|
struct clk *mclk;
|
||||||
struct clk *pll8k_clk;
|
struct clk *pll8k_clk;
|
||||||
struct clk *pll11k_clk;
|
struct clk *pll11k_clk;
|
||||||
|
struct clk *clk_src[MICFIL_CLK_SRC_NUM];
|
||||||
struct snd_dmaengine_dai_dma_data dma_params_rx;
|
struct snd_dmaengine_dai_dma_data dma_params_rx;
|
||||||
struct sdma_peripheral_config sdmacfg;
|
struct sdma_peripheral_config sdmacfg;
|
||||||
struct snd_soc_card *card;
|
struct snd_soc_card *card;
|
||||||
|
struct snd_pcm_hw_constraint_list constraint_rates;
|
||||||
|
unsigned int constraint_rates_list[MICFIL_NUM_RATES];
|
||||||
unsigned int dataline;
|
unsigned int dataline;
|
||||||
char name[32];
|
char name[32];
|
||||||
int irq[MICFIL_IRQ_LINES];
|
int irq[MICFIL_IRQ_LINES];
|
||||||
@ -67,6 +77,7 @@ struct fsl_micfil_soc_data {
|
|||||||
bool imx;
|
bool imx;
|
||||||
bool use_edma;
|
bool use_edma;
|
||||||
bool use_verid;
|
bool use_verid;
|
||||||
|
bool volume_sx;
|
||||||
u64 formats;
|
u64 formats;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -76,6 +87,7 @@ static struct fsl_micfil_soc_data fsl_micfil_imx8mm = {
|
|||||||
.fifo_depth = 8,
|
.fifo_depth = 8,
|
||||||
.dataline = 0xf,
|
.dataline = 0xf,
|
||||||
.formats = SNDRV_PCM_FMTBIT_S16_LE,
|
.formats = SNDRV_PCM_FMTBIT_S16_LE,
|
||||||
|
.volume_sx = true,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct fsl_micfil_soc_data fsl_micfil_imx8mp = {
|
static struct fsl_micfil_soc_data fsl_micfil_imx8mp = {
|
||||||
@ -84,6 +96,7 @@ static struct fsl_micfil_soc_data fsl_micfil_imx8mp = {
|
|||||||
.fifo_depth = 32,
|
.fifo_depth = 32,
|
||||||
.dataline = 0xf,
|
.dataline = 0xf,
|
||||||
.formats = SNDRV_PCM_FMTBIT_S32_LE,
|
.formats = SNDRV_PCM_FMTBIT_S32_LE,
|
||||||
|
.volume_sx = false,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct fsl_micfil_soc_data fsl_micfil_imx93 = {
|
static struct fsl_micfil_soc_data fsl_micfil_imx93 = {
|
||||||
@ -94,6 +107,7 @@ static struct fsl_micfil_soc_data fsl_micfil_imx93 = {
|
|||||||
.formats = SNDRV_PCM_FMTBIT_S32_LE,
|
.formats = SNDRV_PCM_FMTBIT_S32_LE,
|
||||||
.use_edma = true,
|
.use_edma = true,
|
||||||
.use_verid = true,
|
.use_verid = true,
|
||||||
|
.volume_sx = false,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct of_device_id fsl_micfil_dt_ids[] = {
|
static const struct of_device_id fsl_micfil_dt_ids[] = {
|
||||||
@ -317,7 +331,26 @@ static int hwvad_detected(struct snd_kcontrol *kcontrol,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct snd_kcontrol_new fsl_micfil_snd_controls[] = {
|
static const struct snd_kcontrol_new fsl_micfil_volume_controls[] = {
|
||||||
|
SOC_SINGLE_TLV("CH0 Volume", REG_MICFIL_OUT_CTRL,
|
||||||
|
MICFIL_OUTGAIN_CHX_SHIFT(0), 0xF, 0, gain_tlv),
|
||||||
|
SOC_SINGLE_TLV("CH1 Volume", REG_MICFIL_OUT_CTRL,
|
||||||
|
MICFIL_OUTGAIN_CHX_SHIFT(1), 0xF, 0, gain_tlv),
|
||||||
|
SOC_SINGLE_TLV("CH2 Volume", REG_MICFIL_OUT_CTRL,
|
||||||
|
MICFIL_OUTGAIN_CHX_SHIFT(2), 0xF, 0, gain_tlv),
|
||||||
|
SOC_SINGLE_TLV("CH3 Volume", REG_MICFIL_OUT_CTRL,
|
||||||
|
MICFIL_OUTGAIN_CHX_SHIFT(3), 0xF, 0, gain_tlv),
|
||||||
|
SOC_SINGLE_TLV("CH4 Volume", REG_MICFIL_OUT_CTRL,
|
||||||
|
MICFIL_OUTGAIN_CHX_SHIFT(4), 0xF, 0, gain_tlv),
|
||||||
|
SOC_SINGLE_TLV("CH5 Volume", REG_MICFIL_OUT_CTRL,
|
||||||
|
MICFIL_OUTGAIN_CHX_SHIFT(5), 0xF, 0, gain_tlv),
|
||||||
|
SOC_SINGLE_TLV("CH6 Volume", REG_MICFIL_OUT_CTRL,
|
||||||
|
MICFIL_OUTGAIN_CHX_SHIFT(6), 0xF, 0, gain_tlv),
|
||||||
|
SOC_SINGLE_TLV("CH7 Volume", REG_MICFIL_OUT_CTRL,
|
||||||
|
MICFIL_OUTGAIN_CHX_SHIFT(7), 0xF, 0, gain_tlv),
|
||||||
|
};
|
||||||
|
|
||||||
|
static const struct snd_kcontrol_new fsl_micfil_volume_sx_controls[] = {
|
||||||
SOC_SINGLE_SX_TLV("CH0 Volume", REG_MICFIL_OUT_CTRL,
|
SOC_SINGLE_SX_TLV("CH0 Volume", REG_MICFIL_OUT_CTRL,
|
||||||
MICFIL_OUTGAIN_CHX_SHIFT(0), 0x8, 0xF, gain_tlv),
|
MICFIL_OUTGAIN_CHX_SHIFT(0), 0x8, 0xF, gain_tlv),
|
||||||
SOC_SINGLE_SX_TLV("CH1 Volume", REG_MICFIL_OUT_CTRL,
|
SOC_SINGLE_SX_TLV("CH1 Volume", REG_MICFIL_OUT_CTRL,
|
||||||
@ -334,6 +367,9 @@ static const struct snd_kcontrol_new fsl_micfil_snd_controls[] = {
|
|||||||
MICFIL_OUTGAIN_CHX_SHIFT(6), 0x8, 0xF, gain_tlv),
|
MICFIL_OUTGAIN_CHX_SHIFT(6), 0x8, 0xF, gain_tlv),
|
||||||
SOC_SINGLE_SX_TLV("CH7 Volume", REG_MICFIL_OUT_CTRL,
|
SOC_SINGLE_SX_TLV("CH7 Volume", REG_MICFIL_OUT_CTRL,
|
||||||
MICFIL_OUTGAIN_CHX_SHIFT(7), 0x8, 0xF, gain_tlv),
|
MICFIL_OUTGAIN_CHX_SHIFT(7), 0x8, 0xF, gain_tlv),
|
||||||
|
};
|
||||||
|
|
||||||
|
static const struct snd_kcontrol_new fsl_micfil_snd_controls[] = {
|
||||||
SOC_ENUM_EXT("MICFIL Quality Select",
|
SOC_ENUM_EXT("MICFIL Quality Select",
|
||||||
fsl_micfil_quality_enum,
|
fsl_micfil_quality_enum,
|
||||||
micfil_quality_get, micfil_quality_set),
|
micfil_quality_get, micfil_quality_set),
|
||||||
@ -449,12 +485,34 @@ static int fsl_micfil_startup(struct snd_pcm_substream *substream,
|
|||||||
struct snd_soc_dai *dai)
|
struct snd_soc_dai *dai)
|
||||||
{
|
{
|
||||||
struct fsl_micfil *micfil = snd_soc_dai_get_drvdata(dai);
|
struct fsl_micfil *micfil = snd_soc_dai_get_drvdata(dai);
|
||||||
|
unsigned int rates[MICFIL_NUM_RATES] = {8000, 11025, 16000, 22050, 32000, 44100, 48000};
|
||||||
|
int i, j, k = 0;
|
||||||
|
u64 clk_rate;
|
||||||
|
|
||||||
if (!micfil) {
|
if (!micfil) {
|
||||||
dev_err(dai->dev, "micfil dai priv_data not set\n");
|
dev_err(dai->dev, "micfil dai priv_data not set\n");
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
micfil->constraint_rates.list = micfil->constraint_rates_list;
|
||||||
|
micfil->constraint_rates.count = 0;
|
||||||
|
|
||||||
|
for (j = 0; j < MICFIL_NUM_RATES; j++) {
|
||||||
|
for (i = 0; i < MICFIL_CLK_SRC_NUM; i++) {
|
||||||
|
clk_rate = clk_get_rate(micfil->clk_src[i]);
|
||||||
|
if (clk_rate != 0 && do_div(clk_rate, rates[j]) == 0) {
|
||||||
|
micfil->constraint_rates_list[k++] = rates[j];
|
||||||
|
micfil->constraint_rates.count++;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (micfil->constraint_rates.count > 0)
|
||||||
|
snd_pcm_hw_constraint_list(substream->runtime, 0,
|
||||||
|
SNDRV_PCM_HW_PARAM_RATE,
|
||||||
|
&micfil->constraint_rates);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -801,6 +859,20 @@ static int fsl_micfil_dai_probe(struct snd_soc_dai *cpu_dai)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int fsl_micfil_component_probe(struct snd_soc_component *component)
|
||||||
|
{
|
||||||
|
struct fsl_micfil *micfil = snd_soc_component_get_drvdata(component);
|
||||||
|
|
||||||
|
if (micfil->soc->volume_sx)
|
||||||
|
snd_soc_add_component_controls(component, fsl_micfil_volume_sx_controls,
|
||||||
|
ARRAY_SIZE(fsl_micfil_volume_sx_controls));
|
||||||
|
else
|
||||||
|
snd_soc_add_component_controls(component, fsl_micfil_volume_controls,
|
||||||
|
ARRAY_SIZE(fsl_micfil_volume_controls));
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static const struct snd_soc_dai_ops fsl_micfil_dai_ops = {
|
static const struct snd_soc_dai_ops fsl_micfil_dai_ops = {
|
||||||
.probe = fsl_micfil_dai_probe,
|
.probe = fsl_micfil_dai_probe,
|
||||||
.startup = fsl_micfil_startup,
|
.startup = fsl_micfil_startup,
|
||||||
@ -821,6 +893,7 @@ static struct snd_soc_dai_driver fsl_micfil_dai = {
|
|||||||
|
|
||||||
static const struct snd_soc_component_driver fsl_micfil_component = {
|
static const struct snd_soc_component_driver fsl_micfil_component = {
|
||||||
.name = "fsl-micfil-dai",
|
.name = "fsl-micfil-dai",
|
||||||
|
.probe = fsl_micfil_component_probe,
|
||||||
.controls = fsl_micfil_snd_controls,
|
.controls = fsl_micfil_snd_controls,
|
||||||
.num_controls = ARRAY_SIZE(fsl_micfil_snd_controls),
|
.num_controls = ARRAY_SIZE(fsl_micfil_snd_controls),
|
||||||
.legacy_dai_naming = 1,
|
.legacy_dai_naming = 1,
|
||||||
@ -1134,6 +1207,12 @@ static int fsl_micfil_probe(struct platform_device *pdev)
|
|||||||
fsl_asoc_get_pll_clocks(&pdev->dev, &micfil->pll8k_clk,
|
fsl_asoc_get_pll_clocks(&pdev->dev, &micfil->pll8k_clk,
|
||||||
&micfil->pll11k_clk);
|
&micfil->pll11k_clk);
|
||||||
|
|
||||||
|
micfil->clk_src[MICFIL_AUDIO_PLL1] = micfil->pll8k_clk;
|
||||||
|
micfil->clk_src[MICFIL_AUDIO_PLL2] = micfil->pll11k_clk;
|
||||||
|
micfil->clk_src[MICFIL_CLK_EXT3] = devm_clk_get(&pdev->dev, "clkext3");
|
||||||
|
if (IS_ERR(micfil->clk_src[MICFIL_CLK_EXT3]))
|
||||||
|
micfil->clk_src[MICFIL_CLK_EXT3] = NULL;
|
||||||
|
|
||||||
/* init regmap */
|
/* init regmap */
|
||||||
regs = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
|
regs = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
|
||||||
if (IS_ERR(regs))
|
if (IS_ERR(regs))
|
||||||
|
@ -125,6 +125,28 @@ static const struct sst_res_info bytcr_res_info = {
|
|||||||
.acpi_ipc_irq_index = 0
|
.acpi_ipc_irq_index = 0
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* For "LPE0F28" ACPI device found on some Android factory OS models */
|
||||||
|
static const struct sst_res_info lpe8086_res_info = {
|
||||||
|
.shim_offset = 0x140000,
|
||||||
|
.shim_size = 0x000100,
|
||||||
|
.shim_phy_addr = SST_BYT_SHIM_PHY_ADDR,
|
||||||
|
.ssp0_offset = 0xa0000,
|
||||||
|
.ssp0_size = 0x1000,
|
||||||
|
.dma0_offset = 0x98000,
|
||||||
|
.dma0_size = 0x4000,
|
||||||
|
.dma1_offset = 0x9c000,
|
||||||
|
.dma1_size = 0x4000,
|
||||||
|
.iram_offset = 0x0c0000,
|
||||||
|
.iram_size = 0x14000,
|
||||||
|
.dram_offset = 0x100000,
|
||||||
|
.dram_size = 0x28000,
|
||||||
|
.mbox_offset = 0x144000,
|
||||||
|
.mbox_size = 0x1000,
|
||||||
|
.acpi_lpe_res_index = 1,
|
||||||
|
.acpi_ddr_index = 0,
|
||||||
|
.acpi_ipc_irq_index = 0
|
||||||
|
};
|
||||||
|
|
||||||
static struct sst_platform_info byt_rvp_platform_data = {
|
static struct sst_platform_info byt_rvp_platform_data = {
|
||||||
.probe_data = &byt_fwparse_info,
|
.probe_data = &byt_fwparse_info,
|
||||||
.ipc_info = &byt_ipc_info,
|
.ipc_info = &byt_ipc_info,
|
||||||
@ -268,10 +290,38 @@ static int sst_acpi_probe(struct platform_device *pdev)
|
|||||||
mach->pdata = &chv_platform_data;
|
mach->pdata = &chv_platform_data;
|
||||||
pdata = mach->pdata;
|
pdata = mach->pdata;
|
||||||
|
|
||||||
ret = kstrtouint(id->id, 16, &dev_id);
|
if (!strcmp(id->id, "LPE0F28")) {
|
||||||
if (ret < 0) {
|
struct resource *rsrc;
|
||||||
dev_err(dev, "Unique device id conversion error: %d\n", ret);
|
|
||||||
return ret;
|
/* Use regular BYT SST PCI VID:PID */
|
||||||
|
dev_id = 0x80860F28;
|
||||||
|
byt_rvp_platform_data.res_info = &lpe8086_res_info;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The "LPE0F28" ACPI device has separate IO-mem resources for:
|
||||||
|
* DDR, SHIM, MBOX, IRAM, DRAM, CFG
|
||||||
|
* None of which covers the entire LPE base address range.
|
||||||
|
* lpe8086_res_info.acpi_lpe_res_index points to the SHIM.
|
||||||
|
* Patch this to cover the entire base address range as expected
|
||||||
|
* by sst_platform_get_resources().
|
||||||
|
*/
|
||||||
|
rsrc = platform_get_resource(pdev, IORESOURCE_MEM,
|
||||||
|
pdata->res_info->acpi_lpe_res_index);
|
||||||
|
if (!rsrc) {
|
||||||
|
dev_err(dev, "Invalid SHIM base\n");
|
||||||
|
return -EIO;
|
||||||
|
}
|
||||||
|
rsrc->start -= pdata->res_info->shim_offset;
|
||||||
|
rsrc->end = rsrc->start + 0x200000 - 1;
|
||||||
|
} else {
|
||||||
|
ret = kstrtouint(id->id, 16, &dev_id);
|
||||||
|
if (ret < 0) {
|
||||||
|
dev_err(dev, "Unique device id conversion error: %d\n", ret);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (soc_intel_is_byt_cr(pdev))
|
||||||
|
byt_rvp_platform_data.res_info = &bytcr_res_info;
|
||||||
}
|
}
|
||||||
|
|
||||||
dev_dbg(dev, "ACPI device id: %x\n", dev_id);
|
dev_dbg(dev, "ACPI device id: %x\n", dev_id);
|
||||||
@ -280,11 +330,6 @@ static int sst_acpi_probe(struct platform_device *pdev)
|
|||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
if (soc_intel_is_byt_cr(pdev)) {
|
|
||||||
/* override resource info */
|
|
||||||
byt_rvp_platform_data.res_info = &bytcr_res_info;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* update machine parameters */
|
/* update machine parameters */
|
||||||
mach->mach_params.acpi_ipc_irq_index =
|
mach->mach_params.acpi_ipc_irq_index =
|
||||||
pdata->res_info->acpi_ipc_irq_index;
|
pdata->res_info->acpi_ipc_irq_index;
|
||||||
@ -344,6 +389,7 @@ static void sst_acpi_remove(struct platform_device *pdev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static const struct acpi_device_id sst_acpi_ids[] = {
|
static const struct acpi_device_id sst_acpi_ids[] = {
|
||||||
|
{ "LPE0F28", (unsigned long)&snd_soc_acpi_intel_baytrail_machines},
|
||||||
{ "80860F28", (unsigned long)&snd_soc_acpi_intel_baytrail_machines},
|
{ "80860F28", (unsigned long)&snd_soc_acpi_intel_baytrail_machines},
|
||||||
{ "808622A8", (unsigned long)&snd_soc_acpi_intel_cherrytrail_machines},
|
{ "808622A8", (unsigned long)&snd_soc_acpi_intel_cherrytrail_machines},
|
||||||
{ },
|
{ },
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
#include "avs.h"
|
#include "avs.h"
|
||||||
#include "cldma.h"
|
#include "cldma.h"
|
||||||
#include "messages.h"
|
#include "messages.h"
|
||||||
|
#include "pcm.h"
|
||||||
|
|
||||||
static u32 pgctl_mask = AZX_PGCTL_LSRMD_MASK;
|
static u32 pgctl_mask = AZX_PGCTL_LSRMD_MASK;
|
||||||
module_param(pgctl_mask, uint, 0444);
|
module_param(pgctl_mask, uint, 0444);
|
||||||
@ -247,7 +248,7 @@ static void hdac_stream_update_pos(struct hdac_stream *stream, u64 buffer_size)
|
|||||||
static void hdac_update_stream(struct hdac_bus *bus, struct hdac_stream *stream)
|
static void hdac_update_stream(struct hdac_bus *bus, struct hdac_stream *stream)
|
||||||
{
|
{
|
||||||
if (stream->substream) {
|
if (stream->substream) {
|
||||||
snd_pcm_period_elapsed(stream->substream);
|
avs_period_elapsed(stream->substream);
|
||||||
} else if (stream->cstream) {
|
} else if (stream->cstream) {
|
||||||
u64 buffer_size = stream->cstream->runtime->buffer_size;
|
u64 buffer_size = stream->cstream->runtime->buffer_size;
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
#include <sound/soc-component.h>
|
#include <sound/soc-component.h>
|
||||||
#include "avs.h"
|
#include "avs.h"
|
||||||
#include "path.h"
|
#include "path.h"
|
||||||
|
#include "pcm.h"
|
||||||
#include "topology.h"
|
#include "topology.h"
|
||||||
#include "../../codecs/hda.h"
|
#include "../../codecs/hda.h"
|
||||||
|
|
||||||
@ -30,6 +31,7 @@ struct avs_dma_data {
|
|||||||
struct hdac_ext_stream *host_stream;
|
struct hdac_ext_stream *host_stream;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct work_struct period_elapsed_work;
|
||||||
struct snd_pcm_substream *substream;
|
struct snd_pcm_substream *substream;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -56,6 +58,22 @@ avs_dai_find_path_template(struct snd_soc_dai *dai, bool is_fe, int direction)
|
|||||||
return dw->priv;
|
return dw->priv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void avs_period_elapsed_work(struct work_struct *work)
|
||||||
|
{
|
||||||
|
struct avs_dma_data *data = container_of(work, struct avs_dma_data, period_elapsed_work);
|
||||||
|
|
||||||
|
snd_pcm_period_elapsed(data->substream);
|
||||||
|
}
|
||||||
|
|
||||||
|
void avs_period_elapsed(struct snd_pcm_substream *substream)
|
||||||
|
{
|
||||||
|
struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
|
||||||
|
struct snd_soc_dai *dai = snd_soc_rtd_to_cpu(rtd, 0);
|
||||||
|
struct avs_dma_data *data = snd_soc_dai_get_dma_data(dai, substream);
|
||||||
|
|
||||||
|
schedule_work(&data->period_elapsed_work);
|
||||||
|
}
|
||||||
|
|
||||||
static int avs_dai_startup(struct snd_pcm_substream *substream, struct snd_soc_dai *dai)
|
static int avs_dai_startup(struct snd_pcm_substream *substream, struct snd_soc_dai *dai)
|
||||||
{
|
{
|
||||||
struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
|
struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
|
||||||
@ -77,6 +95,7 @@ static int avs_dai_startup(struct snd_pcm_substream *substream, struct snd_soc_d
|
|||||||
data->substream = substream;
|
data->substream = substream;
|
||||||
data->template = template;
|
data->template = template;
|
||||||
data->adev = adev;
|
data->adev = adev;
|
||||||
|
INIT_WORK(&data->period_elapsed_work, avs_period_elapsed_work);
|
||||||
snd_soc_dai_set_dma_data(dai, substream, data);
|
snd_soc_dai_set_dma_data(dai, substream, data);
|
||||||
|
|
||||||
if (rtd->dai_link->ignore_suspend)
|
if (rtd->dai_link->ignore_suspend)
|
||||||
|
16
sound/soc/intel/avs/pcm.h
Normal file
16
sound/soc/intel/avs/pcm.h
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
|
/*
|
||||||
|
* Copyright(c) 2024 Intel Corporation
|
||||||
|
*
|
||||||
|
* Authors: Cezary Rojewski <cezary.rojewski@intel.com>
|
||||||
|
* Amadeusz Slawinski <amadeuszx.slawinski@linux.intel.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __SOUND_SOC_INTEL_AVS_PCM_H
|
||||||
|
#define __SOUND_SOC_INTEL_AVS_PCM_H
|
||||||
|
|
||||||
|
#include <sound/pcm.h>
|
||||||
|
|
||||||
|
void avs_period_elapsed(struct snd_pcm_substream *substream);
|
||||||
|
|
||||||
|
#endif
|
@ -17,6 +17,7 @@
|
|||||||
#include <linux/acpi.h>
|
#include <linux/acpi.h>
|
||||||
#include <linux/clk.h>
|
#include <linux/clk.h>
|
||||||
#include <linux/device.h>
|
#include <linux/device.h>
|
||||||
|
#include <linux/device/bus.h>
|
||||||
#include <linux/dmi.h>
|
#include <linux/dmi.h>
|
||||||
#include <linux/gpio/consumer.h>
|
#include <linux/gpio/consumer.h>
|
||||||
#include <linux/gpio/machine.h>
|
#include <linux/gpio/machine.h>
|
||||||
@ -32,6 +33,8 @@
|
|||||||
#include "../atom/sst-atom-controls.h"
|
#include "../atom/sst-atom-controls.h"
|
||||||
#include "../common/soc-intel-quirks.h"
|
#include "../common/soc-intel-quirks.h"
|
||||||
|
|
||||||
|
#define BYT_RT5640_FALLBACK_CODEC_DEV_NAME "i2c-rt5640"
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
BYT_RT5640_DMIC1_MAP,
|
BYT_RT5640_DMIC1_MAP,
|
||||||
BYT_RT5640_DMIC2_MAP,
|
BYT_RT5640_DMIC2_MAP,
|
||||||
@ -1129,6 +1132,21 @@ static const struct dmi_system_id byt_rt5640_quirk_table[] = {
|
|||||||
BYT_RT5640_SSP0_AIF2 |
|
BYT_RT5640_SSP0_AIF2 |
|
||||||
BYT_RT5640_MCLK_EN),
|
BYT_RT5640_MCLK_EN),
|
||||||
},
|
},
|
||||||
|
{ /* Vexia Edu Atla 10 tablet */
|
||||||
|
.matches = {
|
||||||
|
DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
|
||||||
|
DMI_MATCH(DMI_BOARD_NAME, "Aptio CRB"),
|
||||||
|
/* Above strings are too generic, also match on BIOS date */
|
||||||
|
DMI_MATCH(DMI_BIOS_DATE, "08/25/2014"),
|
||||||
|
},
|
||||||
|
.driver_data = (void *)(BYT_RT5640_IN1_MAP |
|
||||||
|
BYT_RT5640_JD_SRC_JD2_IN4N |
|
||||||
|
BYT_RT5640_OVCD_TH_2000UA |
|
||||||
|
BYT_RT5640_OVCD_SF_0P75 |
|
||||||
|
BYT_RT5640_DIFF_MIC |
|
||||||
|
BYT_RT5640_SSP0_AIF2 |
|
||||||
|
BYT_RT5640_MCLK_EN),
|
||||||
|
},
|
||||||
{ /* Voyo Winpad A15 */
|
{ /* Voyo Winpad A15 */
|
||||||
.matches = {
|
.matches = {
|
||||||
DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
|
DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
|
||||||
@ -1698,9 +1716,33 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
codec_dev = acpi_get_first_physical_node(adev);
|
codec_dev = acpi_get_first_physical_node(adev);
|
||||||
acpi_dev_put(adev);
|
acpi_dev_put(adev);
|
||||||
if (!codec_dev)
|
|
||||||
return -EPROBE_DEFER;
|
if (codec_dev) {
|
||||||
priv->codec_dev = get_device(codec_dev);
|
priv->codec_dev = get_device(codec_dev);
|
||||||
|
} else {
|
||||||
|
/*
|
||||||
|
* Special case for Android tablets where the codec i2c_client
|
||||||
|
* has been manually instantiated by x86_android_tablets.ko due
|
||||||
|
* to a broken DSDT.
|
||||||
|
*/
|
||||||
|
codec_dev = bus_find_device_by_name(&i2c_bus_type, NULL,
|
||||||
|
BYT_RT5640_FALLBACK_CODEC_DEV_NAME);
|
||||||
|
if (!codec_dev)
|
||||||
|
return -EPROBE_DEFER;
|
||||||
|
|
||||||
|
if (!i2c_verify_client(codec_dev)) {
|
||||||
|
dev_err(dev, "Error '%s' is not an i2c_client\n",
|
||||||
|
BYT_RT5640_FALLBACK_CODEC_DEV_NAME);
|
||||||
|
put_device(codec_dev);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* fixup codec name */
|
||||||
|
strscpy(byt_rt5640_codec_name, BYT_RT5640_FALLBACK_CODEC_DEV_NAME,
|
||||||
|
sizeof(byt_rt5640_codec_name));
|
||||||
|
|
||||||
|
/* bus_find_device() returns a reference no need to get() */
|
||||||
|
priv->codec_dev = codec_dev;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* swap SSP0 if bytcr is detected
|
* swap SSP0 if bytcr is detected
|
||||||
|
@ -225,6 +225,15 @@ static const struct snd_soc_acpi_adr_device rt1316_3_group1_adr[] = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const struct snd_soc_acpi_adr_device rt1318_1_adr[] = {
|
||||||
|
{
|
||||||
|
.adr = 0x000133025D131801ull,
|
||||||
|
.num_endpoints = 1,
|
||||||
|
.endpoints = &single_endpoint,
|
||||||
|
.name_prefix = "rt1318-1"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
static const struct snd_soc_acpi_adr_device rt1318_1_group1_adr[] = {
|
static const struct snd_soc_acpi_adr_device rt1318_1_group1_adr[] = {
|
||||||
{
|
{
|
||||||
.adr = 0x000130025D131801ull,
|
.adr = 0x000130025D131801ull,
|
||||||
@ -243,6 +252,15 @@ static const struct snd_soc_acpi_adr_device rt1318_2_group1_adr[] = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const struct snd_soc_acpi_adr_device rt713_0_adr[] = {
|
||||||
|
{
|
||||||
|
.adr = 0x000031025D071301ull,
|
||||||
|
.num_endpoints = 1,
|
||||||
|
.endpoints = &single_endpoint,
|
||||||
|
.name_prefix = "rt713"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
static const struct snd_soc_acpi_adr_device rt714_0_adr[] = {
|
static const struct snd_soc_acpi_adr_device rt714_0_adr[] = {
|
||||||
{
|
{
|
||||||
.adr = 0x000030025D071401ull,
|
.adr = 0x000030025D071401ull,
|
||||||
@ -378,6 +396,20 @@ static const struct snd_soc_acpi_link_adr lnl_sdw_rt1318_l12_rt714_l0[] = {
|
|||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const struct snd_soc_acpi_link_adr lnl_sdw_rt713_l0_rt1318_l1[] = {
|
||||||
|
{
|
||||||
|
.mask = BIT(0),
|
||||||
|
.num_adr = ARRAY_SIZE(rt713_0_adr),
|
||||||
|
.adr_d = rt713_0_adr,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.mask = BIT(1),
|
||||||
|
.num_adr = ARRAY_SIZE(rt1318_1_adr),
|
||||||
|
.adr_d = rt1318_1_adr,
|
||||||
|
},
|
||||||
|
{}
|
||||||
|
};
|
||||||
|
|
||||||
/* this table is used when there is no I2S codec present */
|
/* this table is used when there is no I2S codec present */
|
||||||
struct snd_soc_acpi_mach snd_soc_acpi_intel_lnl_sdw_machines[] = {
|
struct snd_soc_acpi_mach snd_soc_acpi_intel_lnl_sdw_machines[] = {
|
||||||
/* mockup tests need to be first */
|
/* mockup tests need to be first */
|
||||||
@ -447,6 +479,12 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_lnl_sdw_machines[] = {
|
|||||||
.drv_name = "sof_sdw",
|
.drv_name = "sof_sdw",
|
||||||
.sof_tplg_filename = "sof-lnl-rt1318-l12-rt714-l0.tplg"
|
.sof_tplg_filename = "sof-lnl-rt1318-l12-rt714-l0.tplg"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.link_mask = BIT(0) | BIT(1),
|
||||||
|
.links = lnl_sdw_rt713_l0_rt1318_l1,
|
||||||
|
.drv_name = "sof_sdw",
|
||||||
|
.sof_tplg_filename = "sof-lnl-rt713-l0-rt1318-l1.tplg"
|
||||||
|
},
|
||||||
{},
|
{},
|
||||||
};
|
};
|
||||||
EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_lnl_sdw_machines);
|
EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_lnl_sdw_machines);
|
||||||
|
@ -144,6 +144,7 @@ static int loongson_card_parse_of(struct loongson_card_data *data)
|
|||||||
dev_err(dev, "getting cpu dlc error (%d)\n", ret);
|
dev_err(dev, "getting cpu dlc error (%d)\n", ret);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
loongson_dai_links[i].platforms->of_node = loongson_dai_links[i].cpus->of_node;
|
||||||
|
|
||||||
ret = snd_soc_of_get_dlc(codec, NULL, loongson_dai_links[i].codecs, 0);
|
ret = snd_soc_of_get_dlc(codec, NULL, loongson_dai_links[i].codecs, 0);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
|
@ -157,6 +157,7 @@ config SND_SOC_SDM845
|
|||||||
depends on COMMON_CLK
|
depends on COMMON_CLK
|
||||||
select SND_SOC_QDSP6
|
select SND_SOC_QDSP6
|
||||||
select SND_SOC_QCOM_COMMON
|
select SND_SOC_QCOM_COMMON
|
||||||
|
select SND_SOC_QCOM_SDW
|
||||||
select SND_SOC_RT5663
|
select SND_SOC_RT5663
|
||||||
select SND_SOC_MAX98927
|
select SND_SOC_MAX98927
|
||||||
imply SND_SOC_CROS_EC_CODEC
|
imply SND_SOC_CROS_EC_CODEC
|
||||||
@ -208,6 +209,7 @@ config SND_SOC_SC7280
|
|||||||
tristate "SoC Machine driver for SC7280 boards"
|
tristate "SoC Machine driver for SC7280 boards"
|
||||||
depends on I2C && SOUNDWIRE
|
depends on I2C && SOUNDWIRE
|
||||||
select SND_SOC_QCOM_COMMON
|
select SND_SOC_QCOM_COMMON
|
||||||
|
select SND_SOC_QCOM_SDW
|
||||||
select SND_SOC_LPASS_SC7280
|
select SND_SOC_LPASS_SC7280
|
||||||
select SND_SOC_MAX98357A
|
select SND_SOC_MAX98357A
|
||||||
select SND_SOC_WCD938X_SDW
|
select SND_SOC_WCD938X_SDW
|
||||||
|
@ -1242,6 +1242,8 @@ int asoc_qcom_lpass_cpu_platform_probe(struct platform_device *pdev)
|
|||||||
/* Allocation for i2sctl regmap fields */
|
/* Allocation for i2sctl regmap fields */
|
||||||
drvdata->i2sctl = devm_kzalloc(&pdev->dev, sizeof(struct lpaif_i2sctl),
|
drvdata->i2sctl = devm_kzalloc(&pdev->dev, sizeof(struct lpaif_i2sctl),
|
||||||
GFP_KERNEL);
|
GFP_KERNEL);
|
||||||
|
if (!drvdata->i2sctl)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
/* Initialize bitfields for dai I2SCTL register */
|
/* Initialize bitfields for dai I2SCTL register */
|
||||||
ret = lpass_cpu_init_i2sctl_bitfields(dev, drvdata->i2sctl,
|
ret = lpass_cpu_init_i2sctl_bitfields(dev, drvdata->i2sctl,
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "lpass.h"
|
#include "lpass.h"
|
||||||
#include "qdsp6/q6afe.h"
|
#include "qdsp6/q6afe.h"
|
||||||
|
#include "sdw.h"
|
||||||
|
|
||||||
#define DEFAULT_MCLK_RATE 19200000
|
#define DEFAULT_MCLK_RATE 19200000
|
||||||
#define RT5682_PLL_FREQ (48000 * 512)
|
#define RT5682_PLL_FREQ (48000 * 512)
|
||||||
@ -316,6 +317,7 @@ static void sc7280_snd_shutdown(struct snd_pcm_substream *substream)
|
|||||||
struct snd_soc_card *card = rtd->card;
|
struct snd_soc_card *card = rtd->card;
|
||||||
struct sc7280_snd_data *data = snd_soc_card_get_drvdata(card);
|
struct sc7280_snd_data *data = snd_soc_card_get_drvdata(card);
|
||||||
struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0);
|
struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0);
|
||||||
|
struct sdw_stream_runtime *sruntime = data->sruntime[cpu_dai->id];
|
||||||
|
|
||||||
switch (cpu_dai->id) {
|
switch (cpu_dai->id) {
|
||||||
case MI2S_PRIMARY:
|
case MI2S_PRIMARY:
|
||||||
@ -333,6 +335,9 @@ static void sc7280_snd_shutdown(struct snd_pcm_substream *substream)
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
data->sruntime[cpu_dai->id] = NULL;
|
||||||
|
sdw_release_stream(sruntime);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int sc7280_snd_startup(struct snd_pcm_substream *substream)
|
static int sc7280_snd_startup(struct snd_pcm_substream *substream)
|
||||||
@ -347,6 +352,8 @@ static int sc7280_snd_startup(struct snd_pcm_substream *substream)
|
|||||||
switch (cpu_dai->id) {
|
switch (cpu_dai->id) {
|
||||||
case MI2S_PRIMARY:
|
case MI2S_PRIMARY:
|
||||||
ret = sc7280_rt5682_init(rtd);
|
ret = sc7280_rt5682_init(rtd);
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
break;
|
break;
|
||||||
case SECONDARY_MI2S_RX:
|
case SECONDARY_MI2S_RX:
|
||||||
codec_dai_fmt |= SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_I2S;
|
codec_dai_fmt |= SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_I2S;
|
||||||
@ -360,7 +367,8 @@ static int sc7280_snd_startup(struct snd_pcm_substream *substream)
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return ret;
|
|
||||||
|
return qcom_snd_sdw_startup(substream);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct snd_soc_ops sc7280_ops = {
|
static const struct snd_soc_ops sc7280_ops = {
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
#include <uapi/linux/input-event-codes.h>
|
#include <uapi/linux/input-event-codes.h>
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "qdsp6/q6afe.h"
|
#include "qdsp6/q6afe.h"
|
||||||
|
#include "sdw.h"
|
||||||
#include "../codecs/rt5663.h"
|
#include "../codecs/rt5663.h"
|
||||||
|
|
||||||
#define DRIVER_NAME "sdm845"
|
#define DRIVER_NAME "sdm845"
|
||||||
@ -416,7 +417,7 @@ static int sdm845_snd_startup(struct snd_pcm_substream *substream)
|
|||||||
pr_err("%s: invalid dai id 0x%x\n", __func__, cpu_dai->id);
|
pr_err("%s: invalid dai id 0x%x\n", __func__, cpu_dai->id);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return 0;
|
return qcom_snd_sdw_startup(substream);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sdm845_snd_shutdown(struct snd_pcm_substream *substream)
|
static void sdm845_snd_shutdown(struct snd_pcm_substream *substream)
|
||||||
@ -425,6 +426,7 @@ static void sdm845_snd_shutdown(struct snd_pcm_substream *substream)
|
|||||||
struct snd_soc_card *card = rtd->card;
|
struct snd_soc_card *card = rtd->card;
|
||||||
struct sdm845_snd_data *data = snd_soc_card_get_drvdata(card);
|
struct sdm845_snd_data *data = snd_soc_card_get_drvdata(card);
|
||||||
struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0);
|
struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0);
|
||||||
|
struct sdw_stream_runtime *sruntime = data->sruntime[cpu_dai->id];
|
||||||
|
|
||||||
switch (cpu_dai->id) {
|
switch (cpu_dai->id) {
|
||||||
case PRIMARY_MI2S_RX:
|
case PRIMARY_MI2S_RX:
|
||||||
@ -463,6 +465,9 @@ static void sdm845_snd_shutdown(struct snd_pcm_substream *substream)
|
|||||||
pr_err("%s: invalid dai id 0x%x\n", __func__, cpu_dai->id);
|
pr_err("%s: invalid dai id 0x%x\n", __func__, cpu_dai->id);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
data->sruntime[cpu_dai->id] = NULL;
|
||||||
|
sdw_release_stream(sruntime);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int sdm845_snd_prepare(struct snd_pcm_substream *substream)
|
static int sdm845_snd_prepare(struct snd_pcm_substream *substream)
|
||||||
|
@ -1281,7 +1281,9 @@ static int rsnd_dai_of_node(struct rsnd_priv *priv, int *is_graph)
|
|||||||
if (!of_node_name_eq(ports, "ports") &&
|
if (!of_node_name_eq(ports, "ports") &&
|
||||||
!of_node_name_eq(ports, "port"))
|
!of_node_name_eq(ports, "port"))
|
||||||
continue;
|
continue;
|
||||||
priv->component_dais[i] = of_graph_get_endpoint_count(ports);
|
priv->component_dais[i] =
|
||||||
|
of_graph_get_endpoint_count(of_node_name_eq(ports, "ports") ?
|
||||||
|
ports : np);
|
||||||
nr += priv->component_dais[i];
|
nr += priv->component_dais[i];
|
||||||
i++;
|
i++;
|
||||||
if (i >= RSND_MAX_COMPONENT) {
|
if (i >= RSND_MAX_COMPONENT) {
|
||||||
@ -1493,7 +1495,8 @@ static int rsnd_dai_probe(struct rsnd_priv *priv)
|
|||||||
if (!of_node_name_eq(ports, "ports") &&
|
if (!of_node_name_eq(ports, "ports") &&
|
||||||
!of_node_name_eq(ports, "port"))
|
!of_node_name_eq(ports, "port"))
|
||||||
continue;
|
continue;
|
||||||
for_each_endpoint_of_node(ports, dai_np) {
|
for_each_endpoint_of_node(of_node_name_eq(ports, "ports") ?
|
||||||
|
ports : np, dai_np) {
|
||||||
__rsnd_dai_probe(priv, dai_np, dai_np, 0, dai_i);
|
__rsnd_dai_probe(priv, dai_np, dai_np, 0, dai_i);
|
||||||
if (!rsnd_is_gen1(priv) && !rsnd_is_gen2(priv)) {
|
if (!rsnd_is_gen1(priv) && !rsnd_is_gen2(priv)) {
|
||||||
rdai = rsnd_rdai_get(priv, dai_i);
|
rdai = rsnd_rdai_get(priv, dai_i);
|
||||||
|
@ -1147,6 +1147,8 @@ static int dapm_widget_list_create(struct snd_soc_dapm_widget_list **list,
|
|||||||
if (*list == NULL)
|
if (*list == NULL)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
(*list)->num_widgets = size;
|
||||||
|
|
||||||
list_for_each_entry(w, widgets, work_list)
|
list_for_each_entry(w, widgets, work_list)
|
||||||
(*list)->widgets[i++] = w;
|
(*list)->widgets[i++] = w;
|
||||||
|
|
||||||
@ -2785,10 +2787,10 @@ EXPORT_SYMBOL_GPL(snd_soc_dapm_update_dai);
|
|||||||
|
|
||||||
int snd_soc_dapm_widget_name_cmp(struct snd_soc_dapm_widget *widget, const char *s)
|
int snd_soc_dapm_widget_name_cmp(struct snd_soc_dapm_widget *widget, const char *s)
|
||||||
{
|
{
|
||||||
struct snd_soc_component *component = snd_soc_dapm_to_component(widget->dapm);
|
struct snd_soc_component *component = widget->dapm->component;
|
||||||
const char *wname = widget->name;
|
const char *wname = widget->name;
|
||||||
|
|
||||||
if (component->name_prefix)
|
if (component && component->name_prefix)
|
||||||
wname += strlen(component->name_prefix) + 1; /* plus space */
|
wname += strlen(component->name_prefix) + 1; /* plus space */
|
||||||
|
|
||||||
return strcmp(wname, s);
|
return strcmp(wname, s);
|
||||||
|
@ -206,7 +206,10 @@ int acp_dsp_pre_fw_run(struct snd_sof_dev *sdev)
|
|||||||
configure_pte_for_fw_loading(FW_SRAM_DATA_BIN, ACP_SRAM_PAGE_COUNT, adata);
|
configure_pte_for_fw_loading(FW_SRAM_DATA_BIN, ACP_SRAM_PAGE_COUNT, adata);
|
||||||
src_addr = ACP_SYSTEM_MEMORY_WINDOW + ACP_DEFAULT_SRAM_LENGTH +
|
src_addr = ACP_SYSTEM_MEMORY_WINDOW + ACP_DEFAULT_SRAM_LENGTH +
|
||||||
(page_count * ACP_PAGE_SIZE);
|
(page_count * ACP_PAGE_SIZE);
|
||||||
dest_addr = ACP_SRAM_BASE_ADDRESS;
|
if (adata->pci_rev > ACP63_PCI_ID)
|
||||||
|
dest_addr = ACP7X_SRAM_BASE_ADDRESS;
|
||||||
|
else
|
||||||
|
dest_addr = ACP_SRAM_BASE_ADDRESS;
|
||||||
|
|
||||||
ret = configure_and_run_dma(adata, src_addr, dest_addr,
|
ret = configure_and_run_dma(adata, src_addr, dest_addr,
|
||||||
adata->fw_sram_data_bin_size);
|
adata->fw_sram_data_bin_size);
|
||||||
|
@ -329,7 +329,9 @@ int configure_and_run_sha_dma(struct acp_dev_data *adata, void *image_addr,
|
|||||||
fw_qualifier, fw_qualifier & DSP_FW_RUN_ENABLE,
|
fw_qualifier, fw_qualifier & DSP_FW_RUN_ENABLE,
|
||||||
ACP_REG_POLL_INTERVAL, ACP_DMA_COMPLETE_TIMEOUT_US);
|
ACP_REG_POLL_INTERVAL, ACP_DMA_COMPLETE_TIMEOUT_US);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
dev_err(sdev->dev, "PSP validation failed\n");
|
val = snd_sof_dsp_read(sdev, ACP_DSP_BAR, ACP_SHA_PSP_ACK);
|
||||||
|
dev_err(sdev->dev, "PSP validation failed: fw_qualifier = %#x, ACP_SHA_PSP_ACK = %#x\n",
|
||||||
|
fw_qualifier, val);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -346,20 +346,21 @@ static int hda_trigger(struct snd_sof_dev *sdev, struct snd_soc_dai *cpu_dai,
|
|||||||
case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
|
case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
|
||||||
snd_hdac_ext_stream_start(hext_stream);
|
snd_hdac_ext_stream_start(hext_stream);
|
||||||
break;
|
break;
|
||||||
case SNDRV_PCM_TRIGGER_SUSPEND:
|
|
||||||
case SNDRV_PCM_TRIGGER_STOP:
|
|
||||||
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
|
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
|
||||||
snd_hdac_ext_stream_clear(hext_stream);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Save the LLP registers in case the stream is
|
* Save the LLP registers since in case of PAUSE the LLP
|
||||||
* restarting due PAUSE_RELEASE, or START without a pcm
|
* register are not reset to 0, the delay calculation will use
|
||||||
* close/open since in this case the LLP register is not reset
|
* the saved offsets for compensating the delay calculation.
|
||||||
* to 0 and the delay calculation will return with invalid
|
|
||||||
* results.
|
|
||||||
*/
|
*/
|
||||||
hext_stream->pplcllpl = readl(hext_stream->pplc_addr + AZX_REG_PPLCLLPL);
|
hext_stream->pplcllpl = readl(hext_stream->pplc_addr + AZX_REG_PPLCLLPL);
|
||||||
hext_stream->pplcllpu = readl(hext_stream->pplc_addr + AZX_REG_PPLCLLPU);
|
hext_stream->pplcllpu = readl(hext_stream->pplc_addr + AZX_REG_PPLCLLPU);
|
||||||
|
snd_hdac_ext_stream_clear(hext_stream);
|
||||||
|
break;
|
||||||
|
case SNDRV_PCM_TRIGGER_SUSPEND:
|
||||||
|
case SNDRV_PCM_TRIGGER_STOP:
|
||||||
|
hext_stream->pplcllpl = 0;
|
||||||
|
hext_stream->pplcllpu = 0;
|
||||||
|
snd_hdac_ext_stream_clear(hext_stream);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
dev_err(sdev->dev, "unknown trigger command %d\n", cmd);
|
dev_err(sdev->dev, "unknown trigger command %d\n", cmd);
|
||||||
@ -512,7 +513,6 @@ static const struct hda_dai_widget_dma_ops sdw_ipc4_chain_dma_ops = {
|
|||||||
static int hda_ipc3_post_trigger(struct snd_sof_dev *sdev, struct snd_soc_dai *cpu_dai,
|
static int hda_ipc3_post_trigger(struct snd_sof_dev *sdev, struct snd_soc_dai *cpu_dai,
|
||||||
struct snd_pcm_substream *substream, int cmd)
|
struct snd_pcm_substream *substream, int cmd)
|
||||||
{
|
{
|
||||||
struct hdac_ext_stream *hext_stream = hda_get_hext_stream(sdev, cpu_dai, substream);
|
|
||||||
struct snd_soc_dapm_widget *w = snd_soc_dai_get_widget(cpu_dai, substream->stream);
|
struct snd_soc_dapm_widget *w = snd_soc_dai_get_widget(cpu_dai, substream->stream);
|
||||||
|
|
||||||
switch (cmd) {
|
switch (cmd) {
|
||||||
@ -527,9 +527,6 @@ static int hda_ipc3_post_trigger(struct snd_sof_dev *sdev, struct snd_soc_dai *c
|
|||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
if (cmd == SNDRV_PCM_TRIGGER_STOP)
|
|
||||||
return hda_link_dma_cleanup(substream, hext_stream, cpu_dai);
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
|
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
|
||||||
|
@ -302,6 +302,7 @@ static int __maybe_unused hda_dai_trigger(struct snd_pcm_substream *substream, i
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch (cmd) {
|
switch (cmd) {
|
||||||
|
case SNDRV_PCM_TRIGGER_STOP:
|
||||||
case SNDRV_PCM_TRIGGER_SUSPEND:
|
case SNDRV_PCM_TRIGGER_SUSPEND:
|
||||||
ret = hda_link_dma_cleanup(substream, hext_stream, dai);
|
ret = hda_link_dma_cleanup(substream, hext_stream, dai);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
@ -370,6 +371,13 @@ static int non_hda_dai_hw_params_data(struct snd_pcm_substream *substream,
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sdev = widget_to_sdev(w);
|
||||||
|
hext_stream = ops->get_hext_stream(sdev, cpu_dai, substream);
|
||||||
|
|
||||||
|
/* nothing more to do if the link is already prepared */
|
||||||
|
if (hext_stream && hext_stream->link_prepared)
|
||||||
|
return 0;
|
||||||
|
|
||||||
/* use HDaudio stream handling */
|
/* use HDaudio stream handling */
|
||||||
ret = hda_dai_hw_params_data(substream, params, cpu_dai, data, flags);
|
ret = hda_dai_hw_params_data(substream, params, cpu_dai, data, flags);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
@ -377,7 +385,6 @@ static int non_hda_dai_hw_params_data(struct snd_pcm_substream *substream,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
sdev = widget_to_sdev(w);
|
|
||||||
if (sdev->dspless_mode_selected)
|
if (sdev->dspless_mode_selected)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
@ -482,6 +489,31 @@ int sdw_hda_dai_hw_params(struct snd_pcm_substream *substream,
|
|||||||
int ret;
|
int ret;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
ops = hda_dai_get_ops(substream, cpu_dai);
|
||||||
|
if (!ops) {
|
||||||
|
dev_err(cpu_dai->dev, "DAI widget ops not set\n");
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
sdev = widget_to_sdev(w);
|
||||||
|
hext_stream = ops->get_hext_stream(sdev, cpu_dai, substream);
|
||||||
|
|
||||||
|
/* nothing more to do if the link is already prepared */
|
||||||
|
if (hext_stream && hext_stream->link_prepared)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* reset the PCMSyCM registers to handle a prepare callback when the PCM is restarted
|
||||||
|
* due to xruns or after a call to snd_pcm_drain/drop()
|
||||||
|
*/
|
||||||
|
ret = hdac_bus_eml_sdw_map_stream_ch(sof_to_bus(sdev), link_id, cpu_dai->id,
|
||||||
|
0, 0, substream->stream);
|
||||||
|
if (ret < 0) {
|
||||||
|
dev_err(cpu_dai->dev, "%s: hdac_bus_eml_sdw_map_stream_ch failed %d\n",
|
||||||
|
__func__, ret);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
data.dai_index = (link_id << 8) | cpu_dai->id;
|
data.dai_index = (link_id << 8) | cpu_dai->id;
|
||||||
data.dai_node_id = intel_alh_id;
|
data.dai_node_id = intel_alh_id;
|
||||||
ret = non_hda_dai_hw_params_data(substream, params, cpu_dai, &data, flags);
|
ret = non_hda_dai_hw_params_data(substream, params, cpu_dai, &data, flags);
|
||||||
@ -490,10 +522,7 @@ int sdw_hda_dai_hw_params(struct snd_pcm_substream *substream,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
ops = hda_dai_get_ops(substream, cpu_dai);
|
|
||||||
sdev = widget_to_sdev(w);
|
|
||||||
hext_stream = ops->get_hext_stream(sdev, cpu_dai, substream);
|
hext_stream = ops->get_hext_stream(sdev, cpu_dai, substream);
|
||||||
|
|
||||||
if (!hext_stream)
|
if (!hext_stream)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
|
@ -294,14 +294,9 @@ int hda_cl_copy_fw(struct snd_sof_dev *sdev, struct hdac_ext_stream *hext_stream
|
|||||||
{
|
{
|
||||||
struct sof_intel_hda_dev *hda = sdev->pdata->hw_pdata;
|
struct sof_intel_hda_dev *hda = sdev->pdata->hw_pdata;
|
||||||
const struct sof_intel_dsp_desc *chip = hda->desc;
|
const struct sof_intel_dsp_desc *chip = hda->desc;
|
||||||
struct sof_intel_hda_stream *hda_stream;
|
|
||||||
unsigned long time_left;
|
|
||||||
unsigned int reg;
|
unsigned int reg;
|
||||||
int ret, status;
|
int ret, status;
|
||||||
|
|
||||||
hda_stream = container_of(hext_stream, struct sof_intel_hda_stream,
|
|
||||||
hext_stream);
|
|
||||||
|
|
||||||
dev_dbg(sdev->dev, "Code loader DMA starting\n");
|
dev_dbg(sdev->dev, "Code loader DMA starting\n");
|
||||||
|
|
||||||
ret = hda_cl_trigger(sdev->dev, hext_stream, SNDRV_PCM_TRIGGER_START);
|
ret = hda_cl_trigger(sdev->dev, hext_stream, SNDRV_PCM_TRIGGER_START);
|
||||||
@ -310,18 +305,6 @@ int hda_cl_copy_fw(struct snd_sof_dev *sdev, struct hdac_ext_stream *hext_stream
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sdev->pdata->ipc_type == SOF_IPC_TYPE_4) {
|
|
||||||
/* Wait for completion of transfer */
|
|
||||||
time_left = wait_for_completion_timeout(&hda_stream->ioc,
|
|
||||||
msecs_to_jiffies(HDA_CL_DMA_IOC_TIMEOUT_MS));
|
|
||||||
|
|
||||||
if (!time_left) {
|
|
||||||
dev_err(sdev->dev, "Code loader DMA did not complete\n");
|
|
||||||
return -ETIMEDOUT;
|
|
||||||
}
|
|
||||||
dev_dbg(sdev->dev, "Code loader DMA done\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
dev_dbg(sdev->dev, "waiting for FW_ENTERED status\n");
|
dev_dbg(sdev->dev, "waiting for FW_ENTERED status\n");
|
||||||
|
|
||||||
status = snd_sof_dsp_read_poll_timeout(sdev, HDA_DSP_BAR,
|
status = snd_sof_dsp_read_poll_timeout(sdev, HDA_DSP_BAR,
|
||||||
|
@ -3129,9 +3129,20 @@ static int sof_ipc4_dai_config(struct snd_sof_dev *sdev, struct snd_sof_widget *
|
|||||||
* group_id during copier's ipc_prepare op.
|
* group_id during copier's ipc_prepare op.
|
||||||
*/
|
*/
|
||||||
if (flags & SOF_DAI_CONFIG_FLAGS_HW_PARAMS) {
|
if (flags & SOF_DAI_CONFIG_FLAGS_HW_PARAMS) {
|
||||||
|
struct sof_ipc4_alh_configuration_blob *blob;
|
||||||
|
|
||||||
|
blob = (struct sof_ipc4_alh_configuration_blob *)ipc4_copier->copier_config;
|
||||||
ipc4_copier->dai_index = data->dai_node_id;
|
ipc4_copier->dai_index = data->dai_node_id;
|
||||||
copier_data->gtw_cfg.node_id &= ~SOF_IPC4_NODE_INDEX_MASK;
|
|
||||||
copier_data->gtw_cfg.node_id |= SOF_IPC4_NODE_INDEX(data->dai_node_id);
|
/*
|
||||||
|
* no need to set the node_id for aggregated DAI's. These will be assigned
|
||||||
|
* a group_id during widget ipc_prepare
|
||||||
|
*/
|
||||||
|
if (blob->alh_cfg.device_count == 1) {
|
||||||
|
copier_data->gtw_cfg.node_id &= ~SOF_IPC4_NODE_INDEX_MASK;
|
||||||
|
copier_data->gtw_cfg.node_id |=
|
||||||
|
SOF_IPC4_NODE_INDEX(data->dai_node_id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -1205,6 +1205,7 @@ static void volume_control_quirks(struct usb_mixer_elem_info *cval,
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case USB_ID(0x1bcf, 0x2283): /* NexiGo N930AF FHD Webcam */
|
case USB_ID(0x1bcf, 0x2283): /* NexiGo N930AF FHD Webcam */
|
||||||
|
case USB_ID(0x03f0, 0x654a): /* HP 320 FHD Webcam */
|
||||||
if (!strcmp(kctl->id.name, "Mic Capture Volume")) {
|
if (!strcmp(kctl->id.name, "Mic Capture Volume")) {
|
||||||
usb_audio_info(chip,
|
usb_audio_info(chip,
|
||||||
"set resolution quirk: cval->res = 16\n");
|
"set resolution quirk: cval->res = 16\n");
|
||||||
|
@ -4099,6 +4099,9 @@ int snd_usb_mixer_apply_create_quirk(struct usb_mixer_interface *mixer)
|
|||||||
break;
|
break;
|
||||||
err = dell_dock_mixer_init(mixer);
|
err = dell_dock_mixer_init(mixer);
|
||||||
break;
|
break;
|
||||||
|
case USB_ID(0x0bda, 0x402e): /* Dell WD19 dock */
|
||||||
|
err = dell_dock_mixer_create(mixer);
|
||||||
|
break;
|
||||||
|
|
||||||
case USB_ID(0x2a39, 0x3fd2): /* RME ADI-2 Pro */
|
case USB_ID(0x2a39, 0x3fd2): /* RME ADI-2 Pro */
|
||||||
case USB_ID(0x2a39, 0x3fd3): /* RME ADI-2 DAC */
|
case USB_ID(0x2a39, 0x3fd3): /* RME ADI-2 DAC */
|
||||||
|
@ -2114,6 +2114,8 @@ struct usb_audio_quirk_flags_table {
|
|||||||
|
|
||||||
static const struct usb_audio_quirk_flags_table quirk_flags_table[] = {
|
static const struct usb_audio_quirk_flags_table quirk_flags_table[] = {
|
||||||
/* Device matches */
|
/* Device matches */
|
||||||
|
DEVICE_FLG(0x03f0, 0x654a, /* HP 320 FHD Webcam */
|
||||||
|
QUIRK_FLAG_GET_SAMPLE_RATE),
|
||||||
DEVICE_FLG(0x041e, 0x3000, /* Creative SB Extigy */
|
DEVICE_FLG(0x041e, 0x3000, /* Creative SB Extigy */
|
||||||
QUIRK_FLAG_IGNORE_CTL_ERROR),
|
QUIRK_FLAG_IGNORE_CTL_ERROR),
|
||||||
DEVICE_FLG(0x041e, 0x4080, /* Creative Live Cam VF0610 */
|
DEVICE_FLG(0x041e, 0x4080, /* Creative Live Cam VF0610 */
|
||||||
|
Loading…
Reference in New Issue
Block a user