ALSA: line6: add hw monitor volume control for POD HD500
PATCH v4 1/1 ALSA: line6: add hw monitor volume control for POD HD500
Add hw monitor volume control for POD HD500. The same change may work for HD500X but I don't have it to test.
---
v4: add NULL check for kmalloc-ed buffer
v3: - use EXPORT_SYMBOL_GPL instead of EXPORT_SYMBOL
- use GFP_KERNEL instead of GFP_ATOMIC for allocating a message
- use lower case for float lookup table
v2: clamp volume value to [0, ARRAY_SIZE() -1] in
podhd_set_monitor_level()
sound/usb/line6/driver.c | 3 +- sound/usb/line6/driver.h | 4 ++ sound/usb/line6/podhd.c | 127 ++++++++++++++++++++++++++++++++++++++- 3 files changed, 132 insertions(+), 2 deletions(-)
sound/usb/line6/driver.c +2 -1
@@ -97,7 +97,7 @@ static void line6_stop_listen(struct usb_line6 *line6)/* Send raw message in pieces of wMaxPacketSize bytes. */ -static int line6_send_raw_message (struct usb_line6 *line6,const char *buffer, +int line6_send_raw_message (struct usb_line6 *line6,const char *buffer,int size) {int i, done =0 ;
@@ -132,6 +132,7 @@ static int line6_send_raw_message(struct usb_line6 *line6, const char *buffer,return done; } +EXPORT_SYMBOL_GPL (line6_send_raw_message);/* Notification of completion of asynchronous request transmission.
sound/usb/line6/driver.h +4 -0
@@ -108,6 +108,8 @@ enum {LINE6_CAP_CONTROL_MIDI =1 <<4 ,/* device provides low-level information */ LINE6_CAP_CONTROL_INFO =1 <<5 , +/* device provides hardware monitoring volume control */ + LINE6_CAP_HWMON_CTL = 1 << 6, };/*
@@ -185,6 +187,8 @@ extern int line6_read_data(struct usb_line6 *line6, unsigned address, void *data, unsigned datalen);extern int line6_read_serial_number (struct usb_line6 *line6,u32 *serial_number); +extern int line6_send_raw_message (struct usb_line6 *line6, +const char *buffer,int size);extern int line6_send_raw_message_async (struct usb_line6 *line6,const char *buffer,int size); extern int line6_send_sysex_message(struct usb_line6 *line6,
sound/usb/line6/podhd.c +126 -1
157 lines not on this page · raw message
Signature · 1 line
2.27.0
Quoted 4 lines · Vasily Khoruzhick
Add hw monitor volume control for POD HD500. The same change may work for HD500X but I don't have it to test.
Quoted 8 lines
Signed-off-by Vasily Khoruzhick <[email protected]>---
v4: add NULL check for kmalloc-ed buffer
v3: - useEXPORT_SYMBOL_GPLinstead ofEXPORT_SYMBOL
- useGFP_KERNELinstead ofGFP_ATOMICfor allocating a message
- use lower case for float lookup table
v2: clamp volume value to [0,ARRAY_SIZE()-1] in
podhd_set_monitor_level()
Applied now. Thanks.
Takashi