[alsa-devel] Question about write asoc driver
Liam Girdwood
lg at opensource.wolfsonmicro.com
Mon Jul 9 13:01:50 CEST 2007
On Mon, 2007-07-09 at 16:50 +0800, Roy Huang wrote:
> Hi guys,
>
> I am write a codec driver under asoc frame work for ad1980 by study
> the sample driver wm9712.c. I find there are some control item likes
> "out3 switch" to control 16h:15. There are also some widget item likes
> "out 3 PGA" to control 24:5. How can I determine a register bit should
> be a control item or widget item? Thanks ahead.
>
A widget describes a power block within the audio subsystem (this
includes the codec and machine). Widgets usually have several kcontrols
that control their power state and map to hardware audio components like
mixers, amps, DAC'c, ADC's, etc (anything that draws power). A widget is
"on" when there is a valid signal path routing from it's source to sink.
Widgets are entirely optional under ASoC and are only used by DAPM when
making power management decisions. I'd recommend adding them in only for
low power codecs and after you have audio working in the codec driver
(easier to debug).
A general rule for deciding whether something is a widget :-
* Is a widget if it control audio signal routing (e.g. mixer, mux,
jack)
* Is a codec/machine audio sink or source (pin, DAC, ADC)
HTH
Liam
More information about the Alsa-devel
mailing list