Merge tag 'sound-6.15-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
"A bunch of small fixes. Mostly driver specific.

- An OOB access fix in core UMP rawmidi conversion code

- Fix for ASoC DAPM hw_params widget sequence

- Make retry of usb_set_interface() errors for flaky devices

- Fix redundant USB MIDI name strings

- Quirks for various HP and ASUS models with HD-audio, and
Jabra Evolve 65 USB-audio

- Cirrus Kunit test fixes

- Various fixes for ASoC Intel, stm32, renesas, imx-card, and
simple-card"

* tag 'sound-6.15-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (30 commits)
ASoC: amd: ps: fix for irq handler return status
ASoC: simple-card-utils: Fix pointer check in graph_util_parse_link_direction
ASoC: intel/sdw_utils: Add volume limit to cs35l56 speakers
ASoC: intel/sdw_utils: Add volume limit to cs42l43 speakers
ASoC: stm32: sai: add a check on minimal kernel frequency
ASoC: stm32: sai: skip useless iterations on kernel rate loop
ALSA: hda/realtek - Add more HP laptops which need mute led fixup
ALSA: hda/realtek: Fix built-mic regression on other ASUS models
ASoC: Intel: catpt: avoid type mismatch in dev_dbg() format
ALSA: usb-audio: Fix duplicated name in MIDI substream names
ALSA: ump: Fix buffer overflow at UMP SysEx message conversion
ALSA: usb-audio: Add second USB ID for Jabra Evolve 65 headset
ALSA: hda/realtek: Add quirk for HP Spectre x360 15-df1xxx
ALSA: hda: Apply volume control on speaker+lineout for HP EliteStudio AIO
ASoC: Intel: bytcr_rt5640: Add DMI quirk for Acer Aspire SW3-013
ASoC: amd: acp: Fix devm_snd_soc_register_card(acp-pdm-mach) failure
ASoC: amd: acp: Fix NULL pointer deref in acp_i2s_set_tdm_slot
ASoC: amd: acp: Fix NULL pointer deref on acp resume path
ASoC: renesas: rz-ssi: Use NOIRQ_SYSTEM_SLEEP_PM_OPS()
ASoC: soc-acpi-intel-ptl-match: add empty item to ptl_cs42l43_l3[]
...

