Skip to content

Commit a4a6eed

Browse files
committed
Merge tag 'asoc-fix-v6.5-rc7' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v6.5 A relatively large but generally not super urgent set of fixes for ASoC, including some quirks and a MAINTAINERS update. There's also an update to cs35l56 to change the firmware ABI, there are no current shipping systems which use the current interface and the sooner we get the new interface in the less likely it is that something will start. It'd be nice if these landed for v6.5 but not the end of the world if they wait till v6.6.
2 parents 1d0eb61 + 1613781 commit a4a6eed

File tree

8 files changed

+84
-29
lines changed

8 files changed

+84
-29
lines changed

MAINTAINERS

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

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

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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)