mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 11:06:41 -05:00
Merge tag 'sound-6.19-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai:
"Likely the last pull request in 2025, again a collection of lots of
small fixes. Most of them are various device-specific small fixes:
- An ASoC core fix for correcting the clamping behavior of *_SX mixer
elements
- Various fixes for ASoC fsl, SOF, etc
- Usual HD- and USB-audio quirks / fix-ups
- A couple of error-handling fixes for legacy PCMCIA drivers"
* tag 'sound-6.19-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (35 commits)
ALSA: hda/realtek: fix PCI SSID for one of the HP 200 G2i laptop
ASoC: ops: fix snd_soc_get_volsw for sx controls
ALSA: hda/realtek: Add Asus quirk for TAS amplifiers
ASoC: Intel: soc-acpi-intel-mtl-match: Add 6 amp CS35L63 with feedback
ASoC: Intel: soc-acpi-intel-mtl-match: Add 6 amp CS35L56 with feedback
ASoC: fsl-asoc-card: Use of_property_present() for non-boolean properties
ASoC: rt1320: update VC blind write settings
ASoC: fsl_xcvr: provide regmap names
ASoC: fsl_sai: Add missing registers to cache default
ASoC: ak4458: remove the reset operation in probe and remove
ASoC: fsl_asrc_dma: fix duplicate debugfs directory error
ASoC: fsl_easrc: fix duplicate debugfs directory error
ALSA: hda/realtek: fix micmute LED reversed on HP Abe and Bantie
ALSA: hda/realtek: Add support for HP Clipper Laptop
ALSA: hda/realtek: Add support for HP Trekker Laptop
ALSA: usb-mixer: us16x08: validate meter packet indices
ASoC: Intel: soc-acpi-intel-nvl-match: Drop rt722 l3 from the match table
ASoC: soc-acpi / SOF: Add best_effort flag to get_function_tplg_files op
ASoC: SOF: Intel: pci-mtl: Change the topology path to intel/sof-ipc4-tplg
ASoC: SOF: ipc4-topology: set playback channel mask
...
This commit is contained in:
@@ -203,6 +203,8 @@ struct snd_soc_acpi_link_adr {
|
||||
* @mach: the pointer of the machine driver
|
||||
* @prefix: the prefix of the topology file name. Typically, it is the path.
|
||||
* @tplg_files: the pointer of the array of the topology file names.
|
||||
* @best_effort: ignore non supported links and try to build the card in best effort
|
||||
* with supported links
|
||||
*/
|
||||
/* Descriptor for SST ASoC machine driver */
|
||||
struct snd_soc_acpi_mach {
|
||||
@@ -224,7 +226,8 @@ struct snd_soc_acpi_mach {
|
||||
const u32 tplg_quirk_mask;
|
||||
int (*get_function_tplg_files)(struct snd_soc_card *card,
|
||||
const struct snd_soc_acpi_mach *mach,
|
||||
const char *prefix, const char ***tplg_files);
|
||||
const char *prefix, const char ***tplg_files,
|
||||
bool best_effort);
|
||||
};
|
||||
|
||||
#define SND_SOC_ACPI_MAX_CODECS 3
|
||||
|
||||
@@ -1656,6 +1656,18 @@ static void alc236_fixup_hp_mute_led_micmute_vref(struct hda_codec *codec,
|
||||
alc236_fixup_hp_micmute_led_vref(codec, fix, action);
|
||||
}
|
||||
|
||||
static void alc236_fixup_hp_mute_led_micmute_gpio(struct hda_codec *codec,
|
||||
const struct hda_fixup *fix, int action)
|
||||
{
|
||||
struct alc_spec *spec = codec->spec;
|
||||
|
||||
if (action == HDA_FIXUP_ACT_PRE_PROBE)
|
||||
spec->micmute_led_polarity = 1;
|
||||
|
||||
alc236_fixup_hp_mute_led_coefbit2(codec, fix, action);
|
||||
alc_fixup_hp_gpio_led(codec, action, 0x00, 0x01);
|
||||
}
|
||||
|
||||
static inline void alc298_samsung_write_coef_pack(struct hda_codec *codec,
|
||||
const unsigned short coefs[2])
|
||||
{
|
||||
@@ -3753,6 +3765,7 @@ enum {
|
||||
ALC295_FIXUP_DELL_TAS2781_I2C,
|
||||
ALC245_FIXUP_TAS2781_SPI_2,
|
||||
ALC287_FIXUP_TXNW2781_I2C,
|
||||
ALC287_FIXUP_TXNW2781_I2C_ASUS,
|
||||
ALC287_FIXUP_YOGA7_14ARB7_I2C,
|
||||
ALC245_FIXUP_HP_MUTE_LED_COEFBIT,
|
||||
ALC245_FIXUP_HP_MUTE_LED_V1_COEFBIT,
|
||||
@@ -5326,9 +5339,7 @@ static const struct hda_fixup alc269_fixups[] = {
|
||||
},
|
||||
[ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO] = {
|
||||
.type = HDA_FIXUP_FUNC,
|
||||
.v.func = alc236_fixup_hp_mute_led_coefbit2,
|
||||
.chained = true,
|
||||
.chain_id = ALC236_FIXUP_HP_GPIO_LED,
|
||||
.v.func = alc236_fixup_hp_mute_led_micmute_gpio,
|
||||
},
|
||||
[ALC236_FIXUP_LENOVO_INV_DMIC] = {
|
||||
.type = HDA_FIXUP_FUNC,
|
||||
@@ -6053,6 +6064,12 @@ static const struct hda_fixup alc269_fixups[] = {
|
||||
.chained = true,
|
||||
.chain_id = ALC285_FIXUP_THINKPAD_HEADSET_JACK,
|
||||
},
|
||||
[ALC287_FIXUP_TXNW2781_I2C_ASUS] = {
|
||||
.type = HDA_FIXUP_FUNC,
|
||||
.v.func = tas2781_fixup_txnw_i2c,
|
||||
.chained = true,
|
||||
.chain_id = ALC294_FIXUP_ASUS_SPK,
|
||||
},
|
||||
[ALC287_FIXUP_YOGA7_14ARB7_I2C] = {
|
||||
.type = HDA_FIXUP_FUNC,
|
||||
.v.func = yoga7_14arb7_fixup_i2c,
|
||||
@@ -6771,10 +6788,10 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK(0x103c, 0x8e61, "HP Trekker ", ALC287_FIXUP_CS35L41_I2C_2),
|
||||
SND_PCI_QUIRK(0x103c, 0x8e62, "HP Trekker ", ALC287_FIXUP_CS35L41_I2C_2),
|
||||
SND_PCI_QUIRK(0x103c, 0x8e8a, "HP NexusX", ALC245_FIXUP_HP_TAS2781_I2C_MUTE_LED),
|
||||
SND_PCI_QUIRK(0x103c, 0x8e9c, "HP 16 Clipper OmniBook X X360", ALC287_FIXUP_CS35L41_I2C_2),
|
||||
SND_PCI_QUIRK(0x103c, 0x8e9d, "HP 17 Turbine OmniBook X UMA", ALC287_FIXUP_CS35L41_I2C_2),
|
||||
SND_PCI_QUIRK(0x103c, 0x8e9e, "HP 17 Turbine OmniBook X UMA", ALC287_FIXUP_CS35L41_I2C_2),
|
||||
SND_PCI_QUIRK(0x103c, 0x8eb6, "HP Abe A6U", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO),
|
||||
SND_PCI_QUIRK(0x103c, 0x8eb7, "HP Abe A6U", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO),
|
||||
SND_PCI_QUIRK(0x103c, 0x8eb8, "HP Abe A6U", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO),
|
||||
SND_PCI_QUIRK(0x103c, 0x8ec1, "HP 200 G2i", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO),
|
||||
SND_PCI_QUIRK(0x103c, 0x8ec4, "HP Bantie I6U", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO),
|
||||
@@ -6790,11 +6807,13 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK(0x103c, 0x8eda, "HP ZBook Firefly 16W", ALC245_FIXUP_HP_TAS2781_SPI_MUTE_LED),
|
||||
SND_PCI_QUIRK(0x103c, 0x8ee4, "HP Bantie A6U", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO),
|
||||
SND_PCI_QUIRK(0x103c, 0x8ee5, "HP Bantie A6U", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO),
|
||||
SND_PCI_QUIRK(0x103c, 0x8ee7, "HP Abe A6U", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO),
|
||||
SND_PCI_QUIRK(0x103c, 0x8f0c, "HP ZBook X G2i 16W", ALC236_FIXUP_HP_GPIO_LED),
|
||||
SND_PCI_QUIRK(0x103c, 0x8f0e, "HP ZBook X G2i 16W", ALC236_FIXUP_HP_GPIO_LED),
|
||||
SND_PCI_QUIRK(0x103c, 0x8f40, "HP ZBook 8 G2a 14", ALC245_FIXUP_HP_TAS2781_I2C_MUTE_LED),
|
||||
SND_PCI_QUIRK(0x103c, 0x8f41, "HP ZBook 8 G2a 16", ALC245_FIXUP_HP_TAS2781_I2C_MUTE_LED),
|
||||
SND_PCI_QUIRK(0x103c, 0x8f42, "HP ZBook 8 G2a 14W", ALC245_FIXUP_HP_TAS2781_I2C_MUTE_LED),
|
||||
SND_PCI_QUIRK(0x103c, 0x8f57, "HP Trekker G7JC", ALC287_FIXUP_CS35L41_I2C_2),
|
||||
SND_PCI_QUIRK(0x103c, 0x8f62, "HP ZBook 8 G2a 16W", ALC245_FIXUP_HP_TAS2781_I2C_MUTE_LED),
|
||||
SND_PCI_QUIRK(0x1043, 0x1032, "ASUS VivoBook X513EA", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1043, 0x1034, "ASUS GU605C", ALC285_FIXUP_ASUS_GU605_SPI_SPEAKER2_TO_DAC1),
|
||||
@@ -6827,8 +6846,8 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK(0x1043, 0x12f0, "ASUS X541UV", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1043, 0x1313, "Asus K42JZ", ALC269VB_FIXUP_ASUS_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1043, 0x1314, "ASUS GA605K", ALC285_FIXUP_ASUS_GA605K_HEADSET_MIC),
|
||||
SND_PCI_QUIRK(0x1043, 0x1384, "ASUS RC73XA", ALC287_FIXUP_TXNW2781_I2C),
|
||||
SND_PCI_QUIRK(0x1043, 0x1394, "ASUS RC73YA", ALC287_FIXUP_TXNW2781_I2C),
|
||||
SND_PCI_QUIRK(0x1043, 0x1384, "ASUS RC73XA", ALC287_FIXUP_TXNW2781_I2C_ASUS),
|
||||
SND_PCI_QUIRK(0x1043, 0x1394, "ASUS RC73YA", ALC287_FIXUP_TXNW2781_I2C_ASUS),
|
||||
SND_PCI_QUIRK(0x1043, 0x13b0, "ASUS Z550SA", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_ASUS_ZENBOOK),
|
||||
SND_PCI_QUIRK(0x1043, 0x1433, "ASUS GX650PY/PZ/PV/PU/PYV/PZV/PIV/PVV", ALC285_FIXUP_ASUS_I2C_HEADSET_MIC),
|
||||
@@ -7296,6 +7315,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK(0x1d72, 0x1901, "RedmiBook 14", 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(0x1e39, 0xca14, "MEDION NM14LNL", ALC233_FIXUP_MEDION_MTL_SPK),
|
||||
SND_PCI_QUIRK(0x1ee7, 0x2078, "HONOR BRB-X M1010", ALC2XX_FIXUP_HEADSET_MIC),
|
||||
SND_PCI_QUIRK(0x1f66, 0x0105, "Ayaneo Portable Game Player", ALC287_FIXUP_CS35L41_I2C_2),
|
||||
SND_PCI_QUIRK(0x2014, 0x800a, "Positivo ARN50", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
|
||||
|
||||
@@ -115,10 +115,8 @@ static int cix_ipbloq_hda_init(struct cix_ipbloq_hda *hda,
|
||||
bus->addr = res->start;
|
||||
|
||||
irq_id = platform_get_irq(pdev, 0);
|
||||
if (irq_id < 0) {
|
||||
dev_err(hda->dev, "failed to get the irq, err = %d\n", irq_id);
|
||||
if (irq_id < 0)
|
||||
return irq_id;
|
||||
}
|
||||
|
||||
err = devm_request_irq(hda->dev, irq_id, azx_interrupt,
|
||||
0, KBUILD_MODNAME, chip);
|
||||
|
||||
@@ -131,7 +131,13 @@ static int snd_pdacf_probe(struct pcmcia_device *link)
|
||||
link->config_index = 1;
|
||||
link->config_regs = PRESENT_OPTION;
|
||||
|
||||
return pdacf_config(link);
|
||||
err = pdacf_config(link);
|
||||
if (err < 0) {
|
||||
card_list[i] = NULL;
|
||||
snd_card_free(card);
|
||||
return err;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -284,7 +284,13 @@ static int vxpocket_probe(struct pcmcia_device *p_dev)
|
||||
|
||||
vxp->p_dev = p_dev;
|
||||
|
||||
return vxpocket_config(p_dev);
|
||||
err = vxpocket_config(p_dev);
|
||||
if (err < 0) {
|
||||
card_alloc &= ~(1 << i);
|
||||
snd_card_free(card);
|
||||
return err;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void vxpocket_detach(struct pcmcia_device *link)
|
||||
|
||||
@@ -661,6 +661,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = {
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "Bravo 15 C7UCX"),
|
||||
}
|
||||
},
|
||||
{
|
||||
.driver_data = &acp6x_card,
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_VENDOR, "HONOR"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "GOH-X"),
|
||||
}
|
||||
},
|
||||
{}
|
||||
};
|
||||
|
||||
|
||||
@@ -783,16 +783,12 @@ static int ak4458_i2c_probe(struct i2c_client *i2c)
|
||||
|
||||
pm_runtime_enable(&i2c->dev);
|
||||
regcache_cache_only(ak4458->regmap, true);
|
||||
ak4458_reset(ak4458, false);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void ak4458_i2c_remove(struct i2c_client *i2c)
|
||||
{
|
||||
struct ak4458_priv *ak4458 = i2c_get_clientdata(i2c);
|
||||
|
||||
ak4458_reset(ak4458, true);
|
||||
pm_runtime_disable(&i2c->dev);
|
||||
}
|
||||
|
||||
|
||||
@@ -115,7 +115,8 @@ static const struct reg_sequence rt1320_blind_write[] = {
|
||||
static const struct reg_sequence rt1320_vc_blind_write[] = {
|
||||
{ 0xc003, 0xe0 },
|
||||
{ 0xe80a, 0x01 },
|
||||
{ 0xc5c3, 0xf3 },
|
||||
{ 0xc5c3, 0xf2 },
|
||||
{ 0xc5c8, 0x03 },
|
||||
{ 0xc057, 0x51 },
|
||||
{ 0xc054, 0x35 },
|
||||
{ 0xca05, 0xd6 },
|
||||
@@ -126,8 +127,6 @@ static const struct reg_sequence rt1320_vc_blind_write[] = {
|
||||
{ 0xc609, 0x40 },
|
||||
{ 0xc046, 0xff },
|
||||
{ 0xc045, 0xff },
|
||||
{ 0xda81, 0x14 },
|
||||
{ 0xda8d, 0x14 },
|
||||
{ 0xc044, 0xff },
|
||||
{ 0xc043, 0xff },
|
||||
{ 0xc042, 0xff },
|
||||
@@ -136,8 +135,8 @@ static const struct reg_sequence rt1320_vc_blind_write[] = {
|
||||
{ 0xcc10, 0x01 },
|
||||
{ 0xc700, 0xf0 },
|
||||
{ 0xc701, 0x13 },
|
||||
{ 0xc901, 0x09 },
|
||||
{ 0xc900, 0xd0 },
|
||||
{ 0xc901, 0x04 },
|
||||
{ 0xc900, 0x73 },
|
||||
{ 0xde03, 0x05 },
|
||||
{ 0xdd0b, 0x0d },
|
||||
{ 0xdd0a, 0xff },
|
||||
@@ -153,6 +152,7 @@ static const struct reg_sequence rt1320_vc_blind_write[] = {
|
||||
{ 0xf082, 0xff },
|
||||
{ 0xf081, 0xff },
|
||||
{ 0xf080, 0xff },
|
||||
{ 0xe801, 0x01 },
|
||||
{ 0xe802, 0xf8 },
|
||||
{ 0xe803, 0xbe },
|
||||
{ 0xc003, 0xc0 },
|
||||
@@ -202,7 +202,7 @@ static const struct reg_sequence rt1320_vc_blind_write[] = {
|
||||
{ 0x3fc2bfc3, 0x00 },
|
||||
{ 0x3fc2bfc2, 0x00 },
|
||||
{ 0x3fc2bfc1, 0x00 },
|
||||
{ 0x3fc2bfc0, 0x03 },
|
||||
{ 0x3fc2bfc0, 0x07 },
|
||||
{ 0x0000d486, 0x43 },
|
||||
{ SDW_SDCA_CTL(FUNC_NUM_AMP, RT1320_SDCA_ENT_PDE23, RT1320_SDCA_CTL_REQ_POWER_STATE, 0), 0x00 },
|
||||
{ 0x1000db00, 0x07 },
|
||||
@@ -241,9 +241,7 @@ static const struct reg_sequence rt1320_vc_blind_write[] = {
|
||||
{ 0x1000db21, 0x00 },
|
||||
{ 0x1000db22, 0x00 },
|
||||
{ 0x1000db23, 0x00 },
|
||||
{ 0x0000d540, 0x01 },
|
||||
{ 0x0000c081, 0xfc },
|
||||
{ 0x0000f01e, 0x80 },
|
||||
{ 0x0000d540, 0x21 },
|
||||
{ 0xc01b, 0xfc },
|
||||
{ 0xc5d1, 0x89 },
|
||||
{ 0xc5d8, 0x0a },
|
||||
|
||||
@@ -1045,8 +1045,8 @@ static int fsl_asoc_card_probe(struct platform_device *pdev)
|
||||
* The notifier is initialized in snd_soc_card_jack_new(), then
|
||||
* snd_soc_jack_notifier_register can be called.
|
||||
*/
|
||||
if (of_property_read_bool(np, "hp-det-gpios") ||
|
||||
of_property_read_bool(np, "hp-det-gpio") /* deprecated */) {
|
||||
if (of_property_present(np, "hp-det-gpios") ||
|
||||
of_property_present(np, "hp-det-gpio") /* deprecated */) {
|
||||
ret = simple_util_init_jack(&priv->card, &priv->hp_jack,
|
||||
1, NULL, "Headphone Jack");
|
||||
if (ret)
|
||||
@@ -1055,8 +1055,8 @@ static int fsl_asoc_card_probe(struct platform_device *pdev)
|
||||
snd_soc_jack_notifier_register(&priv->hp_jack.jack, &hp_jack_nb);
|
||||
}
|
||||
|
||||
if (of_property_read_bool(np, "mic-det-gpios") ||
|
||||
of_property_read_bool(np, "mic-det-gpio") /* deprecated */) {
|
||||
if (of_property_present(np, "mic-det-gpios") ||
|
||||
of_property_present(np, "mic-det-gpio") /* deprecated */) {
|
||||
ret = simple_util_init_jack(&priv->card, &priv->mic_jack,
|
||||
0, NULL, "Mic Jack");
|
||||
if (ret)
|
||||
|
||||
@@ -473,5 +473,8 @@ struct snd_soc_component_driver fsl_asrc_component = {
|
||||
.pointer = fsl_asrc_dma_pcm_pointer,
|
||||
.pcm_construct = fsl_asrc_dma_pcm_new,
|
||||
.legacy_dai_naming = 1,
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
.debugfs_prefix = "asrc",
|
||||
#endif
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(fsl_asrc_component);
|
||||
|
||||
@@ -1577,6 +1577,9 @@ static const struct snd_soc_component_driver fsl_easrc_component = {
|
||||
.controls = fsl_easrc_snd_controls,
|
||||
.num_controls = ARRAY_SIZE(fsl_easrc_snd_controls),
|
||||
.legacy_dai_naming = 1,
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
.debugfs_prefix = "easrc",
|
||||
#endif
|
||||
};
|
||||
|
||||
static const struct reg_default fsl_easrc_reg_defaults[] = {
|
||||
|
||||
@@ -917,8 +917,14 @@ static int fsl_sai_startup(struct snd_pcm_substream *substream,
|
||||
tx ? sai->dma_params_tx.maxburst :
|
||||
sai->dma_params_rx.maxburst);
|
||||
|
||||
if (sai->is_consumer_mode[tx])
|
||||
ret = snd_pcm_hw_constraint_list(substream->runtime, 0,
|
||||
SNDRV_PCM_HW_PARAM_RATE, &sai->constraint_rates);
|
||||
SNDRV_PCM_HW_PARAM_RATE,
|
||||
&fsl_sai_rate_constraints);
|
||||
else
|
||||
ret = snd_pcm_hw_constraint_list(substream->runtime, 0,
|
||||
SNDRV_PCM_HW_PARAM_RATE,
|
||||
&sai->constraint_rates);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -1075,6 +1081,7 @@ static const struct reg_default fsl_sai_reg_defaults_ofs0[] = {
|
||||
{FSL_SAI_TDR6, 0},
|
||||
{FSL_SAI_TDR7, 0},
|
||||
{FSL_SAI_TMR, 0},
|
||||
{FSL_SAI_TTCTL, 0},
|
||||
{FSL_SAI_RCR1(0), 0},
|
||||
{FSL_SAI_RCR2(0), 0},
|
||||
{FSL_SAI_RCR3(0), 0},
|
||||
@@ -1098,12 +1105,14 @@ static const struct reg_default fsl_sai_reg_defaults_ofs8[] = {
|
||||
{FSL_SAI_TDR6, 0},
|
||||
{FSL_SAI_TDR7, 0},
|
||||
{FSL_SAI_TMR, 0},
|
||||
{FSL_SAI_TTCTL, 0},
|
||||
{FSL_SAI_RCR1(8), 0},
|
||||
{FSL_SAI_RCR2(8), 0},
|
||||
{FSL_SAI_RCR3(8), 0},
|
||||
{FSL_SAI_RCR4(8), 0},
|
||||
{FSL_SAI_RCR5(8), 0},
|
||||
{FSL_SAI_RMR, 0},
|
||||
{FSL_SAI_RTCTL, 0},
|
||||
{FSL_SAI_MCTL, 0},
|
||||
{FSL_SAI_MDIV, 0},
|
||||
};
|
||||
|
||||
@@ -1323,6 +1323,7 @@ static const struct reg_default fsl_xcvr_phy_reg_defaults[] = {
|
||||
};
|
||||
|
||||
static const struct regmap_config fsl_xcvr_regmap_phy_cfg = {
|
||||
.name = "phy",
|
||||
.reg_bits = 8,
|
||||
.reg_stride = 4,
|
||||
.val_bits = 32,
|
||||
@@ -1335,6 +1336,7 @@ static const struct regmap_config fsl_xcvr_regmap_phy_cfg = {
|
||||
};
|
||||
|
||||
static const struct regmap_config fsl_xcvr_regmap_pllv0_cfg = {
|
||||
.name = "pllv0",
|
||||
.reg_bits = 8,
|
||||
.reg_stride = 4,
|
||||
.val_bits = 32,
|
||||
@@ -1345,6 +1347,7 @@ static const struct regmap_config fsl_xcvr_regmap_pllv0_cfg = {
|
||||
};
|
||||
|
||||
static const struct regmap_config fsl_xcvr_regmap_pllv1_cfg = {
|
||||
.name = "pllv1",
|
||||
.reg_bits = 8,
|
||||
.reg_stride = 4,
|
||||
.val_bits = 32,
|
||||
|
||||
@@ -699,6 +699,69 @@ static const struct snd_soc_acpi_adr_device cs35l56_1_fb_adr[] = {
|
||||
},
|
||||
};
|
||||
|
||||
static const struct snd_soc_acpi_adr_device cs35l56_6amp_1_fb_adr[] = {
|
||||
{
|
||||
.adr = 0x00013701FA355601ull,
|
||||
.num_endpoints = ARRAY_SIZE(cs35l56_r_fb_endpoints),
|
||||
.endpoints = cs35l56_r_fb_endpoints,
|
||||
.name_prefix = "AMP6"
|
||||
},
|
||||
{
|
||||
.adr = 0x00013601FA355601ull,
|
||||
.num_endpoints = ARRAY_SIZE(cs35l56_3_fb_endpoints),
|
||||
.endpoints = cs35l56_3_fb_endpoints,
|
||||
.name_prefix = "AMP5"
|
||||
},
|
||||
{
|
||||
.adr = 0x00013501FA355601ull,
|
||||
.num_endpoints = ARRAY_SIZE(cs35l56_5_fb_endpoints),
|
||||
.endpoints = cs35l56_5_fb_endpoints,
|
||||
.name_prefix = "AMP4"
|
||||
},
|
||||
};
|
||||
|
||||
static const struct snd_soc_acpi_adr_device cs35l63_6amp_3_fb_adr[] = {
|
||||
{
|
||||
.adr = 0x00033001FA356301ull,
|
||||
.num_endpoints = ARRAY_SIZE(cs35l56_l_fb_endpoints),
|
||||
.endpoints = cs35l56_l_fb_endpoints,
|
||||
.name_prefix = "AMP1"
|
||||
},
|
||||
{
|
||||
.adr = 0x00033201FA356301ull,
|
||||
.num_endpoints = ARRAY_SIZE(cs35l56_2_fb_endpoints),
|
||||
.endpoints = cs35l56_2_fb_endpoints,
|
||||
.name_prefix = "AMP3"
|
||||
},
|
||||
{
|
||||
.adr = 0x00033401FA356301ull,
|
||||
.num_endpoints = ARRAY_SIZE(cs35l56_4_fb_endpoints),
|
||||
.endpoints = cs35l56_4_fb_endpoints,
|
||||
.name_prefix = "AMP5"
|
||||
},
|
||||
};
|
||||
|
||||
static const struct snd_soc_acpi_adr_device cs35l63_6amp_2_fb_adr[] = {
|
||||
{
|
||||
.adr = 0x00023101FA356301ull,
|
||||
.num_endpoints = ARRAY_SIZE(cs35l56_r_fb_endpoints),
|
||||
.endpoints = cs35l56_r_fb_endpoints,
|
||||
.name_prefix = "AMP2"
|
||||
},
|
||||
{
|
||||
.adr = 0x00023301FA356301ull,
|
||||
.num_endpoints = ARRAY_SIZE(cs35l56_3_fb_endpoints),
|
||||
.endpoints = cs35l56_3_fb_endpoints,
|
||||
.name_prefix = "AMP4"
|
||||
},
|
||||
{
|
||||
.adr = 0x00023501FA356301ull,
|
||||
.num_endpoints = ARRAY_SIZE(cs35l56_5_fb_endpoints),
|
||||
.endpoints = cs35l56_5_fb_endpoints,
|
||||
.name_prefix = "AMP6"
|
||||
},
|
||||
};
|
||||
|
||||
static const struct snd_soc_acpi_adr_device cs35l56_2_r_adr[] = {
|
||||
{
|
||||
.adr = 0x00023201FA355601ull,
|
||||
@@ -1069,6 +1132,35 @@ static const struct snd_soc_acpi_link_adr mtl_cs35l56_x8_link0_link1_fb[] = {
|
||||
{}
|
||||
};
|
||||
|
||||
static const struct snd_soc_acpi_link_adr mtl_cs35l56_x6_link0_link1_fb[] = {
|
||||
{
|
||||
.mask = BIT(1),
|
||||
.num_adr = ARRAY_SIZE(cs35l56_6amp_1_fb_adr),
|
||||
.adr_d = cs35l56_6amp_1_fb_adr,
|
||||
},
|
||||
{
|
||||
.mask = BIT(0),
|
||||
/* First 3 amps in cs35l56_0_fb_adr */
|
||||
.num_adr = 3,
|
||||
.adr_d = cs35l56_0_fb_adr,
|
||||
},
|
||||
{}
|
||||
};
|
||||
|
||||
static const struct snd_soc_acpi_link_adr mtl_cs35l63_x6_link2_link3_fb[] = {
|
||||
{
|
||||
.mask = BIT(3),
|
||||
.num_adr = ARRAY_SIZE(cs35l63_6amp_3_fb_adr),
|
||||
.adr_d = cs35l63_6amp_3_fb_adr,
|
||||
},
|
||||
{
|
||||
.mask = BIT(2),
|
||||
.num_adr = ARRAY_SIZE(cs35l63_6amp_2_fb_adr),
|
||||
.adr_d = cs35l63_6amp_2_fb_adr,
|
||||
},
|
||||
{}
|
||||
};
|
||||
|
||||
static const struct snd_soc_acpi_link_adr mtl_cs35l63_x2_link1_link3_fb[] = {
|
||||
{
|
||||
.mask = BIT(3),
|
||||
@@ -1189,6 +1281,12 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_mtl_sdw_machines[] = {
|
||||
.sof_tplg_filename = "sof-mtl-cs35l56-l01-fb8.tplg",
|
||||
.get_function_tplg_files = sof_sdw_get_tplg_files,
|
||||
},
|
||||
{
|
||||
.link_mask = BIT(0) | BIT(1),
|
||||
.links = mtl_cs35l56_x6_link0_link1_fb,
|
||||
.drv_name = "sof_sdw",
|
||||
.sof_tplg_filename = "sof-mtl-cs35l56-l01-fb6.tplg"
|
||||
},
|
||||
{
|
||||
.link_mask = BIT(0),
|
||||
.links = mtl_cs42l43_l0,
|
||||
@@ -1202,6 +1300,12 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_mtl_sdw_machines[] = {
|
||||
.drv_name = "sof_sdw",
|
||||
.sof_tplg_filename = "sof-mtl-cs35l56-l01-fb8.tplg",
|
||||
},
|
||||
{
|
||||
.link_mask = BIT(2) | BIT(3),
|
||||
.links = mtl_cs35l63_x6_link2_link3_fb,
|
||||
.drv_name = "sof_sdw",
|
||||
.sof_tplg_filename = "sof-mtl-cs35l56-l01-fb6.tplg",
|
||||
},
|
||||
{
|
||||
.link_mask = GENMASK(3, 0),
|
||||
.links = mtl_3_in_1_sdca,
|
||||
|
||||
@@ -15,49 +15,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_nvl_machines[] = {
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_nvl_machines);
|
||||
|
||||
/*
|
||||
* Multi-function codecs with three endpoints created for
|
||||
* headset, amp and dmic functions.
|
||||
*/
|
||||
static const struct snd_soc_acpi_endpoint rt_mf_endpoints[] = {
|
||||
{
|
||||
.num = 0,
|
||||
.aggregated = 0,
|
||||
.group_position = 0,
|
||||
.group_id = 0,
|
||||
},
|
||||
{
|
||||
.num = 1,
|
||||
.aggregated = 0,
|
||||
.group_position = 0,
|
||||
.group_id = 0,
|
||||
},
|
||||
{
|
||||
.num = 2,
|
||||
.aggregated = 0,
|
||||
.group_position = 0,
|
||||
.group_id = 0,
|
||||
},
|
||||
};
|
||||
|
||||
static const struct snd_soc_acpi_adr_device rt722_3_single_adr[] = {
|
||||
{
|
||||
.adr = 0x000330025d072201ull,
|
||||
.num_endpoints = ARRAY_SIZE(rt_mf_endpoints),
|
||||
.endpoints = rt_mf_endpoints,
|
||||
.name_prefix = "rt722"
|
||||
}
|
||||
};
|
||||
|
||||
static const struct snd_soc_acpi_link_adr nvl_rt722_l3[] = {
|
||||
{
|
||||
.mask = BIT(3),
|
||||
.num_adr = ARRAY_SIZE(rt722_3_single_adr),
|
||||
.adr_d = rt722_3_single_adr,
|
||||
},
|
||||
{}
|
||||
};
|
||||
|
||||
/* this table is used when there is no I2S codec present */
|
||||
struct snd_soc_acpi_mach snd_soc_acpi_intel_nvl_sdw_machines[] = {
|
||||
/* mockup tests need to be first */
|
||||
@@ -79,12 +36,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_nvl_sdw_machines[] = {
|
||||
.drv_name = "sof_sdw",
|
||||
.sof_tplg_filename = "sof-nvl-rt715-rt711-rt1308-mono.tplg",
|
||||
},
|
||||
{
|
||||
.link_mask = BIT(3),
|
||||
.links = nvl_rt722_l3,
|
||||
.drv_name = "sof_sdw",
|
||||
.sof_tplg_filename = "sof-nvl-rt722.tplg",
|
||||
},
|
||||
{},
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_nvl_sdw_machines);
|
||||
|
||||
@@ -28,7 +28,7 @@ enum tplg_device_id {
|
||||
#define SOF_INTEL_PLATFORM_NAME_MAX 4
|
||||
|
||||
int sof_sdw_get_tplg_files(struct snd_soc_card *card, const struct snd_soc_acpi_mach *mach,
|
||||
const char *prefix, const char ***tplg_files)
|
||||
const char *prefix, const char ***tplg_files, bool best_effort)
|
||||
{
|
||||
struct snd_soc_acpi_mach_params mach_params = mach->mach_params;
|
||||
struct snd_soc_dai_link *dai_link;
|
||||
@@ -87,6 +87,9 @@ int sof_sdw_get_tplg_files(struct snd_soc_card *card, const struct snd_soc_acpi_
|
||||
dev_dbg(card->dev,
|
||||
"dai_link %s is not supported by separated tplg yet\n",
|
||||
dai_link->name);
|
||||
if (best_effort)
|
||||
continue;
|
||||
|
||||
return 0;
|
||||
}
|
||||
if (tplg_mask & BIT(tplg_dev))
|
||||
|
||||
@@ -10,6 +10,6 @@
|
||||
#define _SND_SOC_ACPI_INTEL_GET_TPLG_H
|
||||
|
||||
int sof_sdw_get_tplg_files(struct snd_soc_card *card, const struct snd_soc_acpi_mach *mach,
|
||||
const char *prefix, const char ***tplg_files);
|
||||
const char *prefix, const char ***tplg_files, bool best_effort);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -365,10 +365,12 @@ static int sdm845_snd_startup(struct snd_pcm_substream *substream)
|
||||
snd_soc_dai_set_fmt(codec_dai, codec_dai_fmt);
|
||||
break;
|
||||
case QUATERNARY_MI2S_RX:
|
||||
codec_dai_fmt |= SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_I2S;
|
||||
snd_soc_dai_set_sysclk(cpu_dai,
|
||||
Q6AFE_LPASS_CLK_ID_QUAD_MI2S_IBIT,
|
||||
MI2S_BCLK_RATE, SNDRV_PCM_STREAM_PLAYBACK);
|
||||
snd_soc_dai_set_fmt(cpu_dai, fmt);
|
||||
snd_soc_dai_set_fmt(codec_dai, codec_dai_fmt);
|
||||
break;
|
||||
|
||||
case QUATERNARY_TDM_RX_0:
|
||||
|
||||
@@ -1534,8 +1534,10 @@ int asoc_sdw_parse_sdw_endpoints(struct snd_soc_card *card,
|
||||
* endpoint check is not necessary
|
||||
*/
|
||||
if (dai_info->quirk &&
|
||||
!(dai_info->quirk_exclude ^ !!(dai_info->quirk & ctx->mc_quirk)))
|
||||
!(dai_info->quirk_exclude ^ !!(dai_info->quirk & ctx->mc_quirk))) {
|
||||
(*num_devs)--;
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
/* Check SDCA codec endpoint if there is no matching quirk */
|
||||
ret = is_sdca_endpoint_present(dev, codec_info, adr_link, i, j);
|
||||
@@ -1543,9 +1545,11 @@ int asoc_sdw_parse_sdw_endpoints(struct snd_soc_card *card,
|
||||
return ret;
|
||||
|
||||
/* The endpoint is not present, skip */
|
||||
if (!ret)
|
||||
if (!ret) {
|
||||
(*num_devs)--;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
dev_dbg(dev,
|
||||
"Add dev: %d, 0x%llx end: %d, dai: %d, %c/%c to %s: %d\n",
|
||||
|
||||
@@ -111,7 +111,8 @@ int snd_soc_put_enum_double(struct snd_kcontrol *kcontrol,
|
||||
EXPORT_SYMBOL_GPL(snd_soc_put_enum_double);
|
||||
|
||||
static int sdca_soc_q78_reg_to_ctl(struct soc_mixer_control *mc, unsigned int reg_val,
|
||||
unsigned int mask, unsigned int shift, int max)
|
||||
unsigned int mask, unsigned int shift, int max,
|
||||
bool sx)
|
||||
{
|
||||
int val = reg_val;
|
||||
|
||||
@@ -141,20 +142,26 @@ static unsigned int sdca_soc_q78_ctl_to_reg(struct soc_mixer_control *mc, int va
|
||||
}
|
||||
|
||||
static int soc_mixer_reg_to_ctl(struct soc_mixer_control *mc, unsigned int reg_val,
|
||||
unsigned int mask, unsigned int shift, int max)
|
||||
unsigned int mask, unsigned int shift, int max,
|
||||
bool sx)
|
||||
{
|
||||
int val = (reg_val >> shift) & mask;
|
||||
|
||||
if (mc->sign_bit)
|
||||
val = sign_extend32(val, mc->sign_bit);
|
||||
|
||||
if (sx) {
|
||||
val -= mc->min; // SX controls intentionally can overflow here
|
||||
val = min_t(unsigned int, val & mask, max);
|
||||
} else {
|
||||
val = clamp(val, mc->min, mc->max);
|
||||
val -= mc->min;
|
||||
}
|
||||
|
||||
if (mc->invert)
|
||||
val = max - val;
|
||||
|
||||
return val & mask;
|
||||
return val;
|
||||
}
|
||||
|
||||
static unsigned int soc_mixer_ctl_to_reg(struct soc_mixer_control *mc, int val,
|
||||
@@ -280,9 +287,10 @@ static int soc_put_volsw(struct snd_kcontrol *kcontrol,
|
||||
|
||||
static int soc_get_volsw(struct snd_kcontrol *kcontrol,
|
||||
struct snd_ctl_elem_value *ucontrol,
|
||||
struct soc_mixer_control *mc, int mask, int max)
|
||||
struct soc_mixer_control *mc, int mask, int max, bool sx)
|
||||
{
|
||||
int (*reg_to_ctl)(struct soc_mixer_control *, unsigned int, unsigned int, unsigned int, int);
|
||||
int (*reg_to_ctl)(struct soc_mixer_control *, unsigned int, unsigned int,
|
||||
unsigned int, int, bool);
|
||||
struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
|
||||
unsigned int reg_val;
|
||||
int val;
|
||||
@@ -293,16 +301,16 @@ static int soc_get_volsw(struct snd_kcontrol *kcontrol,
|
||||
reg_to_ctl = soc_mixer_reg_to_ctl;
|
||||
|
||||
reg_val = snd_soc_component_read(component, mc->reg);
|
||||
val = reg_to_ctl(mc, reg_val, mask, mc->shift, max);
|
||||
val = reg_to_ctl(mc, reg_val, mask, mc->shift, max, sx);
|
||||
|
||||
ucontrol->value.integer.value[0] = val;
|
||||
|
||||
if (snd_soc_volsw_is_stereo(mc)) {
|
||||
if (mc->reg == mc->rreg) {
|
||||
val = reg_to_ctl(mc, reg_val, mask, mc->rshift, max);
|
||||
val = reg_to_ctl(mc, reg_val, mask, mc->rshift, max, sx);
|
||||
} else {
|
||||
reg_val = snd_soc_component_read(component, mc->rreg);
|
||||
val = reg_to_ctl(mc, reg_val, mask, mc->shift, max);
|
||||
val = reg_to_ctl(mc, reg_val, mask, mc->shift, max, sx);
|
||||
}
|
||||
|
||||
ucontrol->value.integer.value[1] = val;
|
||||
@@ -371,7 +379,7 @@ int snd_soc_get_volsw(struct snd_kcontrol *kcontrol,
|
||||
(struct soc_mixer_control *)kcontrol->private_value;
|
||||
unsigned int mask = soc_mixer_mask(mc);
|
||||
|
||||
return soc_get_volsw(kcontrol, ucontrol, mc, mask, mc->max - mc->min);
|
||||
return soc_get_volsw(kcontrol, ucontrol, mc, mask, mc->max - mc->min, false);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(snd_soc_get_volsw);
|
||||
|
||||
@@ -413,7 +421,7 @@ int snd_soc_get_volsw_sx(struct snd_kcontrol *kcontrol,
|
||||
(struct soc_mixer_control *)kcontrol->private_value;
|
||||
unsigned int mask = soc_mixer_sx_mask(mc);
|
||||
|
||||
return soc_get_volsw(kcontrol, ucontrol, mc, mask, mc->max);
|
||||
return soc_get_volsw(kcontrol, ucontrol, mc, mask, mc->max, true);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(snd_soc_get_volsw_sx);
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ static const struct sof_dev_desc mtl_desc = {
|
||||
[SOF_IPC_TYPE_4] = "intel/sof-ipc4-lib/mtl",
|
||||
},
|
||||
.default_tplg_path = {
|
||||
[SOF_IPC_TYPE_4] = "intel/sof-ace-tplg",
|
||||
[SOF_IPC_TYPE_4] = "intel/sof-ipc4-tplg",
|
||||
},
|
||||
.default_fw_filename = {
|
||||
[SOF_IPC_TYPE_4] = "sof-mtl.ri",
|
||||
@@ -77,7 +77,7 @@ static const struct sof_dev_desc arl_desc = {
|
||||
[SOF_IPC_TYPE_4] = "intel/sof-ipc4-lib/arl",
|
||||
},
|
||||
.default_tplg_path = {
|
||||
[SOF_IPC_TYPE_4] = "intel/sof-ace-tplg",
|
||||
[SOF_IPC_TYPE_4] = "intel/sof-ipc4-tplg",
|
||||
},
|
||||
.default_fw_filename = {
|
||||
[SOF_IPC_TYPE_4] = "sof-arl.ri",
|
||||
@@ -107,7 +107,7 @@ static const struct sof_dev_desc arl_s_desc = {
|
||||
[SOF_IPC_TYPE_4] = "intel/sof-ipc4-lib/arl-s",
|
||||
},
|
||||
.default_tplg_path = {
|
||||
[SOF_IPC_TYPE_4] = "intel/sof-ace-tplg",
|
||||
[SOF_IPC_TYPE_4] = "intel/sof-ipc4-tplg",
|
||||
},
|
||||
.default_fw_filename = {
|
||||
[SOF_IPC_TYPE_4] = "sof-arl-s.ri",
|
||||
|
||||
@@ -1752,11 +1752,9 @@ snd_sof_get_nhlt_endpoint_data(struct snd_sof_dev *sdev, struct snd_sof_dai *dai
|
||||
channel_count = params_channels(params);
|
||||
sample_rate = params_rate(params);
|
||||
bit_depth = params_width(params);
|
||||
/*
|
||||
* Look for 32-bit blob first instead of 16-bit if copier
|
||||
* supports multiple formats
|
||||
*/
|
||||
if (bit_depth == 16 && !single_bitdepth) {
|
||||
|
||||
/* Prefer 32-bit blob if copier supports multiple formats */
|
||||
if (bit_depth <= 16 && !single_bitdepth) {
|
||||
dev_dbg(sdev->dev, "Looking for 32-bit blob first for DMIC\n");
|
||||
format_change = true;
|
||||
bit_depth = 32;
|
||||
@@ -1799,10 +1797,18 @@ snd_sof_get_nhlt_endpoint_data(struct snd_sof_dev *sdev, struct snd_sof_dai *dai
|
||||
if (format_change) {
|
||||
/*
|
||||
* The 32-bit blob was not found in NHLT table, try to
|
||||
* look for one based on the params
|
||||
* look for 16-bit for DMIC or based on the params for
|
||||
* SSP
|
||||
*/
|
||||
if (linktype == SOF_DAI_INTEL_DMIC) {
|
||||
bit_depth = 16;
|
||||
if (params_width(params) == 16)
|
||||
format_change = false;
|
||||
} else {
|
||||
bit_depth = params_width(params);
|
||||
format_change = false;
|
||||
}
|
||||
|
||||
get_new_blob = true;
|
||||
} else if (linktype == SOF_DAI_INTEL_DMIC && !single_bitdepth) {
|
||||
/*
|
||||
@@ -1837,7 +1843,7 @@ snd_sof_get_nhlt_endpoint_data(struct snd_sof_dev *sdev, struct snd_sof_dai *dai
|
||||
*len = cfg->size >> 2;
|
||||
*dst = (u32 *)cfg->caps;
|
||||
|
||||
if (format_change) {
|
||||
if (format_change || params_format(params) == SNDRV_PCM_FORMAT_FLOAT_LE) {
|
||||
/*
|
||||
* Update the params to reflect that different blob was loaded
|
||||
* instead of the requested bit depth (16 -> 32 or 32 -> 16).
|
||||
@@ -2280,8 +2286,19 @@ sof_ipc4_prepare_copier_module(struct snd_sof_widget *swidget,
|
||||
ch_map >>= 4;
|
||||
}
|
||||
|
||||
if (swidget->id == snd_soc_dapm_dai_in && ch_count == out_ref_channels) {
|
||||
/*
|
||||
* For playback DAI widgets where the channel number is equal to
|
||||
* the output reference channels, set the step = 0 to ensure all
|
||||
* the ch_mask is applied to all alh mappings.
|
||||
*/
|
||||
mask = ch_mask;
|
||||
step = 0;
|
||||
} else {
|
||||
step = ch_count / blob->alh_cfg.device_count;
|
||||
mask = GENMASK(step - 1, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Set each gtw_cfg.node_id to blob->alh_cfg.mapping[]
|
||||
* for all widgets with the same stream name
|
||||
@@ -2316,8 +2333,9 @@ sof_ipc4_prepare_copier_module(struct snd_sof_widget *swidget,
|
||||
}
|
||||
|
||||
/*
|
||||
* Set the same channel mask for playback as the audio data is
|
||||
* duplicated for all speakers. For capture, split the channels
|
||||
* Set the same channel mask if the widget channel count is the same
|
||||
* as the FE channels for playback as the audio data is duplicated
|
||||
* for all speakers in this case. Otherwise, split the channels
|
||||
* among the aggregated DAIs. For example, with 4 channels on 2
|
||||
* aggregated DAIs, the channel_mask should be 0x3 and 0xc for the
|
||||
* two DAI's.
|
||||
@@ -2326,9 +2344,6 @@ sof_ipc4_prepare_copier_module(struct snd_sof_widget *swidget,
|
||||
* the tables in soc_acpi files depending on the _ADR and devID
|
||||
* registers for each codec.
|
||||
*/
|
||||
if (w->id == snd_soc_dapm_dai_in)
|
||||
blob->alh_cfg.mapping[i].channel_mask = ch_mask;
|
||||
else
|
||||
blob->alh_cfg.mapping[i].channel_mask = mask << (step * i);
|
||||
|
||||
i++;
|
||||
|
||||
@@ -2106,8 +2106,8 @@ static int sof_route_load(struct snd_soc_component *scomp, int index,
|
||||
/* source component */
|
||||
source_swidget = snd_sof_find_swidget(scomp, (char *)route->source);
|
||||
if (!source_swidget) {
|
||||
dev_err(scomp->dev, "error: source %s not found\n",
|
||||
route->source);
|
||||
dev_err(scomp->dev, "source %s for sink %s is not found\n",
|
||||
route->source, route->sink);
|
||||
ret = -EINVAL;
|
||||
goto err;
|
||||
}
|
||||
@@ -2125,8 +2125,8 @@ static int sof_route_load(struct snd_soc_component *scomp, int index,
|
||||
/* sink component */
|
||||
sink_swidget = snd_sof_find_swidget(scomp, (char *)route->sink);
|
||||
if (!sink_swidget) {
|
||||
dev_err(scomp->dev, "error: sink %s not found\n",
|
||||
route->sink);
|
||||
dev_err(scomp->dev, "sink %s for source %s is not found\n",
|
||||
route->sink, route->source);
|
||||
ret = -EINVAL;
|
||||
goto err;
|
||||
}
|
||||
@@ -2506,12 +2506,28 @@ int snd_sof_load_topology(struct snd_soc_component *scomp, const char *file)
|
||||
if (!tplg_files)
|
||||
return -ENOMEM;
|
||||
|
||||
/* Try to use function topologies if possible */
|
||||
if (!sof_pdata->disable_function_topology && !disable_function_topology &&
|
||||
sof_pdata->machine && sof_pdata->machine->get_function_tplg_files) {
|
||||
/*
|
||||
* When the topology name contains 'dummy' word, it means that
|
||||
* there is no fallback option to monolithic topology in case
|
||||
* any of the function topologies might be missing.
|
||||
* In this case we should use best effort to form the card,
|
||||
* ignoring functionalities that we are missing a fragment for.
|
||||
*
|
||||
* Note: monolithic topologies also ignore these possibly
|
||||
* missing functions, so the functionality of the card would be
|
||||
* identical to the case if there would be a fallback monolithic
|
||||
* topology created for the configuration.
|
||||
*/
|
||||
bool no_fallback = strstr(file, "dummy");
|
||||
|
||||
tplg_cnt = sof_pdata->machine->get_function_tplg_files(scomp->card,
|
||||
sof_pdata->machine,
|
||||
tplg_filename_prefix,
|
||||
&tplg_files);
|
||||
&tplg_files,
|
||||
no_fallback);
|
||||
if (tplg_cnt < 0) {
|
||||
kfree(tplg_files);
|
||||
return tplg_cnt;
|
||||
|
||||
@@ -2077,7 +2077,7 @@ static const struct regmap_config tegra210_ahub_regmap_config = {
|
||||
.val_bits = 32,
|
||||
.reg_stride = 4,
|
||||
.max_register = TEGRA210_MAX_REGISTER_ADDR,
|
||||
.cache_type = REGCACHE_FLAT,
|
||||
.cache_type = REGCACHE_FLAT_S,
|
||||
};
|
||||
|
||||
static const struct regmap_config tegra186_ahub_regmap_config = {
|
||||
@@ -2085,7 +2085,7 @@ static const struct regmap_config tegra186_ahub_regmap_config = {
|
||||
.val_bits = 32,
|
||||
.reg_stride = 4,
|
||||
.max_register = TEGRA186_MAX_REGISTER_ADDR,
|
||||
.cache_type = REGCACHE_FLAT,
|
||||
.cache_type = REGCACHE_FLAT_S,
|
||||
};
|
||||
|
||||
static const struct regmap_config tegra264_ahub_regmap_config = {
|
||||
@@ -2094,7 +2094,7 @@ static const struct regmap_config tegra264_ahub_regmap_config = {
|
||||
.reg_stride = 4,
|
||||
.writeable_reg = tegra264_ahub_wr_reg,
|
||||
.max_register = TEGRA264_MAX_REGISTER_ADDR,
|
||||
.cache_type = REGCACHE_FLAT,
|
||||
.cache_type = REGCACHE_FLAT_S,
|
||||
};
|
||||
|
||||
static const struct tegra_ahub_soc_data soc_data_tegra210 = {
|
||||
|
||||
@@ -1481,6 +1481,10 @@ int snd_usb_endpoint_prepare(struct snd_usb_audio *chip,
|
||||
return err;
|
||||
}
|
||||
|
||||
err = snd_usb_select_mode_quirk(chip, ep->cur_audiofmt);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
err = snd_usb_init_pitch(chip, ep->cur_audiofmt);
|
||||
if (err < 0)
|
||||
return err;
|
||||
@@ -1489,10 +1493,6 @@ int snd_usb_endpoint_prepare(struct snd_usb_audio *chip,
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
err = snd_usb_select_mode_quirk(chip, ep->cur_audiofmt);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
/* for UAC2/3, enable the interface altset here at last */
|
||||
if (!iface_first) {
|
||||
err = endpoint_set_interface(chip, ep, true);
|
||||
|
||||
@@ -34,6 +34,7 @@ static u64 parse_audio_format_i_type(struct snd_usb_audio *chip,
|
||||
{
|
||||
int sample_width, sample_bytes;
|
||||
u64 pcm_formats = 0;
|
||||
u64 dsd_formats = 0;
|
||||
|
||||
switch (fp->protocol) {
|
||||
case UAC_VERSION_1:
|
||||
@@ -154,7 +155,9 @@ static u64 parse_audio_format_i_type(struct snd_usb_audio *chip,
|
||||
fp->iface, fp->altsetting, format);
|
||||
}
|
||||
|
||||
pcm_formats |= snd_usb_interface_dsd_format_quirks(chip, fp, sample_bytes);
|
||||
dsd_formats |= snd_usb_interface_dsd_format_quirks(chip, fp, sample_bytes);
|
||||
if (dsd_formats && !fp->dsd_dop)
|
||||
pcm_formats = dsd_formats;
|
||||
|
||||
return pcm_formats;
|
||||
}
|
||||
|
||||
@@ -655,17 +655,25 @@ static void get_meter_levels_from_urb(int s,
|
||||
u8 *meter_urb)
|
||||
{
|
||||
int val = MUC2(meter_urb, s) + (MUC3(meter_urb, s) << 8);
|
||||
int ch = MUB2(meter_urb, s) - 1;
|
||||
|
||||
if (ch < 0)
|
||||
return;
|
||||
|
||||
if (MUA0(meter_urb, s) == 0x61 && MUA1(meter_urb, s) == 0x02 &&
|
||||
MUA2(meter_urb, s) == 0x04 && MUB0(meter_urb, s) == 0x62) {
|
||||
if (ch < SND_US16X08_MAX_CHANNELS) {
|
||||
if (MUC0(meter_urb, s) == 0x72)
|
||||
store->meter_level[MUB2(meter_urb, s) - 1] = val;
|
||||
store->meter_level[ch] = val;
|
||||
if (MUC0(meter_urb, s) == 0xb2)
|
||||
store->comp_level[MUB2(meter_urb, s) - 1] = val;
|
||||
store->comp_level[ch] = val;
|
||||
}
|
||||
}
|
||||
if (MUA0(meter_urb, s) == 0x61 && MUA1(meter_urb, s) == 0x02 &&
|
||||
MUA2(meter_urb, s) == 0x02 && MUB0(meter_urb, s) == 0x62)
|
||||
store->master_level[MUB2(meter_urb, s) - 1] = val;
|
||||
MUA2(meter_urb, s) == 0x02 && MUB0(meter_urb, s) == 0x62) {
|
||||
if (ch < ARRAY_SIZE(store->master_level))
|
||||
store->master_level[ch] = val;
|
||||
}
|
||||
}
|
||||
|
||||
/* Function to retrieve current meter values from the device.
|
||||
|
||||
@@ -2221,7 +2221,7 @@ static const struct usb_audio_quirk_flags_table quirk_flags_table[] = {
|
||||
QUIRK_FLAG_IFACE_DELAY),
|
||||
DEVICE_FLG(0x0644, 0x8044, /* Esoteric D-05X */
|
||||
QUIRK_FLAG_ITF_USB_DSD_DAC | QUIRK_FLAG_CTL_MSG_DELAY |
|
||||
QUIRK_FLAG_IFACE_DELAY),
|
||||
QUIRK_FLAG_IFACE_DELAY | QUIRK_FLAG_FORCE_IFACE_RESET),
|
||||
DEVICE_FLG(0x0644, 0x804a, /* TEAC UD-301 */
|
||||
QUIRK_FLAG_ITF_USB_DSD_DAC | QUIRK_FLAG_CTL_MSG_DELAY |
|
||||
QUIRK_FLAG_IFACE_DELAY),
|
||||
@@ -2229,7 +2229,13 @@ static const struct usb_audio_quirk_flags_table quirk_flags_table[] = {
|
||||
QUIRK_FLAG_FORCE_IFACE_RESET),
|
||||
DEVICE_FLG(0x0644, 0x806b, /* TEAC UD-701 */
|
||||
QUIRK_FLAG_ITF_USB_DSD_DAC | QUIRK_FLAG_CTL_MSG_DELAY |
|
||||
QUIRK_FLAG_IFACE_DELAY),
|
||||
QUIRK_FLAG_IFACE_DELAY | QUIRK_FLAG_FORCE_IFACE_RESET),
|
||||
DEVICE_FLG(0x0644, 0x807d, /* TEAC UD-507 */
|
||||
QUIRK_FLAG_ITF_USB_DSD_DAC | QUIRK_FLAG_CTL_MSG_DELAY |
|
||||
QUIRK_FLAG_IFACE_DELAY | QUIRK_FLAG_FORCE_IFACE_RESET),
|
||||
DEVICE_FLG(0x0644, 0x806c, /* Esoteric XD */
|
||||
QUIRK_FLAG_ITF_USB_DSD_DAC | QUIRK_FLAG_CTL_MSG_DELAY |
|
||||
QUIRK_FLAG_IFACE_DELAY | QUIRK_FLAG_FORCE_IFACE_RESET),
|
||||
DEVICE_FLG(0x06f8, 0xb000, /* Hercules DJ Console (Windows Edition) */
|
||||
QUIRK_FLAG_IGNORE_CTL_ERROR),
|
||||
DEVICE_FLG(0x06f8, 0xd002, /* Hercules DJ Console (Macintosh Edition) */
|
||||
@@ -2388,6 +2394,8 @@ static const struct usb_audio_quirk_flags_table quirk_flags_table[] = {
|
||||
QUIRK_FLAG_CTL_MSG_DELAY_1M),
|
||||
DEVICE_FLG(0x30be, 0x0101, /* Schiit Hel */
|
||||
QUIRK_FLAG_IGNORE_CTL_ERROR),
|
||||
DEVICE_FLG(0x3255, 0x0000, /* Luxman D-10X */
|
||||
QUIRK_FLAG_ITF_USB_DSD_DAC | QUIRK_FLAG_CTL_MSG_DELAY),
|
||||
DEVICE_FLG(0x339b, 0x3a07, /* Synaptics HONOR USB-C HEADSET */
|
||||
QUIRK_FLAG_MIXER_PLAYBACK_MIN_MUTE),
|
||||
DEVICE_FLG(0x413c, 0xa506, /* Dell AE515 sound bar */
|
||||
@@ -2431,6 +2439,8 @@ static const struct usb_audio_quirk_flags_table quirk_flags_table[] = {
|
||||
QUIRK_FLAG_DSD_RAW),
|
||||
VENDOR_FLG(0x2622, /* IAG Limited devices */
|
||||
QUIRK_FLAG_DSD_RAW),
|
||||
VENDOR_FLG(0x2772, /* Musical Fidelity devices */
|
||||
QUIRK_FLAG_DSD_RAW),
|
||||
VENDOR_FLG(0x278b, /* Rotel? */
|
||||
QUIRK_FLAG_DSD_RAW),
|
||||
VENDOR_FLG(0x292b, /* Gustard/Ess based devices */
|
||||
|
||||
Reference in New Issue
Block a user