Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: marcus.weigelt@fwd-online.de
To: broonie@opensource.wolfsonmicro.com, u.kleine-koenig@pengutronix.de
Cc: alsa-devel@alsa-project.org, sonic.zhang@analog.com, lrg@slimlogic.co.uk
Subject: Re-2: [PATCH 2/6] ASoC: ad1980: fix names of a few kcontrols
Date: Mon, 30 Aug 2010 11:52:52 +0000	[thread overview]
Message-ID: <0034DBC1.4C7BB7B3@mail.fwd-online.de> (raw)

Subject: Re: [alsa-devel] [PATCH 2/6] ASoC: ad1980: fix names of a few kcontrols (27-Aug-2010 20:32)
From:    Mark Brown <broonie@opensource.wolfsonmicro.com>
To:      marcus.weigelt@fwd-online.de

> On Tue, Aug 24, 2010 at 03:09:40PM +0200, Uwe Kleine-K??nig wrote:
> > From: Marcus Weigelt <marcus.weigelt@fwd-online.de>
> > 
> > The names used before keep alsamixer from showing the appropriate
> > controls for the AD1980.  Mic and phone volume controls were shown in
> > alsamixers' capture tab where they don??t belong to.  Phone playback
> 
> It's not massively obvious that microphone and phone aren't inputs and
> therefore don't sensibly appear in the capture tab?

The volume controls for mic and phone are actually hw mixing volumes that do not affect the recording path, therefore only the record selector belongs to capture tab, but not the volume control.

> 
> > volume did not appear in playback tab and the microphone playback could
> > never be unmuted.  Further it was not possible to select phone as
> > capture source.  Changing the names fixes these problems.
> 
> This doesn't sound real - misnamed controls might cause UI problems but
> you'd have to try *really* hard to make the control name completely
> prevent the setting of the control.

May sound unreal, but if you look at the specific changes I´ve done, you will notice that I just added "Playback" to the mic volume and mic switch and changed "Phone Capture" to "Phone Playback". From the ALSA amixer.c I know, that there is some string compare on "playback" and "capture", don´t know if it is the same with the alsamixer, but this would explain the different behaviour after changing the names. I can see the result here - the controls are in the right place now and they are doing what they were supposed to.
> 
> What is the actual problem that is is being fixed here?

- microphone playback could not be unmuted before, that means that the hw mixing path from mic in to spk out/line out could never work - fixed by this
- microphone volume was shown twice in "All" tab of Alsamixer, but running synchroniously, if you change one, the other will follow with the same value - fixed by this
- if microphone voulme was changed in capture tab, the volume also changed in playback tab - fixed by this
- microphone was never shown as active capture source, even if it was selected correctly, neither in capture tab nor in all-tab - fixed by this
- phone was shown as selected capture source in capture tab, but actually it was not selected, instead it was muted/unmuted everytime one tries to select it as capture source - fixed by this

> 
> > Signed-off-by: Marcus Weigelt <marcus.weigelt@fwd-online.de>
> > Signed-off-by: Uwe Kleine-K??nig <u.kleine-koenig@pengutronix.de>
> 
> Please remember to CC maintaintainers on patches.
> 
> > ---
> >  sound/soc/codecs/ad1980.c |    8 ++++----
> >  1 files changed, 4 insertions(+), 4 deletions(-)
> > 
> > diff --git a/sound/soc/codecs/ad1980.c b/sound/soc/codecs/ad1980.c
> > index 35c0580..c1550b8 100644
> > --- a/sound/soc/codecs/ad1980.c
> > +++ b/sound/soc/codecs/ad1980.c
> >                     SOC_SINGLE("PCM Capture Switch", AC97_REC_GAIN, 15, 1, 
> > 1),
> >  SOC_SINGLE("Mono Playback Volume", AC97_MASTER_MONO, 0, 31, 1),
> >  SOC_SINGLE("Mono Playback Switch", AC97_MASTER_MONO, 15, 1, 1),
> >  
> > -SOC_SINGLE("Phone Capture Volume", AC97_PHONE, 0, 31, 1),
> > -SOC_SINGLE("Phone Capture Switch", AC97_PHONE, 15, 1, 1),
> > +SOC_SINGLE("Phone Playback Volume", AC97_PHONE, 0, 31, 1),
> > +SOC_SINGLE("Phone Playback Switch", AC97_PHONE, 15, 1, 1),
> >  
> > -SOC_SINGLE("Mic Volume", AC97_MIC, 0, 31, 1),
> > -SOC_SINGLE("Mic Switch", AC97_MIC, 15, 1, 1),
> > +SOC_SINGLE("Mic Playback Volume", AC97_MIC, 0, 31, 1),
> > +SOC_SINGLE("Mic Playback Switch", AC97_MIC, 15, 1, 1),
> >  
> >  SOC_SINGLE("Stereo Mic Switch", AC97_AD_MISC, 6, 1, 0),
> >  SOC_DOUBLE("Line HP Swap Switch", AC97_AD_MISC, 10, 5, 1, 0),
> > -- 
> > 1.7.1
> > 
> > _______________________________________________
> > Alsa-devel mailing list
> > Alsa-devel@alsa-project.org
> > http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
> 
> -- 
> "You grabbed my hand and we fell into it, like a daydream - or a fever."


To: broonie@opensource.wolfsonmicro.com
    u.kleine-koenig@pengutronix.de
Cc: alsa-devel@alsa-project.org
    sonic.zhang@analog.com
    lrg@slimlogic.co.uk

             reply	other threads:[~2010-08-30 11:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-30 11:52 marcus.weigelt [this message]
2010-08-31 11:34 ` Re-2: [PATCH 2/6] ASoC: ad1980: fix names of a few kcontrols Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0034DBC1.4C7BB7B3@mail.fwd-online.de \
    --to=marcus.weigelt@fwd-online.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=lrg@slimlogic.co.uk \
    --cc=sonic.zhang@analog.com \
    --cc=u.kleine-koenig@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox