Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eb9fecb9 authored by Ruslan Bilovol's avatar Ruslan Bilovol Committed by Felipe Balbi
Browse files

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: default avatarRuslan Bilovol <ruslan.bilovol@gmail.com>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent 7158b57a
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -158,6 +158,9 @@ config USB_U_SERIAL
config USB_U_ETHER
config USB_U_ETHER
	tristate
	tristate


config USB_U_AUDIO
	tristate

config USB_F_SERIAL
config USB_F_SERIAL
	tristate
	tristate


@@ -381,6 +384,7 @@ config USB_CONFIGFS_F_UAC2
	depends on SND
	depends on SND
	select USB_LIBCOMPOSITE
	select USB_LIBCOMPOSITE
	select SND_PCM
	select SND_PCM
	select USB_U_AUDIO
	select USB_F_UAC2
	select USB_F_UAC2
	help
	help
	  This Audio function is compatible with USB Audio Class
	  This Audio function is compatible with USB Audio Class
+1 −0
Original line number Original line Diff line number Diff line
@@ -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
obj-$(CONFIG_USB_F_MASS_STORAGE)+= usb_f_mass_storage.o
usb_f_fs-y			:= f_fs.o
usb_f_fs-y			:= f_fs.o
obj-$(CONFIG_USB_F_FS)		+= usb_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
usb_f_uac1-y			:= f_uac1.o u_uac1.o
obj-$(CONFIG_USB_F_UAC1)	+= usb_f_uac1.o
obj-$(CONFIG_USB_F_UAC1)	+= usb_f_uac1.o
usb_f_uac2-y			:= f_uac2.o
usb_f_uac2-y			:= f_uac2.o
+82 −636

File changed.

Preview size limit exceeded, changes collapsed.

+662 −0

File added.

Preview size limit exceeded, changes collapsed.

+95 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading