From: Jaroslav Kysela <perex@perex.cz>
To: alsa-devel@alsa-project.org
Cc: vipin.kumar@st.com
Subject: Re: 24 bit sample embedded in 32 bits
Date: Mon, 02 Jul 2012 13:02:49 +0200 [thread overview]
Message-ID: <4FF17FD9.8040409@perex.cz> (raw)
In-Reply-To: <4FF173D4.7060401@st.com>
Date 2.7.2012 12:11, Vipin Kumar wrote:
> Hello,
>
> I assume that the alsa framework expects the 24 bit sample data to be
> packed one after the other. for example while recording a 2 channel, 24
> bit sample data, typically the dma reads a fifo (which receives data
> from adc) and prepares a buffer which is then passed to the upper layers.
>
> This buffer is expeted to be 24byte left channel and then 24 byte right
> channel. Am I right?
>
> If the above assumption is correct, I need to find a way to tell the
> framework that the data is 24bit but is embedded in 32 bit. ie 32bit
> left and then 32 bit right channel data
>
> I am tending to think that there has to be a way but I am unable to find
> it. Can you please point me to the right direction
Use S/U24 or S/U32 formats - look to adriver.h for SNDRV_PCM_FORMAT
constants. S/U24 expects 24-bit samples with zero MSB in 32-bit words.
S/U32 expects 32-bit samples (LSB is zero for 24-bit data).
Jaroslav
--
Jaroslav Kysela <perex@perex.cz>
Linux Kernel Sound Maintainer
ALSA Project; Red Hat, Inc.
prev parent reply other threads:[~2012-07-02 11:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-02 10:11 24 bit sample embedded in 32 bits Vipin Kumar
2012-07-02 11:01 ` Clemens Ladisch
2012-07-02 11:11 ` Vipin Kumar
2012-07-02 11:02 ` Jaroslav Kysela [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=4FF17FD9.8040409@perex.cz \
--to=perex@perex.cz \
--cc=alsa-devel@alsa-project.org \
--cc=vipin.kumar@st.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