Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

Pull sound fixes from Takashi Iwai:
"This became slightly big partly due to my time off in the last week.
But all changes are about device-specific fixes, so it should be
safely applicable.

ASoC:
- Fix double free in sma1307
- Fix uninitialized variables in simple-card-utils/imx-card
- Address clock leaks and error propagation in ADAU1372
- Add DMI quirks and ACP/SDW support for ASUS
- Fix Intel CATPT DMA mask
- Fix SOF topology parsing
- Fix DT bindings for RK3576 SPDIF, STM32 SAI and WCD934x

HD-audio:
- Quirks for Lenovo, ASUS, and various HP models, as well as
a speaker pop fix on Star Labs StarFighter
- Revert MSI X870E Tomahawk denylist again

USB-Audio:
- Fix distorted audio on Focusrite Scarlett 2i2/2i4 1st Gen
- Add iface reset quirk for AB17X
- Update Qualcomm USB audio Kconfig dependencies and license

Misc:
- Fix minor compile warnings for firewire and asihpi drivers"

* tag 'sound-7.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (35 commits)
Revert "ALSA: hda/intel: Add MSI X870E Tomahawk to denylist"
ALSA: usb-audio: Add iface reset and delay quirk for AB17X USB Audio
ALSA: hda/realtek: add HP Laptop 15-fd0xxx mute LED quirk
ALSA: usb-audio: Exclude Scarlett 2i4 1st Gen from SKIP_IFACE_SETUP
ALSA: hda/realtek: Add mute LED quirk for HP Pavilion 15-eg0xxx
ALSA: hda/realtek - Fixed Speaker Mute LED for HP EliteBoard G1a platform
ASoC: SOF: ipc4-topology: Allow bytes controls without initial payload
ASoC: adau1372: Fix clock leak on PLL lock failure
ASoC: adau1372: Fix unchecked clk_prepare_enable() return value
ASoC: SDCA: fix finding wrong entity
ASoC: SDCA: remove the max count of initialization table
ASoC: codecs: wcd934x: fix typo in dt parsing
ASoC: dt-bindings: stm32: Fix incorrect compatible string in stm32h7-sai match
ASoC: Intel: catpt: Fix the device initialization
ASoC: amd: acp: add ASUS HN7306EA quirk for legacy SDW machine
ASoC: SOF: topology: reject invalid vendor array size in token parser
ASoC: tas2781: Add null check for calibration data
ALSA: asihpi: avoid write overflow check warning
ASoC: fsl: imx-card: initialize playback_only and capture_only
ASoC: simple-card-utils: Check value of is_playback_only and is_capture_only
...

