ALSA: usb-audio: Fix implicit fb endpoint setup by quirk
PATCH 1/1 ALSA: usb-audio: Fix implicit fb endpoint setup by quirk
The commit a60945fd08e4 ("ALSA: usb-audio: move implicit fb quirks to separate function") introduced an error in the handling of quirks for implicit feedback endpoints. This commit fixes this.
If a quirk successfully sets up an implicit feedback endpoint, usb-audio no longer tries to find the implicit fb endpoint itself.
--- sound/usb/pcm.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
sound/usb/pcm.c +8 -1
@@ -314,6 +314,9 @@ static int search_roland_implicit_fb(struct usb_device *dev, int ifnum,return 0 ; } +/* Setup an implicit feedback endpoint from a quirk. Returns 0 if no quirk +* applies. Returns 1 if a quirk was found. +*/ static int set_sync_ep_implicit_fb_quirk(struct snd_usb_substream *subs, struct usb_device *dev, struct usb_interface_descriptor *altsd,
@@ -384,7 +387,7 @@ static int set_sync_ep_implicit_fb_quirk(struct snd_usb_substream *subs, subs->data_endpoint->sync_master = subs->sync_endpoint; -return 0 ; +return 1 ; } static int set_sync_endpoint(struct snd_usb_substream *subs,
@@ -423,6 +426,10 @@ static int set_sync_endpoint(struct snd_usb_substream *subs,if (err <0 )return err; +/* endpoint set by quirk */ +if (err >0 ) +return 0 ; +if (altsd->bNumEndpoints <2 )return 0 ;
Signature · 1 line
2.20.1
Quoted 9 lines · On Thu, 31 Jan 2019 15:32:35 +0100, [email protected] wrote:
The commit
a60945fd08e4("ALSA: usb-audio: move implicit fb quirks to separate function") introduced an error in the handling of quirks for implicit feedback endpoints. This commit fixes this.If a quirk successfully sets up an implicit feedback endpoint, usb-audio no longer tries to find the implicit fb endpoint itself.
Signed-off-by Manuel Reinhardt <[email protected]>
I seem to have overlooked this one, and will queue it.
BTW, did you hit actually a regression by the mentioned commit? Or is just a theoretical fix?
thanks,
Takashi
Am Donnerstag, den 07.02.2019, 08:24 +0100 schrieb Takashi Iwai:
Quoted 12 lines
Quoted 10 lines · On Thu, 31 Jan 2019 15:32:35 +0100, [email protected] wrote:
The commit
a60945fd08e4("ALSA: usb-audio: move implicit fb quirks to
separate function") introduced an error in the handling of quirks for
implicit feedback endpoints. This commit fixes this.If a quirk successfully sets up an implicit feedback endpoint, usb- audio
no longer tries to find the implicit fb endpoint itself.
Quoted 6 lines
Quoted 1 line
Signed-off-by Manuel Reinhardt <[email protected]>I seem to have overlooked this one, and will queue it.
BTW, did you hit actually a regression by the mentioned commit? Or is just a theoretical fix?
I am in the process of writing a quirk to support the MOTU Microbook II device. The fix I submitted is necessary for the device to work. I would be surprised if the fix doesn't also fix regressions with other devices that require the implicit fb quirk.
I will submit the rest of the code needed for Microbook II support soon. I mailed this patch first to become acquainted with the linux patch submission model.
Best,
Manuel