summaryrefslogtreecommitdiffstats
path: root/src/modules/module-alsa-source.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2008-09-09 00:10:54 +0300
committerLennart Poettering <lennart@poettering.net>2008-09-09 00:10:54 +0300
commit3a46bbeba509ed68dfaf28d94be3efac88a2613b (patch)
tree2f67d4464454815819a267ae9aa749e644197f4f /src/modules/module-alsa-source.c
parent25b200c08797b19fb3eb05d6259abee231650196 (diff)
When returning from a suspend, pass exactly the same flags as originally when
we opened the device.
Diffstat (limited to 'src/modules/module-alsa-source.c')
-rw-r--r--src/modules/module-alsa-source.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/modules/module-alsa-source.c b/src/modules/module-alsa-source.c
index fca05006..86e08f7b 100644
--- a/src/modules/module-alsa-source.c
+++ b/src/modules/module-alsa-source.c
@@ -565,7 +565,12 @@ static int unsuspend(struct userdata *u) {
pa_log_info("Trying resume...");
snd_config_update_free_global();
- if ((err = snd_pcm_open(&u->pcm_handle, u->device_name, SND_PCM_STREAM_CAPTURE, SND_PCM_NONBLOCK)) < 0) {
+
+ if ((err = snd_pcm_open(&u->pcm_handle, u->device_name, SND_PCM_STREAM_CAPTURE,
+ /*SND_PCM_NONBLOCK|*/
+ SND_PCM_NO_AUTO_RESAMPLE|
+ SND_PCM_NO_AUTO_CHANNELS|
+ SND_PCM_NO_AUTO_FORMAT)) < 0) {
pa_log("Error opening PCM device %s: %s", u->device_name, snd_strerror(err));
goto fail;
}