diff --git a/0001-alsa-plugins-pulse-Implement-pause.patch b/0001-alsa-plugins-pulse-Implement-pause.patch new file mode 100644 index 0000000..1670fdb --- /dev/null +++ b/0001-alsa-plugins-pulse-Implement-pause.patch @@ -0,0 +1,59 @@ +From d9a839d51255c939f394f770b249c8a4a9600122 Mon Sep 17 00:00:00 2001 +From: Troy Moure +Date: Thu, 18 Jun 2009 14:55:21 +0100 +Subject: [PATCH 01/11] alsa-plugins/pulse: Implement 'pause'. + +Just cork or uncork the stream to pause or unpause it. + +Signed-off-by: Troy Moure +Signed-off-by: Takashi Iwai +--- + pulse/pcm_pulse.c | 25 +++++++++++++++++++++++++ + 1 files changed, 25 insertions(+), 0 deletions(-) + +diff --git a/pulse/pcm_pulse.c b/pulse/pcm_pulse.c +index db8d1e1..c276839 100644 +--- a/pulse/pcm_pulse.c ++++ b/pulse/pcm_pulse.c +@@ -739,6 +739,30 @@ static int pulse_close(snd_pcm_ioplug_t * io) + return 0; + } + ++static int pulse_pause(snd_pcm_ioplug_t * io, int enable) ++{ ++ snd_pcm_pulse_t *pcm = io->private_data; ++ int err = 0; ++ ++ assert (pcm); ++ assert (pcm->p); ++ ++ pa_threaded_mainloop_lock(pcm->p->mainloop); ++ ++ if (pcm->stream) { ++ pa_operation *o; ++ o = pa_stream_cork(pcm->stream, enable, NULL, NULL); ++ if (o) ++ pa_operation_unref(o); ++ else ++ err = -EIO; ++ } ++ ++ pa_threaded_mainloop_unlock(pcm->p->mainloop); ++ ++ return err; ++} ++ + static const snd_pcm_ioplug_callback_t pulse_playback_callback = { + .start = pulse_start, + .stop = pulse_stop, +@@ -750,6 +774,7 @@ static const snd_pcm_ioplug_callback_t pulse_playback_callback = { + .prepare = pulse_prepare, + .hw_params = pulse_hw_params, + .close = pulse_close, ++ .pause = pulse_pause + }; + + +-- +1.6.4 +