Skip to content

Commit c5a9df9

Browse files
committed
Merge tag 'asoc-fix-v6.14-rc2' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v6.14 More fixes and deviec quirks, most of them driver specific including a few SOF robustness fixes. Nothing super remarkable individually.
2 parents 174448b + 571b69f commit c5a9df9

26 files changed

+245
-136
lines changed

sound/soc/codecs/arizona.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -967,7 +967,7 @@ int arizona_out_ev(struct snd_soc_dapm_widget *w,
967967
case ARIZONA_OUT3L_ENA_SHIFT:
968968
case ARIZONA_OUT3R_ENA_SHIFT:
969969
priv->out_up_pending++;
970-
priv->out_up_delay += 17;
970+
priv->out_up_delay += 17000;
971971
break;
972972
case ARIZONA_OUT4L_ENA_SHIFT:
973973
case ARIZONA_OUT4R_ENA_SHIFT:
@@ -977,7 +977,7 @@ int arizona_out_ev(struct snd_soc_dapm_widget *w,
977977
case WM8997:
978978
break;
979979
default:
980-
priv->out_up_delay += 10;
980+
priv->out_up_delay += 10000;
981981
break;
982982
}
983983
break;
@@ -999,7 +999,7 @@ int arizona_out_ev(struct snd_soc_dapm_widget *w,
999999
if (!priv->out_up_pending && priv->out_up_delay) {
10001000
dev_dbg(component->dev, "Power up delay: %d\n",
10011001
priv->out_up_delay);
1002-
msleep(priv->out_up_delay);
1002+
fsleep(priv->out_up_delay);
10031003
priv->out_up_delay = 0;
10041004
}
10051005
break;
@@ -1017,7 +1017,7 @@ int arizona_out_ev(struct snd_soc_dapm_widget *w,
10171017
case ARIZONA_OUT3L_ENA_SHIFT:
10181018
case ARIZONA_OUT3R_ENA_SHIFT:
10191019
priv->out_down_pending++;
1020-
priv->out_down_delay++;
1020+
priv->out_down_delay += 1000;
10211021
break;
10221022
case ARIZONA_OUT4L_ENA_SHIFT:
10231023
case ARIZONA_OUT4R_ENA_SHIFT:
@@ -1028,10 +1028,10 @@ int arizona_out_ev(struct snd_soc_dapm_widget *w,
10281028
break;
10291029
case WM8998:
10301030
case WM1814:
1031-
priv->out_down_delay += 5;
1031+
priv->out_down_delay += 5000;
10321032
break;
10331033
default:
1034-
priv->out_down_delay++;
1034+
priv->out_down_delay += 1000;
10351035
break;
10361036
}
10371037
break;
@@ -1053,7 +1053,7 @@ int arizona_out_ev(struct snd_soc_dapm_widget *w,
10531053
if (!priv->out_down_pending && priv->out_down_delay) {
10541054
dev_dbg(component->dev, "Power down delay: %d\n",
10551055
priv->out_down_delay);
1056-
msleep(priv->out_down_delay);
1056+
fsleep(priv->out_down_delay);
10571057
priv->out_down_delay = 0;
10581058
}
10591059
break;

sound/soc/codecs/cs35l41.c

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1148,21 +1148,31 @@ static int cs35l41_dsp_init(struct cs35l41_private *cs35l41)
11481148
return ret;
11491149
}
11501150

1151+
#ifdef CONFIG_ACPI
11511152
static int cs35l41_acpi_get_name(struct cs35l41_private *cs35l41)
11521153
{
1153-
acpi_handle handle = ACPI_HANDLE(cs35l41->dev);
1154+
struct acpi_device *adev = ACPI_COMPANION(cs35l41->dev);
1155+
acpi_handle handle = acpi_device_handle(adev);
1156+
const char *hid;
11541157
const char *sub;
11551158

1156-
/* If there is no ACPI_HANDLE, there is no ACPI for this system, return 0 */
1157-
if (!handle)
1159+
/* If there is no acpi_device, there is no ACPI for this system, return 0 */
1160+
if (!adev)
11581161
return 0;
11591162

11601163
sub = acpi_get_subsystem_id(handle);
11611164
if (IS_ERR(sub)) {
1162-
/* If bad ACPI, return 0 and fallback to legacy firmware path, otherwise fail */
1163-
if (PTR_ERR(sub) == -ENODATA)
1164-
return 0;
1165-
else
1165+
/* If no _SUB, fallback to _HID, otherwise fail */
1166+
if (PTR_ERR(sub) == -ENODATA) {
1167+
hid = acpi_device_hid(adev);
1168+
/* If dummy hid, return 0 and fallback to legacy firmware path */
1169+
if (!strcmp(hid, "device"))
1170+
return 0;
1171+
sub = kstrdup(hid, GFP_KERNEL);
1172+
if (!sub)
1173+
sub = ERR_PTR(-ENOMEM);
1174+
1175+
} else
11661176
return PTR_ERR(sub);
11671177
}
11681178

@@ -1171,6 +1181,12 @@ static int cs35l41_acpi_get_name(struct cs35l41_private *cs35l41)
11711181

11721182
return 0;
11731183
}
1184+
#else
1185+
static int cs35l41_acpi_get_name(struct cs35l41_private *cs35l41)
1186+
{
1187+
return 0;
1188+
}
1189+
#endif /* CONFIG_ACPI */
11741190

11751191
int cs35l41_probe(struct cs35l41_private *cs35l41, const struct cs35l41_hw_cfg *hw_cfg)
11761192
{

sound/soc/codecs/madera.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2323,10 +2323,10 @@ int madera_out_ev(struct snd_soc_dapm_widget *w,
23232323
case CS42L92:
23242324
case CS47L92:
23252325
case CS47L93:
2326-
out_up_delay = 6;
2326+
out_up_delay = 6000;
23272327
break;
23282328
default:
2329-
out_up_delay = 17;
2329+
out_up_delay = 17000;
23302330
break;
23312331
}
23322332

@@ -2357,7 +2357,7 @@ int madera_out_ev(struct snd_soc_dapm_widget *w,
23572357
case MADERA_OUT3R_ENA_SHIFT:
23582358
priv->out_up_pending--;
23592359
if (!priv->out_up_pending) {
2360-
msleep(priv->out_up_delay);
2360+
fsleep(priv->out_up_delay);
23612361
priv->out_up_delay = 0;
23622362
}
23632363
break;
@@ -2376,7 +2376,7 @@ int madera_out_ev(struct snd_soc_dapm_widget *w,
23762376
case MADERA_OUT3L_ENA_SHIFT:
23772377
case MADERA_OUT3R_ENA_SHIFT:
23782378
priv->out_down_pending++;
2379-
priv->out_down_delay++;
2379+
priv->out_down_delay += 1000;
23802380
break;
23812381
default:
23822382
break;
@@ -2393,7 +2393,7 @@ int madera_out_ev(struct snd_soc_dapm_widget *w,
23932393
case MADERA_OUT3R_ENA_SHIFT:
23942394
priv->out_down_pending--;
23952395
if (!priv->out_down_pending) {
2396-
msleep(priv->out_down_delay);
2396+
fsleep(priv->out_down_delay);
23972397
priv->out_down_delay = 0;
23982398
}
23992399
break;

sound/soc/codecs/tas2781-i2c.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// ALSA SoC Texas Instruments TAS2563/TAS2781 Audio Smart Amplifier
44
//
5-
// Copyright (C) 2022 - 2024 Texas Instruments Incorporated
5+
// Copyright (C) 2022 - 2025 Texas Instruments Incorporated
66
// https://www.ti.com
77
//
88
// The TAS2563/TAS2781 driver implements a flexible and configurable
@@ -1260,8 +1260,6 @@ static int tasdevice_create_cali_ctrls(struct tasdevice_priv *priv)
12601260
(cali_data->cali_dat_sz_per_dev + 1) + 1 + 15 + 1;
12611261
priv->cali_data.total_sz = priv->ndev *
12621262
(cali_data->cali_dat_sz_per_dev + 1);
1263-
priv->cali_data.data = devm_kzalloc(priv->dev,
1264-
ext_cali_data->max, GFP_KERNEL);
12651263
cali_ctrls[i].name = cali_name;
12661264
cali_ctrls[i].iface = SNDRV_CTL_ELEM_IFACE_MIXER;
12671265
cali_ctrls[i].info = snd_soc_bytes_info_ext;

sound/soc/codecs/wm5110.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ static int wm5110_hp_pre_enable(struct snd_soc_dapm_widget *w)
302302
} else {
303303
wseq = wm5110_no_dre_left_enable;
304304
nregs = ARRAY_SIZE(wm5110_no_dre_left_enable);
305-
priv->out_up_delay += 10;
305+
priv->out_up_delay += 10000;
306306
}
307307
break;
308308
case ARIZONA_OUT1R_ENA_SHIFT:
@@ -312,7 +312,7 @@ static int wm5110_hp_pre_enable(struct snd_soc_dapm_widget *w)
312312
} else {
313313
wseq = wm5110_no_dre_right_enable;
314314
nregs = ARRAY_SIZE(wm5110_no_dre_right_enable);
315-
priv->out_up_delay += 10;
315+
priv->out_up_delay += 10000;
316316
}
317317
break;
318318
default:
@@ -338,7 +338,7 @@ static int wm5110_hp_pre_disable(struct snd_soc_dapm_widget *w)
338338
snd_soc_component_update_bits(component,
339339
ARIZONA_SPARE_TRIGGERS,
340340
ARIZONA_WS_TRG1, 0);
341-
priv->out_down_delay += 27;
341+
priv->out_down_delay += 27000;
342342
}
343343
break;
344344
case ARIZONA_OUT1R_ENA_SHIFT:
@@ -350,7 +350,7 @@ static int wm5110_hp_pre_disable(struct snd_soc_dapm_widget *w)
350350
snd_soc_component_update_bits(component,
351351
ARIZONA_SPARE_TRIGGERS,
352352
ARIZONA_WS_TRG2, 0);
353-
priv->out_down_delay += 27;
353+
priv->out_down_delay += 27000;
354354
}
355355
break;
356356
default:

sound/soc/fsl/fsl_micfil.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,8 @@ static int micfil_set_quality(struct fsl_micfil *micfil)
183183
case QUALITY_VLOW2:
184184
qsel = MICFIL_QSEL_VLOW2_QUALITY;
185185
break;
186+
default:
187+
return -EINVAL;
186188
}
187189

188190
return regmap_update_bits(micfil->regmap, REG_MICFIL_CTRL2,

sound/soc/fsl/imx-audmix.c

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ struct imx_audmix {
2323
struct snd_soc_card card;
2424
struct platform_device *audmix_pdev;
2525
struct platform_device *out_pdev;
26-
struct clk *cpu_mclk;
2726
int num_dai;
2827
struct snd_soc_dai_link *dai;
2928
int num_dai_conf;
@@ -32,34 +31,11 @@ struct imx_audmix {
3231
struct snd_soc_dapm_route *dapm_routes;
3332
};
3433

35-
static const u32 imx_audmix_rates[] = {
36-
8000, 12000, 16000, 24000, 32000, 48000, 64000, 96000,
37-
};
38-
39-
static const struct snd_pcm_hw_constraint_list imx_audmix_rate_constraints = {
40-
.count = ARRAY_SIZE(imx_audmix_rates),
41-
.list = imx_audmix_rates,
42-
};
43-
4434
static int imx_audmix_fe_startup(struct snd_pcm_substream *substream)
4535
{
46-
struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
47-
struct imx_audmix *priv = snd_soc_card_get_drvdata(rtd->card);
4836
struct snd_pcm_runtime *runtime = substream->runtime;
49-
struct device *dev = rtd->card->dev;
50-
unsigned long clk_rate = clk_get_rate(priv->cpu_mclk);
5137
int ret;
5238

53-
if (clk_rate % 24576000 == 0) {
54-
ret = snd_pcm_hw_constraint_list(runtime, 0,
55-
SNDRV_PCM_HW_PARAM_RATE,
56-
&imx_audmix_rate_constraints);
57-
if (ret < 0)
58-
return ret;
59-
} else {
60-
dev_warn(dev, "mclk may be not supported %lu\n", clk_rate);
61-
}
62-
6339
ret = snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_CHANNELS,
6440
1, 8);
6541
if (ret < 0)
@@ -323,13 +299,6 @@ static int imx_audmix_probe(struct platform_device *pdev)
323299
}
324300
put_device(&cpu_pdev->dev);
325301

326-
priv->cpu_mclk = devm_clk_get(&cpu_pdev->dev, "mclk1");
327-
if (IS_ERR(priv->cpu_mclk)) {
328-
ret = PTR_ERR(priv->cpu_mclk);
329-
dev_err(&cpu_pdev->dev, "failed to get DAI mclk1: %d\n", ret);
330-
return ret;
331-
}
332-
333302
priv->audmix_pdev = audmix_pdev;
334303
priv->out_pdev = cpu_pdev;
335304

sound/soc/generic/simple-card-utils.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1092,6 +1092,7 @@ int graph_util_parse_dai(struct device *dev, struct device_node *ep,
10921092
args.np = ep;
10931093
dai = snd_soc_get_dai_via_args(&args);
10941094
if (dai) {
1095+
dlc->of_node = node;
10951096
dlc->dai_name = snd_soc_dai_name_get(dai);
10961097
dlc->dai_args = snd_soc_copy_dai_args(dev, &args);
10971098
if (!dlc->dai_args)

sound/soc/intel/boards/sof_sdw.c

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include <linux/soundwire/sdw.h>
1414
#include <linux/soundwire/sdw_type.h>
1515
#include <linux/soundwire/sdw_intel.h>
16+
#include <sound/core.h>
1617
#include <sound/soc-acpi.h>
1718
#include "sof_sdw_common.h"
1819
#include "../../codecs/rt711.h"
@@ -748,9 +749,36 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = {
748749
},
749750
.driver_data = (void *)(SOC_SDW_PCH_DMIC),
750751
},
752+
{
753+
.callback = sof_sdw_quirk_cb,
754+
.matches = {
755+
DMI_MATCH(DMI_SYS_VENDOR, "Google"),
756+
DMI_MATCH(DMI_PRODUCT_NAME, "Fatcat"),
757+
},
758+
.driver_data = (void *)(SOC_SDW_PCH_DMIC |
759+
SOF_BT_OFFLOAD_SSP(2) |
760+
SOF_SSP_BT_OFFLOAD_PRESENT),
761+
},
762+
{}
763+
};
764+
765+
static const struct snd_pci_quirk sof_sdw_ssid_quirk_table[] = {
766+
SND_PCI_QUIRK(0x1043, 0x1e13, "ASUS Zenbook S14", SOC_SDW_CODEC_MIC),
751767
{}
752768
};
753769

770+
static void sof_sdw_check_ssid_quirk(const struct snd_soc_acpi_mach *mach)
771+
{
772+
const struct snd_pci_quirk *quirk_entry;
773+
774+
quirk_entry = snd_pci_quirk_lookup_id(mach->mach_params.subsystem_vendor,
775+
mach->mach_params.subsystem_device,
776+
sof_sdw_ssid_quirk_table);
777+
778+
if (quirk_entry)
779+
sof_sdw_quirk = quirk_entry->value;
780+
}
781+
754782
static struct snd_soc_dai_link_component platform_component[] = {
755783
{
756784
/* name might be overridden during probe */
@@ -1278,6 +1306,13 @@ static int mc_probe(struct platform_device *pdev)
12781306

12791307
snd_soc_card_set_drvdata(card, ctx);
12801308

1309+
if (mach->mach_params.subsystem_id_set) {
1310+
snd_soc_card_set_pci_ssid(card,
1311+
mach->mach_params.subsystem_vendor,
1312+
mach->mach_params.subsystem_device);
1313+
sof_sdw_check_ssid_quirk(mach);
1314+
}
1315+
12811316
dmi_check_system(sof_sdw_quirk_table);
12821317

12831318
if (quirk_override != -1) {
@@ -1293,12 +1328,6 @@ static int mc_probe(struct platform_device *pdev)
12931328
for (i = 0; i < ctx->codec_info_list_count; i++)
12941329
codec_info_list[i].amp_num = 0;
12951330

1296-
if (mach->mach_params.subsystem_id_set) {
1297-
snd_soc_card_set_pci_ssid(card,
1298-
mach->mach_params.subsystem_vendor,
1299-
mach->mach_params.subsystem_device);
1300-
}
1301-
13021331
ret = sof_card_dai_links_create(card);
13031332
if (ret < 0)
13041333
return ret;

sound/soc/intel/common/soc-acpi-intel-mtl-match.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ static const struct snd_soc_acpi_adr_device rt1316_3_single_adr[] = {
330330

331331
static const struct snd_soc_acpi_adr_device rt1318_1_single_adr[] = {
332332
{
333-
.adr = 0x000130025D131801,
333+
.adr = 0x000130025D131801ull,
334334
.num_endpoints = 1,
335335
.endpoints = &single_endpoint,
336336
.name_prefix = "rt1318-1"

0 commit comments

Comments
 (0)