From: Arnaud Pouliquen <arnaud.pouliquen@st.com>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
Mark Brown <broonie@kernel.org>
Cc: Jyri Sarha <jsarha@ti.com>,
"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
Archit Taneja <architt@codeaurora.org>,
David Airlie <airlied@linux.ie>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>, Takashi Iwai <tiwai@suse.com>,
Andrzej Hajda <a.hajda@samsung.com>
Subject: Re: [alsa-devel] [PATCH v2 2/2] drm/bridge: adv7511: restrict audio sample sizes
Date: Tue, 1 Aug 2017 17:50:03 +0200 [thread overview]
Message-ID: <3bf60afb-d260-badd-7340-6d54a4decd62@st.com> (raw)
In-Reply-To: <e5506e72-9788-c65d-6467-6590174f825a@linaro.org>
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
prev parent reply other threads:[~2017-08-01 15:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-31 22:49 [PATCH v2 0/2] ASoC: hdmi-codec: Allow driver to restrict sample size srinivas.kandagatla
2017-07-31 22:49 ` [PATCH v2 1/2] ASoC: hdmi-codec: Allow drivers to restrict sample sizes srinivas.kandagatla
2017-07-31 22:49 ` [PATCH v2 2/2] drm/bridge: adv7511: restrict audio " srinivas.kandagatla
2017-08-01 8:42 ` [alsa-devel] " Arnaud Pouliquen
2017-08-01 12:24 ` Srinivas Kandagatla
2017-08-01 12:28 ` Mark Brown
2017-08-01 12:52 ` Srinivas Kandagatla
2017-08-01 13:15 ` Mark Brown
2017-08-01 15:50 ` Arnaud Pouliquen [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=3bf60afb-d260-badd-7340-6d54a4decd62@st.com \
--to=arnaud.pouliquen@st.com \
--cc=a.hajda@samsung.com \
--cc=airlied@linux.ie \
--cc=alsa-devel@alsa-project.org \
--cc=architt@codeaurora.org \
--cc=broonie@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jsarha@ti.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=srinivas.kandagatla@linaro.org \
--cc=tiwai@suse.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
all inboxes | Powered by JetHome®