[alsa-devel] [PATCH v6] ASoC: add RT286 CODEC driver

Bard Liao bardliao at realtek.com
Tue May 6 14:04:27 CEST 2014


> -----Original Message-----
> From: Mark Brown [mailto:broonie at kernel.org]
> Sent: Friday, April 18, 2014 6:37 PM
> To: Bard Liao
> Cc: lgirdwood at gmail.com; alsa-devel at alsa-project.org; lars at metafoo.de; Flove;
> Oder Chiou; Gustaw Lewandowski
> Subject: Re: [PATCH v6] ASoC: add RT286 CODEC driver
> 
> On Thu, Apr 17, 2014 at 05:39:08AM +0000, Bard Liao wrote:
> 
> > > You can implement non-register DAPM widgets - look at the virtual
> > > controls in the core, or things using SND_SOC_NOPM.
> 
> > It means dapm widget will not control the codec directly, right?
> > I.e. Everything will be done by _event?
> 
> The framework won't do anything directly, yes.
> 

I have a question about the virtual controls.

Virtual controls assume there is no related register related to the controls, so codec
doesn't need to set anything when the control's value is changed in general cases.
But rt286 need to do something when the control's value is changed especially mux
settings.

I have no idea when should codec driver set the corresponding registers of the controls.
The SND_SOC_DAPM_POST_REG event seems not works in virtual controls. Also, I didn't
find a suitable API to get a virtual control's value. Look like dapm_kcontrol_get_value
can do that, but dapm_kcontrol_get_value is not exported.

I am trying to define a .put function in snd_kcontrol_new, so that I can set corresponding 
registers to the control. But I don't know how to update dapm path's connect status. I don't
know if snd_soc_dapm_mux_update_power can do that.

Do you have any suggestion for setting corresponding registers of a virtual control?

Thanks.

> 
> ------Please consider the environment before printing this e-mail.


More information about the Alsa-devel mailing list