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-6.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
"This became a bit larger than wished for, often seen as a bump at the
middle, but almost all changes are small device-specific fixes, so the
risk must be pretty low.

- SoundWire fix for missing symbol export

- Fixes for device-tree bindings

- A fix for OOB access in USB-audio, spotted by fuzzer

- Quirks for HD-audio, SoundWire, AMD ACP

- A series of ASoC tlv320 and wsa codec fixes

- Other misc fixes in PCM OSS error-handling, Cirrus scodec test,
ASoC ops endianess, davinci, simple-card, and tegra"

* tag 'sound-6.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (33 commits)
ALSA: hda/tas2781: Add newly-released HP laptop
ASoC: rt5640: Fix duplicate clock properties in DT binding
ALSA: hda/realtek: Add quirk for HP Pavilion x360 to enable mute LED
ASoC: tlv320adcx140: fix word length
ASoC: tlv320adcx140: Propagate error codes during probe
ASoC: tlv320adcx140: fix null pointer
ASoC: tlv320adcx140: invert DRE_ENABLE
ASoC: sdw_utils: cs42l43: Enable Headphone pin for LINEOUT jack type
ASoC: sdw_utils: Call init callbacks on the correct codec DAI
soundwire: Add missing EXPORT for sdw_slave_type
ALSA: usb-audio: Prevent excessive number of frames
ALSA: hda/cirrus_scodec_test: Fix test suite name
ALSA: hda/cirrus_scodec_test: Fix incorrect setup of gpiochip
ALSA: hda/realtek: Add quirk for Asus Zephyrus G14 2025 using CS35L56, fix speakers
ASoC: amd: yc: Fix microphone on ASUS M6500RE
ASoC: tegra: Revert fix for uninitialized flat cache warning in tegra210_ahub
ASoC: dt-bindings: rockchip-spdif: Allow "port" node
ASoC: dt-bindings: realtek,rt5640: Allow 7 for realtek,jack-detect-source
ASoC: dt-bindings: realtek,rt5640: Add missing properties/node
ASoC: dt-bindings: realtek,rt5640: Document port node
...

