From: Takashi Iwai <tiwai@suse.de>
To: "X Jin" <jinx080808@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: PCM format support (24 bit data stored in 32-bit word) in ALSA?
Date: Tue, 24 Jun 2008 12:13:11 +0200 [thread overview]
Message-ID: <s5h3an33zuw.wl%tiwai@suse.de> (raw)
In-Reply-To: <c058f1520806232346q5c963083x214b658e85523d95@mail.gmail.com>
At Mon, 23 Jun 2008 23:46:11 -0700,
X Jin wrote:
>
> Hi,
>
> I have a capture card using a TI PCM1803a chip, which is a 24-bit AD
> converter. However a 24-bit digital information is stored in a 32-bit
> word. I searched the ALSA PCM code and found that the format
> SNDRV_PCM_FORMAT_S24_LE (and others) defines the physical bit width as
> 32. I guess these definitions are designed to handle exactly the
> situation I'm facing now. In other words, ALSA can handle the 24-bit
> format in a 32-bit physical data.
>
> Is my understanding correct?
Yes.
- The data is stored in lower 24bits of 4 bytes ==>
SNDRV_PCM_FORMAT_S24_LE,BE
- The data is stored in upper 24bits of 4 bytes ==>
SNDRV_PCM_FORMAT_S32_LE,BE (and set msbits hw_params if needed)
- The data is stored in 3 bytes ==>
SNDRV_PCM_FORMAT_S24_3LE,3BE
Takashi
prev parent reply other threads:[~2008-06-24 10:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-24 6:46 X Jin
2008-06-24 10:13 ` Takashi Iwai [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=s5h3an33zuw.wl%tiwai@suse.de \
--to=tiwai@suse.de \
--cc=jinx080808@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/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®