+206 -43
+6
MAINTAINERS
··· 22738 F: Documentation/devicetree/bindings/sound/ 22739 F: Documentation/sound/soc/ 22740 F: include/dt-bindings/sound/ 22741 F: include/sound/soc* 22742 F: include/sound/sof.h 22743 F: include/sound/sof/ 22744 F: include/trace/events/sof*.h 22745 F: include/uapi/sound/asoc.h 22746 F: sound/soc/
··· 22738 F: Documentation/devicetree/bindings/sound/ 22739 F: Documentation/sound/soc/ 22740 F: include/dt-bindings/sound/ 22741 + F: include/sound/cs-amp-lib.h 22742 + F: include/sound/cs35l* 22743 + F: include/sound/cs4271.h 22744 + F: include/sound/cs42l* 22745 + F: include/sound/madera-pdata.h 22746 F: include/sound/soc* 22747 F: include/sound/sof.h 22748 F: include/sound/sof/ 22749 + F: include/sound/wm*.h 22750 F: include/trace/events/sof*.h 22751 F: include/uapi/sound/asoc.h 22752 F: sound/soc/
+1 -4
drivers/firmware/cirrus/Kconfig
··· 6 7 config FW_CS_DSP_KUNIT_TEST_UTILS 8 tristate 9 - depends on KUNIT && REGMAP 10 - select FW_CS_DSP 11 12 config FW_CS_DSP_KUNIT_TEST 13 tristate "KUnit tests for Cirrus Logic cs_dsp" if !KUNIT_ALL_TESTS 14 - depends on KUNIT && REGMAP 15 default KUNIT_ALL_TESTS 16 - select FW_CS_DSP 17 select FW_CS_DSP_KUNIT_TEST_UTILS 18 help 19 This builds KUnit tests for cs_dsp.
··· 6 7 config FW_CS_DSP_KUNIT_TEST_UTILS 8 tristate 9 10 config FW_CS_DSP_KUNIT_TEST 11 tristate "KUnit tests for Cirrus Logic cs_dsp" if !KUNIT_ALL_TESTS 12 + depends on KUNIT && REGMAP && FW_CS_DSP 13 default KUNIT_ALL_TESTS 14 select FW_CS_DSP_KUNIT_TEST_UTILS 15 help 16 This builds KUnit tests for cs_dsp.
+1
include/sound/soc_sdw_utils.h
··· 226 bool playback); 227 int asoc_sdw_cs_spk_feedback_rtd_init(struct snd_soc_pcm_runtime *rtd, 228 struct snd_soc_dai *dai); 229 230 /* MAXIM codec support */ 231 int asoc_sdw_maxim_init(struct snd_soc_card *card,
··· 226 bool playback); 227 int asoc_sdw_cs_spk_feedback_rtd_init(struct snd_soc_pcm_runtime *rtd, 228 struct snd_soc_dai *dai); 229 + int asoc_sdw_cs35l56_volume_limit(struct snd_soc_card *card, const char *name_prefix); 230 231 /* MAXIM codec support */ 232 int asoc_sdw_maxim_init(struct snd_soc_card *card,
+1 -1
include/sound/ump_convert.h
··· 19 /* context for converting from MIDI1 byte stream to UMP packet */ 20 struct ump_cvt_to_ump { 21 /* MIDI1 intermediate buffer */ 22 - unsigned char buf[4]; 23 int len; 24 int cmd_bytes; 25
··· 19 /* context for converting from MIDI1 byte stream to UMP packet */ 20 struct ump_cvt_to_ump { 21 /* MIDI1 intermediate buffer */ 22 + unsigned char buf[6]; /* up to 6 bytes for SysEx */ 23 int len; 24 int cmd_bytes; 25
+81 -10
sound/pci/hda/patch_realtek.c
··· 441 alc_update_coef_idx(codec, 0x67, 0xf000, 0x3000); 442 fallthrough; 443 case 0x10ec0215: 444 case 0x10ec0285: 445 case 0x10ec0289: 446 alc_update_coef_idx(codec, 0x36, 1<<13, 0); ··· 452 case 0x10ec0230: 453 case 0x10ec0233: 454 case 0x10ec0235: 455 - case 0x10ec0236: 456 - case 0x10ec0245: 457 case 0x10ec0255: 458 - case 0x10ec0256: 459 case 0x19e58326: 460 - case 0x10ec0257: 461 case 0x10ec0282: 462 case 0x10ec0283: 463 case 0x10ec0286: ··· 6742 codec->power_save_node = 0; 6743 } 6744 6745 /* avoid DAC 0x06 for bass speaker 0x17; it has no volume control */ 6746 static void alc289_fixup_asus_ga401(struct hda_codec *codec, 6747 const struct hda_fixup *fix, int action) ··· 6965 switch (action) { 6966 case HDA_FIXUP_ACT_PRE_PROBE: 6967 spec->micmute_led_polarity = 1; 6968 /* needed for amp of back speakers */ 6969 spec->gpio_mask |= 0x01; 6970 spec->gpio_dir |= 0x01; ··· 7815 ALC280_FIXUP_HP_9480M, 7816 ALC245_FIXUP_HP_X360_AMP, 7817 ALC285_FIXUP_HP_SPECTRE_X360_EB1, 7818 ALC285_FIXUP_HP_ENVY_X360, 7819 ALC288_FIXUP_DELL_HEADSET_MODE, 7820 ALC288_FIXUP_DELL1_MIC_NO_PRESENCE, ··· 8025 ALC294_FIXUP_BASS_SPEAKER_15, 8026 ALC283_FIXUP_DELL_HP_RESUME, 8027 ALC294_FIXUP_ASUS_CS35L41_SPI_2, 8028 }; 8029 8030 /* A special fixup for Lenovo C940 and Yoga Duet 7; ··· 9893 .type = HDA_FIXUP_FUNC, 9894 .v.func = alc285_fixup_hp_spectre_x360_eb1 9895 }, 9896 [ALC285_FIXUP_HP_ENVY_X360] = { 9897 .type = HDA_FIXUP_FUNC, 9898 .v.func = alc285_fixup_hp_envy_x360, ··· 10400 .chained = true, 10401 .chain_id = ALC294_FIXUP_ASUS_HEADSET_MIC, 10402 }, 10403 }; 10404 10405 static const struct hda_quirk alc269_fixup_tbl[] = { ··· 10628 SND_PCI_QUIRK(0x103c, 0x86c1, "HP Laptop 15-da3001TU", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2), 10629 SND_PCI_QUIRK(0x103c, 0x86c7, "HP Envy AiO 32", ALC274_FIXUP_HP_ENVY_GPIO), 10630 SND_PCI_QUIRK(0x103c, 0x86e7, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1), 10631 SND_PCI_QUIRK(0x103c, 0x86e8, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1), 10632 SND_PCI_QUIRK(0x103c, 0x86f9, "HP Spectre x360 13-aw0xxx", ALC285_FIXUP_HP_SPECTRE_X360_MUTE_LED), 10633 SND_PCI_QUIRK(0x103c, 0x8716, "HP Elite Dragonfly G2 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_INIT), ··· 10833 SND_PCI_QUIRK(0x103c, 0x8ca7, "HP ZBook Fury", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 10834 SND_PCI_QUIRK(0x103c, 0x8caf, "HP Elite mt645 G8 Mobile Thin Client", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 10835 SND_PCI_QUIRK(0x103c, 0x8cbd, "HP Pavilion Aero Laptop 13-bg0xxx", ALC245_FIXUP_HP_X360_MUTE_LEDS), 10836 - SND_PCI_QUIRK(0x103c, 0x8cdd, "HP Spectre", ALC287_FIXUP_CS35L41_I2C_2), 10837 - SND_PCI_QUIRK(0x103c, 0x8cde, "HP Spectre", ALC287_FIXUP_CS35L41_I2C_2), 10838 SND_PCI_QUIRK(0x103c, 0x8cdf, "HP SnowWhite", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED), 10839 SND_PCI_QUIRK(0x103c, 0x8ce0, "HP SnowWhite", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED), 10840 SND_PCI_QUIRK(0x103c, 0x8cf5, "HP ZBook Studio 16", ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED), 10841 SND_PCI_QUIRK(0x103c, 0x8d01, "HP ZBook Power 14 G12", ALC285_FIXUP_HP_GPIO_LED), 10842 SND_PCI_QUIRK(0x103c, 0x8d84, "HP EliteBook X G1i", ALC285_FIXUP_HP_GPIO_LED), 10843 SND_PCI_QUIRK(0x103c, 0x8d85, "HP EliteBook 14 G12", ALC285_FIXUP_HP_GPIO_LED), 10844 SND_PCI_QUIRK(0x103c, 0x8d86, "HP Elite X360 14 G12", ALC285_FIXUP_HP_GPIO_LED), ··· 10859 SND_PCI_QUIRK(0x103c, 0x8da1, "HP 16 Clipper OmniBook X", ALC287_FIXUP_CS35L41_I2C_2), 10860 SND_PCI_QUIRK(0x103c, 0x8da7, "HP 14 Enstrom OmniBook X", ALC287_FIXUP_CS35L41_I2C_2), 10861 SND_PCI_QUIRK(0x103c, 0x8da8, "HP 16 Piston OmniBook X", ALC287_FIXUP_CS35L41_I2C_2), 10862 SND_PCI_QUIRK(0x103c, 0x8de8, "HP Gemtree", ALC245_FIXUP_TAS2781_SPI_2), 10863 SND_PCI_QUIRK(0x103c, 0x8de9, "HP Gemtree", ALC245_FIXUP_TAS2781_SPI_2), 10864 SND_PCI_QUIRK(0x103c, 0x8dec, "HP EliteBook 640 G12", ALC236_FIXUP_HP_GPIO_LED), 10865 SND_PCI_QUIRK(0x103c, 0x8dee, "HP EliteBook 660 G12", ALC236_FIXUP_HP_GPIO_LED), 10866 SND_PCI_QUIRK(0x103c, 0x8df0, "HP EliteBook 630 G12", ALC236_FIXUP_HP_GPIO_LED), 10867 SND_PCI_QUIRK(0x103c, 0x8dfc, "HP EliteBook 645 G12", ALC236_FIXUP_HP_GPIO_LED), 10868 SND_PCI_QUIRK(0x103c, 0x8dfe, "HP EliteBook 665 G12", ALC236_FIXUP_HP_GPIO_LED), 10869 SND_PCI_QUIRK(0x103c, 0x8e11, "HP Trekker", ALC287_FIXUP_CS35L41_I2C_2), ··· 10913 SND_PCI_QUIRK(0x1043, 0x12a3, "Asus N7691ZM", ALC269_FIXUP_ASUS_N7601ZM), 10914 SND_PCI_QUIRK(0x1043, 0x12af, "ASUS UX582ZS", ALC245_FIXUP_CS35L41_SPI_2), 10915 SND_PCI_QUIRK(0x1043, 0x12b4, "ASUS B3405CCA / P3405CCA", ALC294_FIXUP_ASUS_CS35L41_SPI_2), 10916 - SND_PCI_QUIRK(0x1043, 0x12e0, "ASUS X541SA", ALC256_FIXUP_ASUS_MIC), 10917 - SND_PCI_QUIRK(0x1043, 0x12f0, "ASUS X541UV", ALC256_FIXUP_ASUS_MIC), 10918 SND_PCI_QUIRK(0x1043, 0x1313, "Asus K42JZ", ALC269VB_FIXUP_ASUS_MIC_NO_PRESENCE), 10919 - SND_PCI_QUIRK(0x1043, 0x13b0, "ASUS Z550SA", ALC256_FIXUP_ASUS_MIC), 10920 SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_ASUS_ZENBOOK), 10921 SND_PCI_QUIRK(0x1043, 0x1433, "ASUS GX650PY/PZ/PV/PU/PYV/PZV/PIV/PVV", ALC285_FIXUP_ASUS_I2C_HEADSET_MIC), 10922 SND_PCI_QUIRK(0x1043, 0x1460, "Asus VivoBook 15", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE), ··· 10970 SND_PCI_QUIRK(0x1043, 0x1c92, "ASUS ROG Strix G15", ALC285_FIXUP_ASUS_G533Z_PINS), 10971 SND_PCI_QUIRK(0x1043, 0x1c9f, "ASUS G614JU/JV/JI", ALC285_FIXUP_ASUS_HEADSET_MIC), 10972 SND_PCI_QUIRK(0x1043, 0x1caf, "ASUS G634JY/JZ/JI/JG", ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS), 10973 - SND_PCI_QUIRK(0x1043, 0x1ccd, "ASUS X555UB", ALC256_FIXUP_ASUS_MIC), 10974 SND_PCI_QUIRK(0x1043, 0x1ccf, "ASUS G814JU/JV/JI", ALC245_FIXUP_CS35L41_SPI_2), 10975 SND_PCI_QUIRK(0x1043, 0x1cdf, "ASUS G814JY/JZ/JG", ALC245_FIXUP_CS35L41_SPI_2), 10976 SND_PCI_QUIRK(0x1043, 0x1cef, "ASUS G834JY/JZ/JI/JG", ALC285_FIXUP_ASUS_HEADSET_MIC), ··· 11564 {.id = ALC295_FIXUP_HP_OMEN, .name = "alc295-hp-omen"}, 11565 {.id = ALC285_FIXUP_HP_SPECTRE_X360, .name = "alc285-hp-spectre-x360"}, 11566 {.id = ALC285_FIXUP_HP_SPECTRE_X360_EB1, .name = "alc285-hp-spectre-x360-eb1"}, 11567 {.id = ALC285_FIXUP_HP_ENVY_X360, .name = "alc285-hp-envy-x360"}, 11568 {.id = ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP, .name = "alc287-ideapad-bass-spk-amp"}, 11569 {.id = ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN, .name = "alc287-yoga9-bass-spk-pin"},
··· 441 alc_update_coef_idx(codec, 0x67, 0xf000, 0x3000); 442 fallthrough; 443 case 0x10ec0215: 444 + case 0x10ec0236: 445 + case 0x10ec0245: 446 + case 0x10ec0256: 447 + case 0x10ec0257: 448 case 0x10ec0285: 449 case 0x10ec0289: 450 alc_update_coef_idx(codec, 0x36, 1<<13, 0); ··· 448 case 0x10ec0230: 449 case 0x10ec0233: 450 case 0x10ec0235: 451 case 0x10ec0255: 452 case 0x19e58326: 453 case 0x10ec0282: 454 case 0x10ec0283: 455 case 0x10ec0286: ··· 6742 codec->power_save_node = 0; 6743 } 6744 6745 + /* avoid DAC 0x06 for speaker switch 0x17; it has no volume control */ 6746 + static void alc274_fixup_hp_aio_bind_dacs(struct hda_codec *codec, 6747 + const struct hda_fixup *fix, int action) 6748 + { 6749 + static const hda_nid_t conn[] = { 0x02, 0x03 }; /* exclude 0x06 */ 6750 + /* The speaker is routed to the Node 0x06 by a mistake, thus the 6751 + * speaker's volume can't be adjusted since the node doesn't have 6752 + * Amp-out capability. Assure the speaker and lineout pin to be 6753 + * coupled with DAC NID 0x02. 6754 + */ 6755 + static const hda_nid_t preferred_pairs[] = { 6756 + 0x16, 0x02, 0x17, 0x02, 0x21, 0x03, 0 6757 + }; 6758 + struct alc_spec *spec = codec->spec; 6759 + 6760 + snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn); 6761 + spec->gen.preferred_dacs = preferred_pairs; 6762 + } 6763 + 6764 /* avoid DAC 0x06 for bass speaker 0x17; it has no volume control */ 6765 static void alc289_fixup_asus_ga401(struct hda_codec *codec, 6766 const struct hda_fixup *fix, int action) ··· 6946 switch (action) { 6947 case HDA_FIXUP_ACT_PRE_PROBE: 6948 spec->micmute_led_polarity = 1; 6949 + /* needed for amp of back speakers */ 6950 + spec->gpio_mask |= 0x01; 6951 + spec->gpio_dir |= 0x01; 6952 + snd_hda_apply_pincfgs(codec, pincfgs); 6953 + /* share DAC to have unified volume control */ 6954 + snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn), conn); 6955 + snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn); 6956 + break; 6957 + case HDA_FIXUP_ACT_INIT: 6958 + /* need to toggle GPIO to enable the amp of back speakers */ 6959 + alc_update_gpio_data(codec, 0x01, true); 6960 + msleep(100); 6961 + alc_update_gpio_data(codec, 0x01, false); 6962 + break; 6963 + } 6964 + } 6965 + 6966 + /* GPIO1 = amplifier on/off */ 6967 + static void alc285_fixup_hp_spectre_x360_df1(struct hda_codec *codec, 6968 + const struct hda_fixup *fix, 6969 + int action) 6970 + { 6971 + struct alc_spec *spec = codec->spec; 6972 + static const hda_nid_t conn[] = { 0x02 }; 6973 + static const struct hda_pintbl pincfgs[] = { 6974 + { 0x14, 0x90170110 }, /* front/high speakers */ 6975 + { 0x17, 0x90170130 }, /* back/bass speakers */ 6976 + { } 6977 + }; 6978 + 6979 + // enable mute led 6980 + alc285_fixup_hp_mute_led_coefbit(codec, fix, action); 6981 + 6982 + switch (action) { 6983 + case HDA_FIXUP_ACT_PRE_PROBE: 6984 /* needed for amp of back speakers */ 6985 spec->gpio_mask |= 0x01; 6986 spec->gpio_dir |= 0x01; ··· 7761 ALC280_FIXUP_HP_9480M, 7762 ALC245_FIXUP_HP_X360_AMP, 7763 ALC285_FIXUP_HP_SPECTRE_X360_EB1, 7764 + ALC285_FIXUP_HP_SPECTRE_X360_DF1, 7765 ALC285_FIXUP_HP_ENVY_X360, 7766 ALC288_FIXUP_DELL_HEADSET_MODE, 7767 ALC288_FIXUP_DELL1_MIC_NO_PRESENCE, ··· 7970 ALC294_FIXUP_BASS_SPEAKER_15, 7971 ALC283_FIXUP_DELL_HP_RESUME, 7972 ALC294_FIXUP_ASUS_CS35L41_SPI_2, 7973 + ALC274_FIXUP_HP_AIO_BIND_DACS, 7974 }; 7975 7976 /* A special fixup for Lenovo C940 and Yoga Duet 7; ··· 9837 .type = HDA_FIXUP_FUNC, 9838 .v.func = alc285_fixup_hp_spectre_x360_eb1 9839 }, 9840 + [ALC285_FIXUP_HP_SPECTRE_X360_DF1] = { 9841 + .type = HDA_FIXUP_FUNC, 9842 + .v.func = alc285_fixup_hp_spectre_x360_df1 9843 + }, 9844 [ALC285_FIXUP_HP_ENVY_X360] = { 9845 .type = HDA_FIXUP_FUNC, 9846 .v.func = alc285_fixup_hp_envy_x360, ··· 10340 .chained = true, 10341 .chain_id = ALC294_FIXUP_ASUS_HEADSET_MIC, 10342 }, 10343 + [ALC274_FIXUP_HP_AIO_BIND_DACS] = { 10344 + .type = HDA_FIXUP_FUNC, 10345 + .v.func = alc274_fixup_hp_aio_bind_dacs, 10346 + }, 10347 }; 10348 10349 static const struct hda_quirk alc269_fixup_tbl[] = { ··· 10564 SND_PCI_QUIRK(0x103c, 0x86c1, "HP Laptop 15-da3001TU", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2), 10565 SND_PCI_QUIRK(0x103c, 0x86c7, "HP Envy AiO 32", ALC274_FIXUP_HP_ENVY_GPIO), 10566 SND_PCI_QUIRK(0x103c, 0x86e7, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1), 10567 + SND_PCI_QUIRK(0x103c, 0x863e, "HP Spectre x360 15-df1xxx", ALC285_FIXUP_HP_SPECTRE_X360_DF1), 10568 SND_PCI_QUIRK(0x103c, 0x86e8, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1), 10569 SND_PCI_QUIRK(0x103c, 0x86f9, "HP Spectre x360 13-aw0xxx", ALC285_FIXUP_HP_SPECTRE_X360_MUTE_LED), 10570 SND_PCI_QUIRK(0x103c, 0x8716, "HP Elite Dragonfly G2 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_INIT), ··· 10768 SND_PCI_QUIRK(0x103c, 0x8ca7, "HP ZBook Fury", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 10769 SND_PCI_QUIRK(0x103c, 0x8caf, "HP Elite mt645 G8 Mobile Thin Client", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 10770 SND_PCI_QUIRK(0x103c, 0x8cbd, "HP Pavilion Aero Laptop 13-bg0xxx", ALC245_FIXUP_HP_X360_MUTE_LEDS), 10771 + SND_PCI_QUIRK(0x103c, 0x8cdd, "HP Spectre", ALC245_FIXUP_HP_SPECTRE_X360_EU0XXX), 10772 + SND_PCI_QUIRK(0x103c, 0x8cde, "HP OmniBook Ultra Flip Laptop 14t", ALC245_FIXUP_HP_SPECTRE_X360_EU0XXX), 10773 SND_PCI_QUIRK(0x103c, 0x8cdf, "HP SnowWhite", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED), 10774 SND_PCI_QUIRK(0x103c, 0x8ce0, "HP SnowWhite", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED), 10775 SND_PCI_QUIRK(0x103c, 0x8cf5, "HP ZBook Studio 16", ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED), 10776 SND_PCI_QUIRK(0x103c, 0x8d01, "HP ZBook Power 14 G12", ALC285_FIXUP_HP_GPIO_LED), 10777 + SND_PCI_QUIRK(0x103c, 0x8d18, "HP EliteStudio 8 AIO", ALC274_FIXUP_HP_AIO_BIND_DACS), 10778 SND_PCI_QUIRK(0x103c, 0x8d84, "HP EliteBook X G1i", ALC285_FIXUP_HP_GPIO_LED), 10779 SND_PCI_QUIRK(0x103c, 0x8d85, "HP EliteBook 14 G12", ALC285_FIXUP_HP_GPIO_LED), 10780 SND_PCI_QUIRK(0x103c, 0x8d86, "HP Elite X360 14 G12", ALC285_FIXUP_HP_GPIO_LED), ··· 10793 SND_PCI_QUIRK(0x103c, 0x8da1, "HP 16 Clipper OmniBook X", ALC287_FIXUP_CS35L41_I2C_2), 10794 SND_PCI_QUIRK(0x103c, 0x8da7, "HP 14 Enstrom OmniBook X", ALC287_FIXUP_CS35L41_I2C_2), 10795 SND_PCI_QUIRK(0x103c, 0x8da8, "HP 16 Piston OmniBook X", ALC287_FIXUP_CS35L41_I2C_2), 10796 + SND_PCI_QUIRK(0x103c, 0x8dd4, "HP EliteStudio 8 AIO", ALC274_FIXUP_HP_AIO_BIND_DACS), 10797 SND_PCI_QUIRK(0x103c, 0x8de8, "HP Gemtree", ALC245_FIXUP_TAS2781_SPI_2), 10798 SND_PCI_QUIRK(0x103c, 0x8de9, "HP Gemtree", ALC245_FIXUP_TAS2781_SPI_2), 10799 SND_PCI_QUIRK(0x103c, 0x8dec, "HP EliteBook 640 G12", ALC236_FIXUP_HP_GPIO_LED), 10800 + SND_PCI_QUIRK(0x103c, 0x8ded, "HP EliteBook 640 G12", ALC236_FIXUP_HP_GPIO_LED), 10801 SND_PCI_QUIRK(0x103c, 0x8dee, "HP EliteBook 660 G12", ALC236_FIXUP_HP_GPIO_LED), 10802 + SND_PCI_QUIRK(0x103c, 0x8def, "HP EliteBook 660 G12", ALC236_FIXUP_HP_GPIO_LED), 10803 SND_PCI_QUIRK(0x103c, 0x8df0, "HP EliteBook 630 G12", ALC236_FIXUP_HP_GPIO_LED), 10804 + SND_PCI_QUIRK(0x103c, 0x8df1, "HP EliteBook 630 G12", ALC236_FIXUP_HP_GPIO_LED), 10805 SND_PCI_QUIRK(0x103c, 0x8dfc, "HP EliteBook 645 G12", ALC236_FIXUP_HP_GPIO_LED), 10806 SND_PCI_QUIRK(0x103c, 0x8dfe, "HP EliteBook 665 G12", ALC236_FIXUP_HP_GPIO_LED), 10807 SND_PCI_QUIRK(0x103c, 0x8e11, "HP Trekker", ALC287_FIXUP_CS35L41_I2C_2), ··· 10843 SND_PCI_QUIRK(0x1043, 0x12a3, "Asus N7691ZM", ALC269_FIXUP_ASUS_N7601ZM), 10844 SND_PCI_QUIRK(0x1043, 0x12af, "ASUS UX582ZS", ALC245_FIXUP_CS35L41_SPI_2), 10845 SND_PCI_QUIRK(0x1043, 0x12b4, "ASUS B3405CCA / P3405CCA", ALC294_FIXUP_ASUS_CS35L41_SPI_2), 10846 + SND_PCI_QUIRK(0x1043, 0x12e0, "ASUS X541SA", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE), 10847 + SND_PCI_QUIRK(0x1043, 0x12f0, "ASUS X541UV", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE), 10848 SND_PCI_QUIRK(0x1043, 0x1313, "Asus K42JZ", ALC269VB_FIXUP_ASUS_MIC_NO_PRESENCE), 10849 + SND_PCI_QUIRK(0x1043, 0x13b0, "ASUS Z550SA", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE), 10850 SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_ASUS_ZENBOOK), 10851 SND_PCI_QUIRK(0x1043, 0x1433, "ASUS GX650PY/PZ/PV/PU/PYV/PZV/PIV/PVV", ALC285_FIXUP_ASUS_I2C_HEADSET_MIC), 10852 SND_PCI_QUIRK(0x1043, 0x1460, "Asus VivoBook 15", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE), ··· 10900 SND_PCI_QUIRK(0x1043, 0x1c92, "ASUS ROG Strix G15", ALC285_FIXUP_ASUS_G533Z_PINS), 10901 SND_PCI_QUIRK(0x1043, 0x1c9f, "ASUS G614JU/JV/JI", ALC285_FIXUP_ASUS_HEADSET_MIC), 10902 SND_PCI_QUIRK(0x1043, 0x1caf, "ASUS G634JY/JZ/JI/JG", ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS), 10903 + SND_PCI_QUIRK(0x1043, 0x1ccd, "ASUS X555UB", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE), 10904 SND_PCI_QUIRK(0x1043, 0x1ccf, "ASUS G814JU/JV/JI", ALC245_FIXUP_CS35L41_SPI_2), 10905 SND_PCI_QUIRK(0x1043, 0x1cdf, "ASUS G814JY/JZ/JG", ALC245_FIXUP_CS35L41_SPI_2), 10906 SND_PCI_QUIRK(0x1043, 0x1cef, "ASUS G834JY/JZ/JI/JG", ALC285_FIXUP_ASUS_HEADSET_MIC), ··· 11494 {.id = ALC295_FIXUP_HP_OMEN, .name = "alc295-hp-omen"}, 11495 {.id = ALC285_FIXUP_HP_SPECTRE_X360, .name = "alc285-hp-spectre-x360"}, 11496 {.id = ALC285_FIXUP_HP_SPECTRE_X360_EB1, .name = "alc285-hp-spectre-x360-eb1"}, 11497 + {.id = ALC285_FIXUP_HP_SPECTRE_X360_DF1, .name = "alc285-hp-spectre-x360-df1"}, 11498 {.id = ALC285_FIXUP_HP_ENVY_X360, .name = "alc285-hp-envy-x360"}, 11499 {.id = ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP, .name = "alc287-ideapad-bass-spk-amp"}, 11500 {.id = ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN, .name = "alc287-yoga9-bass-spk-pin"},
+1 -1
sound/soc/amd/acp/acp-i2s.c
··· 97 struct acp_stream *stream; 98 int slot_len, no_of_slots; 99 100 - chip = dev_get_platdata(dev); 101 switch (slot_width) { 102 case SLOT_WIDTH_8: 103 slot_len = 8;
··· 97 struct acp_stream *stream; 98 int slot_len, no_of_slots; 99 100 + chip = dev_get_drvdata(dev->parent); 101 switch (slot_width) { 102 case SLOT_WIDTH_8: 103 slot_len = 8;
+1 -1
sound/soc/amd/acp/acp-legacy-common.c
··· 450 struct snd_soc_acpi_mach *mach; 451 int size, platform; 452 453 - if (chip->flag == FLAG_AMD_LEGACY_ONLY_DMIC) { 454 platform = chip->acp_rev; 455 chip->mach_dev = platform_device_register_data(chip->dev, "acp-pdm-mach", 456 PLATFORM_DEVID_NONE, &platform,
··· 450 struct snd_soc_acpi_mach *mach; 451 int size, platform; 452 453 + if (chip->flag == FLAG_AMD_LEGACY_ONLY_DMIC && chip->is_pdm_dev) { 454 platform = chip->acp_rev; 455 chip->mach_dev = platform_device_register_data(chip->dev, "acp-pdm-mach", 456 PLATFORM_DEVID_NONE, &platform,
+1 -1
sound/soc/amd/acp/acp-rembrandt.c
··· 199 200 static int rmb_pcm_resume(struct device *dev) 201 { 202 - struct acp_chip_info *chip = dev_get_platdata(dev); 203 struct acp_stream *stream; 204 struct snd_pcm_substream *substream; 205 snd_pcm_uframes_t buf_in_frames;
··· 199 200 static int rmb_pcm_resume(struct device *dev) 201 { 202 + struct acp_chip_info *chip = dev_get_drvdata(dev->parent); 203 struct acp_stream *stream; 204 struct snd_pcm_substream *substream; 205 snd_pcm_uframes_t buf_in_frames;
+1 -1
sound/soc/amd/acp/acp-renoir.c
··· 146 147 static int rn_pcm_resume(struct device *dev) 148 { 149 - struct acp_chip_info *chip = dev_get_platdata(dev); 150 struct acp_stream *stream; 151 struct snd_pcm_substream *substream; 152 snd_pcm_uframes_t buf_in_frames;
··· 146 147 static int rn_pcm_resume(struct device *dev) 148 { 149 + struct acp_chip_info *chip = dev_get_drvdata(dev->parent); 150 struct acp_stream *stream; 151 struct snd_pcm_substream *substream; 152 snd_pcm_uframes_t buf_in_frames;
+1 -1
sound/soc/amd/acp/acp63.c
··· 250 251 static int acp63_pcm_resume(struct device *dev) 252 { 253 - struct acp_chip_info *chip = dev_get_platdata(dev); 254 struct acp_stream *stream; 255 struct snd_pcm_substream *substream; 256 snd_pcm_uframes_t buf_in_frames;
··· 250 251 static int acp63_pcm_resume(struct device *dev) 252 { 253 + struct acp_chip_info *chip = dev_get_drvdata(dev->parent); 254 struct acp_stream *stream; 255 struct snd_pcm_substream *substream; 256 snd_pcm_uframes_t buf_in_frames;
+1 -1
sound/soc/amd/acp/acp70.c
··· 182 183 static int acp70_pcm_resume(struct device *dev) 184 { 185 - struct acp_chip_info *chip = dev_get_platdata(dev); 186 struct acp_stream *stream; 187 struct snd_pcm_substream *substream; 188 snd_pcm_uframes_t buf_in_frames;
··· 182 183 static int acp70_pcm_resume(struct device *dev) 184 { 185 + struct acp_chip_info *chip = dev_get_drvdata(dev->parent); 186 struct acp_stream *stream; 187 struct snd_pcm_substream *substream; 188 snd_pcm_uframes_t buf_in_frames;
+3 -2
sound/soc/amd/ps/pci-ps.c
··· 193 struct amd_sdw_manager *amd_manager; 194 u32 ext_intr_stat, ext_intr_stat1; 195 u16 irq_flag = 0; 196 u16 sdw_dma_irq_flag = 0; 197 198 adata = dev_id; ··· 232 } 233 234 if (adata->acp_rev >= ACP70_PCI_REV) 235 - irq_flag = check_and_handle_acp70_sdw_wake_irq(adata); 236 237 if (ext_intr_stat & BIT(PDM_DMA_STAT)) { 238 ps_pdm_data = dev_get_drvdata(&adata->pdm_dev->dev); ··· 246 if (sdw_dma_irq_flag) 247 return IRQ_WAKE_THREAD; 248 249 - if (irq_flag) 250 return IRQ_HANDLED; 251 else 252 return IRQ_NONE;
··· 193 struct amd_sdw_manager *amd_manager; 194 u32 ext_intr_stat, ext_intr_stat1; 195 u16 irq_flag = 0; 196 + u16 wake_irq_flag = 0; 197 u16 sdw_dma_irq_flag = 0; 198 199 adata = dev_id; ··· 231 } 232 233 if (adata->acp_rev >= ACP70_PCI_REV) 234 + wake_irq_flag = check_and_handle_acp70_sdw_wake_irq(adata); 235 236 if (ext_intr_stat & BIT(PDM_DMA_STAT)) { 237 ps_pdm_data = dev_get_drvdata(&adata->pdm_dev->dev); ··· 245 if (sdw_dma_irq_flag) 246 return IRQ_WAKE_THREAD; 247 248 + if (irq_flag | wake_irq_flag) 249 return IRQ_HANDLED; 250 else 251 return IRQ_NONE;
+2 -3
sound/soc/codecs/Kconfig
··· 776 tristate 777 778 config SND_SOC_CS_AMP_LIB_TEST 779 - tristate "KUnit test for Cirrus Logic cs-amp-lib" 780 - depends on KUNIT 781 default KUNIT_ALL_TESTS 782 - select SND_SOC_CS_AMP_LIB 783 help 784 This builds KUnit tests for the Cirrus Logic common 785 amplifier library.
··· 776 tristate 777 778 config SND_SOC_CS_AMP_LIB_TEST 779 + tristate "KUnit test for Cirrus Logic cs-amp-lib" if !KUNIT_ALL_TESTS 780 + depends on SND_SOC_CS_AMP_LIB && KUNIT 781 default KUNIT_ALL_TESTS 782 help 783 This builds KUnit tests for the Cirrus Logic common 784 amplifier library.
+7
sound/soc/codecs/cs42l43-jack.c
··· 654 655 reinit_completion(&priv->type_detect); 656 657 cs42l43_start_hs_bias(priv, true); 658 regmap_update_bits(cs42l43->regmap, CS42L43_HS2, 659 CS42L43_HSDET_MODE_MASK, 0x3 << CS42L43_HSDET_MODE_SHIFT); ··· 668 regmap_update_bits(cs42l43->regmap, CS42L43_HS2, 669 CS42L43_HSDET_MODE_MASK, 0x2 << CS42L43_HSDET_MODE_SHIFT); 670 cs42l43_stop_hs_bias(priv); 671 672 if (!time_left) 673 return -ETIMEDOUT;
··· 654 655 reinit_completion(&priv->type_detect); 656 657 + regmap_update_bits(cs42l43->regmap, CS42L43_STEREO_MIC_CLAMP_CTRL, 658 + CS42L43_SMIC_HPAMP_CLAMP_DIS_FRC_VAL_MASK, 659 + CS42L43_SMIC_HPAMP_CLAMP_DIS_FRC_VAL_MASK); 660 + 661 cs42l43_start_hs_bias(priv, true); 662 regmap_update_bits(cs42l43->regmap, CS42L43_HS2, 663 CS42L43_HSDET_MODE_MASK, 0x3 << CS42L43_HSDET_MODE_SHIFT); ··· 664 regmap_update_bits(cs42l43->regmap, CS42L43_HS2, 665 CS42L43_HSDET_MODE_MASK, 0x2 << CS42L43_HSDET_MODE_SHIFT); 666 cs42l43_stop_hs_bias(priv); 667 + 668 + regmap_update_bits(cs42l43->regmap, CS42L43_STEREO_MIC_CLAMP_CTRL, 669 + CS42L43_SMIC_HPAMP_CLAMP_DIS_FRC_VAL_MASK, 0); 670 671 if (!time_left) 672 return -ETIMEDOUT;
+1 -1
sound/soc/fsl/imx-card.c
··· 544 if (!card->dai_link) 545 return -ENOMEM; 546 547 - data->link_data = devm_kcalloc(dev, num_links, sizeof(*link), GFP_KERNEL); 548 if (!data->link_data) 549 return -ENOMEM; 550
··· 544 if (!card->dai_link) 545 return -ENOMEM; 546 547 + data->link_data = devm_kcalloc(dev, num_links, sizeof(*link_data), GFP_KERNEL); 548 if (!data->link_data) 549 return -ENOMEM; 550
+2 -2
sound/soc/generic/simple-card-utils.c
··· 1174 bool is_playback_only = of_property_read_bool(np, "playback-only"); 1175 bool is_capture_only = of_property_read_bool(np, "capture-only"); 1176 1177 - if (is_playback_only) 1178 *playback_only = is_playback_only; 1179 - if (is_capture_only) 1180 *capture_only = is_capture_only; 1181 } 1182 EXPORT_SYMBOL_GPL(graph_util_parse_link_direction);
··· 1174 bool is_playback_only = of_property_read_bool(np, "playback-only"); 1175 bool is_capture_only = of_property_read_bool(np, "capture-only"); 1176 1177 + if (playback_only) 1178 *playback_only = is_playback_only; 1179 + if (capture_only) 1180 *capture_only = is_capture_only; 1181 } 1182 EXPORT_SYMBOL_GPL(graph_util_parse_link_direction);
+13
sound/soc/intel/boards/bytcr_rt5640.c
··· 576 BYT_RT5640_SSP0_AIF2 | 577 BYT_RT5640_MCLK_EN), 578 }, 579 { 580 .matches = { 581 DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
··· 576 BYT_RT5640_SSP0_AIF2 | 577 BYT_RT5640_MCLK_EN), 578 }, 579 + { /* Acer Aspire SW3-013 */ 580 + .matches = { 581 + DMI_MATCH(DMI_SYS_VENDOR, "Acer"), 582 + DMI_MATCH(DMI_PRODUCT_NAME, "Aspire SW3-013"), 583 + }, 584 + .driver_data = (void *)(BYT_RT5640_DMIC1_MAP | 585 + BYT_RT5640_JD_SRC_JD2_IN4N | 586 + BYT_RT5640_OVCD_TH_2000UA | 587 + BYT_RT5640_OVCD_SF_0P75 | 588 + BYT_RT5640_DIFF_MIC | 589 + BYT_RT5640_SSP0_AIF1 | 590 + BYT_RT5640_MCLK_EN), 591 + }, 592 { 593 .matches = { 594 DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
+1 -1
sound/soc/intel/catpt/dsp.c
··· 156 { 157 unsigned long old; 158 u32 off = sram->start; 159 - u32 b = __ffs(mask); 160 161 old = catpt_readl_pci(cdev, VDRTCTL0) & mask; 162 dev_dbg(cdev->dev, "SRAMPGE [0x%08lx] 0x%08lx -> 0x%08lx",
··· 156 { 157 unsigned long old; 158 u32 off = sram->start; 159 + unsigned long b = __ffs(mask); 160 161 old = catpt_readl_pci(cdev, VDRTCTL0) & mask; 162 dev_dbg(cdev->dev, "SRAMPGE [0x%08lx] 0x%08lx -> 0x%08lx",
+2 -1
sound/soc/intel/common/soc-acpi-intel-ptl-match.c
··· 431 .mask = BIT(3), 432 .num_adr = ARRAY_SIZE(cs42l43_3_adr), 433 .adr_d = cs42l43_3_adr, 434 - } 435 }; 436 437 static const struct snd_soc_acpi_link_adr ptl_rt722_only[] = {
··· 431 .mask = BIT(3), 432 .num_adr = ARRAY_SIZE(cs42l43_3_adr), 433 .adr_d = cs42l43_3_adr, 434 + }, 435 + {} 436 }; 437 438 static const struct snd_soc_acpi_link_adr ptl_rt722_only[] = {
+1 -1
sound/soc/renesas/rz-ssi.c
··· 1244 1245 static const struct dev_pm_ops rz_ssi_pm_ops = { 1246 RUNTIME_PM_OPS(rz_ssi_runtime_suspend, rz_ssi_runtime_resume, NULL) 1247 - SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) 1248 }; 1249 1250 static struct platform_driver rz_ssi_driver = {
··· 1244 1245 static const struct dev_pm_ops rz_ssi_pm_ops = { 1246 RUNTIME_PM_OPS(rz_ssi_runtime_suspend, rz_ssi_runtime_resume, NULL) 1247 + NOIRQ_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) 1248 }; 1249 1250 static struct platform_driver rz_ssi_driver = {
+4
sound/soc/sdw_utils/soc_sdw_bridge_cs35l56.c
··· 60 61 /* 4 x 16-bit sample slots and FSYNC=48000, BCLK=3.072 MHz */ 62 for_each_rtd_codec_dais(rtd, i, codec_dai) { 63 ret = snd_soc_dai_set_tdm_slot(codec_dai, tx_mask, rx_mask, 4, 16); 64 if (ret < 0) 65 return ret;
··· 60 61 /* 4 x 16-bit sample slots and FSYNC=48000, BCLK=3.072 MHz */ 62 for_each_rtd_codec_dais(rtd, i, codec_dai) { 63 + ret = asoc_sdw_cs35l56_volume_limit(card, codec_dai->component->name_prefix); 64 + if (ret) 65 + return ret; 66 + 67 ret = snd_soc_dai_set_tdm_slot(codec_dai, tx_mask, rx_mask, 4, 16); 68 if (ret < 0) 69 return ret;
+10
sound/soc/sdw_utils/soc_sdw_cs42l43.c
··· 20 #include <sound/soc-dapm.h> 21 #include <sound/soc_sdw_utils.h> 22 23 static const struct snd_soc_dapm_route cs42l43_hs_map[] = { 24 { "Headphone", NULL, "cs42l43 AMP3_OUT" }, 25 { "Headphone", NULL, "cs42l43 AMP4_OUT" }, ··· 118 if (!card->components) 119 return -ENOMEM; 120 } 121 122 ret = snd_soc_dapm_add_routes(&card->dapm, cs42l43_spk_map, 123 ARRAY_SIZE(cs42l43_spk_map));
··· 20 #include <sound/soc-dapm.h> 21 #include <sound/soc_sdw_utils.h> 22 23 + #define CS42L43_SPK_VOLUME_0DB 128 /* 0dB Max */ 24 + 25 static const struct snd_soc_dapm_route cs42l43_hs_map[] = { 26 { "Headphone", NULL, "cs42l43 AMP3_OUT" }, 27 { "Headphone", NULL, "cs42l43 AMP4_OUT" }, ··· 116 if (!card->components) 117 return -ENOMEM; 118 } 119 + 120 + ret = snd_soc_limit_volume(card, "cs42l43 Speaker Digital Volume", 121 + CS42L43_SPK_VOLUME_0DB); 122 + if (ret) 123 + dev_err(card->dev, "cs42l43 speaker volume limit failed: %d\n", ret); 124 + else 125 + dev_info(card->dev, "Setting CS42L43 Speaker volume limit to %d\n", 126 + CS42L43_SPK_VOLUME_0DB); 127 128 ret = snd_soc_dapm_add_routes(&card->dapm, cs42l43_spk_map, 129 ARRAY_SIZE(cs42l43_spk_map));
+24
sound/soc/sdw_utils/soc_sdw_cs_amp.c
··· 16 17 #define CODEC_NAME_SIZE 8 18 #define CS_AMP_CHANNELS_PER_AMP 4 19 20 int asoc_sdw_cs_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai) 21 { ··· 59 60 snprintf(widget_name, sizeof(widget_name), "%s SPK", 61 codec_dai->component->name_prefix); 62 ret = snd_soc_dapm_add_routes(&card->dapm, &route, 1); 63 if (ret) 64 return ret;
··· 16 17 #define CODEC_NAME_SIZE 8 18 #define CS_AMP_CHANNELS_PER_AMP 4 19 + #define CS35L56_SPK_VOLUME_0DB 400 /* 0dB Max */ 20 + 21 + int asoc_sdw_cs35l56_volume_limit(struct snd_soc_card *card, const char *name_prefix) 22 + { 23 + char *volume_ctl_name; 24 + int ret; 25 + 26 + volume_ctl_name = kasprintf(GFP_KERNEL, "%s Speaker Volume", name_prefix); 27 + if (!volume_ctl_name) 28 + return -ENOMEM; 29 + 30 + ret = snd_soc_limit_volume(card, volume_ctl_name, CS35L56_SPK_VOLUME_0DB); 31 + if (ret) 32 + dev_err(card->dev, "%s limit set failed: %d\n", volume_ctl_name, ret); 33 + 34 + kfree(volume_ctl_name); 35 + return ret; 36 + } 37 + EXPORT_SYMBOL_NS(asoc_sdw_cs35l56_volume_limit, "SND_SOC_SDW_UTILS"); 38 39 int asoc_sdw_cs_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai) 40 { ··· 40 41 snprintf(widget_name, sizeof(widget_name), "%s SPK", 42 codec_dai->component->name_prefix); 43 + 44 + ret = asoc_sdw_cs35l56_volume_limit(card, codec_dai->component->name_prefix); 45 + if (ret) 46 + return ret; 47 + 48 ret = snd_soc_dapm_add_routes(&card->dapm, &route, 1); 49 if (ret) 50 return ret;
+2
sound/soc/sdw_utils/soc_sdw_rt_dmic.c
··· 29 mic_name = devm_kasprintf(card->dev, GFP_KERNEL, "rt715-sdca"); 30 else 31 mic_name = devm_kasprintf(card->dev, GFP_KERNEL, "%s", component->name_prefix); 32 33 card->components = devm_kasprintf(card->dev, GFP_KERNEL, 34 "%s mic:%s", card->components,
··· 29 mic_name = devm_kasprintf(card->dev, GFP_KERNEL, "rt715-sdca"); 30 else 31 mic_name = devm_kasprintf(card->dev, GFP_KERNEL, "%s", component->name_prefix); 32 + if (!mic_name) 33 + return -ENOMEM; 34 35 card->components = devm_kasprintf(card->dev, GFP_KERNEL, 36 "%s mic:%s", card->components,
+4 -1
sound/soc/soc-pcm.c
··· 1584 /* 1585 * Filter for systems with 'component_chaining' enabled. 1586 * This helps to avoid unnecessary re-configuration of an 1587 - * already active BE on such systems. 1588 */ 1589 if (fe->card->component_chaining && 1590 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_NEW) && 1591 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_CLOSE)) 1592 continue; 1593
··· 1584 /* 1585 * Filter for systems with 'component_chaining' enabled. 1586 * This helps to avoid unnecessary re-configuration of an 1587 + * already active BE on such systems and ensures the BE DAI 1588 + * widget is powered ON after hw_params() BE DAI callback. 1589 */ 1590 if (fe->card->component_chaining && 1591 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_NEW) && 1592 + (be->dpcm[stream].state != SND_SOC_DPCM_STATE_OPEN) && 1593 + (be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_PARAMS) && 1594 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_CLOSE)) 1595 continue; 1596
+11 -5
sound/soc/stm/stm32_sai_sub.c
··· 409 unsigned int rate) 410 { 411 struct platform_device *pdev = sai->pdev; 412 - unsigned int sai_ck_rate, sai_ck_max_rate, sai_curr_rate, sai_new_rate; 413 int div, ret; 414 415 /* 416 - * Set maximum expected kernel clock frequency 417 * - mclk on or spdif: 418 * f_sai_ck = MCKDIV * mclk-fs * fs 419 * Here typical 256 ratio is assumed for mclk-fs ··· 423 * Set constraint MCKDIV * FRL <= 256, to ensure MCKDIV is in available range 424 * f_sai_ck = sai_ck_max_rate * pow_of_two(FRL) / 256 425 */ 426 if (!(rate % SAI_RATE_11K)) 427 sai_ck_max_rate = SAI_MAX_SAMPLE_RATE_11K * 256; 428 else 429 sai_ck_max_rate = SAI_MAX_SAMPLE_RATE_8K * 256; 430 431 - if (!sai->sai_mclk && !STM_SAI_PROTOCOL_IS_SPDIF(sai)) 432 sai_ck_max_rate /= DIV_ROUND_CLOSEST(256, roundup_pow_of_two(sai->fs_length)); 433 434 /* 435 * Request exclusivity, as the clock is shared by SAI sub-blocks and by ··· 447 * return immediately. 448 */ 449 sai_curr_rate = clk_get_rate(sai->sai_ck); 450 - if (stm32_sai_rate_accurate(sai_ck_max_rate, sai_curr_rate)) 451 return 0; 452 453 /* ··· 478 /* Try a lower frequency */ 479 div++; 480 sai_ck_rate = sai_ck_max_rate / div; 481 - } while (sai_ck_rate > rate); 482 483 /* No accurate rate found */ 484 dev_err(&pdev->dev, "Failed to find an accurate rate");
··· 409 unsigned int rate) 410 { 411 struct platform_device *pdev = sai->pdev; 412 + unsigned int sai_ck_rate, sai_ck_max_rate, sai_ck_min_rate, sai_curr_rate, sai_new_rate; 413 int div, ret; 414 415 /* 416 + * Set minimum and maximum expected kernel clock frequency 417 * - mclk on or spdif: 418 * f_sai_ck = MCKDIV * mclk-fs * fs 419 * Here typical 256 ratio is assumed for mclk-fs ··· 423 * Set constraint MCKDIV * FRL <= 256, to ensure MCKDIV is in available range 424 * f_sai_ck = sai_ck_max_rate * pow_of_two(FRL) / 256 425 */ 426 + sai_ck_min_rate = rate * 256; 427 if (!(rate % SAI_RATE_11K)) 428 sai_ck_max_rate = SAI_MAX_SAMPLE_RATE_11K * 256; 429 else 430 sai_ck_max_rate = SAI_MAX_SAMPLE_RATE_8K * 256; 431 432 + if (!sai->sai_mclk && !STM_SAI_PROTOCOL_IS_SPDIF(sai)) { 433 + sai_ck_min_rate = rate * sai->fs_length; 434 sai_ck_max_rate /= DIV_ROUND_CLOSEST(256, roundup_pow_of_two(sai->fs_length)); 435 + } 436 437 /* 438 * Request exclusivity, as the clock is shared by SAI sub-blocks and by ··· 444 * return immediately. 445 */ 446 sai_curr_rate = clk_get_rate(sai->sai_ck); 447 + dev_dbg(&pdev->dev, "kernel clock rate: min [%u], max [%u], current [%u]", 448 + sai_ck_min_rate, sai_ck_max_rate, sai_curr_rate); 449 + if (stm32_sai_rate_accurate(sai_ck_max_rate, sai_curr_rate) && 450 + sai_curr_rate >= sai_ck_min_rate) 451 return 0; 452 453 /* ··· 472 /* Try a lower frequency */ 473 div++; 474 sai_ck_rate = sai_ck_max_rate / div; 475 + } while (sai_ck_rate >= sai_ck_min_rate); 476 477 /* No accurate rate found */ 478 dev_err(&pdev->dev, "Failed to find an accurate rate");
+7
sound/usb/endpoint.c
··· 926 { 927 int altset = set ? ep->altsetting : 0; 928 int err; 929 930 if (ep->iface_ref->altset == altset) 931 return 0; ··· 937 938 usb_audio_dbg(chip, "Setting usb interface %d:%d for EP 0x%x\n", 939 ep->iface, altset, ep->ep_num); 940 err = usb_set_interface(chip->dev, ep->iface, altset); 941 if (err < 0) { 942 usb_audio_err_ratelimited( 943 chip, "%d:%d: usb_set_interface failed (%d)\n", 944 ep->iface, altset, err);
··· 926 { 927 int altset = set ? ep->altsetting : 0; 928 int err; 929 + int retries = 0; 930 + const int max_retries = 5; 931 932 if (ep->iface_ref->altset == altset) 933 return 0; ··· 935 936 usb_audio_dbg(chip, "Setting usb interface %d:%d for EP 0x%x\n", 937 ep->iface, altset, ep->ep_num); 938 + retry: 939 err = usb_set_interface(chip->dev, ep->iface, altset); 940 if (err < 0) { 941 + if (err == -EPROTO && ++retries <= max_retries) { 942 + msleep(5 * (1 << (retries - 1))); 943 + goto retry; 944 + } 945 usb_audio_err_ratelimited( 946 chip, "%d:%d: usb_set_interface failed (%d)\n", 947 ep->iface, altset, err);
+2 -1
sound/usb/format.c
··· 260 } 261 262 /* Jabra Evolve 65 headset */ 263 - if (chip->usb_id == USB_ID(0x0b0e, 0x030b)) { 264 /* only 48kHz for playback while keeping 16kHz for capture */ 265 if (fp->nr_rates != 1) 266 return set_fixed_rate(fp, 48000, SNDRV_PCM_RATE_48000);
··· 260 } 261 262 /* Jabra Evolve 65 headset */ 263 + if (chip->usb_id == USB_ID(0x0b0e, 0x030b) || 264 + chip->usb_id == USB_ID(0x0b0e, 0x030c)) { 265 /* only 48kHz for playback while keeping 16kHz for capture */ 266 if (fp->nr_rates != 1) 267 return set_fixed_rate(fp, 48000, SNDRV_PCM_RATE_48000);
+12 -4
sound/usb/midi.c
··· 1885 } 1886 1887 port_info = find_port_info(umidi, number); 1888 - name_format = port_info ? port_info->name : 1889 - (jack_name != default_jack_name ? "%s %s" : "%s %s %d"); 1890 - snprintf(substream->name, sizeof(substream->name), 1891 - name_format, umidi->card->shortname, jack_name, number + 1); 1892 1893 *rsubstream = substream; 1894 }
··· 1885 } 1886 1887 port_info = find_port_info(umidi, number); 1888 + if (port_info || jack_name == default_jack_name || 1889 + strncmp(umidi->card->shortname, jack_name, strlen(umidi->card->shortname)) != 0) { 1890 + name_format = port_info ? port_info->name : 1891 + (jack_name != default_jack_name ? "%s %s" : "%s %s %d"); 1892 + snprintf(substream->name, sizeof(substream->name), 1893 + name_format, umidi->card->shortname, jack_name, number + 1); 1894 + } else { 1895 + /* The manufacturer included the iProduct name in the jack 1896 + * name, do not use both 1897 + */ 1898 + strscpy(substream->name, jack_name); 1899 + } 1900 1901 *rsubstream = substream; 1902 }
+2
tools/testing/kunit/configs/all_tests.config
··· 20 21 CONFIG_PCI=y 22 CONFIG_USB4=y 23 24 CONFIG_NET=y 25 CONFIG_MCTP=y ··· 54 CONFIG_SND=y 55 CONFIG_SND_SOC=y 56 CONFIG_SND_SOC_TOPOLOGY_BUILD=y
··· 20 21 CONFIG_PCI=y 22 CONFIG_USB4=y 23 + CONFIG_I2C=y 24 25 CONFIG_NET=y 26 CONFIG_MCTP=y ··· 53 CONFIG_SND=y 54 CONFIG_SND_SOC=y 55 CONFIG_SND_SOC_TOPOLOGY_BUILD=y 56 + CONFIG_SND_SOC_CS35L56_I2C=y