summaryrefslogtreecommitdiffstats
path: root/sound/core
diff options
context:
space:
mode:
authorBen Collins <bcollins@bluecherry.net>2010-05-28 11:43:45 -0400
committerTakashi Iwai <tiwai@suse.de>2010-05-31 09:10:03 +0200
commit15c0cee6c809a137e0fc7f1d2b0867cc03473c0c (patch)
treef36f51f0a1f78f69c38f9a43f7fafe18600409d2 /sound/core
parent67a3e12b05e055c0415c556a315a3d3eb637e29e (diff)
downloadblackbird-op-linux-15c0cee6c809a137e0fc7f1d2b0867cc03473c0c.tar.gz
blackbird-op-linux-15c0cee6c809a137e0fc7f1d2b0867cc03473c0c.zip
ALSA: pcm: Define G723 3-bit and 5-bit formats
This defines the 24bps and 40bps (8khz sample rate) G.723 codec formats. They are going to be used once I submit the driver for an mpeg4/g723 compression card. I've updated the signed value to -1 as per Takashi's comments since these are non-linear formats. Signed-off-by: Ben Collins <bcollins@bluecherry.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core')
-rw-r--r--sound/core/pcm_misc.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/sound/core/pcm_misc.c b/sound/core/pcm_misc.c
index ea2bf82c9373..434af3c56d52 100644
--- a/sound/core/pcm_misc.c
+++ b/sound/core/pcm_misc.c
@@ -128,6 +128,14 @@ static struct pcm_format_data pcm_formats[SNDRV_PCM_FORMAT_LAST+1] = {
.width = 4, .phys = 4, .le = -1, .signd = -1,
.silence = {},
},
+ [SNDRV_PCM_FORMAT_G723_24] = {
+ .width = 3, .phys = 3, .le = -1, .signd = -1,
+ .silence = {},
+ },
+ [SNDRV_PCM_FORMAT_G723_40] = {
+ .width = 5, .phys = 5, .le = -1, .signd = -1,
+ .silence = {},
+ },
/* FIXME: the following three formats are not defined properly yet */
[SNDRV_PCM_FORMAT_MPEG] = {
.le = -1, .signd = -1,
@@ -186,6 +194,14 @@ static struct pcm_format_data pcm_formats[SNDRV_PCM_FORMAT_LAST+1] = {
.width = 18, .phys = 24, .le = 0, .signd = 0,
.silence = { 0x02, 0x00, 0x00 },
},
+ [SNDRV_PCM_FORMAT_G723_24_1B] = {
+ .width = 3, .phys = 8, .le = -1, .signd = -1,
+ .silence = {},
+ },
+ [SNDRV_PCM_FORMAT_G723_40_1B] = {
+ .width = 5, .phys = 8, .le = -1, .signd = -1,
+ .silence = {},
+ },
};
OpenPOWER on IntegriCloud