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/pcxhr/pcxhr.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sound/pci/pcxhr') diff --git a/sound/pci/pcxhr/pcxhr.c b/sound/pci/pcxhr/pcxhr.c index f7f6a687f03..1b787f45557 100644 --- a/sound/pci/pcxhr/pcxhr.c +++ b/sound/pci/pcxhr/pcxhr.c @@ -646,6 +646,8 @@ static int pcxhr_trigger(struct snd_pcm_substream *subs, int cmd) if (snd_pcm_stream_linked(subs)) { struct snd_pcxhr *chip = snd_pcm_substream_chip(subs); snd_pcm_group_for_each_entry(s, subs) { + if (snd_pcm_substream_chip(s) != chip) + continue; stream = s->runtime->private_data; stream->status = PCXHR_STREAM_STATUS_SCHEDULE_RUN; -- cgit v1.2.3