summaryrefslogtreecommitdiffstats
path: root/src/modules/alsa/alsa-sink.c
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@collabora.co.uk>2010-09-08 13:26:39 +0200
committerColin Guthrie <cguthrie@mandriva.org>2010-09-09 17:03:34 +0100
commitf29acfd0e0413a9bd126782763ee2dcf10357546 (patch)
tree29bb37d84c49b4f27684f37d39f3d9df0c48f17e /src/modules/alsa/alsa-sink.c
parentb0042cec71ffb09d3720fdcc4223de8153fed67a (diff)
alsa: work around slightly broken _delay implementations
Use snd_pcm_avail_delay() in pa_alsa_safe_delay() so that we can check the delay value against the avail value and patch it up when it looks invalid. Only do this for capture.
Diffstat (limited to 'src/modules/alsa/alsa-sink.c')
-rw-r--r--src/modules/alsa/alsa-sink.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c
index f8249440..14f08a56 100644
--- a/src/modules/alsa/alsa-sink.c
+++ b/src/modules/alsa/alsa-sink.c
@@ -802,7 +802,7 @@ static void update_smoother(struct userdata *u) {
/* Let's update the time smoother */
- if (PA_UNLIKELY((err = pa_alsa_safe_delay(u->pcm_handle, &delay, u->hwbuf_size, &u->sink->sample_spec)) < 0)) {
+ if (PA_UNLIKELY((err = pa_alsa_safe_delay(u->pcm_handle, &delay, u->hwbuf_size, &u->sink->sample_spec, FALSE)) < 0)) {
pa_log_warn("Failed to query DSP status data: %s", pa_alsa_strerror(err));
return;
}