alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: alsa-devel@alsa-project.org, patches@opensource.wolfsonmicro.com,
	Liam Girdwood <lrg@ti.com>
Subject: Re: [PATCH 1/2] ASoC: Allow drivers to specify how many bits are significant on a DAI
Date: Tue, 17 Jan 2012 19:51:29 +0100	[thread overview]
Message-ID: <4F15C331.1020701@ti.com> (raw)
In-Reply-To: <20120117181709.GM2944@opensource.wolfsonmicro.com>

On 01/17/2012 07:17 PM, Mark Brown wrote:
> Off the top of my head it may decide that if it happens to have 24 bit
> data then passing it straight through was sensible.  But frankly I'm
> just working on the basis that if it's more effort to hide information
> than to provide it then providing it seems like the way forwards.  I've
> certainly got no intention of writing any code here myself unless
> there's some issue found.

We have the sample formats (S16_LE, S32_LE, etc) to tell application
about the supported level of bit depth.
They can choose to use 16bit if that is better for them, or choose
32bit. They make the decision based on the sample is playing,
configuration, whatever.
It does not help them if we tell when they use 16bit audio: hey, but you
could use 24bit.
When they use 32bit on the other hand it make sense to let them know
that out of the 32bit only the 24msb will be used, so they can align
their processing accordingly (if they care).

>> Yeah, but it is not correct. If it does not know this we have 8bit
>> 'latency' in gain control. Pulse can change the gain which will have no
>> effect.
> 
> Which will have the same overall effect as if it doesn't do anything
> based on knowing the resolution.

But we still 'loose' 8bits. It might be not a big loss at the end when
PA for example applies the gain, but for sure we will loose resolution
(8bit worth).

My only problem is to say this to application: "out of 8/16bit you
should use 24msb". AFAIK this is the meaning of the constraint. This
constraint makes sense for 32bit samples: "out of 32bit you should use
24msb".

-- 
Péter

  reply	other threads:[~2012-01-17 18:51 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-16 18:41 [PATCH 1/2] ASoC: Allow drivers to specify how many bits are significant on a DAI Mark Brown
2012-01-16 18:41 ` [PATCH 2/2] ASoC: 24 bits are significant on the WM8996 audio interfaces Mark Brown
2012-01-16 22:26 ` [PATCH 1/2] ASoC: Allow drivers to specify how many bits are significant on a DAI Girdwood, Liam
2012-01-16 22:42   ` Mark Brown
2012-01-17  8:56     ` Peter Ujfalusi
2012-01-17  8:55 ` Peter Ujfalusi
2012-01-17 11:38   ` Mark Brown
2012-01-17 13:06     ` Peter Ujfalusi
2012-01-17 13:19       ` Mark Brown
2012-01-17 14:18         ` Peter Ujfalusi
2012-01-17 14:56           ` Mark Brown
2012-01-17 16:08             ` Peter Ujfalusi
2012-01-17 16:44               ` Mark Brown
2012-01-17 17:55                 ` Peter Ujfalusi
2012-01-17 18:17                   ` Mark Brown
2012-01-17 18:51                     ` Peter Ujfalusi [this message]
2012-01-17 18:59                       ` 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=4F15C331.1020701@ti.com \
    --to=peter.ujfalusi@ti.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=lrg@ti.com \
    --cc=patches@opensource.wolfsonmicro.com \
    /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;
as well as URLs for NNTP newsgroup(s).