ALSA: hda - Distinguish each substream for better sticky assignment
authorTakashi Iwai <tiwai@suse.de>
Thu, 6 Oct 2011 08:07:58 +0000 (10:07 +0200)
committerTakashi Iwai <tiwai@suse.de>
Thu, 6 Oct 2011 08:11:11 +0000 (10:11 +0200)
commitd5cf9911988287e819ce98ccd9f61ca82fbc90c6
treef097738d1b72946aecf757d93e7b27847af6b15b
parent97999e28c74c5908445735ac282e8b20deb67b81
ALSA: hda - Distinguish each substream for better sticky assignment

The commit ef18beded8ddbaafdf4914bab209f77e60ae3a18 introduced a
mechanism to assign the previously used slot for the next reopen of a
PCM stream.  But the PCM device number isn't always unique (it may
have multiple substreams), and also the code doesn't check the stream
direction, thus both playback and capture streams share the same
device number.

For avoiding this conflict, make a unique key for each substream and
store/check this value at reopening.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_intel.c