From: Russell King Date: Sun, 29 Nov 2009 16:39:52 +0000 (+0000) Subject: ALSA: AACI: fix AC97 multiple-open bug X-Git-Tag: v2.6.27.40~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a390ede93a1b9f6a66c39789fc97e6219068c9a9;p=thirdparty%2Fkernel%2Fstable.git ALSA: AACI: fix AC97 multiple-open bug commit 4acd57c3de62374fe5bb52e5cd24538190f4eab2 upstream. Signed-off-by: Russell King Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman --- diff --git a/sound/arm/aaci.c b/sound/arm/aaci.c index b0a474494966d..c735a0dca7641 100644 --- a/sound/arm/aaci.c +++ b/sound/arm/aaci.c @@ -504,6 +504,10 @@ static int aaci_pcm_hw_params(struct snd_pcm_substream *substream, int err; aaci_pcm_hw_free(substream); + if (aacirun->pcm_open) { + snd_ac97_pcm_close(aacirun->pcm); + aacirun->pcm_open = 0; + } err = devdma_hw_alloc(NULL, substream, params_buffer_bytes(params));