[alsa-devel] [PATCH] ASoC: dapm: Add speaker driver widget.
Liam Girdwood
lrg at slimlogic.co.uk
Tue Dec 7 15:01:24 CET 2010
On Tue, 2010-12-07 at 13:09 +0000, Mark Brown wrote:
> On Tue, Dec 07, 2010 at 12:46:28PM +0000, Liam Girdwood wrote:
>
> > Ok, but by sharing the number we take away some flexibility in the
> > sequence ordering. Say something has to be done in the machine driver
> > _after_ the spk/haptic/vibra driver is enabled in the CODEC driver ?
>
> You can say that for pretty much all of the widgets, though, including
> the existing speaker and headphone widgets.
You can only really say for the last widget in the sequence.
> I'd be a bit surprised if
> you had anything afterwards in this case, a driver is generally the high
> power stage wired directly to the transducer.
>
> > I dont actually see any major issue of using a new number here unless
> > you have it reserved for something else ?
>
> Adding a new number and renumbering all the subsequent ones wouldn't be
> so bad, the patch wasn't doing that.
@@ -61,6 +61,7 @@ static int dapm_up_seq[] = {
[snd_soc_dapm_mixer] = 7,
[snd_soc_dapm_mixer_named_ctl] = 7,
[snd_soc_dapm_pga] = 8,
+ [snd_soc_dapm_drv] = 9,
[snd_soc_dapm_adc] = 9,
[snd_soc_dapm_hp] = 10,
[snd_soc_dapm_spk] = 10,
This patch shares the ADC sequence number for the DRV on the power ON.
@@ -72,6 +73,7 @@ static int dapm_down_seq[] = {
[snd_soc_dapm_adc] = 1,
[snd_soc_dapm_hp] = 2,
[snd_soc_dapm_spk] = 2,
+ [snd_soc_dapm_drv] = 3,
[snd_soc_dapm_pga] = 4,
[snd_soc_dapm_mixer_named_ctl] = 5,
[snd_soc_dapm_mixer] = 5,
and inserts a new number as you suggested for power OFF. Imo, nothing
wrong with this approach and since I don't have all day to discuss, Magi
will change both the sequence numbers to use the same number as
snd_soc_dapm_spk.
Liam
--
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk
More information about the Alsa-devel
mailing list