usb: gadget: f_uac2: split out audio core
authorRuslan Bilovol <ruslan.bilovol@gmail.com>
Sun, 18 Jun 2017 13:23:52 +0000 (16:23 +0300)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Mon, 19 Jun 2017 06:22:46 +0000 (09:22 +0300)
commiteb9fecb9e69b0be8c267c55b0bb52a08e8fb6bee
tree5ea55227c274c14a377ee35edb458aa4a421e844
parent7158b57a495635c04507d986117ae26b2eb5e4e5
usb: gadget: f_uac2: split out audio core

Abstract the peripheral side ALSA sound card code from
the f_uac2 function into a component that can be called
by various functions, so the various flavors can be split
apart and selectively reused.

Visible changes:
 - add uac_params structure to pass audio paramteres for
   g_audio_setup
 - make ALSA sound card's name configurable
 - add [in/out]_ep_maxpsize
 - allocate snd_uac_chip structure during g_audio_setup
 - add u_audio_[start/stop]_[capture/playback] functions

Signed-off-by: Ruslan Bilovol <ruslan.bilovol@gmail.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/gadget/Kconfig
drivers/usb/gadget/function/Makefile
drivers/usb/gadget/function/f_uac2.c
drivers/usb/gadget/function/u_audio.c [new file with mode: 0644]
drivers/usb/gadget/function/u_audio.h [new file with mode: 0644]
drivers/usb/gadget/legacy/Kconfig