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

Pull sound fixes from Takashi Iwai:
"A collection of small fixes. All changes are device-specific, and
nothing stands out.

- A regression fix for HD-audio HDMI probe

- USB-audio hardening patches for issues spotted by fuzzers

- ASoC fixes for TAS278x, SoundWire and Cirrus

- Usual HD-audio and USB-audio quirks"

* tag 'sound-6.18-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ALSA: usb-audio: Add native DSD quirks for PureAudio DAC series
ASoC: rsnd: fix OF node reference leak in rsnd_ssiu_probe()
ALSA: hda/tas2781: Correct the wrong project ID
ALSA: usb-audio: Fix NULL pointer dereference in snd_usb_mixer_controls_badd
ASoC: SDCA: bug fix while parsing mipi-sdca-control-cn-list
ALSA: usb-audio: Fix potential overflow of PCM transfer buffer
ALSA: hda/tas2781: Add new quirk for HP new projects
ASoC: tas2781: fix getting the wrong device number
ASoC: codecs: va-macro: fix resource leak in probe error path
ASoC: tas2783A: Fix issues in firmware parsing
ASoC: sdw_utils: fix device reference leak in is_sdca_endpoint_present()
ASoC: cs4271: Fix regulator leak on probe failure
ALSA: hda/hdmi: Fix breakage at probing nvhdmi-mcp driver
ASoC: da7213: Use component driver suspend/resume
ALSA: usb-audio: add min_mute quirk for SteelSeries Arctis
ASoC: doc: cs35l56: Update firmware filename description for B0 silicon