+226 -44
+1
Documentation/devicetree/bindings/sound/rockchip-spdif.yaml
··· 33 33 - const: rockchip,rk3066-spdif 34 34 - items: 35 35 - enum: 36 + - rockchip,rk3576-spdif 36 37 - rockchip,rk3588-spdif 37 38 - const: rockchip,rk3568-spdif 38 39
+1 -1
Documentation/devicetree/bindings/sound/st,stm32-sai.yaml
··· 164 164 properties: 165 165 compatible: 166 166 contains: 167 - const: st,stm32mph7-sai 167 + const: st,stm32h7-sai 168 168 then: 169 169 properties: 170 170 clocks:
-5
include/sound/sdca_function.h
··· 27 27 #define SDCA_MAX_ENTITY_COUNT 128 28 28 29 29 /* 30 - * Sanity check on number of initialization writes, can be expanded if needed. 31 - */ 32 - #define SDCA_MAX_INIT_COUNT 2048 33 - 34 - /* 35 30 * The Cluster IDs are 16-bit, so a maximum of 65535 Clusters per 36 31 * function can be represented, however limit this to a slightly 37 32 * more reasonable value. Can be expanded if needed.
+1 -1
sound/firewire/amdtp-stream.c
··· 1164 1164 struct pkt_desc *desc = s->packet_descs_cursor; 1165 1165 unsigned int pkt_header_length; 1166 1166 unsigned int packets; 1167 - u32 curr_cycle_time; 1167 + u32 curr_cycle_time = 0; 1168 1168 bool need_hw_irq; 1169 1169 int i; 1170 1170
+59 -7
sound/hda/codecs/realtek/alc269.c
··· 1017 1017 return 0; 1018 1018 } 1019 1019 1020 - #define STARLABS_STARFIGHTER_SHUTUP_DELAY_MS 30 1020 + #define ALC233_STARFIGHTER_SPK_PIN 0x1b 1021 + #define ALC233_STARFIGHTER_GPIO2 0x04 1021 1022 1022 - static void starlabs_starfighter_shutup(struct hda_codec *codec) 1023 + static void alc233_starfighter_update_amp(struct hda_codec *codec, bool on) 1023 1024 { 1024 - if (snd_hda_gen_shutup_speakers(codec)) 1025 - msleep(STARLABS_STARFIGHTER_SHUTUP_DELAY_MS); 1025 + snd_hda_codec_write(codec, ALC233_STARFIGHTER_SPK_PIN, 0, 1026 + AC_VERB_SET_EAPD_BTLENABLE, 1027 + on ? AC_EAPDBTL_EAPD : 0); 1028 + alc_update_gpio_data(codec, ALC233_STARFIGHTER_GPIO2, on); 1029 + } 1030 + 1031 + static void alc233_starfighter_pcm_hook(struct hda_pcm_stream *hinfo, 1032 + struct hda_codec *codec, 1033 + struct snd_pcm_substream *substream, 1034 + int action) 1035 + { 1036 + switch (action) { 1037 + case HDA_GEN_PCM_ACT_PREPARE: 1038 + alc233_starfighter_update_amp(codec, true); 1039 + break; 1040 + case HDA_GEN_PCM_ACT_CLEANUP: 1041 + alc233_starfighter_update_amp(codec, false); 1042 + break; 1043 + } 1026 1044 } 1027 1045 1028 1046 static void alc233_fixup_starlabs_starfighter(struct hda_codec *codec, ··· 1049 1031 { 1050 1032 struct alc_spec *spec = codec->spec; 1051 1033 1052 - if (action == HDA_FIXUP_ACT_PRE_PROBE) 1053 - spec->shutup = starlabs_starfighter_shutup; 1034 + switch (action) { 1035 + case HDA_FIXUP_ACT_PRE_PROBE: 1036 + spec->gpio_mask |= ALC233_STARFIGHTER_GPIO2; 1037 + spec->gpio_dir |= ALC233_STARFIGHTER_GPIO2; 1038 + spec->gpio_data &= ~ALC233_STARFIGHTER_GPIO2; 1039 + break; 1040 + case HDA_FIXUP_ACT_PROBE: 1041 + spec->gen.pcm_playback_hook = alc233_starfighter_pcm_hook; 1042 + break; 1043 + } 1054 1044 } 1055 1045 1056 1046 static void alc269_fixup_pincfg_no_hp_to_lineout(struct hda_codec *codec, ··· 3725 3699 alc_fixup_hp_gpio_led(codec, action, 0x04, 0x0); 3726 3700 alc285_fixup_hp_coef_micmute_led(codec, fix, action); 3727 3701 } 3702 + 3703 + static void alc245_hp_spk_mute_led_update(void *private_data, int enabled) 3704 + { 3705 + struct hda_codec *codec = private_data; 3706 + unsigned int val; 3707 + 3708 + val = enabled ? 0x08 : 0x04; /* 0x08 led on, 0x04 led off */ 3709 + alc_update_coef_idx(codec, 0x0b, 0x0c, val); 3710 + } 3711 + 3728 3712 /* JD2: mute led GPIO3: micmute led */ 3729 3713 static void alc245_tas2781_i2c_hp_fixup_muteled(struct hda_codec *codec, 3730 3714 const struct hda_fixup *fix, int action) 3731 3715 { 3732 3716 struct alc_spec *spec = codec->spec; 3717 + hda_nid_t hp_pin = alc_get_hp_pin(spec); 3733 3718 static const hda_nid_t conn[] = { 0x02 }; 3734 3719 3735 3720 switch (action) { 3736 3721 case HDA_FIXUP_ACT_PRE_PROBE: 3722 + if (!hp_pin) { 3723 + spec->gen.vmaster_mute.hook = alc245_hp_spk_mute_led_update; 3724 + spec->gen.vmaster_mute_led = 1; 3725 + } 3737 3726 spec->gen.auto_mute_via_amp = 1; 3738 3727 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn); 3728 + break; 3729 + case HDA_FIXUP_ACT_INIT: 3730 + if (!hp_pin) 3731 + alc245_hp_spk_mute_led_update(codec, !spec->gen.master_mute); 3739 3732 break; 3740 3733 } 3741 3734 3742 3735 tas2781_fixup_txnw_i2c(codec, fix, action); 3743 - alc245_fixup_hp_mute_led_coefbit(codec, fix, action); 3736 + if (hp_pin) 3737 + alc245_fixup_hp_mute_led_coefbit(codec, fix, action); 3744 3738 alc285_fixup_hp_coef_micmute_led(codec, fix, action); 3745 3739 } 3746 3740 /* ··· 6900 6854 SND_PCI_QUIRK(0x103c, 0x8730, "HP ProBook 445 G7", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 6901 6855 SND_PCI_QUIRK(0x103c, 0x8735, "HP ProBook 435 G7", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 6902 6856 SND_PCI_QUIRK(0x103c, 0x8736, "HP", ALC285_FIXUP_HP_GPIO_AMP_INIT), 6857 + SND_PCI_QUIRK(0x103c, 0x8756, "HP ENVY Laptop 13-ba0xxx", ALC245_FIXUP_HP_X360_MUTE_LEDS), 6903 6858 SND_PCI_QUIRK(0x103c, 0x8760, "HP EliteBook 8{4,5}5 G7", ALC285_FIXUP_HP_BEEP_MICMUTE_LED), 6904 6859 SND_PCI_QUIRK(0x103c, 0x876e, "HP ENVY x360 Convertible 13-ay0xxx", ALC245_FIXUP_HP_X360_MUTE_LEDS), 6905 6860 SND_PCI_QUIRK(0x103c, 0x877a, "HP", ALC285_FIXUP_HP_MUTE_LED), ··· 6914 6867 SND_PCI_QUIRK(0x103c, 0x8788, "HP OMEN 15", ALC285_FIXUP_HP_MUTE_LED), 6915 6868 SND_PCI_QUIRK(0x103c, 0x87b7, "HP Laptop 14-fq0xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2), 6916 6869 SND_PCI_QUIRK(0x103c, 0x87c8, "HP", ALC287_FIXUP_HP_GPIO_LED), 6870 + SND_PCI_QUIRK(0x103c, 0x87cb, "HP Pavilion 15-eg0xxx", ALC287_FIXUP_HP_GPIO_LED), 6917 6871 SND_PCI_QUIRK(0x103c, 0x87cc, "HP Pavilion 15-eg0xxx", ALC287_FIXUP_HP_GPIO_LED), 6918 6872 SND_PCI_QUIRK(0x103c, 0x87d3, "HP Laptop 15-gw0xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2), 6919 6873 SND_PCI_QUIRK(0x103c, 0x87df, "HP ProBook 430 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED), ··· 7146 7098 SND_PCI_QUIRK(0x103c, 0x8da7, "HP 14 Enstrom OmniBook X", ALC287_FIXUP_CS35L41_I2C_2), 7147 7099 SND_PCI_QUIRK(0x103c, 0x8da8, "HP 16 Piston OmniBook X", ALC287_FIXUP_CS35L41_I2C_2), 7148 7100 SND_PCI_QUIRK(0x103c, 0x8dd4, "HP EliteStudio 8 AIO", ALC274_FIXUP_HP_AIO_BIND_DACS), 7101 + SND_PCI_QUIRK(0x103c, 0x8dd7, "HP Laptop 15-fd0xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2), 7149 7102 SND_PCI_QUIRK(0x103c, 0x8de8, "HP Gemtree", ALC245_FIXUP_TAS2781_SPI_2), 7150 7103 SND_PCI_QUIRK(0x103c, 0x8de9, "HP Gemtree", ALC245_FIXUP_TAS2781_SPI_2), 7151 7104 SND_PCI_QUIRK(0x103c, 0x8dec, "HP EliteBook 640 G12", ALC236_FIXUP_HP_GPIO_LED), ··· 7226 7177 SND_PCI_QUIRK(0x1043, 0x115d, "Asus 1015E", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), 7227 7178 SND_PCI_QUIRK(0x1043, 0x1194, "ASUS UM3406KA", ALC287_FIXUP_CS35L41_I2C_2), 7228 7179 SND_PCI_QUIRK(0x1043, 0x11c0, "ASUS X556UR", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE), 7180 + HDA_CODEC_QUIRK(0x1043, 0x1204, "ASUS Strix G16 G615JMR", ALC287_FIXUP_TXNW2781_I2C_ASUS), 7229 7181 SND_PCI_QUIRK(0x1043, 0x1204, "ASUS Strix G615JHR_JMR_JPR", ALC287_FIXUP_TAS2781_I2C), 7230 7182 SND_PCI_QUIRK(0x1043, 0x1214, "ASUS Strix G615LH_LM_LP", ALC287_FIXUP_TAS2781_I2C), 7231 7183 SND_PCI_QUIRK(0x1043, 0x125e, "ASUS Q524UQK", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE), ··· 7256 7206 SND_PCI_QUIRK(0x1043, 0x14e3, "ASUS G513PI/PU/PV", ALC287_FIXUP_CS35L41_I2C_2), 7257 7207 SND_PCI_QUIRK(0x1043, 0x14f2, "ASUS VivoBook X515JA", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE), 7258 7208 SND_PCI_QUIRK(0x1043, 0x1503, "ASUS G733PY/PZ/PZV/PYV", ALC287_FIXUP_CS35L41_I2C_2), 7209 + SND_PCI_QUIRK(0x1043, 0x1514, "ASUS ROG Flow Z13 GZ302EAC", ALC287_FIXUP_CS35L41_I2C_2), 7259 7210 SND_PCI_QUIRK(0x1043, 0x1517, "Asus Zenbook UX31A", ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A), 7260 7211 SND_PCI_QUIRK(0x1043, 0x1533, "ASUS GV302XA/XJ/XQ/XU/XV/XI", ALC287_FIXUP_CS35L41_I2C_2), 7261 7212 SND_PCI_QUIRK(0x1043, 0x1573, "ASUS GZ301VV/VQ/VU/VJ/VA/VC/VE/VVC/VQC/VUC/VJC/VEC/VCC", ALC285_FIXUP_ASUS_HEADSET_MIC), ··· 7626 7575 SND_PCI_QUIRK(0x17aa, 0x38ab, "Thinkbook 16P", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD), 7627 7576 SND_PCI_QUIRK(0x17aa, 0x38b4, "Legion Slim 7 16IRH8", ALC287_FIXUP_CS35L41_I2C_2), 7628 7577 HDA_CODEC_QUIRK(0x17aa, 0x391c, "Lenovo Yoga 7 2-in-1 14AKP10", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN), 7578 + HDA_CODEC_QUIRK(0x17aa, 0x391d, "Lenovo Yoga 7 2-in-1 16AKP10", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN), 7629 7579 SND_PCI_QUIRK(0x17aa, 0x38b5, "Legion Slim 7 16IRH8", ALC287_FIXUP_CS35L41_I2C_2), 7630 7580 SND_PCI_QUIRK(0x17aa, 0x38b6, "Legion Slim 7 16APH8", ALC287_FIXUP_CS35L41_I2C_2), 7631 7581 SND_PCI_QUIRK(0x17aa, 0x38b7, "Legion Slim 7 16APH8", ALC287_FIXUP_CS35L41_I2C_2),
-1
sound/hda/controllers/intel.c
··· 2077 2077 { PCI_DEVICE_SUB(0x1022, 0x1487, 0x1043, 0x874f) }, /* ASUS ROG Zenith II / Strix */ 2078 2078 { PCI_DEVICE_SUB(0x1022, 0x1487, 0x1462, 0xcb59) }, /* MSI TRX40 Creator */ 2079 2079 { PCI_DEVICE_SUB(0x1022, 0x1487, 0x1462, 0xcb60) }, /* MSI TRX40 */ 2080 - { PCI_DEVICE_SUB(0x1022, 0x15e3, 0x1462, 0xee59) }, /* MSI X870E Tomahawk WiFi */ 2081 2080 {} 2082 2081 }; 2083 2082
+4 -2
sound/pci/asihpi/hpimsgx.c
··· 581 581 HPI_ADAPTER_OPEN); 582 582 hm.adapter_index = adapter; 583 583 hw_entry_point(&hm, &hr); 584 - memcpy(&rESP_HPI_ADAPTER_OPEN[adapter], &hr, 585 - sizeof(rESP_HPI_ADAPTER_OPEN[0])); 584 + memcpy(&rESP_HPI_ADAPTER_OPEN[adapter].h, &hr, 585 + sizeof(rESP_HPI_ADAPTER_OPEN[adapter].h)); 586 + memcpy(&rESP_HPI_ADAPTER_OPEN[adapter].a, &hr.u.ax.info, 587 + sizeof(rESP_HPI_ADAPTER_OPEN[adapter].a)); 586 588 if (hr.error) 587 589 return hr.error; 588 590
+14 -1
sound/soc/amd/acp-config.c
··· 23 23 24 24 static int acp_quirk_data; 25 25 26 + static const struct dmi_system_id acp70_acpi_flag_override_table[] = { 27 + { 28 + .matches = { 29 + DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."), 30 + DMI_MATCH(DMI_PRODUCT_NAME, "HN7306EA"), 31 + }, 32 + }, 33 + {} 34 + }; 35 + 26 36 static const struct config_entry config_table[] = { 27 37 { 28 38 .flags = FLAG_AMD_SOF, ··· 196 186 */ 197 187 if (!pci->revision) 198 188 return 0; 199 - else if (pci->revision >= ACP_7_0_REV) 189 + else if (pci->revision >= ACP_7_0_REV) { 190 + if (dmi_check_system(acp70_acpi_flag_override_table)) 191 + return 0; 200 192 return snd_amd_acp_acpi_find_config(pci); 193 + } 201 194 202 195 for (i = 0; i < ARRAY_SIZE(config_table); i++, table++) { 203 196 if (table->device != device)
+8
sound/soc/amd/acp/acp-sdw-legacy-mach.c
··· 111 111 }, 112 112 .driver_data = (void *)(ASOC_SDW_CODEC_SPKR), 113 113 }, 114 + { 115 + .callback = soc_sdw_quirk_cb, 116 + .matches = { 117 + DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."), 118 + DMI_MATCH(DMI_PRODUCT_NAME, "HN7306EA"), 119 + }, 120 + .driver_data = (void *)(ASOC_SDW_ACP_DMIC), 121 + }, 114 122 {} 115 123 }; 116 124
+61
sound/soc/amd/acp/amd-acp70-acpi-match.c
··· 69 69 }, 70 70 }; 71 71 72 + static const struct snd_soc_acpi_endpoint jack_dmic_endpoints[] = { 73 + /* Jack Endpoint */ 74 + { 75 + .num = 0, 76 + .aggregated = 0, 77 + .group_position = 0, 78 + .group_id = 0, 79 + }, 80 + /* DMIC Endpoint */ 81 + { 82 + /* 83 + * rt721 endpoint #2 maps to AIF3 (internal DMIC capture). 84 + * Endpoint #1 is AIF2 amp path and is handled by external amps 85 + * on this platform. 86 + */ 87 + .num = 2, 88 + .aggregated = 0, 89 + .group_position = 0, 90 + .group_id = 0, 91 + }, 92 + }; 93 + 72 94 static const struct snd_soc_acpi_adr_device rt712_vb_1_group1_adr[] = { 73 95 { 74 96 .adr = 0x000130025D071201ull, ··· 585 563 {} 586 564 }; 587 565 566 + static const struct snd_soc_acpi_adr_device rt721_l1u0_tas2783x2_l1u8b_adr[] = { 567 + { 568 + .adr = 0x000130025D072101ull, 569 + /* 570 + * On this platform speakers are provided by two TAS2783 amps. 571 + * Keep rt721 as UAJ + DMIC only. 572 + */ 573 + .num_endpoints = ARRAY_SIZE(jack_dmic_endpoints), 574 + .endpoints = jack_dmic_endpoints, 575 + .name_prefix = "rt721", 576 + }, 577 + { 578 + .adr = 0x0001380102000001ull, 579 + .num_endpoints = 1, 580 + .endpoints = &spk_l_endpoint, 581 + .name_prefix = "tas2783-1", 582 + }, 583 + { 584 + .adr = 0x00013B0102000001ull, 585 + .num_endpoints = 1, 586 + .endpoints = &spk_r_endpoint, 587 + .name_prefix = "tas2783-2", 588 + }, 589 + }; 590 + 591 + static const struct snd_soc_acpi_link_adr acp70_rt721_l1u0_tas2783x2_l1u8b[] = { 592 + { 593 + .mask = BIT(1), 594 + .num_adr = ARRAY_SIZE(rt721_l1u0_tas2783x2_l1u8b_adr), 595 + .adr_d = rt721_l1u0_tas2783x2_l1u8b_adr, 596 + }, 597 + {} 598 + }; 599 + 588 600 struct snd_soc_acpi_mach snd_soc_acpi_amd_acp70_sdw_machines[] = { 589 601 { 590 602 .link_mask = BIT(0) | BIT(1), ··· 704 648 .link_mask = BIT(1), 705 649 .links = acp70_alc712_vb_l1, 706 650 .machine_check = snd_soc_acpi_amd_sdca_is_device_rt712_vb, 651 + .drv_name = "amd_sdw", 652 + }, 653 + { 654 + .link_mask = BIT(1), 655 + .links = acp70_rt721_l1u0_tas2783x2_l1u8b, 707 656 .drv_name = "amd_sdw", 708 657 }, 709 658 {},
+14
sound/soc/amd/yc/acp6x-mach.c
··· 717 717 DMI_MATCH(DMI_BOARD_NAME, "PM1503CDA"), 718 718 } 719 719 }, 720 + { 721 + .driver_data = &acp6x_card, 722 + .matches = { 723 + DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."), 724 + DMI_MATCH(DMI_BOARD_NAME, "BM1403CDA"), 725 + } 726 + }, 727 + { 728 + .driver_data = &acp6x_card, 729 + .matches = { 730 + DMI_MATCH(DMI_BOARD_VENDOR, "Micro-Star International Co., Ltd."), 731 + DMI_MATCH(DMI_PRODUCT_NAME, "Thin A15 B7VE"), 732 + } 733 + }, 720 734 {} 721 735 }; 722 736
+24 -10
sound/soc/codecs/adau1372.c
··· 762 762 return 0; 763 763 } 764 764 765 - static void adau1372_enable_pll(struct adau1372 *adau1372) 765 + static int adau1372_enable_pll(struct adau1372 *adau1372) 766 766 { 767 767 unsigned int val, timeout = 0; 768 768 int ret; ··· 778 778 timeout++; 779 779 } while (!(val & 1) && timeout < 3); 780 780 781 - if (ret < 0 || !(val & 1)) 781 + if (ret < 0 || !(val & 1)) { 782 782 dev_err(adau1372->dev, "Failed to lock PLL\n"); 783 + return ret < 0 ? ret : -ETIMEDOUT; 784 + } 785 + 786 + return 0; 783 787 } 784 788 785 - static void adau1372_set_power(struct adau1372 *adau1372, bool enable) 789 + static int adau1372_set_power(struct adau1372 *adau1372, bool enable) 786 790 { 787 791 if (adau1372->enabled == enable) 788 - return; 792 + return 0; 789 793 790 794 if (enable) { 791 795 unsigned int clk_ctrl = ADAU1372_CLK_CTRL_MCLK_EN; 796 + int ret; 792 797 793 - clk_prepare_enable(adau1372->mclk); 798 + ret = clk_prepare_enable(adau1372->mclk); 799 + if (ret) 800 + return ret; 794 801 if (adau1372->pd_gpio) 795 802 gpiod_set_value(adau1372->pd_gpio, 0); 796 803 ··· 811 804 * accessed. 812 805 */ 813 806 if (adau1372->use_pll) { 814 - adau1372_enable_pll(adau1372); 807 + ret = adau1372_enable_pll(adau1372); 808 + if (ret) { 809 + regcache_cache_only(adau1372->regmap, true); 810 + if (adau1372->pd_gpio) 811 + gpiod_set_value(adau1372->pd_gpio, 1); 812 + clk_disable_unprepare(adau1372->mclk); 813 + return ret; 814 + } 815 815 clk_ctrl |= ADAU1372_CLK_CTRL_CLKSRC; 816 816 } 817 817 ··· 843 829 } 844 830 845 831 adau1372->enabled = enable; 832 + 833 + return 0; 846 834 } 847 835 848 836 static int adau1372_set_bias_level(struct snd_soc_component *component, ··· 858 842 case SND_SOC_BIAS_PREPARE: 859 843 break; 860 844 case SND_SOC_BIAS_STANDBY: 861 - adau1372_set_power(adau1372, true); 862 - break; 845 + return adau1372_set_power(adau1372, true); 863 846 case SND_SOC_BIAS_OFF: 864 - adau1372_set_power(adau1372, false); 865 - break; 847 + return adau1372_set_power(adau1372, false); 866 848 } 867 849 868 850 return 0;
+4 -2
sound/soc/codecs/sma1307.c
··· 1759 1759 sma1307->set.mode_size * 2 * sizeof(int), 1760 1760 GFP_KERNEL); 1761 1761 if (!sma1307->set.mode_set[i]) { 1762 - for (int j = 0; j < i; j++) 1763 - kfree(sma1307->set.mode_set[j]); 1762 + for (int j = 0; j < i; j++) { 1763 + devm_kfree(sma1307->dev, sma1307->set.mode_set[j]); 1764 + sma1307->set.mode_set[j] = NULL; 1765 + } 1764 1766 sma1307->set.status = false; 1765 1767 return; 1766 1768 }
+3
sound/soc/codecs/tas2781-fmwlib.c
··· 2550 2550 int k = i * (cali_data->cali_dat_sz_per_dev + 1); 2551 2551 int rc; 2552 2552 2553 + if (!data || !cali_data->total_sz) 2554 + return; 2555 + 2553 2556 if (data[k] != i) { 2554 2557 dev_err(priv->dev, "%s: no cal-data for dev %d from usr-spc\n", 2555 2558 __func__, i);
+1 -1
sound/soc/codecs/wcd934x.c
··· 2172 2172 u32 def_dmic_rate, dmic_clk_drv; 2173 2173 int ret; 2174 2174 2175 - ret = wcd_dt_parse_mbhc_data(comp->dev, &wcd->mbhc_cfg); 2175 + ret = wcd_dt_parse_micbias_info(&wcd->common); 2176 2176 if (ret) 2177 2177 return ret; 2178 2178
+2
sound/soc/fsl/imx-card.c
··· 710 710 link->ops = &imx_aif_ops; 711 711 } 712 712 713 + playback_only = false; 714 + capture_only = false; 713 715 graph_util_parse_link_direction(np, &playback_only, &capture_only); 714 716 link->playback_only = playback_only; 715 717 link->capture_only = capture_only;
+2 -2
sound/soc/generic/simple-card-utils.c
··· 1183 1183 bool is_playback_only = of_property_read_bool(np, "playback-only"); 1184 1184 bool is_capture_only = of_property_read_bool(np, "capture-only"); 1185 1185 1186 - if (np && playback_only) 1186 + if (playback_only && is_playback_only) 1187 1187 *playback_only = is_playback_only; 1188 - if (np && capture_only) 1188 + if (capture_only && is_capture_only) 1189 1189 *capture_only = is_capture_only; 1190 1190 } 1191 1191 EXPORT_SYMBOL_GPL(graph_util_parse_link_direction);
+9 -1
sound/soc/intel/catpt/device.c
··· 281 281 if (IS_ERR(cdev->pci_ba)) 282 282 return PTR_ERR(cdev->pci_ba); 283 283 284 - /* alloc buffer for storing DRAM context during dx transitions */ 284 + /* 285 + * As per design HOST is responsible for preserving firmware's runtime 286 + * context during D0 -> D3 -> D0 transitions. Addresses used for DMA 287 + * to/from HOST memory shall be outside the reserved range of 0xFFFxxxxx. 288 + */ 289 + ret = dma_coerce_mask_and_coherent(cdev->dev, DMA_BIT_MASK(31)); 290 + if (ret) 291 + return ret; 292 + 285 293 cdev->dxbuf_vaddr = dmam_alloc_coherent(dev, catpt_dram_size(cdev), 286 294 &cdev->dxbuf_paddr, GFP_KERNEL); 287 295 if (!cdev->dxbuf_vaddr)
-3
sound/soc/intel/catpt/dsp.c
··· 125 125 dmac->dev = cdev->dev; 126 126 dmac->irq = cdev->irq; 127 127 128 - ret = dma_coerce_mask_and_coherent(cdev->dev, DMA_BIT_MASK(31)); 129 - if (ret) 130 - return ret; 131 128 /* 132 129 * Caller is responsible for putting device in D0 to allow 133 130 * for I/O and memory access before probing DW.
+10 -4
sound/soc/sdca/sdca_functions.c
··· 216 216 } else if (num_init_writes % sizeof(*raw) != 0) { 217 217 dev_err(dev, "%pfwP: init table size invalid\n", function_node); 218 218 return -EINVAL; 219 - } else if ((num_init_writes / sizeof(*raw)) > SDCA_MAX_INIT_COUNT) { 220 - dev_err(dev, "%pfwP: maximum init table size exceeded\n", function_node); 221 - return -EINVAL; 222 219 } 223 220 224 221 raw = kzalloc(num_init_writes, GFP_KERNEL); ··· 1601 1604 static struct sdca_entity *find_sdca_entity_by_label(struct sdca_function_data *function, 1602 1605 const char *entity_label) 1603 1606 { 1607 + struct sdca_entity *entity = NULL; 1604 1608 int i; 1605 1609 1606 1610 for (i = 0; i < function->num_entities; i++) { 1607 - struct sdca_entity *entity = &function->entities[i]; 1611 + entity = &function->entities[i]; 1612 + 1613 + /* check whole string first*/ 1614 + if (!strcmp(entity->label, entity_label)) 1615 + return entity; 1616 + } 1617 + 1618 + for (i = 0; i < function->num_entities; i++) { 1619 + entity = &function->entities[i]; 1608 1620 1609 1621 if (!strncmp(entity->label, entity_label, strlen(entity_label))) 1610 1622 return entity;
+1 -1
sound/soc/sof/ipc4-topology.c
··· 2950 2950 return -EINVAL; 2951 2951 } 2952 2952 2953 - if (scontrol->priv_size < sizeof(struct sof_abi_hdr)) { 2953 + if (scontrol->priv_size && scontrol->priv_size < sizeof(struct sof_abi_hdr)) { 2954 2954 dev_err(sdev->dev, 2955 2955 "bytes control %s initial data size %zu is insufficient.\n", 2956 2956 scontrol->name, scontrol->priv_size);
+1 -1
sound/soc/sof/topology.c
··· 736 736 asize = le32_to_cpu(array->size); 737 737 738 738 /* validate asize */ 739 - if (asize < 0) { /* FIXME: A zero-size array makes no sense */ 739 + if (asize < sizeof(*array)) { 740 740 dev_err(scomp->dev, "error: invalid array size 0x%x\n", 741 741 asize); 742 742 return -EINVAL;
+1
sound/usb/Kconfig
··· 192 192 tristate "Qualcomm Audio Offload driver" 193 193 depends on QCOM_QMI_HELPERS && SND_USB_AUDIO && SND_SOC_USB 194 194 depends on USB_XHCI_HCD && USB_XHCI_SIDEBAND 195 + select AUXILIARY_BUS 195 196 help 196 197 Say Y here to enable the Qualcomm USB audio offloading feature. 197 198
+1 -1
sound/usb/qcom/qc_audio_offload.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 2 /* 3 - * Copyright (c) 2022-2025 Qualcomm Innovation Center, Inc. All rights reserved. 3 + * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. 4 4 */ 5 5 6 6 #include <linux/auxiliary_bus.h>
+4
sound/usb/quirks.c
··· 2148 2148 /* Device matches */ 2149 2149 DEVICE_FLG(0x001f, 0x0b21, /* AB13X USB Audio */ 2150 2150 QUIRK_FLAG_FORCE_IFACE_RESET | QUIRK_FLAG_IFACE_DELAY), 2151 + DEVICE_FLG(0x001f, 0x0b23, /* AB17X USB Audio */ 2152 + QUIRK_FLAG_FORCE_IFACE_RESET | QUIRK_FLAG_IFACE_DELAY), 2151 2153 DEVICE_FLG(0x0020, 0x0b21, /* GHW-123P */ 2152 2154 QUIRK_FLAG_FORCE_IFACE_RESET | QUIRK_FLAG_IFACE_DELAY), 2153 2155 DEVICE_FLG(0x03f0, 0x654a, /* HP 320 FHD Webcam */ ··· 2431 2429 QUIRK_FLAG_CTL_MSG_DELAY | QUIRK_FLAG_IFACE_DELAY), 2432 2430 VENDOR_FLG(0x07fd, /* MOTU */ 2433 2431 QUIRK_FLAG_VALIDATE_RATES), 2432 + DEVICE_FLG(0x1235, 0x8006, 0), /* Focusrite Scarlett 2i2 1st Gen */ 2433 + DEVICE_FLG(0x1235, 0x800a, 0), /* Focusrite Scarlett 2i4 1st Gen */ 2434 2434 VENDOR_FLG(0x1235, /* Focusrite Novation */ 2435 2435 QUIRK_FLAG_SKIP_CLOCK_SELECTOR | 2436 2436 QUIRK_FLAG_SKIP_IFACE_SETUP),