summaryrefslogtreecommitdiffstats
path: root/sound/usb/stream.c
diff options
context:
space:
mode:
authorShuah Khan <shuahkh@osg.samsung.com>2016-03-02 17:50:31 +0100
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2016-03-03 19:01:13 +0100
commitaebb2b89bff0fdeb4e7ddd73dcbccde1a0f27554 (patch)
treeaad7f1862beb01250032ac02d46d1dac11ccaa18 /sound/usb/stream.c
parent[media] dw2102: add support for TeVii S662 (diff)
downloadlinux-aebb2b89bff0fdeb4e7ddd73dcbccde1a0f27554.tar.xz
linux-aebb2b89bff0fdeb4e7ddd73dcbccde1a0f27554.zip
[media] sound/usb: Use Media Controller API to share media resources
Change ALSA driver to use Media Controller API to share media resources with DVB and V4L2 drivers on a AU0828 media device. Media Controller specific initialization is done after sound card is registered. ALSA creates Media interface and entity function graph nodes for Control, Mixer, PCM Playback, and PCM Capture devices. snd_usb_hw_params() will call Media Controller enable source handler interface to request the media resource. If resource request is granted, it will release it from snd_usb_hw_free(). If resource is busy, -EBUSY is returned. Media specific cleanup is done in usb_audio_disconnect(). Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com> Acked-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'sound/usb/stream.c')
-rw-r--r--sound/usb/stream.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/usb/stream.c b/sound/usb/stream.c
index c4dc577ab1bd..51258a15f653 100644
--- a/sound/usb/stream.c
+++ b/sound/usb/stream.c
@@ -36,6 +36,7 @@
#include "format.h"
#include "clock.h"
#include "stream.h"
+#include "media.h"
/*
* free a substream
@@ -52,6 +53,7 @@ static void free_substream(struct snd_usb_substream *subs)
kfree(fp);
}
kfree(subs->rate_list.list);
+ media_snd_stream_delete(subs);
}