pcm: Add support for S8 and S24LE formats.

This commit is contained in:
Gabriel M. Beddingfield
2012-05-02 11:51:20 -05:00
committed by Simon Wilson
parent a5baefd1ab
commit 2a274a18b0
2 changed files with 6 additions and 0 deletions
+2
View File
@@ -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,
};
+4
View File
@@ -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;