23 Apr
2020
23 Apr
'20
5:53 p.m.
@@ -3124,12 +3141,15 @@ static int skl_tplg_control_load(struct snd_soc_component *cmpnt, case SND_SOC_TPLG_CTL_ENUM: tplg_ec = container_of(hdr, struct snd_soc_tplg_enum_control, hdr);
if (kctl->access & SNDRV_CTL_ELEM_ACCESS_READWRITE) {
if (kctl->access & SNDRV_CTL_ELEM_ACCESS_READ) { se = (struct soc_enum *)kctl->private_value; if (tplg_ec->priv.size)
return skl_init_enum_data(bus->dev, se,
tplg_ec);
}skl_init_enum_data(bus->dev, se, tplg_ec);
I finally got the explanations and it wouldn't hurt to have a comment here:
/* * now that the initializations are done, remove write permissions for * the DMIC to avoid conflicts between NHLT settings and user * interaction */
if (hdr->ops.get == SKL_CONTROL_TYPE_MULTI_IO_SELECT_DMIC)
kctl->access = SNDRV_CTL_ELEM_ACCESS_READ;