sound: usb: Add support for usb audio qmi service

Upon usb audio device enumeration remote entity
communicates with usb audio qmi server to enable
or disable particular audio stream on usb audio
device. This off loades ISOC data transfer
operations to remote entity and allows APQ to go
to power collapse more frequently for better
power saving.

Change-Id: I2c9b0ba0837f8fec5c320e3117aa3b2f553db6b2
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
diff --git a/sound/usb/stream.c b/sound/usb/stream.c
index 8e9548bc..7437cd5 100644
--- a/sound/usb/stream.c
+++ b/sound/usb/stream.c
@@ -69,9 +69,14 @@
 static void snd_usb_audio_pcm_free(struct snd_pcm *pcm)
 {
 	struct snd_usb_stream *stream = pcm->private_data;
+	struct snd_usb_audio *chip;
+
 	if (stream) {
+		mutex_lock(&stream->chip->dev_lock);
+		chip = stream->chip;
 		stream->pcm = NULL;
 		snd_usb_audio_stream_free(stream);
+		mutex_unlock(&chip->dev_lock);
 	}
 }