]> git.baikalelectronics.ru Git - kernel.git/commit
usb: gadget: u_audio: add bi-directional volume and mute support
authorRuslan Bilovol <ruslan.bilovol@gmail.com>
Mon, 12 Jul 2021 12:55:27 +0000 (14:55 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Jul 2021 08:10:11 +0000 (10:10 +0200)
commit2857e111d336a6a77afa9ea08805e79770fca3a1
treee71937dca9ff2e0852bd290e239b35cf539f0afc
parent649e633959e4439b621a8849874376c11e67adbe
usb: gadget: u_audio: add bi-directional volume and mute support

USB Audio Class 1/2 have ability to change device's
volume and mute by USB Host through class-specific control
requests. Device also can notify Host about volume/mute
change on its side through optional interrupt endpoint.

This patch adds Volume and Mute ALSA controls which can be
used by user to send and receive notifications to/from
the USB Host about Volume and Mute change.

These params come from f_uac* so volume and mute controls
will be created only if the function support and enable
each explicitly

Signed-off-by: Ruslan Bilovol <ruslan.bilovol@gmail.com>
Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Link: https://lore.kernel.org/r/20210712125529.76070-3-pavel.hofman@ivitera.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/function/u_audio.c
drivers/usb/gadget/function/u_audio.h