Skip to content

Commit

Permalink
usb: gadget: f_uac2: split out audio core
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ruslan Bilovol authored and Felipe Balbi committed Jun 19, 2017
1 parent 7158b57 commit eb9fecb
Show file tree
Hide file tree
Showing 6 changed files with 845 additions and 636 deletions.
4 changes: 4 additions & 0 deletions drivers/usb/gadget/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@ config USB_U_SERIAL
config USB_U_ETHER
tristate

config USB_U_AUDIO
tristate

config USB_F_SERIAL
tristate

Expand Down Expand Up @@ -381,6 +384,7 @@ config USB_CONFIGFS_F_UAC2
depends on SND
select USB_LIBCOMPOSITE
select SND_PCM
select USB_U_AUDIO
select USB_F_UAC2
help
This Audio function is compatible with USB Audio Class
Expand Down
1 change: 1 addition & 0 deletions drivers/usb/gadget/function/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ usb_f_mass_storage-y := f_mass_storage.o storage_common.o
obj-$(CONFIG_USB_F_MASS_STORAGE)+= usb_f_mass_storage.o
usb_f_fs-y := f_fs.o
obj-$(CONFIG_USB_F_FS) += usb_f_fs.o
obj-$(CONFIG_USB_U_AUDIO) += u_audio.o
usb_f_uac1-y := f_uac1.o u_uac1.o
obj-$(CONFIG_USB_F_UAC1) += usb_f_uac1.o
usb_f_uac2-y := f_uac2.o
Expand Down
Loading

0 comments on commit eb9fecb

Please sign in to comment.