OSDN Git Service

ALSA: usx2y: Don't peep the card internal object
authorTakashi Iwai <tiwai@suse.de>
Fri, 14 Feb 2014 08:05:47 +0000 (09:05 +0100)
committerTakashi Iwai <tiwai@suse.de>
Mon, 17 Feb 2014 09:16:25 +0000 (10:16 +0100)
commite2439a5401486d8b7f1076fc6df9b80143ed62e2
tree3dd69d1751290ac803fe9014db2746523eaac058
parent1f85a0f0cce583a8ac436bda8807ec8fd8e8ef16
ALSA: usx2y: Don't peep the card internal object

Avoid traversing the device object list of the card instance just for
checking the PCM streams.  The driver's private object already
contains the array of substream pointers, so it can be simply looked
through.  The card internal may be restructured in future, thus better
not to rely on it.

Also, this fixes the possible deadlocks in PCM mutex.  Instead of
taking multiple PCM mutexes, just take the common mutex in all
places.  Along with it, rename prepare_mutex as pcm_mutex.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/usx2y/usbusx2y.c
sound/usb/usx2y/usbusx2y.h
sound/usb/usx2y/usbusx2yaudio.c
sound/usb/usx2y/usx2yhwdeppcm.c