All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Cc: alsa-devel@alsa-project.org,
	ext Stuart Longland <redhatter@gentoo.org>,
	Eric B??nard <eric@eukrea.com>,
	Liam Girdwood <lrg@slimlogic.co.uk>
Subject: Re: Update on TLV320AIC3204 Driver
Date: Tue, 15 Jun 2010 14:53:23 +0100	[thread overview]
Message-ID: <20100615135322.GG14510@rakim.wolfsonmicro.main> (raw)
In-Reply-To: <201006151642.32385.peter.ujfalusi@nokia.com>

On Tue, Jun 15, 2010 at 04:42:32PM +0300, Peter Ujfalusi wrote:
> On Tuesday 15 June 2010 08:11:10 ext Stuart Longland wrote:
> > Okay, I've had a close inspection of how the SOC_DOUBLE_R_SX_TLV widgets
> > are implemented.  I couldn't find where in the git trees the control had
> > been added, I wound up applying this patch myself in my tree... it
> > apparently got applied in the official trees, but I cannot find it.

> I'm not really sure what the SOC_DOUBLE_R_SX_TLV is for... 

It's for value ranges which have normal unsigned integer mapping but
where the zero point is not at the lowest value so you need to wrap
around.  Which isn't actually what Stuart is looking for...

> But would a simple SOC_DOUBLE_R_TLV enough for the aic3204 codec?
> I have not looked at the datasheet (if it is available), but I'll try to find 
> it.
> Well looking at the _2r_sx functions in soc-core.c does not really clears the 
> intention, but at least I can see several things in the snd_soc_put_volsw_2r_sx 

...and this won't work since Stuart is looking for something that does
signed values which I don't think we have already, the standard stuff
all wants unsigned quantities.

> function, which can cause problems:
> - in error case it returns 0,

Yup, will fix that just now.

> - instead of updating the bits, it rewrites the register, which I think will 
> erase bits, which it should not touch.

It's just open coding the update bits so there's no actual problem here.

> - it has the ret variable, but it is not really used, and when it got assigned, 
> than it gets 1 in the success case. But luckily the return at the end of the 
> function is not using the ret, but 0.

Yeah, ret is a waste of time.

> - I'm not really sure if the 0xff masking is needed at all in the _sx functions, 
> since the values are masked with the mask anyways.

It's not really needed due to mask, yes.

> So I do not really follow what these suppose to do... Can someone give an 
> example of HW register, and the SX combination with the tlv struct? 

The only user is cs42l451.

  reply	other threads:[~2010-06-15 13:53 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-11  5:55 Update on TLV320AIC3204 Driver Stuart Longland
2010-06-11 10:18 ` Mark Brown
2010-06-15  0:27   ` Stuart Longland
2010-06-15  5:11     ` Stuart Longland
2010-06-15  5:23       ` Stuart Longland
2010-06-15  9:00         ` Mark Brown
2010-06-15 13:42       ` Peter Ujfalusi
2010-06-15 13:53         ` Mark Brown [this message]
2010-06-16  5:33           ` Peter Ujfalusi
2010-06-16 14:51             ` Mark Brown
2010-06-15 22:59         ` Stuart Longland
2010-06-18  2:38       ` SOC_DOUBLE_R_SX_TLV (was Update on TLV320AIC3204 Driver) Stuart Longland
2010-06-18  2:56         ` [PATCH] ASoC: Fix overflow bug in SOC_DOUBLE_R_SX_TLV Stuart Longland
2010-06-18  2:56           ` Stuart Longland
2010-06-18  2:56           ` Stuart Longland
2010-06-18 10:29           ` Liam Girdwood
2010-06-18 10:29             ` Liam Girdwood
2010-06-18 10:29             ` Liam Girdwood
2010-06-19  1:36           ` Mark Brown
2010-06-19  1:36             ` Mark Brown
2010-06-19  1:36             ` Mark Brown
2010-06-15  7:21     ` Update on TLV320AIC3204 Driver Mark Brown
2010-06-15  0:29   ` Update on TLV320AIC3204 Driver [File 1/3] Stuart Longland
2010-06-15  0:33     ` Update on TLV320AIC3204 Driver [File 2/3] Stuart Longland
2010-06-15  0:34     ` Update on TLV320AIC3204 Driver [File 3/3] Stuart Longland
2010-06-15 14:20     ` Update on TLV320AIC3204 Driver [File 1/3] Mark Brown
2010-06-15 22:46       ` Stuart Longland
2010-06-16  9:35         ` 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=20100615135322.GG14510@rakim.wolfsonmicro.main \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=eric@eukrea.com \
    --cc=lrg@slimlogic.co.uk \
    --cc=peter.ujfalusi@nokia.com \
    --cc=redhatter@gentoo.org \
    /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.