From: Giuliano Pochini <pochini@shiny.it>
To: Maen Suleiman <maen.suleiman@gmail.com>
Cc: alsa-devel@lists.sourceforge.net
Subject: Re: 20bit PCM in 32 bit container
Date: Sun, 4 Mar 2007 16:39:53 +0100 [thread overview]
Message-ID: <20070304163953.044b8a29.pochini@shiny.it> (raw)
In-Reply-To: <9c1cad6e0703031535m18d7a93fp6d1c0925893ba7d6@mail.gmail.com>
On Sun, 4 Mar 2007 01:35:28 +0200
"Maen Suleiman" <maen.suleiman@gmail.com> wrote:
> Hi ,
>
> My hardware uses a 20bit PCM format packed in 32bit, , I am using a
> 2.6.12 kernel and such a format doesn't exist, is the following enough
> for defining this format:
>
> 1) defning a new value in 'enum sndrv_pcm_format'
> 2) adding new entry to pcm_formats[SNDRV_PCM_FORMAT_LAST+1] array
> that describes the new format .
>
> [SNDRV_PCM_FORMAT_S20_NEW_LE] = {
> .width = 20, .phys = 32, .le = 1, .signd = 1,
> .silence = {},
> },
I suggest SND_PCM_FORMAT_S20_LE (ie. 20 bits signed data right-aligned in 32
bits frame). I never had a serious look at that code, but you at least also
have to add a lot of conversion functions to/from S20_LE in
alsa-lib/src/pcm/plugin_ops.h (look for #ifdef CONV_LABELS) which are used
by alsa-lib/src/pcm/pcm_linear.c:snd_pcm_linear_convert() and by many other
plugins.
--
Giuliano.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
prev parent reply other threads:[~2007-03-04 15:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-03 23:35 20bit PCM in 32 bit container Maen Suleiman
2007-03-04 15:39 ` Giuliano Pochini [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=20070304163953.044b8a29.pochini@shiny.it \
--to=pochini@shiny.it \
--cc=alsa-devel@lists.sourceforge.net \
--cc=maen.suleiman@gmail.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