ALSA: AACI: fix AC97 multiple-open bug

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Russell King 2009-11-29 16:39:52 +00:00 committed by Takashi Iwai
parent 77a9d3eb77
commit 4acd57c3de

View file

@ -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));