mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 19:08:57 +09:00
ANDROID: usb: gadget: f_audio_source: New gadget driver for audio output
This driver presents a standard USB audio class interface to the host
and an ALSA PCM device to userspace
Bug: 78114713
Bug: 120441124
[badhri: f_audio_source is being migrated to userspace.]
Change-Id: If16b14a5ff27045f9cb2daaf1ae9195c5eeab7d0
Signed-off-by: Mike Lockwood <lockwood@google.com>
[AmitP: Folded following android-4.9 commit changes into this patch
Parts of e275439310 ("ANDROID: usb: gadget: Fixes and hacks to make android usb gadget compile on 3.8")
i6d9285e2574a ("ANDROID: usb: gadget: f_audio_source:replace deprecated API")]
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
[astrachan: Folded the following changes into this patch:
ddfd0c4070c1 ("ANDROID: usb: gadget: f_audio_source: Move to USB_FUNCTION API")
a3ab81aaa19e ("ANDROID: usb: gadget: f_audio_source: Move gadget functions code")
2095c953d894 ("ANDROID: usb: gadget: f_audio_source: change max ISO packet size")
8671b3e53638 ("ANDROID: usb: gadget: f_audio_source: Fixed USB Audio Class Interface Descriptor")
af98f36edbe2 ("ANDROID: usb: gadget: f_audio_source: disable the CPU C-states upon playback")
a830751a338e ("CHROMIUM: usb: gadget: f_audio_source: add .free_func callback")]
Signed-off-by: Alistair Strachan <astrachan@google.com>
This commit is contained in:
@@ -218,6 +218,9 @@ config USB_F_TCM
|
||||
config USB_F_ACC
|
||||
tristate
|
||||
|
||||
config USB_F_AUDIO_SRC
|
||||
tristate
|
||||
|
||||
# this first set of drivers all depend on bulk-capable hardware.
|
||||
|
||||
config USB_CONFIGFS
|
||||
@@ -386,6 +389,15 @@ config USB_CONFIGFS_F_ACC
|
||||
help
|
||||
USB gadget Accessory support
|
||||
|
||||
config USB_CONFIGFS_F_AUDIO_SRC
|
||||
bool "Audio Source gadget"
|
||||
depends on USB_CONFIGFS
|
||||
depends on SND
|
||||
select SND_PCM
|
||||
select USB_F_AUDIO_SRC
|
||||
help
|
||||
USB gadget Audio Source support
|
||||
|
||||
config USB_CONFIGFS_F_UAC1
|
||||
bool "Audio Class 1.0"
|
||||
depends on USB_CONFIGFS
|
||||
|
||||
@@ -52,3 +52,5 @@ usb_f_tcm-y := f_tcm.o
|
||||
obj-$(CONFIG_USB_F_TCM) += usb_f_tcm.o
|
||||
usb_f_accessory-y := f_accessory.o
|
||||
obj-$(CONFIG_USB_F_ACC) += usb_f_accessory.o
|
||||
usb_f_audio_source-y := f_audio_source.o
|
||||
obj-$(CONFIG_USB_F_AUDIO_SRC) += usb_f_audio_source.o
|
||||
|
||||
1071
drivers/usb/gadget/function/f_audio_source.c
Normal file
1071
drivers/usb/gadget/function/f_audio_source.c
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user