Commit 3a4c1551 authored by Takashi Iwai's avatar Takashi Iwai

Merge tag 'asoc-fix-v6.6-rc5' of...

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.
parents ccbd88be 1426b9ba
...@@ -56,6 +56,9 @@ properties: ...@@ -56,6 +56,9 @@ properties:
- const: clkext3 - const: clkext3
minItems: 2 minItems: 2
"#sound-dai-cells":
const: 0
required: required:
- compatible - compatible
- reg - reg
......
...@@ -1126,6 +1126,8 @@ struct snd_soc_pcm_runtime { ...@@ -1126,6 +1126,8 @@ struct snd_soc_pcm_runtime {
unsigned int pop_wait:1; unsigned int pop_wait:1;
unsigned int fe_compr:1; /* for Dynamic PCM */ unsigned int fe_compr:1; /* for Dynamic PCM */
bool initialized;
int num_components; int num_components;
struct snd_soc_component *components[]; /* CPU/Codec/Platform */ struct snd_soc_component *components[]; /* CPU/Codec/Platform */
}; };
......
...@@ -241,6 +241,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = { ...@@ -241,6 +241,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = {
DMI_MATCH(DMI_PRODUCT_NAME, "82V2"), DMI_MATCH(DMI_PRODUCT_NAME, "82V2"),
} }
}, },
{
.driver_data = &acp6x_card,
.matches = {
DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
DMI_MATCH(DMI_PRODUCT_NAME, "82YM"),
}
},
{ {
.driver_data = &acp6x_card, .driver_data = &acp6x_card,
.matches = { .matches = {
......
...@@ -531,7 +531,10 @@ static int hdmi_codec_fill_codec_params(struct snd_soc_dai *dai, ...@@ -531,7 +531,10 @@ static int hdmi_codec_fill_codec_params(struct snd_soc_dai *dai,
hp->sample_rate = sample_rate; hp->sample_rate = sample_rate;
hp->channels = channels; hp->channels = channels;
hcp->chmap_idx = idx; if (pcm_audio)
hcp->chmap_idx = ca_id;
else
hcp->chmap_idx = HDMI_CODEC_CHMAP_IDX_UNKNOWN;
return 0; return 0;
} }
......
...@@ -157,11 +157,6 @@ static int rt5682_i2c_probe(struct i2c_client *i2c) ...@@ -157,11 +157,6 @@ static int rt5682_i2c_probe(struct i2c_client *i2c)
return ret; return ret;
} }
ret = devm_add_action_or_reset(&i2c->dev, rt5682_i2c_disable_regulators,
rt5682);
if (ret)
return ret;
ret = regulator_bulk_enable(ARRAY_SIZE(rt5682->supplies), ret = regulator_bulk_enable(ARRAY_SIZE(rt5682->supplies),
rt5682->supplies); rt5682->supplies);
if (ret) { if (ret) {
...@@ -169,6 +164,11 @@ static int rt5682_i2c_probe(struct i2c_client *i2c) ...@@ -169,6 +164,11 @@ static int rt5682_i2c_probe(struct i2c_client *i2c)
return ret; return ret;
} }
ret = devm_add_action_or_reset(&i2c->dev, rt5682_i2c_disable_regulators,
rt5682);
if (ret)
return ret;
ret = rt5682_get_ldo1(rt5682, &i2c->dev); ret = rt5682_get_ldo1(rt5682, &i2c->dev);
if (ret) if (ret)
return ret; return ret;
......
...@@ -293,7 +293,7 @@ ...@@ -293,7 +293,7 @@
#define ADC3XXX_BYPASS_RPGA 0x80 #define ADC3XXX_BYPASS_RPGA 0x80
/* MICBIAS control bits */ /* MICBIAS control bits */
#define ADC3XXX_MICBIAS_MASK 0x2 #define ADC3XXX_MICBIAS_MASK 0x3
#define ADC3XXX_MICBIAS1_SHIFT 5 #define ADC3XXX_MICBIAS1_SHIFT 5
#define ADC3XXX_MICBIAS2_SHIFT 3 #define ADC3XXX_MICBIAS2_SHIFT 3
...@@ -1099,7 +1099,7 @@ static int adc3xxx_parse_dt_micbias(struct adc3xxx *adc3xxx, ...@@ -1099,7 +1099,7 @@ static int adc3xxx_parse_dt_micbias(struct adc3xxx *adc3xxx,
unsigned int val; unsigned int val;
if (!of_property_read_u32(np, propname, &val)) { if (!of_property_read_u32(np, propname, &val)) {
if (val >= ADC3XXX_MICBIAS_AVDD) { if (val > ADC3XXX_MICBIAS_AVDD) {
dev_err(dev, "Invalid property value for '%s'\n", propname); dev_err(dev, "Invalid property value for '%s'\n", propname);
return -EINVAL; return -EINVAL;
} }
......
...@@ -1347,7 +1347,7 @@ static int soc_init_pcm_runtime(struct snd_soc_card *card, ...@@ -1347,7 +1347,7 @@ static int soc_init_pcm_runtime(struct snd_soc_card *card,
snd_soc_runtime_get_dai_fmt(rtd); snd_soc_runtime_get_dai_fmt(rtd);
ret = snd_soc_runtime_set_dai_fmt(rtd, dai_link->dai_fmt); ret = snd_soc_runtime_set_dai_fmt(rtd, dai_link->dai_fmt);
if (ret) if (ret)
return ret; goto err;
/* add DPCM sysfs entries */ /* add DPCM sysfs entries */
soc_dpcm_debugfs_add(rtd); soc_dpcm_debugfs_add(rtd);
...@@ -1372,17 +1372,26 @@ static int soc_init_pcm_runtime(struct snd_soc_card *card, ...@@ -1372,17 +1372,26 @@ static int soc_init_pcm_runtime(struct snd_soc_card *card,
/* create compress_device if possible */ /* create compress_device if possible */
ret = snd_soc_dai_compress_new(cpu_dai, rtd, num); ret = snd_soc_dai_compress_new(cpu_dai, rtd, num);
if (ret != -ENOTSUPP) if (ret != -ENOTSUPP)
return ret; goto err;
/* create the pcm */ /* create the pcm */
ret = soc_new_pcm(rtd, num); ret = soc_new_pcm(rtd, num);
if (ret < 0) { if (ret < 0) {
dev_err(card->dev, "ASoC: can't create pcm %s :%d\n", dev_err(card->dev, "ASoC: can't create pcm %s :%d\n",
dai_link->stream_name, ret); dai_link->stream_name, ret);
return ret; goto err;
} }
return snd_soc_pcm_dai_new(rtd); ret = snd_soc_pcm_dai_new(rtd);
if (ret < 0)
goto err;
rtd->initialized = true;
return 0;
err:
snd_soc_link_exit(rtd);
return ret;
} }
static void soc_set_name_prefix(struct snd_soc_card *card, 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, ...@@ -1445,8 +1454,8 @@ static int soc_probe_component(struct snd_soc_card *card,
if (component->card) { if (component->card) {
if (component->card != card) { if (component->card != card) {
dev_err(component->dev, dev_err(component->dev,
"Trying to bind component to card \"%s\" but is already bound to card \"%s\"\n", "Trying to bind component \"%s\" to card \"%s\" but is already bound to card \"%s\"\n",
card->name, component->card->name); component->name, card->name, component->card->name);
return -ENODEV; return -ENODEV;
} }
return 0; return 0;
...@@ -1980,7 +1989,8 @@ static void soc_cleanup_card_resources(struct snd_soc_card *card) ...@@ -1980,7 +1989,8 @@ static void soc_cleanup_card_resources(struct snd_soc_card *card)
/* release machine specific resources */ /* release machine specific resources */
for_each_card_rtds(card, rtd) for_each_card_rtds(card, rtd)
snd_soc_link_exit(rtd); if (rtd->initialized)
snd_soc_link_exit(rtd);
/* remove and free each DAI */ /* remove and free each DAI */
soc_remove_link_dais(card); soc_remove_link_dais(card);
soc_remove_link_components(card); soc_remove_link_components(card);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment