* PCM format support (24 bit data stored in 32-bit word) in ALSA?
@ 2008-06-24 6:46 X Jin
2008-06-24 10:13 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: X Jin @ 2008-06-24 6:46 UTC (permalink / raw)
To: linux-kernel
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?
TIA
-XJ
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: PCM format support (24 bit data stored in 32-bit word) in ALSA?
2008-06-24 6:46 PCM format support (24 bit data stored in 32-bit word) in ALSA? X Jin
@ 2008-06-24 10:13 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2008-06-24 10:13 UTC (permalink / raw)
To: X Jin; +Cc: linux-kernel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-06-24 10:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-24 6:46 PCM format support (24 bit data stored in 32-bit word) in ALSA? X Jin
2008-06-24 10:13 ` Takashi Iwai
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®