+125 -49
+4 -5
Documentation/sound/codecs/cs35l56.rst
··· 105 105 106 106 The format of the firmware file names is: 107 107 108 - SoundWire (except CS35L56 Rev B0): 108 + SoundWire: 109 109 cs35lxx-b0-dsp1-misc-SSID[-spkidX]-l?u? 110 110 111 - SoundWire CS35L56 Rev B0: 111 + SoundWire CS35L56 Rev B0 firmware released before kernel version 6.16: 112 112 cs35lxx-b0-dsp1-misc-SSID[-spkidX]-ampN 113 113 114 114 Non-SoundWire (HDA and I2S): ··· 127 127 * spkidX is an optional part, used for laptops that have firmware 128 128 configurations for different makes and models of internal speakers. 129 129 130 - The CS35L56 Rev B0 continues to use the old filename scheme because a 131 - large number of firmware files have already been published with these 132 - names. 130 + Early firmware for CS35L56 Rev B0 used the ALSA prefix (ampN) as the 131 + filename qualifier. Support for the l?u? qualifier was added in kernel 6.16. 133 132 134 133 Sound Open Firmware and ALSA topology files 135 134 -------------------------------------------
+2 -2
sound/hda/codecs/hdmi/nvhdmi-mcp.c
··· 350 350 static const struct hda_codec_ops nvhdmi_mcp_codec_ops = { 351 351 .probe = nvhdmi_mcp_probe, 352 352 .remove = snd_hda_hdmi_simple_remove, 353 - .build_controls = nvhdmi_mcp_build_pcms, 354 - .build_pcms = nvhdmi_mcp_build_controls, 353 + .build_pcms = nvhdmi_mcp_build_pcms, 354 + .build_controls = nvhdmi_mcp_build_controls, 355 355 .init = nvhdmi_mcp_init, 356 356 .unsol_event = snd_hda_hdmi_simple_unsol_event, 357 357 };
+9
sound/hda/codecs/realtek/alc269.c
··· 6694 6694 SND_PCI_QUIRK(0x103c, 0x8e60, "HP Trekker ", ALC287_FIXUP_CS35L41_I2C_2), 6695 6695 SND_PCI_QUIRK(0x103c, 0x8e61, "HP Trekker ", ALC287_FIXUP_CS35L41_I2C_2), 6696 6696 SND_PCI_QUIRK(0x103c, 0x8e62, "HP Trekker ", ALC287_FIXUP_CS35L41_I2C_2), 6697 + SND_PCI_QUIRK(0x103c, 0x8ed5, "HP Merino13X", ALC245_FIXUP_TAS2781_SPI_2), 6698 + SND_PCI_QUIRK(0x103c, 0x8ed6, "HP Merino13", ALC245_FIXUP_TAS2781_SPI_2), 6699 + SND_PCI_QUIRK(0x103c, 0x8ed7, "HP Merino14", ALC245_FIXUP_TAS2781_SPI_2), 6700 + SND_PCI_QUIRK(0x103c, 0x8ed8, "HP Merino16", ALC245_FIXUP_TAS2781_SPI_2), 6701 + SND_PCI_QUIRK(0x103c, 0x8ed9, "HP Merino14W", ALC245_FIXUP_TAS2781_SPI_2), 6702 + SND_PCI_QUIRK(0x103c, 0x8eda, "HP Merino16W", ALC245_FIXUP_TAS2781_SPI_2), 6703 + SND_PCI_QUIRK(0x103c, 0x8f40, "HP Lampas14", ALC287_FIXUP_TXNW2781_I2C), 6704 + SND_PCI_QUIRK(0x103c, 0x8f41, "HP Lampas16", ALC287_FIXUP_TXNW2781_I2C), 6705 + SND_PCI_QUIRK(0x103c, 0x8f42, "HP LampasW14", ALC287_FIXUP_TXNW2781_I2C), 6697 6706 SND_PCI_QUIRK(0x1043, 0x1032, "ASUS VivoBook X513EA", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE), 6698 6707 SND_PCI_QUIRK(0x1043, 0x1034, "ASUS GU605C", ALC285_FIXUP_ASUS_GU605_SPI_SPEAKER2_TO_DAC1), 6699 6708 SND_PCI_QUIRK(0x1043, 0x103e, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC),
+7 -3
sound/soc/codecs/cs4271.c
··· 581 581 582 582 ret = regcache_sync(cs4271->regmap); 583 583 if (ret < 0) 584 - return ret; 584 + goto err_disable_regulator; 585 585 586 586 ret = regmap_update_bits(cs4271->regmap, CS4271_MODE2, 587 587 CS4271_MODE2_PDN | CS4271_MODE2_CPEN, 588 588 CS4271_MODE2_PDN | CS4271_MODE2_CPEN); 589 589 if (ret < 0) 590 - return ret; 590 + goto err_disable_regulator; 591 591 ret = regmap_update_bits(cs4271->regmap, CS4271_MODE2, 592 592 CS4271_MODE2_PDN, 0); 593 593 if (ret < 0) 594 - return ret; 594 + goto err_disable_regulator; 595 595 /* Power-up sequence requires 85 uS */ 596 596 udelay(85); 597 597 ··· 601 601 CS4271_MODE2_MUTECAEQUB); 602 602 603 603 return 0; 604 + 605 + err_disable_regulator: 606 + regulator_bulk_disable(ARRAY_SIZE(cs4271->supplies), cs4271->supplies); 607 + return ret; 604 608 } 605 609 606 610 static void cs4271_component_remove(struct snd_soc_component *component)
+44 -25
sound/soc/codecs/da7213.c
··· 2124 2124 return 0; 2125 2125 } 2126 2126 2127 + static int da7213_runtime_suspend(struct device *dev) 2128 + { 2129 + struct da7213_priv *da7213 = dev_get_drvdata(dev); 2130 + 2131 + regcache_cache_only(da7213->regmap, true); 2132 + regcache_mark_dirty(da7213->regmap); 2133 + regulator_bulk_disable(DA7213_NUM_SUPPLIES, da7213->supplies); 2134 + 2135 + return 0; 2136 + } 2137 + 2138 + static int da7213_runtime_resume(struct device *dev) 2139 + { 2140 + struct da7213_priv *da7213 = dev_get_drvdata(dev); 2141 + int ret; 2142 + 2143 + ret = regulator_bulk_enable(DA7213_NUM_SUPPLIES, da7213->supplies); 2144 + if (ret < 0) 2145 + return ret; 2146 + regcache_cache_only(da7213->regmap, false); 2147 + return regcache_sync(da7213->regmap); 2148 + } 2149 + 2150 + static int da7213_suspend(struct snd_soc_component *component) 2151 + { 2152 + struct da7213_priv *da7213 = snd_soc_component_get_drvdata(component); 2153 + 2154 + return da7213_runtime_suspend(da7213->dev); 2155 + } 2156 + 2157 + static int da7213_resume(struct snd_soc_component *component) 2158 + { 2159 + struct da7213_priv *da7213 = snd_soc_component_get_drvdata(component); 2160 + 2161 + return da7213_runtime_resume(da7213->dev); 2162 + } 2163 + 2127 2164 static const struct snd_soc_component_driver soc_component_dev_da7213 = { 2128 2165 .probe = da7213_probe, 2129 2166 .set_bias_level = da7213_set_bias_level, 2130 2167 .controls = da7213_snd_controls, 2131 2168 .num_controls = ARRAY_SIZE(da7213_snd_controls), 2169 + .suspend = da7213_suspend, 2170 + .resume = da7213_resume, 2132 2171 .dapm_widgets = da7213_dapm_widgets, 2133 2172 .num_dapm_widgets = ARRAY_SIZE(da7213_dapm_widgets), 2134 2173 .dapm_routes = da7213_audio_map, ··· 2213 2174 da7213->fin_min_rate = (uintptr_t)i2c_get_match_data(i2c); 2214 2175 if (!da7213->fin_min_rate) 2215 2176 return -EINVAL; 2177 + 2178 + da7213->dev = &i2c->dev; 2216 2179 2217 2180 i2c_set_clientdata(i2c, da7213); 2218 2181 ··· 2265 2224 pm_runtime_disable(&i2c->dev); 2266 2225 } 2267 2226 2268 - static int da7213_runtime_suspend(struct device *dev) 2269 - { 2270 - struct da7213_priv *da7213 = dev_get_drvdata(dev); 2271 - 2272 - regcache_cache_only(da7213->regmap, true); 2273 - regcache_mark_dirty(da7213->regmap); 2274 - regulator_bulk_disable(DA7213_NUM_SUPPLIES, da7213->supplies); 2275 - 2276 - return 0; 2277 - } 2278 - 2279 - static int da7213_runtime_resume(struct device *dev) 2280 - { 2281 - struct da7213_priv *da7213 = dev_get_drvdata(dev); 2282 - int ret; 2283 - 2284 - ret = regulator_bulk_enable(DA7213_NUM_SUPPLIES, da7213->supplies); 2285 - if (ret < 0) 2286 - return ret; 2287 - regcache_cache_only(da7213->regmap, false); 2288 - return regcache_sync(da7213->regmap); 2289 - } 2290 - 2291 - static DEFINE_RUNTIME_DEV_PM_OPS(da7213_pm, da7213_runtime_suspend, 2292 - da7213_runtime_resume, NULL); 2227 + static const struct dev_pm_ops da7213_pm = { 2228 + RUNTIME_PM_OPS(da7213_runtime_suspend, da7213_runtime_resume, NULL) 2229 + }; 2293 2230 2294 2231 static const struct i2c_device_id da7213_i2c_id[] = { 2295 2232 { "da7213" },
+1
sound/soc/codecs/da7213.h
··· 595 595 /* Codec private data */ 596 596 struct da7213_priv { 597 597 struct regmap *regmap; 598 + struct device *dev; 598 599 struct mutex ctrl_lock; 599 600 struct regulator_bulk_data supplies[DA7213_NUM_SUPPLIES]; 600 601 struct clk *mclk;
+1 -1
sound/soc/codecs/lpass-va-macro.c
··· 1638 1638 if (ret) 1639 1639 goto err_clkout; 1640 1640 1641 - va->fsgen = clk_hw_get_clk(&va->hw, "fsgen"); 1641 + va->fsgen = devm_clk_hw_get_clk(dev, &va->hw, "fsgen"); 1642 1642 if (IS_ERR(va->fsgen)) { 1643 1643 ret = PTR_ERR(va->fsgen); 1644 1644 goto err_clkout;
+7 -2
sound/soc/codecs/tas2781-i2c.c
··· 1957 1957 { 1958 1958 struct i2c_client *client = (struct i2c_client *)tas_priv->client; 1959 1959 unsigned int dev_addrs[TASDEVICE_MAX_CHANNELS]; 1960 - int i, ndev = 0; 1960 + int ndev = 0; 1961 + int i, rc; 1961 1962 1962 1963 if (tas_priv->isacpi) { 1963 1964 ndev = device_property_read_u32_array(&client->dev, ··· 1969 1968 } else { 1970 1969 ndev = (ndev < ARRAY_SIZE(dev_addrs)) 1971 1970 ? ndev : ARRAY_SIZE(dev_addrs); 1972 - ndev = device_property_read_u32_array(&client->dev, 1971 + rc = device_property_read_u32_array(&client->dev, 1973 1972 "ti,audio-slots", dev_addrs, ndev); 1973 + if (rc != 0) { 1974 + ndev = 1; 1975 + dev_addrs[0] = client->addr; 1976 + } 1974 1977 } 1975 1978 1976 1979 tas_priv->irq =
+18 -2
sound/soc/codecs/tas2783-sdw.c
··· 762 762 goto out; 763 763 } 764 764 765 - mutex_lock(&tas_dev->pde_lock); 766 765 img_sz = fmw->size; 767 766 buf = fmw->data; 768 767 offset += FW_DL_OFFSET; 768 + if (offset >= (img_sz - FW_FL_HDR)) { 769 + dev_err(tas_dev->dev, 770 + "firmware is too small"); 771 + ret = -EINVAL; 772 + goto out; 773 + } 774 + 775 + mutex_lock(&tas_dev->pde_lock); 769 776 while (offset < (img_sz - FW_FL_HDR)) { 770 777 memset(&hdr, 0, sizeof(hdr)); 771 778 offset += read_header(&buf[offset], &hdr); ··· 782 775 hdr.length, offset); 783 776 /* size also includes the header */ 784 777 file_blk_size = hdr.length - FW_FL_HDR; 778 + 779 + /* make sure that enough data is there */ 780 + if (offset + file_blk_size > img_sz) { 781 + ret = -EINVAL; 782 + dev_err(tas_dev->dev, 783 + "corrupt firmware file"); 784 + break; 785 + } 785 786 786 787 switch (hdr.file_id) { 787 788 case 0: ··· 823 808 break; 824 809 } 825 810 mutex_unlock(&tas_dev->pde_lock); 826 - tas2783_update_calibdata(tas_dev); 811 + if (!ret) 812 + tas2783_update_calibdata(tas_dev); 827 813 828 814 out: 829 815 if (!ret)
+1 -2
sound/soc/renesas/rcar/ssiu.c
··· 509 509 int rsnd_ssiu_probe(struct rsnd_priv *priv) 510 510 { 511 511 struct device *dev = rsnd_priv_to_dev(priv); 512 - struct device_node *node; 512 + struct device_node *node __free(device_node) = rsnd_ssiu_of_node(priv); 513 513 struct rsnd_ssiu *ssiu; 514 514 struct rsnd_mod_ops *ops; 515 515 const int *list = NULL; ··· 522 522 * see 523 523 * rsnd_ssiu_bufsif_to_id() 524 524 */ 525 - node = rsnd_ssiu_of_node(priv); 526 525 if (node) 527 526 nr = rsnd_node_count(priv, node, SSIU_NAME); 528 527 else
+2 -1
sound/soc/sdca/sdca_functions.c
··· 894 894 return ret; 895 895 } 896 896 897 - control->values = devm_kzalloc(dev, hweight64(control->cn_list), GFP_KERNEL); 897 + control->values = devm_kcalloc(dev, hweight64(control->cn_list), 898 + sizeof(int), GFP_KERNEL); 898 899 if (!control->values) 899 900 return -ENOMEM; 900 901
+14 -6
sound/soc/sdw_utils/soc_sdw_utils.c
··· 1277 1277 struct sdw_slave *slave; 1278 1278 struct device *sdw_dev; 1279 1279 const char *sdw_codec_name; 1280 - int i; 1280 + int ret, i; 1281 1281 1282 1282 dlc = kzalloc(sizeof(*dlc), GFP_KERNEL); 1283 1283 if (!dlc) ··· 1307 1307 } 1308 1308 1309 1309 slave = dev_to_sdw_dev(sdw_dev); 1310 - if (!slave) 1311 - return -EINVAL; 1310 + if (!slave) { 1311 + ret = -EINVAL; 1312 + goto put_device; 1313 + } 1312 1314 1313 1315 /* Make sure BIOS provides SDCA properties */ 1314 1316 if (!slave->sdca_data.interface_revision) { 1315 1317 dev_warn(&slave->dev, "SDCA properties not found in the BIOS\n"); 1316 - return 1; 1318 + ret = 1; 1319 + goto put_device; 1317 1320 } 1318 1321 1319 1322 for (i = 0; i < slave->sdca_data.num_functions; i++) { ··· 1325 1322 if (dai_type == dai_info->dai_type) { 1326 1323 dev_dbg(&slave->dev, "DAI type %d sdca function %s found\n", 1327 1324 dai_type, slave->sdca_data.function[i].name); 1328 - return 1; 1325 + ret = 1; 1326 + goto put_device; 1329 1327 } 1330 1328 } 1331 1329 ··· 1334 1330 "SDCA device function for DAI type %d not supported, skip endpoint\n", 1335 1331 dai_info->dai_type); 1336 1332 1337 - return 0; 1333 + ret = 0; 1334 + 1335 + put_device: 1336 + put_device(sdw_dev); 1337 + return ret; 1338 1338 } 1339 1339 1340 1340 int asoc_sdw_parse_sdw_endpoints(struct snd_soc_card *card,
+5
sound/usb/endpoint.c
··· 1362 1362 ep->sample_rem = ep->cur_rate % ep->pps; 1363 1363 ep->packsize[0] = ep->cur_rate / ep->pps; 1364 1364 ep->packsize[1] = (ep->cur_rate + (ep->pps - 1)) / ep->pps; 1365 + if (ep->packsize[1] > ep->maxpacksize) { 1366 + usb_audio_dbg(chip, "Too small maxpacksize %u for rate %u / pps %u\n", 1367 + ep->maxpacksize, ep->cur_rate, ep->pps); 1368 + return -EINVAL; 1369 + } 1365 1370 1366 1371 /* calculate the frequency in 16.16 format */ 1367 1372 ep->freqm = ep->freqn;
+2
sound/usb/mixer.c
··· 3086 3086 int i; 3087 3087 3088 3088 assoc = usb_ifnum_to_if(dev, ctrlif)->intf_assoc; 3089 + if (!assoc) 3090 + return -EINVAL; 3089 3091 3090 3092 /* Detect BADD capture/playback channels from AS EP descriptors */ 3091 3093 for (i = 0; i < assoc->bInterfaceCount; i++) {
+8
sound/usb/quirks.c
··· 2022 2022 case USB_ID(0x16d0, 0x09d8): /* NuPrime IDA-8 */ 2023 2023 case USB_ID(0x16d0, 0x09db): /* NuPrime Audio DAC-9 */ 2024 2024 case USB_ID(0x16d0, 0x09dd): /* Encore mDSD */ 2025 + case USB_ID(0x16d0, 0x0ab1): /* PureAudio APA DAC */ 2026 + case USB_ID(0x16d0, 0xeca1): /* PureAudio Lotus DAC5, DAC5 SE, DAC5 Pro */ 2025 2027 case USB_ID(0x1db5, 0x0003): /* Bryston BDA3 */ 2026 2028 case USB_ID(0x20a0, 0x4143): /* WaveIO USB Audio 2.0 */ 2027 2029 case USB_ID(0x22e1, 0xca01): /* HDTA Serenade DSD */ ··· 2269 2267 QUIRK_FLAG_FIXED_RATE), 2270 2268 DEVICE_FLG(0x0fd9, 0x0008, /* Hauppauge HVR-950Q */ 2271 2269 QUIRK_FLAG_SHARE_MEDIA_DEVICE | QUIRK_FLAG_ALIGN_TRANSFER), 2270 + DEVICE_FLG(0x1038, 0x1294, /* SteelSeries Arctis Pro Wireless */ 2271 + QUIRK_FLAG_MIXER_PLAYBACK_MIN_MUTE), 2272 2272 DEVICE_FLG(0x1101, 0x0003, /* Audioengine D1 */ 2273 2273 QUIRK_FLAG_GET_SAMPLE_RATE), 2274 2274 DEVICE_FLG(0x12d1, 0x3a07, /* Huawei Technologies Co., Ltd. */ ··· 2301 2297 QUIRK_FLAG_IGNORE_CLOCK_SOURCE), 2302 2298 DEVICE_FLG(0x1686, 0x00dd, /* Zoom R16/24 */ 2303 2299 QUIRK_FLAG_TX_LENGTH | QUIRK_FLAG_CTL_MSG_DELAY_1M), 2300 + DEVICE_FLG(0x16d0, 0x0ab1, /* PureAudio APA DAC */ 2301 + QUIRK_FLAG_DSD_RAW), 2302 + DEVICE_FLG(0x16d0, 0xeca1, /* PureAudio Lotus DAC5, DAC5 SE and DAC5 Pro */ 2303 + QUIRK_FLAG_DSD_RAW), 2304 2304 DEVICE_FLG(0x17aa, 0x1046, /* Lenovo ThinkStation P620 Rear Line-in, Line-out and Microphone */ 2305 2305 QUIRK_FLAG_DISABLE_AUTOSUSPEND), 2306 2306 DEVICE_FLG(0x17aa, 0x104d, /* Lenovo ThinkStation P620 Internal Speaker + Front Headset */