[PATCH v3 3/3] ASoC: Intel: Skylake: Automatic DMIC format configuration according to information from NHLT

Pierre-Louis Bossart pierre-louis.bossart at linux.intel.com
Thu Apr 23 17:53:41 CEST 2020


> @@ -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;
> +



More information about the Alsa-devel mailing list