diff options
author | Takashi Iwai <tiwai@suse.de> | 2007-10-29 11:07:01 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2007-10-29 11:07:01 +0100 |
commit | 9883345a35b5a146c917c5df7e15430b2d500190 (patch) | |
tree | 173fabd6de13ac88a51e4a6d03a286349b512318 | |
parent | aa36d2081b9d1fbf5bcafa4d22b02fc907fa8d97 (diff) |
Fix unexpected assert with pulse plugin
This patch fixes the unexpected assert call at calling snd_pcm_hw_params
in PREPARED state. Since multiple hw_params calls are allowed, the pulse
plugin shouldn't call assert.
Handled in ALSA bug#3470.
From: Sean McNamara <smcnam@gmail.com>
-rw-r--r-- | pulse/pcm_pulse.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pulse/pcm_pulse.c b/pulse/pcm_pulse.c index 96ef6bc..7d8f59e 100644 --- a/pulse/pcm_pulse.c +++ b/pulse/pcm_pulse.c @@ -490,15 +490,18 @@ finish: static int pulse_hw_params(snd_pcm_ioplug_t *io, snd_pcm_hw_params_t *params) { snd_pcm_pulse_t *pcm = io->private_data; + snd_pcm_t *base = io->pcm; int err = 0; assert(pcm); assert(pcm->p); + //Resolving bugtrack ID 0003470 + if(!(base && snd_pcm_state(base) == SND_PCM_STATE_PREPARED)) + assert(!pcm->stream); + pa_threaded_mainloop_lock(pcm->p->mainloop); - assert(!pcm->stream); - pcm->frame_size = (snd_pcm_format_physical_width(io->format) * io->channels) / 8; switch (io->format) { |