+182 -41
+4
Documentation/devicetree/bindings/sound/everest,es8316.yaml
··· 49 49 items: 50 50 - const: mclk 51 51 52 + interrupts: 53 + maxItems: 1 54 + description: Headphone detect interrupt 55 + 52 56 port: 53 57 $ref: audio-graph-port.yaml# 54 58 unevaluatedProperties: false
+11
Documentation/devicetree/bindings/sound/realtek,rt5640.yaml
··· 47 47 reg: 48 48 maxItems: 1 49 49 50 + clocks: 51 + maxItems: 1 52 + 53 + clock-names: 54 + const: mclk 55 + 50 56 interrupts: 51 57 maxItems: 1 52 58 description: The CODEC's interrupt output. ··· 104 98 - 4 # Use GPIO2 for jack-detect 105 99 - 5 # Use GPIO3 for jack-detect 106 100 - 6 # Use GPIO4 for jack-detect 101 + - 7 # Use HDA header for jack-detect 107 102 108 103 realtek,jack-detect-not-inverted: 109 104 description: ··· 127 120 - 1 # Scale current by 0.75 128 121 - 2 # Scale current by 1.0 129 122 - 3 # Scale current by 1.5 123 + 124 + port: 125 + $ref: audio-graph-port.yaml# 126 + unevaluatedProperties: false 130 127 131 128 required: 132 129 - compatible
+3
Documentation/devicetree/bindings/sound/rockchip-spdif.yaml
··· 70 70 "#sound-dai-cells": 71 71 const: 0 72 72 73 + port: 74 + $ref: /schemas/graph.yaml#/properties/port 75 + 73 76 required: 74 77 - compatible 75 78 - reg
+1
drivers/soundwire/slave.c
··· 23 23 .release = sdw_slave_release, 24 24 .uevent = sdw_slave_uevent, 25 25 }; 26 + EXPORT_SYMBOL_GPL(sdw_slave_type); 26 27 27 28 int sdw_slave_add(struct sdw_bus *bus, 28 29 struct sdw_slave_id *id, struct fwnode_handle *fwnode)
+1 -1
include/sound/pcm.h
··· 1402 1402 #define snd_pcm_lib_mmap_iomem NULL 1403 1403 #endif 1404 1404 1405 - void snd_pcm_runtime_buffer_set_silence(struct snd_pcm_runtime *runtime); 1405 + int snd_pcm_runtime_buffer_set_silence(struct snd_pcm_runtime *runtime); 1406 1406 1407 1407 /** 1408 1408 * snd_pcm_limit_isa_dma_size - Get the max size fitting with ISA DMA transfer
+3 -1
sound/core/oss/pcm_oss.c
··· 1074 1074 runtime->oss.params = 0; 1075 1075 runtime->oss.prepare = 1; 1076 1076 runtime->oss.buffer_used = 0; 1077 - snd_pcm_runtime_buffer_set_silence(runtime); 1077 + err = snd_pcm_runtime_buffer_set_silence(runtime); 1078 + if (err < 0) 1079 + goto failure; 1078 1080 1079 1081 runtime->oss.period_frames = snd_pcm_alsa_frames(substream, oss_period_size); 1080 1082
+7 -2
sound/core/pcm_native.c
··· 730 730 } 731 731 732 732 /* fill the PCM buffer with the current silence format; called from pcm_oss.c */ 733 - void snd_pcm_runtime_buffer_set_silence(struct snd_pcm_runtime *runtime) 733 + int snd_pcm_runtime_buffer_set_silence(struct snd_pcm_runtime *runtime) 734 734 { 735 - snd_pcm_buffer_access_lock(runtime); 735 + int err; 736 + 737 + err = snd_pcm_buffer_access_lock(runtime); 738 + if (err < 0) 739 + return err; 736 740 if (runtime->dma_area) 737 741 snd_pcm_format_set_silence(runtime->format, runtime->dma_area, 738 742 bytes_to_samples(runtime, runtime->dma_bytes)); 739 743 snd_pcm_buffer_access_unlock(runtime); 744 + return 0; 740 745 } 741 746 EXPORT_SYMBOL_GPL(snd_pcm_runtime_buffer_set_silence); 742 747
+2
sound/hda/codecs/realtek/alc269.c
··· 6613 6613 SND_PCI_QUIRK(0x103c, 0x8a2e, "HP Envy 16", ALC287_FIXUP_CS35L41_I2C_2), 6614 6614 SND_PCI_QUIRK(0x103c, 0x8a30, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2), 6615 6615 SND_PCI_QUIRK(0x103c, 0x8a31, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2), 6616 + SND_PCI_QUIRK(0x103c, 0x8a34, "HP Pavilion x360 2-in-1 Laptop 14-ek0xxx", ALC245_FIXUP_HP_MUTE_LED_COEFBIT), 6616 6617 SND_PCI_QUIRK(0x103c, 0x8a4f, "HP Victus 15-fa0xxx (MB 8A4F)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT), 6617 6618 SND_PCI_QUIRK(0x103c, 0x8a6e, "HP EDNA 360", ALC287_FIXUP_CS35L41_I2C_4), 6618 6619 SND_PCI_QUIRK(0x103c, 0x8a74, "HP ProBook 440 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED), ··· 6818 6817 SND_PCI_QUIRK(0x103c, 0x8f42, "HP ZBook 8 G2a 14W", ALC245_FIXUP_HP_TAS2781_I2C_MUTE_LED), 6819 6818 SND_PCI_QUIRK(0x103c, 0x8f57, "HP Trekker G7JC", ALC287_FIXUP_CS35L41_I2C_2), 6820 6819 SND_PCI_QUIRK(0x103c, 0x8f62, "HP ZBook 8 G2a 16W", ALC245_FIXUP_HP_TAS2781_I2C_MUTE_LED), 6820 + SND_PCI_QUIRK(0x1043, 0x1024, "ASUS Zephyrus G14 2025", ALC285_FIXUP_ASUS_GA403U_HEADSET_MIC), 6821 6821 SND_PCI_QUIRK(0x1043, 0x1032, "ASUS VivoBook X513EA", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE), 6822 6822 SND_PCI_QUIRK(0x1043, 0x1034, "ASUS GU605C", ALC285_FIXUP_ASUS_GU605_SPI_SPEAKER2_TO_DAC1), 6823 6823 SND_PCI_QUIRK(0x1043, 0x103e, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC),
+2 -1
sound/hda/codecs/side-codecs/cirrus_scodec_test.c
··· 103 103 104 104 /* GPIO core modifies our struct gpio_chip so use a copy */ 105 105 gpio_priv->chip = cirrus_scodec_test_gpio_chip; 106 + gpio_priv->chip.parent = &pdev->dev; 106 107 ret = devm_gpiochip_add_data(&pdev->dev, &gpio_priv->chip, gpio_priv); 107 108 if (ret) 108 109 return dev_err_probe(&pdev->dev, ret, "Failed to add gpiochip\n"); ··· 320 319 }; 321 320 322 321 static struct kunit_suite cirrus_scodec_test_suite = { 323 - .name = "snd-hda-scodec-cs35l56-test", 322 + .name = "snd-hda-cirrus-scodec-test", 324 323 .init = cirrus_scodec_test_case_init, 325 324 .test_cases = cirrus_scodec_test_cases, 326 325 };
+16 -2
sound/hda/codecs/side-codecs/tas2781_hda_i2c.c
··· 2 2 // 3 3 // TAS2781 HDA I2C driver 4 4 // 5 - // Copyright 2023 - 2025 Texas Instruments, Inc. 5 + // Copyright 2023 - 2026 Texas Instruments, Inc. 6 6 // 7 7 // Author: Shenghao Ding <shenghao-ding@ti.com> 8 8 // Current maintainer: Baojun Xu <baojun.xu@ti.com> ··· 60 60 int (*save_calibration)(struct tas2781_hda *h); 61 61 62 62 int hda_chip_id; 63 + bool skip_calibration; 63 64 }; 64 65 65 66 static int tas2781_get_i2c_res(struct acpi_resource *ares, void *data) ··· 492 491 /* If calibrated data occurs error, dsp will still works with default 493 492 * calibrated data inside algo. 494 493 */ 495 - hda_priv->save_calibration(tas_hda); 494 + if (!hda_priv->skip_calibration) 495 + hda_priv->save_calibration(tas_hda); 496 496 } 497 497 498 498 static void tasdev_fw_ready(const struct firmware *fmw, void *context) ··· 550 548 void *master_data) 551 549 { 552 550 struct tas2781_hda *tas_hda = dev_get_drvdata(dev); 551 + struct tas2781_hda_i2c_priv *hda_priv = tas_hda->hda_priv; 553 552 struct hda_component_parent *parent = master_data; 554 553 struct hda_component *comp; 555 554 struct hda_codec *codec; ··· 571 568 case 0x1028: 572 569 tas_hda->catlog_id = DELL; 573 570 break; 571 + case 0x103C: 572 + tas_hda->catlog_id = HP; 573 + break; 574 574 default: 575 575 tas_hda->catlog_id = LENOVO; 576 576 break; 577 577 } 578 + 579 + /* 580 + * Using ASUS ROG Xbox Ally X (RC73XA) UEFI calibration data 581 + * causes audio dropouts during playback, use fallback data 582 + * from DSP firmware as a workaround. 583 + */ 584 + if (codec->core.subsystem_id == 0x10431384) 585 + hda_priv->skip_calibration = true; 578 586 579 587 pm_runtime_get_sync(dev); 580 588
+7
sound/soc/amd/yc/acp6x-mach.c
··· 420 420 .driver_data = &acp6x_card, 421 421 .matches = { 422 422 DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."), 423 + DMI_MATCH(DMI_PRODUCT_NAME, "M6500RE"), 424 + } 425 + }, 426 + { 427 + .driver_data = &acp6x_card, 428 + .matches = { 429 + DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."), 423 430 DMI_MATCH(DMI_PRODUCT_NAME, "M6501RM"), 424 431 } 425 432 },
+7 -6
sound/soc/codecs/tlv320adcx140.c
··· 23 23 #include "tlv320adcx140.h" 24 24 25 25 struct adcx140_priv { 26 - struct snd_soc_component *component; 27 26 struct regulator *supply_areg; 28 27 struct gpio_desc *gpio_reset; 29 28 struct regmap *regmap; ··· 337 338 SOC_DAPM_SINGLE("Switch", ADCX140_CH4_CFG0, 0, 1, 0); 338 339 339 340 static const struct snd_kcontrol_new adcx140_dapm_dre_en_switch = 340 - SOC_DAPM_SINGLE("Switch", ADCX140_DSP_CFG1, 3, 1, 0); 341 + SOC_DAPM_SINGLE("Switch", ADCX140_DSP_CFG1, 3, 1, 1); 341 342 342 343 /* Output Mixer */ 343 344 static const struct snd_kcontrol_new adcx140_output_mixer_controls[] = { ··· 698 699 { 699 700 int pwr_ctrl = 0; 700 701 int ret = 0; 701 - struct snd_soc_component *component = adcx140->component; 702 702 703 703 if (power_state) 704 704 pwr_ctrl = ADCX140_PWR_CFG_ADC_PDZ | ADCX140_PWR_CFG_PLL_PDZ; ··· 709 711 ret = regmap_write(adcx140->regmap, ADCX140_PHASE_CALIB, 710 712 adcx140->phase_calib_on ? 0x00 : 0x40); 711 713 if (ret) 712 - dev_err(component->dev, "%s: register write error %d\n", 714 + dev_err(adcx140->dev, "%s: register write error %d\n", 713 715 __func__, ret); 714 716 } 715 717 ··· 725 727 struct adcx140_priv *adcx140 = snd_soc_component_get_drvdata(component); 726 728 u8 data = 0; 727 729 728 - switch (params_width(params)) { 730 + switch (params_physical_width(params)) { 729 731 case 16: 730 732 data = ADCX140_16_BIT_WORD; 731 733 break; ··· 740 742 break; 741 743 default: 742 744 dev_err(component->dev, "%s: Unsupported width %d\n", 743 - __func__, params_width(params)); 745 + __func__, params_physical_width(params)); 744 746 return -EINVAL; 745 747 } 746 748 ··· 1154 1156 adcx140->gpio_reset = devm_gpiod_get_optional(adcx140->dev, 1155 1157 "reset", GPIOD_OUT_LOW); 1156 1158 if (IS_ERR(adcx140->gpio_reset)) 1159 + return dev_err_probe(&i2c->dev, PTR_ERR(adcx140->gpio_reset), 1160 + "Failed to get Reset GPIO\n"); 1161 + if (!adcx140->gpio_reset) 1157 1162 dev_info(&i2c->dev, "Reset GPIO not defined\n"); 1158 1163 1159 1164 adcx140->supply_areg = devm_regulator_get_optional(adcx140->dev,
+9
sound/soc/codecs/wsa881x.c
··· 678 678 */ 679 679 unsigned int sd_n_val; 680 680 int active_ports; 681 + bool hw_init; 681 682 bool port_prepared[WSA881X_MAX_SWR_PORTS]; 682 683 bool port_enable[WSA881X_MAX_SWR_PORTS]; 683 684 }; ··· 687 686 { 688 687 struct regmap *rm = wsa881x->regmap; 689 688 unsigned int val = 0; 689 + 690 + if (wsa881x->hw_init) 691 + return; 690 692 691 693 regmap_register_patch(wsa881x->regmap, wsa881x_rev_2_0, 692 694 ARRAY_SIZE(wsa881x_rev_2_0)); ··· 728 724 regmap_update_bits(rm, WSA881X_OTP_REG_28, 0x3F, 0x3A); 729 725 regmap_update_bits(rm, WSA881X_BONGO_RESRV_REG1, 0xFF, 0xB2); 730 726 regmap_update_bits(rm, WSA881X_BONGO_RESRV_REG2, 0xFF, 0x05); 727 + 728 + wsa881x->hw_init = true; 731 729 } 732 730 733 731 static int wsa881x_component_probe(struct snd_soc_component *comp) ··· 1072 1066 enum sdw_slave_status status) 1073 1067 { 1074 1068 struct wsa881x_priv *wsa881x = dev_get_drvdata(&slave->dev); 1069 + 1070 + if (status == SDW_SLAVE_UNATTACHED) 1071 + wsa881x->hw_init = false; 1075 1072 1076 1073 if (status == SDW_SLAVE_ATTACHED && slave->dev_num > 0) 1077 1074 wsa881x_init(wsa881x);
+18 -8
sound/soc/codecs/wsa883x.c
··· 475 475 int active_ports; 476 476 int dev_mode; 477 477 int comp_offset; 478 + bool hw_init; 478 479 /* 479 480 * Protects temperature reading code (related to speaker protection) and 480 481 * fields: temperature and pa_on. ··· 1044 1043 struct regmap *regmap = wsa883x->regmap; 1045 1044 int variant, version, ret; 1046 1045 1046 + if (wsa883x->hw_init) 1047 + return 0; 1048 + 1047 1049 ret = regmap_read(regmap, WSA883X_OTP_REG_0, &variant); 1048 1050 if (ret) 1049 1051 return ret; ··· 1058 1054 1059 1055 switch (variant) { 1060 1056 case WSA8830: 1061 - dev_info(wsa883x->dev, "WSA883X Version 1_%d, Variant: WSA8830\n", 1062 - version); 1057 + dev_dbg(wsa883x->dev, "WSA883X Version 1_%d, Variant: WSA8830\n", 1058 + version); 1063 1059 break; 1064 1060 case WSA8835: 1065 - dev_info(wsa883x->dev, "WSA883X Version 1_%d, Variant: WSA8835\n", 1066 - version); 1061 + dev_dbg(wsa883x->dev, "WSA883X Version 1_%d, Variant: WSA8835\n", 1062 + version); 1067 1063 break; 1068 1064 case WSA8832: 1069 - dev_info(wsa883x->dev, "WSA883X Version 1_%d, Variant: WSA8832\n", 1070 - version); 1065 + dev_dbg(wsa883x->dev, "WSA883X Version 1_%d, Variant: WSA8832\n", 1066 + version); 1071 1067 break; 1072 1068 case WSA8835_V2: 1073 - dev_info(wsa883x->dev, "WSA883X Version 1_%d, Variant: WSA8835_V2\n", 1074 - version); 1069 + dev_dbg(wsa883x->dev, "WSA883X Version 1_%d, Variant: WSA8835_V2\n", 1070 + version); 1075 1071 break; 1076 1072 default: 1073 + dev_warn(wsa883x->dev, "unknown variant: %d\n", variant); 1077 1074 break; 1078 1075 } 1079 1076 ··· 1090 1085 wsa883x->comp_offset); 1091 1086 } 1092 1087 1088 + wsa883x->hw_init = true; 1089 + 1093 1090 return 0; 1094 1091 } 1095 1092 ··· 1099 1092 enum sdw_slave_status status) 1100 1093 { 1101 1094 struct wsa883x_priv *wsa883x = dev_get_drvdata(&slave->dev); 1095 + 1096 + if (status == SDW_SLAVE_UNATTACHED) 1097 + wsa883x->hw_init = false; 1102 1098 1103 1099 if (status == SDW_SLAVE_ATTACHED && slave->dev_num > 0) 1104 1100 return wsa883x_init(wsa883x);
+1 -2
sound/soc/codecs/wsa884x.c
··· 1534 1534 1535 1535 wsa884x_set_gain_parameters(wsa884x); 1536 1536 1537 - wsa884x->hw_init = false; 1537 + wsa884x->hw_init = true; 1538 1538 } 1539 1539 1540 1540 static int wsa884x_update_status(struct sdw_slave *slave, ··· 2109 2109 2110 2110 /* Start in cache-only until device is enumerated */ 2111 2111 regcache_cache_only(wsa884x->regmap, true); 2112 - wsa884x->hw_init = true; 2113 2112 2114 2113 if (IS_REACHABLE(CONFIG_HWMON)) { 2115 2114 struct device *hwmon;
+2 -2
sound/soc/generic/simple-card-utils.c
··· 1179 1179 bool is_playback_only = of_property_read_bool(np, "playback-only"); 1180 1180 bool is_capture_only = of_property_read_bool(np, "capture-only"); 1181 1181 1182 - if (playback_only) 1182 + if (np && playback_only) 1183 1183 *playback_only = is_playback_only; 1184 - if (capture_only) 1184 + if (np && capture_only) 1185 1185 *capture_only = is_capture_only; 1186 1186 } 1187 1187 EXPORT_SYMBOL_GPL(graph_util_parse_link_direction);
+8
sound/soc/intel/boards/sof_sdw.c
··· 767 767 { 768 768 .callback = sof_sdw_quirk_cb, 769 769 .matches = { 770 + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"), 771 + DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0DD6") 772 + }, 773 + .driver_data = (void *)(SOC_SDW_SIDECAR_AMPS), 774 + }, 775 + { 776 + .callback = sof_sdw_quirk_cb, 777 + .matches = { 770 778 DMI_MATCH(DMI_PRODUCT_FAMILY, "Intel_ptlrvp"), 771 779 }, 772 780 .driver_data = (void *)(SOC_SDW_PCH_DMIC),
+1 -1
sound/soc/sdw_utils/soc_sdw_cs42l43.c
··· 44 44 static struct snd_soc_jack_pin soc_jack_pins[] = { 45 45 { 46 46 .pin = "Headphone", 47 - .mask = SND_JACK_HEADPHONE, 47 + .mask = SND_JACK_HEADPHONE | SND_JACK_LINEOUT, 48 48 }, 49 49 { 50 50 .pin = "Headset Mic",
+42 -1
sound/soc/sdw_utils/soc_sdw_utils.c
··· 841 841 } 842 842 EXPORT_SYMBOL_NS(asoc_sdw_find_codec_info_part, "SND_SOC_SDW_UTILS"); 843 843 844 + static struct asoc_sdw_codec_info *asoc_sdw_find_codec_info_sdw_id(const struct sdw_slave_id *id) 845 + { 846 + int i; 847 + 848 + for (i = 0; i < ARRAY_SIZE(codec_info_list); i++) 849 + if (id->part_id == codec_info_list[i].part_id && 850 + (!codec_info_list[i].version_id || 851 + id->sdw_version == codec_info_list[i].version_id)) 852 + return &codec_info_list[i]; 853 + 854 + return NULL; 855 + } 856 + 844 857 struct asoc_sdw_codec_info *asoc_sdw_find_codec_info_acpi(const u8 *acpi_id) 845 858 { 846 859 int i; ··· 886 873 } 887 874 EXPORT_SYMBOL_NS(asoc_sdw_find_codec_info_dai, "SND_SOC_SDW_UTILS"); 888 875 876 + static int asoc_sdw_find_codec_info_dai_index(const struct asoc_sdw_codec_info *codec_info, 877 + const char *dai_name) 878 + { 879 + int i; 880 + 881 + for (i = 0; i < codec_info->dai_num; i++) { 882 + if (!strcmp(codec_info->dais[i].dai_name, dai_name)) 883 + return i; 884 + } 885 + 886 + return -ENOENT; 887 + } 888 + 889 889 int asoc_sdw_rtd_init(struct snd_soc_pcm_runtime *rtd) 890 890 { 891 891 struct snd_soc_card *card = rtd->card; 892 892 struct snd_soc_dapm_context *dapm = snd_soc_card_to_dapm(card); 893 893 struct asoc_sdw_codec_info *codec_info; 894 894 struct snd_soc_dai *dai; 895 + struct sdw_slave *sdw_peripheral; 895 896 const char *spk_components=""; 896 897 int dai_index; 897 898 int ret; 898 899 int i; 899 900 900 901 for_each_rtd_codec_dais(rtd, i, dai) { 901 - codec_info = asoc_sdw_find_codec_info_dai(dai->name, &dai_index); 902 + if (is_sdw_slave(dai->component->dev)) 903 + sdw_peripheral = dev_to_sdw_dev(dai->component->dev); 904 + else if (dai->component->dev->parent && is_sdw_slave(dai->component->dev->parent)) 905 + sdw_peripheral = dev_to_sdw_dev(dai->component->dev->parent); 906 + else 907 + continue; 908 + 909 + codec_info = asoc_sdw_find_codec_info_sdw_id(&sdw_peripheral->id); 902 910 if (!codec_info) 903 911 return -EINVAL; 912 + 913 + dai_index = asoc_sdw_find_codec_info_dai_index(codec_info, dai->name); 914 + WARN_ON(dai_index < 0); 904 915 905 916 /* 906 917 * A codec dai can be connected to different dai links for capture and playback, ··· 934 897 */ 935 898 if (codec_info->dais[dai_index].rtd_init_done) 936 899 continue; 900 + 901 + dev_dbg(card->dev, "%#x/%s initializing for %s/%s\n", 902 + codec_info->part_id, codec_info->dais[dai_index].dai_name, 903 + dai->component->name, dai->name); 937 904 938 905 /* 939 906 * Add card controls and dapm widgets for the first codec dai.
+2 -2
sound/soc/soc-ops.c
··· 543 543 ucontrol->value.bytes.data[0] &= ~params->mask; 544 544 break; 545 545 case 2: 546 - ((u16 *)(&ucontrol->value.bytes.data))[0] 546 + ((__be16 *)(&ucontrol->value.bytes.data))[0] 547 547 &= cpu_to_be16(~params->mask); 548 548 break; 549 549 case 4: 550 - ((u32 *)(&ucontrol->value.bytes.data))[0] 550 + ((__be32 *)(&ucontrol->value.bytes.data))[0] 551 551 &= cpu_to_be32(~params->mask); 552 552 break; 553 553 default:
+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_S, 2080 + .cache_type = REGCACHE_FLAT, 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_S, 2088 + .cache_type = REGCACHE_FLAT, 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_S, 2097 + .cache_type = REGCACHE_FLAT, 2098 2098 }; 2099 2099 2100 2100 static const struct tegra_ahub_soc_data soc_data_tegra210 = {
+31 -8
sound/soc/ti/davinci-evm.c
··· 194 194 return -EINVAL; 195 195 196 196 dai->cpus->of_node = of_parse_phandle(np, "ti,mcasp-controller", 0); 197 - if (!dai->cpus->of_node) 198 - return -EINVAL; 197 + if (!dai->cpus->of_node) { 198 + ret = -EINVAL; 199 + goto err_put; 200 + } 199 201 200 202 dai->platforms->of_node = dai->cpus->of_node; 201 203 202 204 evm_soc_card.dev = &pdev->dev; 203 205 ret = snd_soc_of_parse_card_name(&evm_soc_card, "ti,model"); 204 206 if (ret) 205 - return ret; 207 + goto err_put; 206 208 207 209 mclk = devm_clk_get(&pdev->dev, "mclk"); 208 210 if (PTR_ERR(mclk) == -EPROBE_DEFER) { 209 - return -EPROBE_DEFER; 211 + ret = -EPROBE_DEFER; 212 + goto err_put; 210 213 } else if (IS_ERR(mclk)) { 211 214 dev_dbg(&pdev->dev, "mclk not found.\n"); 212 215 mclk = NULL; 213 216 } 214 217 215 218 drvdata = devm_kzalloc(&pdev->dev, sizeof(*drvdata), GFP_KERNEL); 216 - if (!drvdata) 217 - return -ENOMEM; 219 + if (!drvdata) { 220 + ret = -ENOMEM; 221 + goto err_put; 222 + } 218 223 219 224 drvdata->mclk = mclk; 220 225 ··· 229 224 if (!drvdata->mclk) { 230 225 dev_err(&pdev->dev, 231 226 "No clock or clock rate defined.\n"); 232 - return -EINVAL; 227 + ret = -EINVAL; 228 + goto err_put; 233 229 } 234 230 drvdata->sysclk = clk_get_rate(drvdata->mclk); 235 231 } else if (drvdata->mclk) { ··· 246 240 snd_soc_card_set_drvdata(&evm_soc_card, drvdata); 247 241 ret = devm_snd_soc_register_card(&pdev->dev, &evm_soc_card); 248 242 249 - if (ret) 243 + if (ret) { 250 244 dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret); 245 + goto err_put; 246 + } 247 + 248 + return ret; 249 + 250 + err_put: 251 + dai->platforms->of_node = NULL; 252 + 253 + if (dai->cpus->of_node) { 254 + of_node_put(dai->cpus->of_node); 255 + dai->cpus->of_node = NULL; 256 + } 257 + 258 + if (dai->codecs->of_node) { 259 + of_node_put(dai->codecs->of_node); 260 + dai->codecs->of_node = NULL; 261 + } 251 262 252 263 return ret; 253 264 }
+1 -1
sound/usb/pcm.c
··· 1553 1553 1554 1554 for (i = 0; i < ctx->packets; i++) { 1555 1555 counts = snd_usb_endpoint_next_packet_size(ep, ctx, i, avail); 1556 - if (counts < 0) 1556 + if (counts < 0 || frames + counts >= ep->max_urb_frames) 1557 1557 break; 1558 1558 /* set up descriptor */ 1559 1559 urb->iso_frame_desc[i].offset = frames * stride;