Skip to content

Commit 3a4c155

Browse files
committed
Merge tag 'asoc-fix-v6.6-rc5' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: More fixes for v6.6 Some additional fixes for v6.6, some fairly unremarkable driver specific ones and a couple of minor core fixes for error handling and improved logging.
2 parents ccbd88b + 1426b9b commit 3a4c155

File tree

7 files changed

+40
-15
lines changed

7 files changed

+40
-15
lines changed

Documentation/devicetree/bindings/sound/fsl,micfil.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ properties:
5656
- const: clkext3
5757
minItems: 2
5858

59+
"#sound-dai-cells":
60+
const: 0
61+
5962
required:
6063
- compatible
6164
- reg

include/sound/soc.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1126,6 +1126,8 @@ struct snd_soc_pcm_runtime {
11261126
unsigned int pop_wait:1;
11271127
unsigned int fe_compr:1; /* for Dynamic PCM */
11281128

1129+
bool initialized;
1130+
11291131
int num_components;
11301132
struct snd_soc_component *components[]; /* CPU/Codec/Platform */
11311133
};

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = {
241241
DMI_MATCH(DMI_PRODUCT_NAME, "82V2"),
242242
}
243243
},
244+
{
245+
.driver_data = &acp6x_card,
246+
.matches = {
247+
DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
248+
DMI_MATCH(DMI_PRODUCT_NAME, "82YM"),
249+
}
250+
},
244251
{
245252
.driver_data = &acp6x_card,
246253
.matches = {

sound/soc/codecs/hdmi-codec.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,10 @@ static int hdmi_codec_fill_codec_params(struct snd_soc_dai *dai,
531531
hp->sample_rate = sample_rate;
532532
hp->channels = channels;
533533

534-
hcp->chmap_idx = idx;
534+
if (pcm_audio)
535+
hcp->chmap_idx = ca_id;
536+
else
537+
hcp->chmap_idx = HDMI_CODEC_CHMAP_IDX_UNKNOWN;
535538

536539
return 0;
537540
}

sound/soc/codecs/rt5682-i2c.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,18 +157,18 @@ static int rt5682_i2c_probe(struct i2c_client *i2c)
157157
return ret;
158158
}
159159

160-
ret = devm_add_action_or_reset(&i2c->dev, rt5682_i2c_disable_regulators,
161-
rt5682);
162-
if (ret)
163-
return ret;
164-
165160
ret = regulator_bulk_enable(ARRAY_SIZE(rt5682->supplies),
166161
rt5682->supplies);
167162
if (ret) {
168163
dev_err(&i2c->dev, "Failed to enable supplies: %d\n", ret);
169164
return ret;
170165
}
171166

167+
ret = devm_add_action_or_reset(&i2c->dev, rt5682_i2c_disable_regulators,
168+
rt5682);
169+
if (ret)
170+
return ret;
171+
172172
ret = rt5682_get_ldo1(rt5682, &i2c->dev);
173173
if (ret)
174174
return ret;

sound/soc/codecs/tlv320adc3xxx.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@
293293
#define ADC3XXX_BYPASS_RPGA 0x80
294294

295295
/* MICBIAS control bits */
296-
#define ADC3XXX_MICBIAS_MASK 0x2
296+
#define ADC3XXX_MICBIAS_MASK 0x3
297297
#define ADC3XXX_MICBIAS1_SHIFT 5
298298
#define ADC3XXX_MICBIAS2_SHIFT 3
299299

@@ -1099,7 +1099,7 @@ static int adc3xxx_parse_dt_micbias(struct adc3xxx *adc3xxx,
10991099
unsigned int val;
11001100

11011101
if (!of_property_read_u32(np, propname, &val)) {
1102-
if (val >= ADC3XXX_MICBIAS_AVDD) {
1102+
if (val > ADC3XXX_MICBIAS_AVDD) {
11031103
dev_err(dev, "Invalid property value for '%s'\n", propname);
11041104
return -EINVAL;
11051105
}

sound/soc/soc-core.c

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1347,7 +1347,7 @@ static int soc_init_pcm_runtime(struct snd_soc_card *card,
13471347
snd_soc_runtime_get_dai_fmt(rtd);
13481348
ret = snd_soc_runtime_set_dai_fmt(rtd, dai_link->dai_fmt);
13491349
if (ret)
1350-
return ret;
1350+
goto err;
13511351

13521352
/* add DPCM sysfs entries */
13531353
soc_dpcm_debugfs_add(rtd);
@@ -1372,17 +1372,26 @@ static int soc_init_pcm_runtime(struct snd_soc_card *card,
13721372
/* create compress_device if possible */
13731373
ret = snd_soc_dai_compress_new(cpu_dai, rtd, num);
13741374
if (ret != -ENOTSUPP)
1375-
return ret;
1375+
goto err;
13761376

13771377
/* create the pcm */
13781378
ret = soc_new_pcm(rtd, num);
13791379
if (ret < 0) {
13801380
dev_err(card->dev, "ASoC: can't create pcm %s :%d\n",
13811381
dai_link->stream_name, ret);
1382-
return ret;
1382+
goto err;
13831383
}
13841384

1385-
return snd_soc_pcm_dai_new(rtd);
1385+
ret = snd_soc_pcm_dai_new(rtd);
1386+
if (ret < 0)
1387+
goto err;
1388+
1389+
rtd->initialized = true;
1390+
1391+
return 0;
1392+
err:
1393+
snd_soc_link_exit(rtd);
1394+
return ret;
13861395
}
13871396

13881397
static void soc_set_name_prefix(struct snd_soc_card *card,
@@ -1445,8 +1454,8 @@ static int soc_probe_component(struct snd_soc_card *card,
14451454
if (component->card) {
14461455
if (component->card != card) {
14471456
dev_err(component->dev,
1448-
"Trying to bind component to card \"%s\" but is already bound to card \"%s\"\n",
1449-
card->name, component->card->name);
1457+
"Trying to bind component \"%s\" to card \"%s\" but is already bound to card \"%s\"\n",
1458+
component->name, card->name, component->card->name);
14501459
return -ENODEV;
14511460
}
14521461
return 0;
@@ -1980,7 +1989,8 @@ static void soc_cleanup_card_resources(struct snd_soc_card *card)
19801989

19811990
/* release machine specific resources */
19821991
for_each_card_rtds(card, rtd)
1983-
snd_soc_link_exit(rtd);
1992+
if (rtd->initialized)
1993+
snd_soc_link_exit(rtd);
19841994
/* remove and free each DAI */
19851995
soc_remove_link_dais(card);
19861996
soc_remove_link_components(card);

0 commit comments

Comments
 (0)