From 2a274a18b0eb4ff45c5bb8f02eb0264d8cc6154c Mon Sep 17 00:00:00 2001 From: "Gabriel M. Beddingfield" Date: Wed, 2 May 2012 11:51:20 -0500 Subject: pcm: Add support for S8 and S24LE formats. --- include/tinyalsa/asoundlib.h | 2 ++ pcm.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/include/tinyalsa/asoundlib.h b/include/tinyalsa/asoundlib.h index e65403e..5f3d563 100644 --- a/include/tinyalsa/asoundlib.h +++ b/include/tinyalsa/asoundlib.h @@ -70,6 +70,8 @@ struct pcm; enum pcm_format { PCM_FORMAT_S16_LE = 0, PCM_FORMAT_S32_LE, + PCM_FORMAT_S8, + PCM_FORMAT_S24_LE, PCM_FORMAT_MAX, }; diff --git a/pcm.c b/pcm.c index a59301e..ecd2304 100644 --- a/pcm.c +++ b/pcm.c @@ -189,6 +189,10 @@ static unsigned int pcm_format_to_alsa(enum pcm_format format) switch (format) { case PCM_FORMAT_S32_LE: return SNDRV_PCM_FORMAT_S32_LE; + case PCM_FORMAT_S8: + return SNDRV_PCM_FORMAT_S8; + case PCM_FORMAT_S24_LE: + return SNDRV_PCM_FORMAT_S24_LE; default: case PCM_FORMAT_S16_LE: return SNDRV_PCM_FORMAT_S16_LE; -- cgit v1.2.3