[alsa-devel] [PATCH 2/8] ASoC: TWL4030: Add Analog PGA control switch to DAPM
Mark Brown
broonie at sirena.org.uk
Mon Dec 8 13:35:03 CET 2008
On Mon, Dec 08, 2008 at 02:06:08PM +0200, Peter Ujfalusi wrote:
> On Monday 08 December 2008 13:23:37 ext Mark Brown wrote:
> > The PGA should be standard SND_SOC_DAPM_PGA()s with the digital to
> > analogue switches used to implement mute controls for them.
> Should I 'chain' these switches, like this:
> /* Digital to analog enable/disable */
> SND_SOC_DAPM_PGA("ARXR1_APGA", TWL4030_REG_ARXR1_APGA_CTL,
> 1, 0, NULL, 0),
> /* APGA enable/disable */
> SND_SOC_DAPM_PGA("ARXR1_APGA Enable", TWL4030_REG_ARXR1_APGA_CTL,
> 0, 0, NULL, 0),
I'd expect to see user control here...
> Or should I use the wcontrols, wncontrols to implement the DA enable/disable:
You can do that, or just do it as a normal control (which allows you to
make the control a stereo control). This lets the user control the
switch which is generally more useful.
> If the later is preferred, than probably it would be better to move the
> "DAC1 Analog Playback Volume" and "DAC2 Analog Playback Volume" from the
> twl4030_snd_controls to twl4030_dapm_widgets, separate the four paths and use
> SOC_DAPM_SINGLE_TLV("ARXR1_APGA Playback Volume" ?
> Hmm, in this case the SOC_DAPM_SINGLE_TLV can be also part of the
> arxr1_apga_controls...
Indeed, and if you do that DAPM will try to ramp up and down the volume
using the first control after and before changing the power. This
feature is rarely used since it's not normally needed for performance.
More information about the Alsa-devel
mailing list