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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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




[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux