All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Ujfalusi <peter.ujfalusi@nokia.com>
To: ext Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	"lrg@slimlogic.co.uk" <lrg@slimlogic.co.uk>
Subject: Re: [PATCH] ASoC: TWL4030: PM fix for output	amplifiers
Date: Tue, 23 Mar 2010 14:29:26 +0200	[thread overview]
Message-ID: <201003231429.26268.peter.ujfalusi@nokia.com> (raw)
In-Reply-To: <20100323100209.GA7100@sirena.org.uk>

On Tuesday 23 March 2010 12:02:10 ext Mark Brown wrote:
> On Tue, Mar 23, 2010 at 09:59:13AM +0200, Peter Ujfalusi wrote:
> > /*
> > 
> >  * Gain controls tied to outputs
> >  * -6 dB to 6 dB in 6 dB steps (mute instead of -12)
> >  */
> > 
> > static const unsigned int output_tlv[] = {
> > 
> > 	TLV_DB_RANGE_HEAD(4),
> > 	0, 0, TLV_DB_SCALE_ITEM(-1200, 0,  1),
> > 	3, 3, TLV_DB_SCALE_ITEM(-600, 0, 0),
> > 	2, 2, TLV_DB_SCALE_ITEM(0, 0, 0),
> > 	1, 1, TLV_DB_SCALE_ITEM(600, 0, 0),
> > 
> > };
> > 
> > I'm not sure about the tlv declaration, but is there a way to actually
> > map the gain/power control in the TWL in a standard way?
> 
> I'd expect that to work in that userspace will see the various values
> with the expected gains but I'd not expect that applications would
> reorder the values so it'll look odd in the UI.  But I've not actually
> tried it.

Indeed it look odd at the end:

amixer sset 'PreDriv' 0
  Front Left: Playback 0 [0%] [-99999.99dB]
  Front Right: Playback 0 [0%] [-99999.99dB]

amixer sset 'PreDriv' 1
  Front Left: Playback 1 [33%] [6.00dB]
  Front Right: Playback 1 [33%] [6.00dB]

amixer sset 'PreDriv' 2
  Front Left: Playback 2 [67%] [0.00dB]
  Front Right: Playback 2 [67%] [0.00dB]

amixer sset 'PreDriv' 3
  Front Left: Playback 3 [100%] [-6.00dB]
  Front Right: Playback 3 [100%] [-6.00dB

It worth a try anyway.

-- 
Péter

      reply	other threads:[~2010-03-23 12:29 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-22 13:36 [PATCH] ASoC: TWL4030: PM fix for output amplifiers Peter Ujfalusi
2010-03-22 13:47 ` Mark Brown
2010-03-22 14:04   ` Peter Ujfalusi
2010-03-22 14:15     ` Mark Brown
2010-03-22 14:46       ` Peter Ujfalusi
2010-03-22 15:06         ` Mark Brown
2010-03-22 15:31           ` Peter Ujfalusi
2010-03-22 16:19             ` Mark Brown
2010-03-22 16:48               ` Liam Girdwood
2010-03-22 17:00                 ` Mark Brown
2010-03-23  7:05               ` Peter Ujfalusi
2010-03-23  7:59                 ` Peter Ujfalusi
2010-03-23 10:02                   ` Mark Brown
2010-03-23 12:29                     ` Peter Ujfalusi [this message]

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=201003231429.26268.peter.ujfalusi@nokia.com \
    --to=peter.ujfalusi@nokia.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=lrg@slimlogic.co.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.