* [PATCH] ALSA: snd-usb-usx2y: remove bogus frame check
@ 2013-10-02 13:54 Daniel Mack
2013-10-02 15:43 ` Takashi Iwai
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Mack @ 2013-10-02 13:54 UTC (permalink / raw)
To: alsa-devel; +Cc: tiwai, guido.aulisi, nicholas.bailey, Daniel Mack
The frame check in i_usX2Y_urb_complete() is bogus and produces false
positives as described in this LAU thread:
http://linuxaudio.org/mailarchive/lau/2013/5/20/200177
This code removes the check code entirely.
Cc: fzu@wemgehoertderstaat.de
Reported-by: Dr Nicholas J Bailey <nicholas.bailey@glasgow.ac.uk>
Suggested-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Daniel Mack <zonque@gmail.com>
---
sound/usb/usx2y/usbusx2yaudio.c | 22 +++-------------------
1 file changed, 3 insertions(+), 19 deletions(-)
diff --git a/sound/usb/usx2y/usbusx2yaudio.c b/sound/usb/usx2y/usbusx2yaudio.c
index 63fb521..6234a51 100644
--- a/sound/usb/usx2y/usbusx2yaudio.c
+++ b/sound/usb/usx2y/usbusx2yaudio.c
@@ -299,19 +299,6 @@ static void usX2Y_error_urb_status(struct usX2Ydev *usX2Y,
usX2Y_clients_stop(usX2Y);
}
-static void usX2Y_error_sequence(struct usX2Ydev *usX2Y,
- struct snd_usX2Y_substream *subs, struct urb *urb)
-{
- snd_printk(KERN_ERR
-"Sequence Error!(hcd_frame=%i ep=%i%s;wait=%i,frame=%i).\n"
-"Most probably some urb of usb-frame %i is still missing.\n"
-"Cause could be too long delays in usb-hcd interrupt handling.\n",
- usb_get_current_frame_number(usX2Y->dev),
- subs->endpoint, usb_pipein(urb->pipe) ? "in" : "out",
- usX2Y->wait_iso_frame, urb->start_frame, usX2Y->wait_iso_frame);
- usX2Y_clients_stop(usX2Y);
-}
-
static void i_usX2Y_urb_complete(struct urb *urb)
{
struct snd_usX2Y_substream *subs = urb->context;
@@ -328,12 +315,9 @@ 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)))
- subs->completed_urb = urb;
- else {
- usX2Y_error_sequence(usX2Y, subs, urb);
- return;
- }
+
+ subs->completed_urb = urb;
+
{
struct snd_usX2Y_substream *capsubs = usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE],
*playbacksubs = usX2Y->subs[SNDRV_PCM_STREAM_PLAYBACK];
--
1.8.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ALSA: snd-usb-usx2y: remove bogus frame check
2013-10-02 13:54 [PATCH] ALSA: snd-usb-usx2y: remove bogus frame check Daniel Mack
@ 2013-10-02 15:43 ` Takashi Iwai
2013-10-02 15:49 ` Daniel Mack
0 siblings, 1 reply; 3+ messages in thread
From: Takashi Iwai @ 2013-10-02 15:43 UTC (permalink / raw)
To: Daniel Mack; +Cc: alsa-devel, guido.aulisi, nicholas.bailey
At Wed, 2 Oct 2013 15:54:28 +0200,
Daniel Mack wrote:
>
> The frame check in i_usX2Y_urb_complete() is bogus and produces false
> positives as described in this LAU thread:
>
> http://linuxaudio.org/mailarchive/lau/2013/5/20/200177
>
> This code removes the check code entirely.
>
> Cc: fzu@wemgehoertderstaat.de
> Reported-by: Dr Nicholas J Bailey <nicholas.bailey@glasgow.ac.uk>
> Suggested-by: Takashi Iwai <tiwai@suse.de>
> Signed-off-by: Daniel Mack <zonque@gmail.com>
It's referred in usx2yhwdeppcm.c, too (the file is included there).
Yeah, I know that the driver code is fairly complex (IOW ugly). IIRC,
the hwdeppcm mmap is also broken, and we need yet another fix.
Sigh...
thanks,
Takashi
> ---
> sound/usb/usx2y/usbusx2yaudio.c | 22 +++-------------------
> 1 file changed, 3 insertions(+), 19 deletions(-)
>
> diff --git a/sound/usb/usx2y/usbusx2yaudio.c b/sound/usb/usx2y/usbusx2yaudio.c
> index 63fb521..6234a51 100644
> --- a/sound/usb/usx2y/usbusx2yaudio.c
> +++ b/sound/usb/usx2y/usbusx2yaudio.c
> @@ -299,19 +299,6 @@ static void usX2Y_error_urb_status(struct usX2Ydev *usX2Y,
> usX2Y_clients_stop(usX2Y);
> }
>
> -static void usX2Y_error_sequence(struct usX2Ydev *usX2Y,
> - struct snd_usX2Y_substream *subs, struct urb *urb)
> -{
> - snd_printk(KERN_ERR
> -"Sequence Error!(hcd_frame=%i ep=%i%s;wait=%i,frame=%i).\n"
> -"Most probably some urb of usb-frame %i is still missing.\n"
> -"Cause could be too long delays in usb-hcd interrupt handling.\n",
> - usb_get_current_frame_number(usX2Y->dev),
> - subs->endpoint, usb_pipein(urb->pipe) ? "in" : "out",
> - usX2Y->wait_iso_frame, urb->start_frame, usX2Y->wait_iso_frame);
> - usX2Y_clients_stop(usX2Y);
> -}
> -
> static void i_usX2Y_urb_complete(struct urb *urb)
> {
> struct snd_usX2Y_substream *subs = urb->context;
> @@ -328,12 +315,9 @@ 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)))
> - subs->completed_urb = urb;
> - else {
> - usX2Y_error_sequence(usX2Y, subs, urb);
> - return;
> - }
> +
> + subs->completed_urb = urb;
> +
> {
> struct snd_usX2Y_substream *capsubs = usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE],
> *playbacksubs = usX2Y->subs[SNDRV_PCM_STREAM_PLAYBACK];
> --
> 1.8.3.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ALSA: snd-usb-usx2y: remove bogus frame check
2013-10-02 15:43 ` Takashi Iwai
@ 2013-10-02 15:49 ` Daniel Mack
0 siblings, 0 replies; 3+ messages in thread
From: Daniel Mack @ 2013-10-02 15:49 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel, guido.aulisi, nicholas.bailey
On 02.10.2013 17:43, Takashi Iwai wrote:
> At Wed, 2 Oct 2013 15:54:28 +0200,
> Daniel Mack wrote:
>>
>> The frame check in i_usX2Y_urb_complete() is bogus and produces false
>> positives as described in this LAU thread:
>>
>> http://linuxaudio.org/mailarchive/lau/2013/5/20/200177
>>
>> This code removes the check code entirely.
>>
>> Cc: fzu@wemgehoertderstaat.de
>> Reported-by: Dr Nicholas J Bailey <nicholas.bailey@glasgow.ac.uk>
>> Suggested-by: Takashi Iwai <tiwai@suse.de>
>> Signed-off-by: Daniel Mack <zonque@gmail.com>
>
> It's referred in usx2yhwdeppcm.c, too (the file is included there).
Eek. I missed that. Thanks for the heads-up.
> Yeah, I know that the driver code is fairly complex (IOW ugly). IIRC,
> the hwdeppcm mmap is also broken, and we need yet another fix.
> Sigh...
I don't know if Karsten (cc) is still maintaning this piece of code :-/
Daniel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-10-02 15:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-02 13:54 [PATCH] ALSA: snd-usb-usx2y: remove bogus frame check Daniel Mack
2013-10-02 15:43 ` Takashi Iwai
2013-10-02 15:49 ` Daniel Mack
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).