ALSA: usb-audio: scarlett2: Fix device hang with ehci-pci
cover ALSA: usb-audio: scarlett2: Fix device hang with ehci-pci
This patchset fixes a show-stopper bug with the Scarlett Gen 2 mixer driver not working with the ehci-pci host driver, and improves the user experience with better driver startup messages.
Patch 1: Fixes the driver hanging the device by using the correct direction pipe now.
Patch 2: Improves the user experience with more specific enabling instructions, positive feedback when it is enabled or if initialisation fails. The previous instructions were incomplete and didn't confirm that the driver was enabled.
#Cc: [email protected] please (sorry, not sure if I should be sending this there myself or if it gets added by Takashi after review?)
Geoffrey D. Bennett (2):
ALSA: usb-audio: scarlett2: Fix device hang with ehci-pci
ALSA: usb-audio: scarlett2: Improve driver startup messages
sound/usb/mixer_quirks.c | 2 +- sound/usb/mixer_scarlett_gen2.c | 81 +++++++++++++++++++++------------ sound/usb/mixer_scarlett_gen2.h | 2 +- 3 files changed, 53 insertions(+), 32 deletions(-)
Signature · 1 line
2.31.1
PATCH 1/2 ALSA: usb-audio: scarlett2: Fix device hang with ehci-pci
Use usb_rcvctrlpipe() not usb_sndctrlpipe() for USB control input in the Scarlett Gen 2 mixer driver. This fixes the device hang during initialisation when used with the ehci-pci host driver.
--- sound/usb/mixer_scarlett_gen2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/usb/mixer_scarlett_gen2.c +1 -1
@@ -635,7 +635,7 @@ static int scarlett2_usb(/* send a second message to get the response */ err = snd_usb_ctl_msg(mixer->chip->dev, - usb_sndctrlpipe(mixer->chip->dev, 0), + usb_rcvctrlpipe(mixer->chip->dev, 0), SCARLETT2_USB_VENDOR_SPECIFIC_CMD_RESP, USB_RECIP_INTERFACE | USB_TYPE_CLASS | USB_DIR_IN, 0,
Signature · 1 line
2.31.1
PATCH 2/2 ALSA: usb-audio: scarlett2: Improve driver startup messages
In reply to Geoffrey D. BennettAdd separate init function to call the existing controls_create function so a custom error can be displayed if initialisation fails.
Use info level instead of error for notifications.
Display the VID/PID so device_setup is targeted to the right device.
Display "enabled" message to easily confirm that the driver is loaded.
--- sound/usb/mixer_quirks.c | 2 +- sound/usb/mixer_scarlett_gen2.c | 79 +++++++++++++++++++++------------ sound/usb/mixer_scarlett_gen2.h | 2 +- 3 files changed, 52 insertions(+), 31 deletions(-)
sound/usb/mixer_quirks.c +1 -1
@@ -3017,7 +3017,7 @@ int snd_usb_mixer_apply_create_quirk(struct usb_mixer_interface *mixer)case USB_ID (0x1235 ,0x8203 ):/* Focusrite Scarlett 6i6 2nd Gen */ case USB_ID (0x1235 ,0x8204 ):/* Focusrite Scarlett 18i8 2nd Gen */ case USB_ID (0x1235 ,0x8201 ):/* Focusrite Scarlett 18i20 2nd Gen */ - err =snd_scarlett_gen2_controls_create (mixer); + err =snd_scarlett_gen2_init (mixer);break ;case USB_ID (0x041e ,0x323b ):/* Creative Sound Blaster E1 */
sound/usb/mixer_scarlett_gen2.c +50 -29
91 lines not on this page · raw message
sound/usb/mixer_scarlett_gen2.h +1 -1
@@ -2,6 +2,6 @@#ifndef __USB_MIXER_SCARLETT_GEN2_H#define __USB_MIXER_SCARLETT_GEN2_H -int snd_scarlett_gen2_controls_create (struct usb_mixer_interface *mixer); +int snd_scarlett_gen2_init (struct usb_mixer_interface *mixer);#endif /* __USB_MIXER_SCARLETT_GEN2_H */
Signature · 1 line
2.31.1
Takashi Iwai
AppliedQuoted 8 lines · Geoffrey D. Bennett
This patchset fixes a show-stopper bug with the Scarlett Gen 2 mixer driver not working with the ehci-pci host driver, and improves the user experience with better driver startup messages.
Patch 1: Fixes the driver hanging the device by using the correct direction pipe now.
Quoted 8 lines
Patch 2: Improves the user experience with more specific enabling instructions, positive feedback when it is enabled or if initialisation fails. The previous instructions were incomplete and didn't confirm that the driver was enabled.
#Cc: [email protected] please (sorry, not sure if I should be sending this there myself or if it gets added by Takashi after review?)
No problem, I added manually at applying.
Quoted 4 lines
Geoffrey D. Bennett (2):
ALSA: usb-audio: scarlett2: Fix device hang with ehci-pci
ALSA: usb-audio: scarlett2: Improve driver startup messages
Applied both patches now. Thanks.
Takashi