lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 24 Jun 2008 12:13:11 +0200
From:	Takashi Iwai <tiwai@...e.de>
To:	"X Jin" <jinx080808@...il.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: PCM format support (24 bit data stored in 32-bit word) in ALSA?

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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