summaryrefslogtreecommitdiffstats
path: root/src/modules/alsa-util.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2007-11-09 02:45:07 +0000
committerLennart Poettering <lennart@poettering.net>2007-11-09 02:45:07 +0000
commit7e0f547f2fd8ddfae1d807334dbc3428a3dfe374 (patch)
tree94464f114e05f6b2689e60b9364a62cfd404c109 /src/modules/alsa-util.c
parent3c17c7d44284a739ec1453a7470333c73f072eeb (diff)
add support for 32bit integer samples
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2037 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/modules/alsa-util.c')
-rw-r--r--src/modules/alsa-util.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/modules/alsa-util.c b/src/modules/alsa-util.c
index 906de58d..15ae1fc6 100644
--- a/src/modules/alsa-util.c
+++ b/src/modules/alsa-util.c
@@ -227,15 +227,19 @@ static int set_format(snd_pcm_t *pcm_handle, snd_pcm_hw_params_t *hwparams, pa_s
[PA_SAMPLE_S16BE] = SND_PCM_FORMAT_S16_BE,
[PA_SAMPLE_FLOAT32LE] = SND_PCM_FORMAT_FLOAT_LE,
[PA_SAMPLE_FLOAT32BE] = SND_PCM_FORMAT_FLOAT_BE,
+ [PA_SAMPLE_S32LE] = SND_PCM_FORMAT_S32_LE,
+ [PA_SAMPLE_S32BE] = SND_PCM_FORMAT_S32_BE,
};
static const pa_sample_format_t try_order[] = {
- PA_SAMPLE_S16NE,
- PA_SAMPLE_S16RE,
PA_SAMPLE_FLOAT32NE,
PA_SAMPLE_FLOAT32RE,
- PA_SAMPLE_ULAW,
+ PA_SAMPLE_S32NE,
+ PA_SAMPLE_S32RE,
+ PA_SAMPLE_S16NE,
+ PA_SAMPLE_S16RE,
PA_SAMPLE_ALAW,
+ PA_SAMPLE_ULAW,
PA_SAMPLE_U8,
PA_SAMPLE_INVALID
};
@@ -256,6 +260,10 @@ static int set_format(snd_pcm_t *pcm_handle, snd_pcm_hw_params_t *hwparams, pa_s
*f = PA_SAMPLE_S16LE;
else if (*f == PA_SAMPLE_S16LE)
*f = PA_SAMPLE_S16BE;
+ else if (*f == PA_SAMPLE_S32BE)
+ *f = PA_SAMPLE_S32LE;
+ else if (*f == PA_SAMPLE_S32LE)
+ *f = PA_SAMPLE_S32BE;
else
goto try_auto;