Skip to content

Commit ced5bf2

Browse files
committed
Merge tag 'sound-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai: "Hopefully the last bits for 6.5. It's slightly higher LOCs than wished, but it doesn't look scary. The biggest change is MAINTAINERS update for TI; it's good to have the update before the final release, so that people can contact to the right persons for bug reports (which shouldn't happen of course!) The rest are all device-specific fixes and quirks, most for various ASoC platforms" * tag 'sound-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ASoC: amd: yc: Fix a non-functional mic on Lenovo 82SJ ALSA: ymfpci: Fix the missing snd_card_free() call at probe error ASoC: cs35l41: Correct amp_gain_tlv values ASoC: amd: yc: Add VivoBook Pro 15 to quirks list for acp6x ASoC: tas2781: fixed register access error when switching to other chips ASoC: cs35l56: Add an ACPI match table ASoC: cs35l56: Read firmware uuid from a device property instead of _SUB ASoC: SOF: ipc4-pcm: fix possible null pointer deference MAINTAINERS: Add entries for TEXAS INSTRUMENTS ASoC DRIVERS
2 parents beaa71d + 37e44d6 commit ced5bf2

File tree

9 files changed

+93
-32
lines changed

9 files changed

+93
-32
lines changed

MAINTAINERS

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21062,6 +21062,39 @@ S: Maintained
2106221062
F: Documentation/devicetree/bindings/sound/davinci-mcasp-audio.yaml
2106321063
F: sound/soc/ti/
2106421064

21065+
TEXAS INSTRUMENTS AUDIO (ASoC/HDA) DRIVERS
21066+
M: Shenghao Ding <shenghao-ding@ti.com>
21067+
M: Kevin Lu <kevin-lu@ti.com>
21068+
M: Baojun Xu <x1077012@ti.com>
21069+
L: alsa-devel@alsa-project.org (moderated for non-subscribers)
21070+
S: Maintained
21071+
F: Documentation/devicetree/bindings/sound/tas2552.txt
21072+
F: Documentation/devicetree/bindings/sound/tas2562.yaml
21073+
F: Documentation/devicetree/bindings/sound/tas2770.yaml
21074+
F: Documentation/devicetree/bindings/sound/tas27xx.yaml
21075+
F: Documentation/devicetree/bindings/sound/ti,pcm1681.txt
21076+
F: Documentation/devicetree/bindings/sound/ti,pcm3168a.yaml
21077+
F: Documentation/devicetree/bindings/sound/ti,tlv320*.yaml
21078+
F: Documentation/devicetree/bindings/sound/tlv320adcx140.yaml
21079+
F: Documentation/devicetree/bindings/sound/tlv320aic31xx.txt
21080+
F: Documentation/devicetree/bindings/sound/tpa6130a2.txt
21081+
F: include/sound/tas2*.h
21082+
F: include/sound/tlv320*.h
21083+
F: include/sound/tpa6130a2-plat.h
21084+
F: sound/pci/hda/tas2781_hda_i2c.c
21085+
F: sound/soc/codecs/pcm1681.c
21086+
F: sound/soc/codecs/pcm1789*.*
21087+
F: sound/soc/codecs/pcm179x*.*
21088+
F: sound/soc/codecs/pcm186x*.*
21089+
F: sound/soc/codecs/pcm3008.*
21090+
F: sound/soc/codecs/pcm3060*.*
21091+
F: sound/soc/codecs/pcm3168a*.*
21092+
F: sound/soc/codecs/pcm5102a.c
21093+
F: sound/soc/codecs/pcm512x*.*
21094+
F: sound/soc/codecs/tas2*.*
21095+
F: sound/soc/codecs/tlv320*.*
21096+
F: sound/soc/codecs/tpa6130a2.*
21097+
2106521098
TEXAS INSTRUMENTS DMA DRIVERS
2106621099
M: Peter Ujfalusi <peter.ujfalusi@gmail.com>
2106721100
L: dmaengine@vger.kernel.org

sound/pci/ymfpci/ymfpci.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,8 @@ static inline int snd_ymfpci_create_gameport(struct snd_ymfpci *chip, int dev, i
152152
void snd_ymfpci_free_gameport(struct snd_ymfpci *chip) { }
153153
#endif /* SUPPORT_JOYSTICK */
154154

155-
static int snd_card_ymfpci_probe(struct pci_dev *pci,
156-
const struct pci_device_id *pci_id)
155+
static int __snd_card_ymfpci_probe(struct pci_dev *pci,
156+
const struct pci_device_id *pci_id)
157157
{
158158
static int dev;
159159
struct snd_card *card;
@@ -348,6 +348,12 @@ static int snd_card_ymfpci_probe(struct pci_dev *pci,
348348
return 0;
349349
}
350350

351+
static int snd_card_ymfpci_probe(struct pci_dev *pci,
352+
const struct pci_device_id *pci_id)
353+
{
354+
return snd_card_free_on_error(&pci->dev, __snd_card_ymfpci_probe(pci, pci_id));
355+
}
356+
351357
static struct pci_driver ymfpci_driver = {
352358
.name = KBUILD_MODNAME,
353359
.id_table = snd_ymfpci_ids,

sound/soc/amd/yc/acp6x-mach.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ static const struct dmi_system_id yc_acp_quirk_table[] = {
217217
.driver_data = &acp6x_card,
218218
.matches = {
219219
DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
220-
DMI_MATCH(DMI_PRODUCT_NAME, "82"),
220+
DMI_MATCH(DMI_PRODUCT_NAME, "82V2"),
221221
}
222222
},
223223
{
@@ -248,6 +248,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = {
248248
DMI_MATCH(DMI_PRODUCT_NAME, "M3402RA"),
249249
}
250250
},
251+
{
252+
.driver_data = &acp6x_card,
253+
.matches = {
254+
DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."),
255+
DMI_MATCH(DMI_PRODUCT_NAME, "M6500RC"),
256+
}
257+
},
251258
{
252259
.driver_data = &acp6x_card,
253260
.matches = {

sound/soc/codecs/cs35l41.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ static int cs35l41_get_fs_mon_config_index(int freq)
168168
static const DECLARE_TLV_DB_RANGE(dig_vol_tlv,
169169
0, 0, TLV_DB_SCALE_ITEM(TLV_DB_GAIN_MUTE, 0, 1),
170170
1, 913, TLV_DB_MINMAX_ITEM(-10200, 1200));
171-
static DECLARE_TLV_DB_SCALE(amp_gain_tlv, 0, 1, 1);
171+
static DECLARE_TLV_DB_SCALE(amp_gain_tlv, 50, 100, 0);
172172

173173
static const struct snd_kcontrol_new dre_ctrl =
174174
SOC_DAPM_SINGLE("Switch", CS35L41_PWR_CTRL3, 20, 1, 0);

sound/soc/codecs/cs35l56-i2c.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,19 @@ static const struct i2c_device_id cs35l56_id_i2c[] = {
6262
};
6363
MODULE_DEVICE_TABLE(i2c, cs35l56_id_i2c);
6464

65+
#ifdef CONFIG_ACPI
66+
static const struct acpi_device_id cs35l56_asoc_acpi_match[] = {
67+
{ "CSC355C", 0 },
68+
{},
69+
};
70+
MODULE_DEVICE_TABLE(acpi, cs35l56_asoc_acpi_match);
71+
#endif
72+
6573
static struct i2c_driver cs35l56_i2c_driver = {
6674
.driver = {
6775
.name = "cs35l56",
6876
.pm = &cs35l56_pm_ops_i2c_spi,
77+
.acpi_match_table = ACPI_PTR(cs35l56_asoc_acpi_match),
6978
},
7079
.id_table = cs35l56_id_i2c,
7180
.probe = cs35l56_i2c_probe,

sound/soc/codecs/cs35l56-spi.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,19 @@ static const struct spi_device_id cs35l56_id_spi[] = {
5959
};
6060
MODULE_DEVICE_TABLE(spi, cs35l56_id_spi);
6161

62+
#ifdef CONFIG_ACPI
63+
static const struct acpi_device_id cs35l56_asoc_acpi_match[] = {
64+
{ "CSC355C", 0 },
65+
{},
66+
};
67+
MODULE_DEVICE_TABLE(acpi, cs35l56_asoc_acpi_match);
68+
#endif
69+
6270
static struct spi_driver cs35l56_spi_driver = {
6371
.driver = {
6472
.name = "cs35l56",
6573
.pm = &cs35l56_pm_ops_i2c_spi,
74+
.acpi_match_table = ACPI_PTR(cs35l56_asoc_acpi_match),
6675
},
6776
.id_table = cs35l56_id_spi,
6877
.probe = cs35l56_spi_probe,

sound/soc/codecs/cs35l56.c

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
// Copyright (C) 2023 Cirrus Logic, Inc. and
66
// Cirrus Logic International Semiconductor Ltd.
77

8-
#include <linux/acpi.h>
98
#include <linux/completion.h>
109
#include <linux/debugfs.h>
1110
#include <linux/delay.h>
@@ -1354,26 +1353,22 @@ static int cs35l56_dsp_init(struct cs35l56_private *cs35l56)
13541353
return 0;
13551354
}
13561355

1357-
static int cs35l56_acpi_get_name(struct cs35l56_private *cs35l56)
1356+
static int cs35l56_get_firmware_uid(struct cs35l56_private *cs35l56)
13581357
{
1359-
acpi_handle handle = ACPI_HANDLE(cs35l56->dev);
1360-
const char *sub;
1358+
struct device *dev = cs35l56->dev;
1359+
const char *prop;
1360+
int ret;
13611361

1362-
/* If there is no ACPI_HANDLE, there is no ACPI for this system, return 0 */
1363-
if (!handle)
1362+
ret = device_property_read_string(dev, "cirrus,firmware-uid", &prop);
1363+
/* If bad sw node property, return 0 and fallback to legacy firmware path */
1364+
if (ret < 0)
13641365
return 0;
13651366

1366-
sub = acpi_get_subsystem_id(handle);
1367-
if (IS_ERR(sub)) {
1368-
/* If bad ACPI, return 0 and fallback to legacy firmware path, otherwise fail */
1369-
if (PTR_ERR(sub) == -ENODATA)
1370-
return 0;
1371-
else
1372-
return PTR_ERR(sub);
1373-
}
1367+
cs35l56->dsp.system_name = devm_kstrdup(dev, prop, GFP_KERNEL);
1368+
if (cs35l56->dsp.system_name == NULL)
1369+
return -ENOMEM;
13741370

1375-
cs35l56->dsp.system_name = sub;
1376-
dev_dbg(cs35l56->dev, "Subsystem ID: %s\n", cs35l56->dsp.system_name);
1371+
dev_dbg(dev, "Firmware UID: %s\n", cs35l56->dsp.system_name);
13771372

13781373
return 0;
13791374
}
@@ -1417,7 +1412,7 @@ int cs35l56_common_probe(struct cs35l56_private *cs35l56)
14171412
gpiod_set_value_cansleep(cs35l56->reset_gpio, 1);
14181413
}
14191414

1420-
ret = cs35l56_acpi_get_name(cs35l56);
1415+
ret = cs35l56_get_firmware_uid(cs35l56);
14211416
if (ret != 0)
14221417
goto err;
14231418

@@ -1604,8 +1599,6 @@ void cs35l56_remove(struct cs35l56_private *cs35l56)
16041599

16051600
regcache_cache_only(cs35l56->regmap, true);
16061601

1607-
kfree(cs35l56->dsp.system_name);
1608-
16091602
gpiod_set_value_cansleep(cs35l56->reset_gpio, 0);
16101603
regulator_bulk_disable(ARRAY_SIZE(cs35l56->supplies), cs35l56->supplies);
16111604
}

sound/soc/codecs/tas2781-comlib.c

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,17 @@ static int tasdevice_change_chn_book(struct tasdevice_priv *tas_priv,
5757

5858
if (client->addr != tasdev->dev_addr) {
5959
client->addr = tasdev->dev_addr;
60-
if (tasdev->cur_book == book) {
61-
ret = regmap_write(map,
62-
TASDEVICE_PAGE_SELECT, 0);
63-
if (ret < 0) {
64-
dev_err(tas_priv->dev, "%s, E=%d\n",
65-
__func__, ret);
66-
goto out;
67-
}
60+
/* All tas2781s share the same regmap, clear the page
61+
* inside regmap once switching to another tas2781.
62+
* Register 0 at any pages and any books inside tas2781
63+
* is the same one for page-switching.
64+
*/
65+
ret = regmap_write(map, TASDEVICE_PAGE_SELECT, 0);
66+
if (ret < 0) {
67+
dev_err(tas_priv->dev, "%s, E=%d\n",
68+
__func__, ret);
69+
goto out;
6870
}
69-
goto out;
7071
}
7172

7273
if (tasdev->cur_book != book) {

sound/soc/sof/ipc4-pcm.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -708,6 +708,9 @@ static int sof_ipc4_pcm_hw_params(struct snd_soc_component *component,
708708
struct snd_sof_pcm *spcm;
709709

710710
spcm = snd_sof_find_spcm_dai(component, rtd);
711+
if (!spcm)
712+
return -EINVAL;
713+
711714
time_info = spcm->stream[substream->stream].private;
712715
/* delay calculation is not supported by current fw_reg ABI */
713716
if (!time_info)

0 commit comments

Comments
 (0)