diff mbox

[08/17] ALSA: line6: Don't handle PCM trigger for other cards

Message ID 1421682891-11594-9-git-send-email-tiwai@suse.de (mailing list archive)
State Accepted
Commit 7d70c81ccaccb74326255fb9549c872bc29193d6
Headers show

Commit Message

Takashi Iwai Jan. 19, 2015, 3:54 p.m. UTC
Otherwise it oopses.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/usb/line6/pcm.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox

Patch

diff --git a/sound/usb/line6/pcm.c b/sound/usb/line6/pcm.c
index 520cf540e83c..932cc7e194e2 100644
--- a/sound/usb/line6/pcm.c
+++ b/sound/usb/line6/pcm.c
@@ -233,6 +233,8 @@  int snd_line6_trigger(struct snd_pcm_substream *substream, int cmd)
 	clear_bit(LINE6_INDEX_PREPARED, &line6pcm->flags);
 
 	snd_pcm_group_for_each_entry(s, substream) {
+		if (s->pcm->card != substream->pcm->card)
+			continue;
 		switch (s->stream) {
 		case SNDRV_PCM_STREAM_PLAYBACK:
 			err = snd_line6_playback_trigger(line6pcm, cmd);