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 18:55:29 +0100 [thread overview]
Message-ID: <4F15B611.2080808@ti.com> (raw)
In-Reply-To: <20120117164452.GJ2944@opensource.wolfsonmicro.com>
On 01/17/2012 05:44 PM, Mark Brown wrote:
>> Sure it might be good to know, but it is something we do not have
>> control over. There's a datasheet if someone is interested.
>
> The datasheet isn't terribly machine parseable.
True, and the information that the chip internally works in 24 bit mode
is irrelevant. Why would any application care when it plays 16bit sample
that the HW will internally convert it to 24 bit?
>> Even if you could select the algorithm for the in HW resampling it could
>> be configured via kcontrol, or via qos.
>> For application it does not matter.
>
> I don't recall suggesting configuring the hardware algorithm here?
For what other reason application would use the fact that the 16bit
sample will converted to 24bit by the HW other that you might want to
influence the algorithm used by the HW when it does it?
>> This is not a point. If it does it's internal digital volume on the full
>> 32bit resolution from which the HW just discards 8bits we will loose
>> resolution. If PA knows that out of the 32bit only the 24bit msbit is
>> going to be used it can apply the gain correctly.
>
> This isn't a correctness thing really, it's just that it's doing more
> work than it needs to because nothing is going to pay attention to the
> the lower bits it outputs. A gain applied with 24 bits just has an
> output with a bit less resolution than one applied with 32 bits but it
> shouldn't be substantially different.
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.
But I'm not arguing against the constraint on the 32bit sample for
24msbits...
>> If we tell PA that the codec internally works in 24bit, and we play
>> 16bit audio (in 16bit mode) PA needs to apply the gain in 16bit
>> resolution. The information about the codec working internally in 24bit
>> irrelevant.
>
> I can't think why Pulse might want to use it. On the other hand it's
> not going to hurt to tell it.
If you look at this:
Its setup is:
stream : PLAYBACK
access : RW_INTERLEAVED
format : S16_LE
subformat : STD
channels : 2
rate : 48000
exact rate : 48000 (48000/1)
msbits : 24
buffer_size : 24000
period_size : 6000
period_time : 125000
It just does not feel right.
What if application takes this literally, goes and applies the digital
gain on a 16bit sample with 24bit resolution?
I know the application need to be fixed, but no application expect to be
told that out of the 16bit they can use 24bit..
I'm not convinced that this is a good idea. We should apply the
constraints on the sample size where it actually make sense.
IMHO.
--
Péter
next prev parent reply other threads:[~2012-01-17 17:55 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 [this message]
2012-01-17 18:17 ` Mark Brown
2012-01-17 18:51 ` Peter Ujfalusi
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=4F15B611.2080808@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).