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
...

+313 -137
+4 -1
include/sound/soc-acpi.h
··· 203 203 * @mach: the pointer of the machine driver 204 204 * @prefix: the prefix of the topology file name. Typically, it is the path. 205 205 * @tplg_files: the pointer of the array of the topology file names. 206 + * @best_effort: ignore non supported links and try to build the card in best effort 207 + * with supported links 206 208 */ 207 209 /* Descriptor for SST ASoC machine driver */ 208 210 struct snd_soc_acpi_mach { ··· 226 224 const u32 tplg_quirk_mask; 227 225 int (*get_function_tplg_files)(struct snd_soc_card *card, 228 226 const struct snd_soc_acpi_mach *mach, 229 - const char *prefix, const char ***tplg_files); 227 + const char *prefix, const char ***tplg_files, 228 + bool best_effort); 230 229 }; 231 230 232 231 #define SND_SOC_ACPI_MAX_CODECS 3
+26 -6
sound/hda/codecs/realtek/alc269.c
··· 1656 1656 alc236_fixup_hp_micmute_led_vref(codec, fix, action); 1657 1657 } 1658 1658 1659 + static void alc236_fixup_hp_mute_led_micmute_gpio(struct hda_codec *codec, 1660 + const struct hda_fixup *fix, int action) 1661 + { 1662 + struct alc_spec *spec = codec->spec; 1663 + 1664 + if (action == HDA_FIXUP_ACT_PRE_PROBE) 1665 + spec->micmute_led_polarity = 1; 1666 + 1667 + alc236_fixup_hp_mute_led_coefbit2(codec, fix, action); 1668 + alc_fixup_hp_gpio_led(codec, action, 0x00, 0x01); 1669 + } 1670 + 1659 1671 static inline void alc298_samsung_write_coef_pack(struct hda_codec *codec, 1660 1672 const unsigned short coefs[2]) 1661 1673 { ··· 3765 3753 ALC295_FIXUP_DELL_TAS2781_I2C, 3766 3754 ALC245_FIXUP_TAS2781_SPI_2, 3767 3755 ALC287_FIXUP_TXNW2781_I2C, 3756 + ALC287_FIXUP_TXNW2781_I2C_ASUS, 3768 3757 ALC287_FIXUP_YOGA7_14ARB7_I2C, 3769 3758 ALC245_FIXUP_HP_MUTE_LED_COEFBIT, 3770 3759 ALC245_FIXUP_HP_MUTE_LED_V1_COEFBIT, ··· 5339 5326 }, 5340 5327 [ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO] = { 5341 5328 .type = HDA_FIXUP_FUNC, 5342 - .v.func = alc236_fixup_hp_mute_led_coefbit2, 5343 - .chained = true, 5344 - .chain_id = ALC236_FIXUP_HP_GPIO_LED, 5329 + .v.func = alc236_fixup_hp_mute_led_micmute_gpio, 5345 5330 }, 5346 5331 [ALC236_FIXUP_LENOVO_INV_DMIC] = { 5347 5332 .type = HDA_FIXUP_FUNC, ··· 6064 6053 .chained = true, 6065 6054 .chain_id = ALC285_FIXUP_THINKPAD_HEADSET_JACK, 6066 6055 }, 6056 + [ALC287_FIXUP_TXNW2781_I2C_ASUS] = { 6057 + .type = HDA_FIXUP_FUNC, 6058 + .v.func = tas2781_fixup_txnw_i2c, 6059 + .chained = true, 6060 + .chain_id = ALC294_FIXUP_ASUS_SPK, 6061 + }, 6067 6062 [ALC287_FIXUP_YOGA7_14ARB7_I2C] = { 6068 6063 .type = HDA_FIXUP_FUNC, 6069 6064 .v.func = yoga7_14arb7_fixup_i2c, ··· 6788 6771 SND_PCI_QUIRK(0x103c, 0x8e61, "HP Trekker ", ALC287_FIXUP_CS35L41_I2C_2), 6789 6772 SND_PCI_QUIRK(0x103c, 0x8e62, "HP Trekker ", ALC287_FIXUP_CS35L41_I2C_2), 6790 6773 SND_PCI_QUIRK(0x103c, 0x8e8a, "HP NexusX", ALC245_FIXUP_HP_TAS2781_I2C_MUTE_LED), 6774 + SND_PCI_QUIRK(0x103c, 0x8e9c, "HP 16 Clipper OmniBook X X360", ALC287_FIXUP_CS35L41_I2C_2), 6791 6775 SND_PCI_QUIRK(0x103c, 0x8e9d, "HP 17 Turbine OmniBook X UMA", ALC287_FIXUP_CS35L41_I2C_2), 6792 6776 SND_PCI_QUIRK(0x103c, 0x8e9e, "HP 17 Turbine OmniBook X UMA", ALC287_FIXUP_CS35L41_I2C_2), 6793 6777 SND_PCI_QUIRK(0x103c, 0x8eb6, "HP Abe A6U", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO), 6794 - SND_PCI_QUIRK(0x103c, 0x8eb7, "HP Abe A6U", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO), 6795 6778 SND_PCI_QUIRK(0x103c, 0x8eb8, "HP Abe A6U", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO), 6796 6779 SND_PCI_QUIRK(0x103c, 0x8ec1, "HP 200 G2i", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO), 6797 6780 SND_PCI_QUIRK(0x103c, 0x8ec4, "HP Bantie I6U", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO), ··· 6807 6790 SND_PCI_QUIRK(0x103c, 0x8eda, "HP ZBook Firefly 16W", ALC245_FIXUP_HP_TAS2781_SPI_MUTE_LED), 6808 6791 SND_PCI_QUIRK(0x103c, 0x8ee4, "HP Bantie A6U", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO), 6809 6792 SND_PCI_QUIRK(0x103c, 0x8ee5, "HP Bantie A6U", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO), 6793 + SND_PCI_QUIRK(0x103c, 0x8ee7, "HP Abe A6U", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO), 6810 6794 SND_PCI_QUIRK(0x103c, 0x8f0c, "HP ZBook X G2i 16W", ALC236_FIXUP_HP_GPIO_LED), 6811 6795 SND_PCI_QUIRK(0x103c, 0x8f0e, "HP ZBook X G2i 16W", ALC236_FIXUP_HP_GPIO_LED), 6812 6796 SND_PCI_QUIRK(0x103c, 0x8f40, "HP ZBook 8 G2a 14", ALC245_FIXUP_HP_TAS2781_I2C_MUTE_LED), 6813 6797 SND_PCI_QUIRK(0x103c, 0x8f41, "HP ZBook 8 G2a 16", ALC245_FIXUP_HP_TAS2781_I2C_MUTE_LED), 6814 6798 SND_PCI_QUIRK(0x103c, 0x8f42, "HP ZBook 8 G2a 14W", ALC245_FIXUP_HP_TAS2781_I2C_MUTE_LED), 6799 + SND_PCI_QUIRK(0x103c, 0x8f57, "HP Trekker G7JC", ALC287_FIXUP_CS35L41_I2C_2), 6815 6800 SND_PCI_QUIRK(0x103c, 0x8f62, "HP ZBook 8 G2a 16W", ALC245_FIXUP_HP_TAS2781_I2C_MUTE_LED), 6816 6801 SND_PCI_QUIRK(0x1043, 0x1032, "ASUS VivoBook X513EA", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE), 6817 6802 SND_PCI_QUIRK(0x1043, 0x1034, "ASUS GU605C", ALC285_FIXUP_ASUS_GU605_SPI_SPEAKER2_TO_DAC1), ··· 6846 6827 SND_PCI_QUIRK(0x1043, 0x12f0, "ASUS X541UV", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE), 6847 6828 SND_PCI_QUIRK(0x1043, 0x1313, "Asus K42JZ", ALC269VB_FIXUP_ASUS_MIC_NO_PRESENCE), 6848 6829 SND_PCI_QUIRK(0x1043, 0x1314, "ASUS GA605K", ALC285_FIXUP_ASUS_GA605K_HEADSET_MIC), 6849 - SND_PCI_QUIRK(0x1043, 0x1384, "ASUS RC73XA", ALC287_FIXUP_TXNW2781_I2C), 6850 - SND_PCI_QUIRK(0x1043, 0x1394, "ASUS RC73YA", ALC287_FIXUP_TXNW2781_I2C), 6830 + SND_PCI_QUIRK(0x1043, 0x1384, "ASUS RC73XA", ALC287_FIXUP_TXNW2781_I2C_ASUS), 6831 + SND_PCI_QUIRK(0x1043, 0x1394, "ASUS RC73YA", ALC287_FIXUP_TXNW2781_I2C_ASUS), 6851 6832 SND_PCI_QUIRK(0x1043, 0x13b0, "ASUS Z550SA", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE), 6852 6833 SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_ASUS_ZENBOOK), 6853 6834 SND_PCI_QUIRK(0x1043, 0x1433, "ASUS GX650PY/PZ/PV/PU/PYV/PZV/PIV/PVV", ALC285_FIXUP_ASUS_I2C_HEADSET_MIC), ··· 7315 7296 SND_PCI_QUIRK(0x1d72, 0x1901, "RedmiBook 14", ALC256_FIXUP_ASUS_HEADSET_MIC), 7316 7297 SND_PCI_QUIRK(0x1d72, 0x1945, "Redmi G", ALC256_FIXUP_ASUS_HEADSET_MIC), 7317 7298 SND_PCI_QUIRK(0x1d72, 0x1947, "RedmiBook Air", ALC255_FIXUP_XIAOMI_HEADSET_MIC), 7299 + SND_PCI_QUIRK(0x1e39, 0xca14, "MEDION NM14LNL", ALC233_FIXUP_MEDION_MTL_SPK), 7318 7300 SND_PCI_QUIRK(0x1ee7, 0x2078, "HONOR BRB-X M1010", ALC2XX_FIXUP_HEADSET_MIC), 7319 7301 SND_PCI_QUIRK(0x1f66, 0x0105, "Ayaneo Portable Game Player", ALC287_FIXUP_CS35L41_I2C_2), 7320 7302 SND_PCI_QUIRK(0x2014, 0x800a, "Positivo ARN50", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
+1 -3
sound/hda/controllers/cix-ipbloq.c
··· 115 115 bus->addr = res->start; 116 116 117 117 irq_id = platform_get_irq(pdev, 0); 118 - if (irq_id < 0) { 119 - dev_err(hda->dev, "failed to get the irq, err = %d\n", irq_id); 118 + if (irq_id < 0) 120 119 return irq_id; 121 - } 122 120 123 121 err = devm_request_irq(hda->dev, irq_id, azx_interrupt, 124 122 0, KBUILD_MODNAME, chip);
+7 -1
sound/pcmcia/pdaudiocf/pdaudiocf.c
··· 131 131 link->config_index = 1; 132 132 link->config_regs = PRESENT_OPTION; 133 133 134 - return pdacf_config(link); 134 + err = pdacf_config(link); 135 + if (err < 0) { 136 + card_list[i] = NULL; 137 + snd_card_free(card); 138 + return err; 139 + } 140 + return 0; 135 141 } 136 142 137 143
+7 -1
sound/pcmcia/vx/vxpocket.c
··· 284 284 285 285 vxp->p_dev = p_dev; 286 286 287 - return vxpocket_config(p_dev); 287 + err = vxpocket_config(p_dev); 288 + if (err < 0) { 289 + card_alloc &= ~(1 << i); 290 + snd_card_free(card); 291 + return err; 292 + } 293 + return 0; 288 294 } 289 295 290 296 static void vxpocket_detach(struct pcmcia_device *link)
+7
sound/soc/amd/yc/acp6x-mach.c
··· 661 661 DMI_MATCH(DMI_PRODUCT_NAME, "Bravo 15 C7UCX"), 662 662 } 663 663 }, 664 + { 665 + .driver_data = &acp6x_card, 666 + .matches = { 667 + DMI_MATCH(DMI_BOARD_VENDOR, "HONOR"), 668 + DMI_MATCH(DMI_PRODUCT_NAME, "GOH-X"), 669 + } 670 + }, 664 671 {} 665 672 }; 666 673
-4
sound/soc/codecs/ak4458.c
··· 783 783 784 784 pm_runtime_enable(&i2c->dev); 785 785 regcache_cache_only(ak4458->regmap, true); 786 - ak4458_reset(ak4458, false); 787 786 788 787 return 0; 789 788 } 790 789 791 790 static void ak4458_i2c_remove(struct i2c_client *i2c) 792 791 { 793 - struct ak4458_priv *ak4458 = i2c_get_clientdata(i2c); 794 - 795 - ak4458_reset(ak4458, true); 796 792 pm_runtime_disable(&i2c->dev); 797 793 } 798 794
+7 -9
sound/soc/codecs/rt1320-sdw.c
··· 115 115 static const struct reg_sequence rt1320_vc_blind_write[] = { 116 116 { 0xc003, 0xe0 }, 117 117 { 0xe80a, 0x01 }, 118 - { 0xc5c3, 0xf3 }, 118 + { 0xc5c3, 0xf2 }, 119 + { 0xc5c8, 0x03 }, 119 120 { 0xc057, 0x51 }, 120 121 { 0xc054, 0x35 }, 121 122 { 0xca05, 0xd6 }, ··· 127 126 { 0xc609, 0x40 }, 128 127 { 0xc046, 0xff }, 129 128 { 0xc045, 0xff }, 130 - { 0xda81, 0x14 }, 131 - { 0xda8d, 0x14 }, 132 129 { 0xc044, 0xff }, 133 130 { 0xc043, 0xff }, 134 131 { 0xc042, 0xff }, ··· 135 136 { 0xcc10, 0x01 }, 136 137 { 0xc700, 0xf0 }, 137 138 { 0xc701, 0x13 }, 138 - { 0xc901, 0x09 }, 139 - { 0xc900, 0xd0 }, 139 + { 0xc901, 0x04 }, 140 + { 0xc900, 0x73 }, 140 141 { 0xde03, 0x05 }, 141 142 { 0xdd0b, 0x0d }, 142 143 { 0xdd0a, 0xff }, ··· 152 153 { 0xf082, 0xff }, 153 154 { 0xf081, 0xff }, 154 155 { 0xf080, 0xff }, 156 + { 0xe801, 0x01 }, 155 157 { 0xe802, 0xf8 }, 156 158 { 0xe803, 0xbe }, 157 159 { 0xc003, 0xc0 }, ··· 202 202 { 0x3fc2bfc3, 0x00 }, 203 203 { 0x3fc2bfc2, 0x00 }, 204 204 { 0x3fc2bfc1, 0x00 }, 205 - { 0x3fc2bfc0, 0x03 }, 205 + { 0x3fc2bfc0, 0x07 }, 206 206 { 0x0000d486, 0x43 }, 207 207 { SDW_SDCA_CTL(FUNC_NUM_AMP, RT1320_SDCA_ENT_PDE23, RT1320_SDCA_CTL_REQ_POWER_STATE, 0), 0x00 }, 208 208 { 0x1000db00, 0x07 }, ··· 241 241 { 0x1000db21, 0x00 }, 242 242 { 0x1000db22, 0x00 }, 243 243 { 0x1000db23, 0x00 }, 244 - { 0x0000d540, 0x01 }, 245 - { 0x0000c081, 0xfc }, 246 - { 0x0000f01e, 0x80 }, 244 + { 0x0000d540, 0x21 }, 247 245 { 0xc01b, 0xfc }, 248 246 { 0xc5d1, 0x89 }, 249 247 { 0xc5d8, 0x0a },
+4 -4
sound/soc/fsl/fsl-asoc-card.c
··· 1045 1045 * The notifier is initialized in snd_soc_card_jack_new(), then 1046 1046 * snd_soc_jack_notifier_register can be called. 1047 1047 */ 1048 - if (of_property_read_bool(np, "hp-det-gpios") || 1049 - of_property_read_bool(np, "hp-det-gpio") /* deprecated */) { 1048 + if (of_property_present(np, "hp-det-gpios") || 1049 + of_property_present(np, "hp-det-gpio") /* deprecated */) { 1050 1050 ret = simple_util_init_jack(&priv->card, &priv->hp_jack, 1051 1051 1, NULL, "Headphone Jack"); 1052 1052 if (ret) ··· 1055 1055 snd_soc_jack_notifier_register(&priv->hp_jack.jack, &hp_jack_nb); 1056 1056 } 1057 1057 1058 - if (of_property_read_bool(np, "mic-det-gpios") || 1059 - of_property_read_bool(np, "mic-det-gpio") /* deprecated */) { 1058 + if (of_property_present(np, "mic-det-gpios") || 1059 + of_property_present(np, "mic-det-gpio") /* deprecated */) { 1060 1060 ret = simple_util_init_jack(&priv->card, &priv->mic_jack, 1061 1061 0, NULL, "Mic Jack"); 1062 1062 if (ret)
+3
sound/soc/fsl/fsl_asrc_dma.c
··· 473 473 .pointer = fsl_asrc_dma_pcm_pointer, 474 474 .pcm_construct = fsl_asrc_dma_pcm_new, 475 475 .legacy_dai_naming = 1, 476 + #ifdef CONFIG_DEBUG_FS 477 + .debugfs_prefix = "asrc", 478 + #endif 476 479 }; 477 480 EXPORT_SYMBOL_GPL(fsl_asrc_component);
+3
sound/soc/fsl/fsl_easrc.c
··· 1577 1577 .controls = fsl_easrc_snd_controls, 1578 1578 .num_controls = ARRAY_SIZE(fsl_easrc_snd_controls), 1579 1579 .legacy_dai_naming = 1, 1580 + #ifdef CONFIG_DEBUG_FS 1581 + .debugfs_prefix = "easrc", 1582 + #endif 1580 1583 }; 1581 1584 1582 1585 static const struct reg_default fsl_easrc_reg_defaults[] = {
+11 -2
sound/soc/fsl/fsl_sai.c
··· 917 917 tx ? sai->dma_params_tx.maxburst : 918 918 sai->dma_params_rx.maxburst); 919 919 920 - ret = snd_pcm_hw_constraint_list(substream->runtime, 0, 921 - SNDRV_PCM_HW_PARAM_RATE, &sai->constraint_rates); 920 + if (sai->is_consumer_mode[tx]) 921 + ret = snd_pcm_hw_constraint_list(substream->runtime, 0, 922 + SNDRV_PCM_HW_PARAM_RATE, 923 + &fsl_sai_rate_constraints); 924 + else 925 + ret = snd_pcm_hw_constraint_list(substream->runtime, 0, 926 + SNDRV_PCM_HW_PARAM_RATE, 927 + &sai->constraint_rates); 922 928 923 929 return ret; 924 930 } ··· 1081 1075 {FSL_SAI_TDR6, 0}, 1082 1076 {FSL_SAI_TDR7, 0}, 1083 1077 {FSL_SAI_TMR, 0}, 1078 + {FSL_SAI_TTCTL, 0}, 1084 1079 {FSL_SAI_RCR1(0), 0}, 1085 1080 {FSL_SAI_RCR2(0), 0}, 1086 1081 {FSL_SAI_RCR3(0), 0}, ··· 1105 1098 {FSL_SAI_TDR6, 0}, 1106 1099 {FSL_SAI_TDR7, 0}, 1107 1100 {FSL_SAI_TMR, 0}, 1101 + {FSL_SAI_TTCTL, 0}, 1108 1102 {FSL_SAI_RCR1(8), 0}, 1109 1103 {FSL_SAI_RCR2(8), 0}, 1110 1104 {FSL_SAI_RCR3(8), 0}, 1111 1105 {FSL_SAI_RCR4(8), 0}, 1112 1106 {FSL_SAI_RCR5(8), 0}, 1113 1107 {FSL_SAI_RMR, 0}, 1108 + {FSL_SAI_RTCTL, 0}, 1114 1109 {FSL_SAI_MCTL, 0}, 1115 1110 {FSL_SAI_MDIV, 0}, 1116 1111 };
+3
sound/soc/fsl/fsl_xcvr.c
··· 1323 1323 }; 1324 1324 1325 1325 static const struct regmap_config fsl_xcvr_regmap_phy_cfg = { 1326 + .name = "phy", 1326 1327 .reg_bits = 8, 1327 1328 .reg_stride = 4, 1328 1329 .val_bits = 32, ··· 1336 1335 }; 1337 1336 1338 1337 static const struct regmap_config fsl_xcvr_regmap_pllv0_cfg = { 1338 + .name = "pllv0", 1339 1339 .reg_bits = 8, 1340 1340 .reg_stride = 4, 1341 1341 .val_bits = 32, ··· 1347 1345 }; 1348 1346 1349 1347 static const struct regmap_config fsl_xcvr_regmap_pllv1_cfg = { 1348 + .name = "pllv1", 1350 1349 .reg_bits = 8, 1351 1350 .reg_stride = 4, 1352 1351 .val_bits = 32,
+104
sound/soc/intel/common/soc-acpi-intel-mtl-match.c
··· 699 699 }, 700 700 }; 701 701 702 + static const struct snd_soc_acpi_adr_device cs35l56_6amp_1_fb_adr[] = { 703 + { 704 + .adr = 0x00013701FA355601ull, 705 + .num_endpoints = ARRAY_SIZE(cs35l56_r_fb_endpoints), 706 + .endpoints = cs35l56_r_fb_endpoints, 707 + .name_prefix = "AMP6" 708 + }, 709 + { 710 + .adr = 0x00013601FA355601ull, 711 + .num_endpoints = ARRAY_SIZE(cs35l56_3_fb_endpoints), 712 + .endpoints = cs35l56_3_fb_endpoints, 713 + .name_prefix = "AMP5" 714 + }, 715 + { 716 + .adr = 0x00013501FA355601ull, 717 + .num_endpoints = ARRAY_SIZE(cs35l56_5_fb_endpoints), 718 + .endpoints = cs35l56_5_fb_endpoints, 719 + .name_prefix = "AMP4" 720 + }, 721 + }; 722 + 723 + static const struct snd_soc_acpi_adr_device cs35l63_6amp_3_fb_adr[] = { 724 + { 725 + .adr = 0x00033001FA356301ull, 726 + .num_endpoints = ARRAY_SIZE(cs35l56_l_fb_endpoints), 727 + .endpoints = cs35l56_l_fb_endpoints, 728 + .name_prefix = "AMP1" 729 + }, 730 + { 731 + .adr = 0x00033201FA356301ull, 732 + .num_endpoints = ARRAY_SIZE(cs35l56_2_fb_endpoints), 733 + .endpoints = cs35l56_2_fb_endpoints, 734 + .name_prefix = "AMP3" 735 + }, 736 + { 737 + .adr = 0x00033401FA356301ull, 738 + .num_endpoints = ARRAY_SIZE(cs35l56_4_fb_endpoints), 739 + .endpoints = cs35l56_4_fb_endpoints, 740 + .name_prefix = "AMP5" 741 + }, 742 + }; 743 + 744 + static const struct snd_soc_acpi_adr_device cs35l63_6amp_2_fb_adr[] = { 745 + { 746 + .adr = 0x00023101FA356301ull, 747 + .num_endpoints = ARRAY_SIZE(cs35l56_r_fb_endpoints), 748 + .endpoints = cs35l56_r_fb_endpoints, 749 + .name_prefix = "AMP2" 750 + }, 751 + { 752 + .adr = 0x00023301FA356301ull, 753 + .num_endpoints = ARRAY_SIZE(cs35l56_3_fb_endpoints), 754 + .endpoints = cs35l56_3_fb_endpoints, 755 + .name_prefix = "AMP4" 756 + }, 757 + { 758 + .adr = 0x00023501FA356301ull, 759 + .num_endpoints = ARRAY_SIZE(cs35l56_5_fb_endpoints), 760 + .endpoints = cs35l56_5_fb_endpoints, 761 + .name_prefix = "AMP6" 762 + }, 763 + }; 764 + 702 765 static const struct snd_soc_acpi_adr_device cs35l56_2_r_adr[] = { 703 766 { 704 767 .adr = 0x00023201FA355601ull, ··· 1132 1069 {} 1133 1070 }; 1134 1071 1072 + static const struct snd_soc_acpi_link_adr mtl_cs35l56_x6_link0_link1_fb[] = { 1073 + { 1074 + .mask = BIT(1), 1075 + .num_adr = ARRAY_SIZE(cs35l56_6amp_1_fb_adr), 1076 + .adr_d = cs35l56_6amp_1_fb_adr, 1077 + }, 1078 + { 1079 + .mask = BIT(0), 1080 + /* First 3 amps in cs35l56_0_fb_adr */ 1081 + .num_adr = 3, 1082 + .adr_d = cs35l56_0_fb_adr, 1083 + }, 1084 + {} 1085 + }; 1086 + 1087 + static const struct snd_soc_acpi_link_adr mtl_cs35l63_x6_link2_link3_fb[] = { 1088 + { 1089 + .mask = BIT(3), 1090 + .num_adr = ARRAY_SIZE(cs35l63_6amp_3_fb_adr), 1091 + .adr_d = cs35l63_6amp_3_fb_adr, 1092 + }, 1093 + { 1094 + .mask = BIT(2), 1095 + .num_adr = ARRAY_SIZE(cs35l63_6amp_2_fb_adr), 1096 + .adr_d = cs35l63_6amp_2_fb_adr, 1097 + }, 1098 + {} 1099 + }; 1100 + 1135 1101 static const struct snd_soc_acpi_link_adr mtl_cs35l63_x2_link1_link3_fb[] = { 1136 1102 { 1137 1103 .mask = BIT(3), ··· 1282 1190 .get_function_tplg_files = sof_sdw_get_tplg_files, 1283 1191 }, 1284 1192 { 1193 + .link_mask = BIT(0) | BIT(1), 1194 + .links = mtl_cs35l56_x6_link0_link1_fb, 1195 + .drv_name = "sof_sdw", 1196 + .sof_tplg_filename = "sof-mtl-cs35l56-l01-fb6.tplg" 1197 + }, 1198 + { 1285 1199 .link_mask = BIT(0), 1286 1200 .links = mtl_cs42l43_l0, 1287 1201 .drv_name = "sof_sdw", ··· 1299 1201 .links = mtl_cs35l63_x2_link1_link3_fb, 1300 1202 .drv_name = "sof_sdw", 1301 1203 .sof_tplg_filename = "sof-mtl-cs35l56-l01-fb8.tplg", 1204 + }, 1205 + { 1206 + .link_mask = BIT(2) | BIT(3), 1207 + .links = mtl_cs35l63_x6_link2_link3_fb, 1208 + .drv_name = "sof_sdw", 1209 + .sof_tplg_filename = "sof-mtl-cs35l56-l01-fb6.tplg", 1302 1210 }, 1303 1211 { 1304 1212 .link_mask = GENMASK(3, 0),
-49
sound/soc/intel/common/soc-acpi-intel-nvl-match.c
··· 15 15 }; 16 16 EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_nvl_machines); 17 17 18 - /* 19 - * Multi-function codecs with three endpoints created for 20 - * headset, amp and dmic functions. 21 - */ 22 - static const struct snd_soc_acpi_endpoint rt_mf_endpoints[] = { 23 - { 24 - .num = 0, 25 - .aggregated = 0, 26 - .group_position = 0, 27 - .group_id = 0, 28 - }, 29 - { 30 - .num = 1, 31 - .aggregated = 0, 32 - .group_position = 0, 33 - .group_id = 0, 34 - }, 35 - { 36 - .num = 2, 37 - .aggregated = 0, 38 - .group_position = 0, 39 - .group_id = 0, 40 - }, 41 - }; 42 - 43 - static const struct snd_soc_acpi_adr_device rt722_3_single_adr[] = { 44 - { 45 - .adr = 0x000330025d072201ull, 46 - .num_endpoints = ARRAY_SIZE(rt_mf_endpoints), 47 - .endpoints = rt_mf_endpoints, 48 - .name_prefix = "rt722" 49 - } 50 - }; 51 - 52 - static const struct snd_soc_acpi_link_adr nvl_rt722_l3[] = { 53 - { 54 - .mask = BIT(3), 55 - .num_adr = ARRAY_SIZE(rt722_3_single_adr), 56 - .adr_d = rt722_3_single_adr, 57 - }, 58 - {} 59 - }; 60 - 61 18 /* this table is used when there is no I2S codec present */ 62 19 struct snd_soc_acpi_mach snd_soc_acpi_intel_nvl_sdw_machines[] = { 63 20 /* mockup tests need to be first */ ··· 35 78 .links = sdw_mockup_mic_headset_1amp, 36 79 .drv_name = "sof_sdw", 37 80 .sof_tplg_filename = "sof-nvl-rt715-rt711-rt1308-mono.tplg", 38 - }, 39 - { 40 - .link_mask = BIT(3), 41 - .links = nvl_rt722_l3, 42 - .drv_name = "sof_sdw", 43 - .sof_tplg_filename = "sof-nvl-rt722.tplg", 44 81 }, 45 82 {}, 46 83 };
+4 -1
sound/soc/intel/common/sof-function-topology-lib.c
··· 28 28 #define SOF_INTEL_PLATFORM_NAME_MAX 4 29 29 30 30 int sof_sdw_get_tplg_files(struct snd_soc_card *card, const struct snd_soc_acpi_mach *mach, 31 - const char *prefix, const char ***tplg_files) 31 + const char *prefix, const char ***tplg_files, bool best_effort) 32 32 { 33 33 struct snd_soc_acpi_mach_params mach_params = mach->mach_params; 34 34 struct snd_soc_dai_link *dai_link; ··· 87 87 dev_dbg(card->dev, 88 88 "dai_link %s is not supported by separated tplg yet\n", 89 89 dai_link->name); 90 + if (best_effort) 91 + continue; 92 + 90 93 return 0; 91 94 } 92 95 if (tplg_mask & BIT(tplg_dev))
+1 -1
sound/soc/intel/common/sof-function-topology-lib.h
··· 10 10 #define _SND_SOC_ACPI_INTEL_GET_TPLG_H 11 11 12 12 int sof_sdw_get_tplg_files(struct snd_soc_card *card, const struct snd_soc_acpi_mach *mach, 13 - const char *prefix, const char ***tplg_files); 13 + const char *prefix, const char ***tplg_files, bool best_effort); 14 14 15 15 #endif
+2
sound/soc/qcom/sdm845.c
··· 365 365 snd_soc_dai_set_fmt(codec_dai, codec_dai_fmt); 366 366 break; 367 367 case QUATERNARY_MI2S_RX: 368 + codec_dai_fmt |= SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_I2S; 368 369 snd_soc_dai_set_sysclk(cpu_dai, 369 370 Q6AFE_LPASS_CLK_ID_QUAD_MI2S_IBIT, 370 371 MI2S_BCLK_RATE, SNDRV_PCM_STREAM_PLAYBACK); 371 372 snd_soc_dai_set_fmt(cpu_dai, fmt); 373 + snd_soc_dai_set_fmt(codec_dai, codec_dai_fmt); 372 374 break; 373 375 374 376 case QUATERNARY_TDM_RX_0:
+6 -2
sound/soc/sdw_utils/soc_sdw_utils.c
··· 1534 1534 * endpoint check is not necessary 1535 1535 */ 1536 1536 if (dai_info->quirk && 1537 - !(dai_info->quirk_exclude ^ !!(dai_info->quirk & ctx->mc_quirk))) 1537 + !(dai_info->quirk_exclude ^ !!(dai_info->quirk & ctx->mc_quirk))) { 1538 + (*num_devs)--; 1538 1539 continue; 1540 + } 1539 1541 } else { 1540 1542 /* Check SDCA codec endpoint if there is no matching quirk */ 1541 1543 ret = is_sdca_endpoint_present(dev, codec_info, adr_link, i, j); ··· 1545 1543 return ret; 1546 1544 1547 1545 /* The endpoint is not present, skip */ 1548 - if (!ret) 1546 + if (!ret) { 1547 + (*num_devs)--; 1549 1548 continue; 1549 + } 1550 1550 } 1551 1551 1552 1552 dev_dbg(dev,
+20 -12
sound/soc/soc-ops.c
··· 111 111 EXPORT_SYMBOL_GPL(snd_soc_put_enum_double); 112 112 113 113 static int sdca_soc_q78_reg_to_ctl(struct soc_mixer_control *mc, unsigned int reg_val, 114 - unsigned int mask, unsigned int shift, int max) 114 + unsigned int mask, unsigned int shift, int max, 115 + bool sx) 115 116 { 116 117 int val = reg_val; 117 118 ··· 142 141 } 143 142 144 143 static int soc_mixer_reg_to_ctl(struct soc_mixer_control *mc, unsigned int reg_val, 145 - unsigned int mask, unsigned int shift, int max) 144 + unsigned int mask, unsigned int shift, int max, 145 + bool sx) 146 146 { 147 147 int val = (reg_val >> shift) & mask; 148 148 149 149 if (mc->sign_bit) 150 150 val = sign_extend32(val, mc->sign_bit); 151 151 152 - val = clamp(val, mc->min, mc->max); 153 - val -= mc->min; 152 + if (sx) { 153 + val -= mc->min; // SX controls intentionally can overflow here 154 + val = min_t(unsigned int, val & mask, max); 155 + } else { 156 + val = clamp(val, mc->min, mc->max); 157 + val -= mc->min; 158 + } 154 159 155 160 if (mc->invert) 156 161 val = max - val; 157 162 158 - return val & mask; 163 + return val; 159 164 } 160 165 161 166 static unsigned int soc_mixer_ctl_to_reg(struct soc_mixer_control *mc, int val, ··· 287 280 288 281 static int soc_get_volsw(struct snd_kcontrol *kcontrol, 289 282 struct snd_ctl_elem_value *ucontrol, 290 - struct soc_mixer_control *mc, int mask, int max) 283 + struct soc_mixer_control *mc, int mask, int max, bool sx) 291 284 { 292 - int (*reg_to_ctl)(struct soc_mixer_control *, unsigned int, unsigned int, unsigned int, int); 285 + int (*reg_to_ctl)(struct soc_mixer_control *, unsigned int, unsigned int, 286 + unsigned int, int, bool); 293 287 struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 294 288 unsigned int reg_val; 295 289 int val; ··· 301 293 reg_to_ctl = soc_mixer_reg_to_ctl; 302 294 303 295 reg_val = snd_soc_component_read(component, mc->reg); 304 - val = reg_to_ctl(mc, reg_val, mask, mc->shift, max); 296 + val = reg_to_ctl(mc, reg_val, mask, mc->shift, max, sx); 305 297 306 298 ucontrol->value.integer.value[0] = val; 307 299 308 300 if (snd_soc_volsw_is_stereo(mc)) { 309 301 if (mc->reg == mc->rreg) { 310 - val = reg_to_ctl(mc, reg_val, mask, mc->rshift, max); 302 + val = reg_to_ctl(mc, reg_val, mask, mc->rshift, max, sx); 311 303 } else { 312 304 reg_val = snd_soc_component_read(component, mc->rreg); 313 - val = reg_to_ctl(mc, reg_val, mask, mc->shift, max); 305 + val = reg_to_ctl(mc, reg_val, mask, mc->shift, max, sx); 314 306 } 315 307 316 308 ucontrol->value.integer.value[1] = val; ··· 379 371 (struct soc_mixer_control *)kcontrol->private_value; 380 372 unsigned int mask = soc_mixer_mask(mc); 381 373 382 - return soc_get_volsw(kcontrol, ucontrol, mc, mask, mc->max - mc->min); 374 + return soc_get_volsw(kcontrol, ucontrol, mc, mask, mc->max - mc->min, false); 383 375 } 384 376 EXPORT_SYMBOL_GPL(snd_soc_get_volsw); 385 377 ··· 421 413 (struct soc_mixer_control *)kcontrol->private_value; 422 414 unsigned int mask = soc_mixer_sx_mask(mc); 423 415 424 - return soc_get_volsw(kcontrol, ucontrol, mc, mask, mc->max); 416 + return soc_get_volsw(kcontrol, ucontrol, mc, mask, mc->max, true); 425 417 } 426 418 EXPORT_SYMBOL_GPL(snd_soc_get_volsw_sx); 427 419
+3 -3
sound/soc/sof/intel/pci-mtl.c
··· 47 47 [SOF_IPC_TYPE_4] = "intel/sof-ipc4-lib/mtl", 48 48 }, 49 49 .default_tplg_path = { 50 - [SOF_IPC_TYPE_4] = "intel/sof-ace-tplg", 50 + [SOF_IPC_TYPE_4] = "intel/sof-ipc4-tplg", 51 51 }, 52 52 .default_fw_filename = { 53 53 [SOF_IPC_TYPE_4] = "sof-mtl.ri", ··· 77 77 [SOF_IPC_TYPE_4] = "intel/sof-ipc4-lib/arl", 78 78 }, 79 79 .default_tplg_path = { 80 - [SOF_IPC_TYPE_4] = "intel/sof-ace-tplg", 80 + [SOF_IPC_TYPE_4] = "intel/sof-ipc4-tplg", 81 81 }, 82 82 .default_fw_filename = { 83 83 [SOF_IPC_TYPE_4] = "sof-arl.ri", ··· 107 107 [SOF_IPC_TYPE_4] = "intel/sof-ipc4-lib/arl-s", 108 108 }, 109 109 .default_tplg_path = { 110 - [SOF_IPC_TYPE_4] = "intel/sof-ace-tplg", 110 + [SOF_IPC_TYPE_4] = "intel/sof-ipc4-tplg", 111 111 }, 112 112 .default_fw_filename = { 113 113 [SOF_IPC_TYPE_4] = "sof-arl-s.ri",
+32 -17
sound/soc/sof/ipc4-topology.c
··· 1752 1752 channel_count = params_channels(params); 1753 1753 sample_rate = params_rate(params); 1754 1754 bit_depth = params_width(params); 1755 - /* 1756 - * Look for 32-bit blob first instead of 16-bit if copier 1757 - * supports multiple formats 1758 - */ 1759 - if (bit_depth == 16 && !single_bitdepth) { 1755 + 1756 + /* Prefer 32-bit blob if copier supports multiple formats */ 1757 + if (bit_depth <= 16 && !single_bitdepth) { 1760 1758 dev_dbg(sdev->dev, "Looking for 32-bit blob first for DMIC\n"); 1761 1759 format_change = true; 1762 1760 bit_depth = 32; ··· 1797 1799 if (format_change) { 1798 1800 /* 1799 1801 * The 32-bit blob was not found in NHLT table, try to 1800 - * look for one based on the params 1802 + * look for 16-bit for DMIC or based on the params for 1803 + * SSP 1801 1804 */ 1802 - bit_depth = params_width(params); 1803 - format_change = false; 1805 + if (linktype == SOF_DAI_INTEL_DMIC) { 1806 + bit_depth = 16; 1807 + if (params_width(params) == 16) 1808 + format_change = false; 1809 + } else { 1810 + bit_depth = params_width(params); 1811 + format_change = false; 1812 + } 1813 + 1804 1814 get_new_blob = true; 1805 1815 } else if (linktype == SOF_DAI_INTEL_DMIC && !single_bitdepth) { 1806 1816 /* ··· 1843 1837 *len = cfg->size >> 2; 1844 1838 *dst = (u32 *)cfg->caps; 1845 1839 1846 - if (format_change) { 1840 + if (format_change || params_format(params) == SNDRV_PCM_FORMAT_FLOAT_LE) { 1847 1841 /* 1848 1842 * Update the params to reflect that different blob was loaded 1849 1843 * instead of the requested bit depth (16 -> 32 or 32 -> 16). ··· 2286 2280 ch_map >>= 4; 2287 2281 } 2288 2282 2289 - step = ch_count / blob->alh_cfg.device_count; 2290 - mask = GENMASK(step - 1, 0); 2283 + if (swidget->id == snd_soc_dapm_dai_in && ch_count == out_ref_channels) { 2284 + /* 2285 + * For playback DAI widgets where the channel number is equal to 2286 + * the output reference channels, set the step = 0 to ensure all 2287 + * the ch_mask is applied to all alh mappings. 2288 + */ 2289 + mask = ch_mask; 2290 + step = 0; 2291 + } else { 2292 + step = ch_count / blob->alh_cfg.device_count; 2293 + mask = GENMASK(step - 1, 0); 2294 + } 2295 + 2291 2296 /* 2292 2297 * Set each gtw_cfg.node_id to blob->alh_cfg.mapping[] 2293 2298 * for all widgets with the same stream name ··· 2333 2316 } 2334 2317 2335 2318 /* 2336 - * Set the same channel mask for playback as the audio data is 2337 - * duplicated for all speakers. For capture, split the channels 2319 + * Set the same channel mask if the widget channel count is the same 2320 + * as the FE channels for playback as the audio data is duplicated 2321 + * for all speakers in this case. Otherwise, split the channels 2338 2322 * among the aggregated DAIs. For example, with 4 channels on 2 2339 2323 * aggregated DAIs, the channel_mask should be 0x3 and 0xc for the 2340 2324 * two DAI's. ··· 2344 2326 * the tables in soc_acpi files depending on the _ADR and devID 2345 2327 * registers for each codec. 2346 2328 */ 2347 - if (w->id == snd_soc_dapm_dai_in) 2348 - blob->alh_cfg.mapping[i].channel_mask = ch_mask; 2349 - else 2350 - blob->alh_cfg.mapping[i].channel_mask = mask << (step * i); 2329 + blob->alh_cfg.mapping[i].channel_mask = mask << (step * i); 2351 2330 2352 2331 i++; 2353 2332 }
+21 -5
sound/soc/sof/topology.c
··· 2106 2106 /* source component */ 2107 2107 source_swidget = snd_sof_find_swidget(scomp, (char *)route->source); 2108 2108 if (!source_swidget) { 2109 - dev_err(scomp->dev, "error: source %s not found\n", 2110 - route->source); 2109 + dev_err(scomp->dev, "source %s for sink %s is not found\n", 2110 + route->source, route->sink); 2111 2111 ret = -EINVAL; 2112 2112 goto err; 2113 2113 } ··· 2125 2125 /* sink component */ 2126 2126 sink_swidget = snd_sof_find_swidget(scomp, (char *)route->sink); 2127 2127 if (!sink_swidget) { 2128 - dev_err(scomp->dev, "error: sink %s not found\n", 2129 - route->sink); 2128 + dev_err(scomp->dev, "sink %s for source %s is not found\n", 2129 + route->sink, route->source); 2130 2130 ret = -EINVAL; 2131 2131 goto err; 2132 2132 } ··· 2506 2506 if (!tplg_files) 2507 2507 return -ENOMEM; 2508 2508 2509 + /* Try to use function topologies if possible */ 2509 2510 if (!sof_pdata->disable_function_topology && !disable_function_topology && 2510 2511 sof_pdata->machine && sof_pdata->machine->get_function_tplg_files) { 2512 + /* 2513 + * When the topology name contains 'dummy' word, it means that 2514 + * there is no fallback option to monolithic topology in case 2515 + * any of the function topologies might be missing. 2516 + * In this case we should use best effort to form the card, 2517 + * ignoring functionalities that we are missing a fragment for. 2518 + * 2519 + * Note: monolithic topologies also ignore these possibly 2520 + * missing functions, so the functionality of the card would be 2521 + * identical to the case if there would be a fallback monolithic 2522 + * topology created for the configuration. 2523 + */ 2524 + bool no_fallback = strstr(file, "dummy"); 2525 + 2511 2526 tplg_cnt = sof_pdata->machine->get_function_tplg_files(scomp->card, 2512 2527 sof_pdata->machine, 2513 2528 tplg_filename_prefix, 2514 - &tplg_files); 2529 + &tplg_files, 2530 + no_fallback); 2515 2531 if (tplg_cnt < 0) { 2516 2532 kfree(tplg_files); 2517 2533 return tplg_cnt;
+3 -3
sound/soc/tegra/tegra210_ahub.c
··· 2077 2077 .val_bits = 32, 2078 2078 .reg_stride = 4, 2079 2079 .max_register = TEGRA210_MAX_REGISTER_ADDR, 2080 - .cache_type = REGCACHE_FLAT, 2080 + .cache_type = REGCACHE_FLAT_S, 2081 2081 }; 2082 2082 2083 2083 static const struct regmap_config tegra186_ahub_regmap_config = { ··· 2085 2085 .val_bits = 32, 2086 2086 .reg_stride = 4, 2087 2087 .max_register = TEGRA186_MAX_REGISTER_ADDR, 2088 - .cache_type = REGCACHE_FLAT, 2088 + .cache_type = REGCACHE_FLAT_S, 2089 2089 }; 2090 2090 2091 2091 static const struct regmap_config tegra264_ahub_regmap_config = { ··· 2094 2094 .reg_stride = 4, 2095 2095 .writeable_reg = tegra264_ahub_wr_reg, 2096 2096 .max_register = TEGRA264_MAX_REGISTER_ADDR, 2097 - .cache_type = REGCACHE_FLAT, 2097 + .cache_type = REGCACHE_FLAT_S, 2098 2098 }; 2099 2099 2100 2100 static const struct tegra_ahub_soc_data soc_data_tegra210 = {
+4 -4
sound/usb/endpoint.c
··· 1481 1481 return err; 1482 1482 } 1483 1483 1484 + err = snd_usb_select_mode_quirk(chip, ep->cur_audiofmt); 1485 + if (err < 0) 1486 + return err; 1487 + 1484 1488 err = snd_usb_init_pitch(chip, ep->cur_audiofmt); 1485 1489 if (err < 0) 1486 1490 return err; 1487 1491 1488 1492 err = init_sample_rate(chip, ep); 1489 - if (err < 0) 1490 - return err; 1491 - 1492 - err = snd_usb_select_mode_quirk(chip, ep->cur_audiofmt); 1493 1493 if (err < 0) 1494 1494 return err; 1495 1495
+4 -1
sound/usb/format.c
··· 34 34 { 35 35 int sample_width, sample_bytes; 36 36 u64 pcm_formats = 0; 37 + u64 dsd_formats = 0; 37 38 38 39 switch (fp->protocol) { 39 40 case UAC_VERSION_1: ··· 155 154 fp->iface, fp->altsetting, format); 156 155 } 157 156 158 - pcm_formats |= snd_usb_interface_dsd_format_quirks(chip, fp, sample_bytes); 157 + dsd_formats |= snd_usb_interface_dsd_format_quirks(chip, fp, sample_bytes); 158 + if (dsd_formats && !fp->dsd_dop) 159 + pcm_formats = dsd_formats; 159 160 160 161 return pcm_formats; 161 162 }
+14 -6
sound/usb/mixer_us16x08.c
··· 655 655 u8 *meter_urb) 656 656 { 657 657 int val = MUC2(meter_urb, s) + (MUC3(meter_urb, s) << 8); 658 + int ch = MUB2(meter_urb, s) - 1; 659 + 660 + if (ch < 0) 661 + return; 658 662 659 663 if (MUA0(meter_urb, s) == 0x61 && MUA1(meter_urb, s) == 0x02 && 660 664 MUA2(meter_urb, s) == 0x04 && MUB0(meter_urb, s) == 0x62) { 661 - if (MUC0(meter_urb, s) == 0x72) 662 - store->meter_level[MUB2(meter_urb, s) - 1] = val; 663 - if (MUC0(meter_urb, s) == 0xb2) 664 - store->comp_level[MUB2(meter_urb, s) - 1] = val; 665 + if (ch < SND_US16X08_MAX_CHANNELS) { 666 + if (MUC0(meter_urb, s) == 0x72) 667 + store->meter_level[ch] = val; 668 + if (MUC0(meter_urb, s) == 0xb2) 669 + store->comp_level[ch] = val; 670 + } 665 671 } 666 672 if (MUA0(meter_urb, s) == 0x61 && MUA1(meter_urb, s) == 0x02 && 667 - MUA2(meter_urb, s) == 0x02 && MUB0(meter_urb, s) == 0x62) 668 - store->master_level[MUB2(meter_urb, s) - 1] = val; 673 + MUA2(meter_urb, s) == 0x02 && MUB0(meter_urb, s) == 0x62) { 674 + if (ch < ARRAY_SIZE(store->master_level)) 675 + store->master_level[ch] = val; 676 + } 669 677 } 670 678 671 679 /* Function to retrieve current meter values from the device.
+12 -2
sound/usb/quirks.c
··· 2221 2221 QUIRK_FLAG_IFACE_DELAY), 2222 2222 DEVICE_FLG(0x0644, 0x8044, /* Esoteric D-05X */ 2223 2223 QUIRK_FLAG_ITF_USB_DSD_DAC | QUIRK_FLAG_CTL_MSG_DELAY | 2224 - QUIRK_FLAG_IFACE_DELAY), 2224 + QUIRK_FLAG_IFACE_DELAY | QUIRK_FLAG_FORCE_IFACE_RESET), 2225 2225 DEVICE_FLG(0x0644, 0x804a, /* TEAC UD-301 */ 2226 2226 QUIRK_FLAG_ITF_USB_DSD_DAC | QUIRK_FLAG_CTL_MSG_DELAY | 2227 2227 QUIRK_FLAG_IFACE_DELAY), ··· 2229 2229 QUIRK_FLAG_FORCE_IFACE_RESET), 2230 2230 DEVICE_FLG(0x0644, 0x806b, /* TEAC UD-701 */ 2231 2231 QUIRK_FLAG_ITF_USB_DSD_DAC | QUIRK_FLAG_CTL_MSG_DELAY | 2232 - QUIRK_FLAG_IFACE_DELAY), 2232 + QUIRK_FLAG_IFACE_DELAY | QUIRK_FLAG_FORCE_IFACE_RESET), 2233 + DEVICE_FLG(0x0644, 0x807d, /* TEAC UD-507 */ 2234 + QUIRK_FLAG_ITF_USB_DSD_DAC | QUIRK_FLAG_CTL_MSG_DELAY | 2235 + QUIRK_FLAG_IFACE_DELAY | QUIRK_FLAG_FORCE_IFACE_RESET), 2236 + DEVICE_FLG(0x0644, 0x806c, /* Esoteric XD */ 2237 + QUIRK_FLAG_ITF_USB_DSD_DAC | QUIRK_FLAG_CTL_MSG_DELAY | 2238 + QUIRK_FLAG_IFACE_DELAY | QUIRK_FLAG_FORCE_IFACE_RESET), 2233 2239 DEVICE_FLG(0x06f8, 0xb000, /* Hercules DJ Console (Windows Edition) */ 2234 2240 QUIRK_FLAG_IGNORE_CTL_ERROR), 2235 2241 DEVICE_FLG(0x06f8, 0xd002, /* Hercules DJ Console (Macintosh Edition) */ ··· 2394 2388 QUIRK_FLAG_CTL_MSG_DELAY_1M), 2395 2389 DEVICE_FLG(0x30be, 0x0101, /* Schiit Hel */ 2396 2390 QUIRK_FLAG_IGNORE_CTL_ERROR), 2391 + DEVICE_FLG(0x3255, 0x0000, /* Luxman D-10X */ 2392 + QUIRK_FLAG_ITF_USB_DSD_DAC | QUIRK_FLAG_CTL_MSG_DELAY), 2397 2393 DEVICE_FLG(0x339b, 0x3a07, /* Synaptics HONOR USB-C HEADSET */ 2398 2394 QUIRK_FLAG_MIXER_PLAYBACK_MIN_MUTE), 2399 2395 DEVICE_FLG(0x413c, 0xa506, /* Dell AE515 sound bar */ ··· 2438 2430 VENDOR_FLG(0x25ce, /* Mytek devices */ 2439 2431 QUIRK_FLAG_DSD_RAW), 2440 2432 VENDOR_FLG(0x2622, /* IAG Limited devices */ 2433 + QUIRK_FLAG_DSD_RAW), 2434 + VENDOR_FLG(0x2772, /* Musical Fidelity devices */ 2441 2435 QUIRK_FLAG_DSD_RAW), 2442 2436 VENDOR_FLG(0x278b, /* Rotel? */ 2443 2437 QUIRK_FLAG_DSD_RAW),