Skip to contentSkip to conversation

ALSA: snd-usb-usx2y: fix start frame mask

PATCH In review Daniel Mack 3 participants 5 messages Oct 2, 2013 – Oct 3, 2013 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: snd-usb-usx2y: fix start frame mask

This patch is based on a change proposed by Guido Aulisi in a discussion on LAU which can be followed here:

http://linuxaudio.org/mailarchive/lau/2013/5/20/200177

---
 sound/usb/usx2y/usbusx2yaudio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/usb/usx2y/usbusx2yaudio.c +1 -1
index 63fb521..cd16fcc 100644
@@ -328,7 +328,7 @@ static void i_usX2Y_urb_complete(struct urb *urb)
 		usX2Y_error_urb_status(usX2Y, subs, urb);
 		return;
 	}
-	if (likely((urb->start_frame & 0xFFFF) == (usX2Y->wait_iso_frame & 0xFFFF)))
+	if (likely((urb->start_frame & 0x03FF) == (usX2Y->wait_iso_frame & 0x03FF)))
 		subs->completed_urb = urb;
 	else {
 		usX2Y_error_sequence(usX2Y, subs, urb);
Signature · 1 line
1.8.3.1
#1 lore raw

At Wed, 2 Oct 2013 15:39:57 +0200,

Quoted 10 lines · Daniel Mack

This patch is based on a change proposed by Guido Aulisi in a discussion on LAU which can be followed here:

http://linuxaudio.org/mailarchive/lau/2013/5/20/200177

Why this fixes the issue at all?
There is no explanation in the thread.

If any, the sanity check there is simply bogus for ehci, and it'd be better to get rid of it completely.

thanks,

Takashi

Quoted 20 lines
---
 sound/usb/usx2y/usbusx2yaudio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/usb/usx2y/usbusx2yaudio.c +1 -1
index 63fb521..cd16fcc 100644
@@ -328,7 +328,7 @@ static void i_usX2Y_urb_complete(struct urb *urb)
 		usX2Y_error_urb_status(usX2Y, subs, urb);
 		return;
 	}
-	if (likely((urb->start_frame & 0xFFFF) == (usX2Y->wait_iso_frame & 0xFFFF)))
+	if (likely((urb->start_frame & 0x03FF) == (usX2Y->wait_iso_frame & 0x03FF)))
 		subs->completed_urb = urb;
 	else {
 		usX2Y_error_sequence(usX2Y, subs, urb);
Signature · 1 line
1.8.3.1
#2 lore raw
Quoted 8 lines · Takashi Iwai

At Wed, 2 Oct 2013 15:39:57 +0200,

Quoted 6 lines · Daniel Mack

This patch is based on a change proposed by Guido Aulisi in a discussion on LAU which can be followed here:

http://linuxaudio.org/mailarchive/lau/2013/5/20/200177

Quoted 7 lines
Quoted 4 lines

Why this fixes the issue at all?
There is no explanation in the thread.

I have no idea of this driver.

Quoted 2 lines

If any, the sanity check there is simply bogus for ehci, and it'd be better to get rid of it completely.

You're right. I guess, however, that there was a reason to add the code in the first place.

Anyway, I'll send another patch that does the removal.

Thanks,
Daniel

#3 lore raw

Hi,
I saw this thread only today.
if I remember well, that patch worked because the check wrapped around 03ff, but in the end I removed that check totally.
I haven't used my Tascam US122 since may 2013, because I work with an RME Raydat in my studio and I used the Tascam only for live recording. If you want, I can do some other testing on my US122.
Ciao
Guido Aulisi

2013/10/2 Daniel Mack <[email protected]>:

Quoted 30 lines · Takashi Iwai
Quoted 8 lines

At Wed, 2 Oct 2013 15:39:57 +0200,

Quoted 6 lines · Daniel Mack

This patch is based on a change proposed by Guido Aulisi in a discussion on LAU which can be followed here:

http://linuxaudio.org/mailarchive/lau/2013/5/20/200177

Quoted 7 lines
Quoted 4 lines

Why this fixes the issue at all?
There is no explanation in the thread.

I have no idea of this driver.

Quoted 2 lines

If any, the sanity check there is simply bogus for ehci, and it'd be better to get rid of it completely.

You're right. I guess, however, that there was a reason to add the code in the first place.

Anyway, I'll send another patch that does the removal.

Thanks,
Daniel

#4 lore raw
Quoted 4 lines · Guido Aulisi

Hi,
I saw this thread only today.
if I remember well, that patch worked because the check wrapped around 03ff, but in the end I removed that check totally.

That's what the second version of my patch also does.

Next time, when detecting such problems, please consider sending a patch to alsa-devel, so fixes make it to the users eventually :)

Thanks,
Daniel