summaryrefslogtreecommitdiffstats
path: root/src/modules/alsa/alsa-util.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-09-09 23:57:49 +0200
committerLennart Poettering <lennart@poettering.net>2009-09-09 23:57:49 +0200
commitd5f43bd4c6a7eecff7bc0c4ff1be9152b33cb1e0 (patch)
tree366accbabcde984abf163197a8d3b59e67f36489 /src/modules/alsa/alsa-util.c
parent8364b959b452a2b9e3f230705feb176a1fa6de06 (diff)
alsa: disable tsched for software devices before we configure the buffer metrics so that we don't accidently set a buffer size that is suitable for tsched where we don't use tsched
Diffstat (limited to 'src/modules/alsa/alsa-util.c')
-rw-r--r--src/modules/alsa/alsa-util.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/modules/alsa/alsa-util.c b/src/modules/alsa/alsa-util.c
index 91474527..f934285a 100644
--- a/src/modules/alsa/alsa-util.c
+++ b/src/modules/alsa/alsa-util.c
@@ -189,7 +189,7 @@ static int set_buffer_size(snd_pcm_t *pcm_handle, snd_pcm_hw_params_t *hwparams,
}
/* Set the hardware parameters of the given ALSA device. Returns the
- * selected fragment settings in *period and *period_size */
+ * selected fragment settings in *buffer_size and *period_size. If tsched mode can be enabled */
int pa_alsa_set_hw_params(
snd_pcm_t *pcm_handle,
pa_sample_spec *ss,
@@ -247,6 +247,9 @@ int pa_alsa_set_hw_params(
if (!_use_mmap)
_use_tsched = FALSE;
+ if (!pa_alsa_pcm_is_hw(pcm_handle))
+ _use_tsched = FALSE;
+
if ((ret = set_format(pcm_handle, hwparams, &_ss.format)) < 0)
goto finish;