[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <3bf60afb-d260-badd-7340-6d54a4decd62@st.com>
Date: Tue, 1 Aug 2017 17:50:03 +0200
From: Arnaud Pouliquen <arnaud.pouliquen@...com>
To: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
Mark Brown <broonie@...nel.org>
CC: Jyri Sarha <jsarha@...com>,
"alsa-devel@...a-project.org" <alsa-devel@...a-project.org>,
Archit Taneja <architt@...eaurora.org>,
David Airlie <airlied@...ux.ie>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Liam Girdwood <lgirdwood@...il.com>,
"dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
Takashi Iwai <tiwai@...e.com>,
Andrzej Hajda <a.hajda@...sung.com>
Subject: Re: [alsa-devel] [PATCH v2 2/2] drm/bridge: adv7511: restrict audio
sample sizes
Hello Srinivas,
On 08/01/2017 02:52 PM, Srinivas Kandagatla wrote:
>>>> As example, if you configure bus in Left justified format with 24 bits
>>>> sample length, 32 bits application samples should be truncated to 24
>>>> bits samples at ADV7533 I2S interface level (LSB dropped).
>>
>>> May be we can do that to make the user happy but isn't this just truncate
>>> the resolution to 24Bit then?
>>
>>> And it's a false indication that we are supporting 32bit samples.
>>> Which am not very happy with.
>>
>> This is what the sample_bits field in the DAI structure is for.ya.
> But still reporting that driver supports 32 bit samples when it does not
> really support all 32 bits, is kinda misleading to user.
> Isn't it?
>
> And the driver would be end up with hacked up code for each case.
By experience, this is usual. As example, if you have a look to codec
ad193x (i take one randomly) it support 16, 20, 24 and 32 bits frames.
But if you have a look to AD1939 data-sheet it supports 24-bits conversion.
Some other examples could be 13-bits DAC/ADC with 16 bits samples.
In term of audio quality, truncation to a 24 bits sample should generate
an negligible additional error equal to the LSB bit: -20log(2^24)= -144dB.
It is just a personal opinion, but if have the choice between do
truncation in software (application or alsa-lib) and in hardware, i
would prefer the second one.
Regards
arnaud
Powered by blists - more mailing lists