From 29998d24ab5ec488cd127488246cc749b0ac52d6 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Mon, 30 Jul 2007 08:14:31 +0200 Subject: [ALSA] check for linked substreams of different cards It is possible to have linked substreams that belong to different cards and/or different drivers. This patch changes some drivers to make sure that they do not incorrectly try to handle substreams of a different card. Signed-off-by: Clemens Ladisch Signed-off-by: Jaroslav Kysela --- sound/pci/emu10k1/p16v.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sound/pci/emu10k1') diff --git a/sound/pci/emu10k1/p16v.c b/sound/pci/emu10k1/p16v.c index 7ee19c6..6ace107 100644 --- a/sound/pci/emu10k1/p16v.c +++ b/sound/pci/emu10k1/p16v.c @@ -448,6 +448,9 @@ static int snd_p16v_pcm_trigger_playback(struct snd_pcm_substream *substream, break; } snd_pcm_group_for_each_entry(s, substream) { + if (snd_pcm_substream_chip(s) != emu || + s->stream != SNDRV_PCM_STREAM_PLAYBACK) + continue; runtime = s->runtime; epcm = runtime->private_data; channel = substream->pcm->device-emu->p16v_device_offset; -- cgit v1.1