Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* High-bandwidth/multiple transactions per microframe in usb audio?
@ 2020-04-24  9:42 Pavel Hofman
  2020-04-25 12:06 ` Alexander Tsoy
  0 siblings, 1 reply; 6+ messages in thread
From: Pavel Hofman @ 2020-04-24  9:42 UTC (permalink / raw)
  To: alsa-devel@alsa-project.org

Hi,

Please does the current USB audio driver support multiple transactions
per microframe (high-bandwidth mode)? I could not find it in endpoint.c
but it may be there or somewhere else :-)

Thanks a lot,

Pavel.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: High-bandwidth/multiple transactions per microframe in usb audio?
  2020-04-24  9:42 High-bandwidth/multiple transactions per microframe in usb audio? Pavel Hofman
@ 2020-04-25 12:06 ` Alexander Tsoy
  2020-04-25 18:06   ` Pavel Hofman
  0 siblings, 1 reply; 6+ messages in thread
From: Alexander Tsoy @ 2020-04-25 12:06 UTC (permalink / raw)
  To: Pavel Hofman, alsa-devel@alsa-project.org

В Пт, 24/04/2020 в 11:42 +0200, Pavel Hofman пишет:
> Hi,
> 
> Please does the current USB audio driver support multiple
> transactions
> per microframe (high-bandwidth mode)? I could not find it in
> endpoint.c
> but it may be there or somewhere else :-)

This should be transparent for the driver. See usb_submit_urb()
function from drivers/usb/core/urb.c. It allows packets larger than
1024 for isochronous transfers over High Speed and Super Speed buses.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: High-bandwidth/multiple transactions per microframe in usb audio?
  2020-04-25 12:06 ` Alexander Tsoy
@ 2020-04-25 18:06   ` Pavel Hofman
  2020-04-25 19:50     ` Alexander Tsoy
  0 siblings, 1 reply; 6+ messages in thread
From: Pavel Hofman @ 2020-04-25 18:06 UTC (permalink / raw)
  To: Alexander Tsoy, alsa-devel@alsa-project.org

Dne 25. 04. 20 v 14:06 Alexander Tsoy napsal(a):
> В Пт, 24/04/2020 в 11:42 +0200, Pavel Hofman пишет:
>> Hi,
>>
>> Please does the current USB audio driver support multiple
>> transactions
>> per microframe (high-bandwidth mode)? I could not find it in
>> endpoint.c
>> but it may be there or somewhere else :-)
> 
> This should be transparent for the driver. See usb_submit_urb()
> function from drivers/usb/core/urb.c. It allows packets larger than
> 1024 for isochronous transfers over High Speed and Super Speed buses.

Alexander, thanks a lot for the info and hint, indeed at
https://github.com/torvalds/linux/blob/master/drivers/usb/core/urb.c#L444

Best regards,

Pavel.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: High-bandwidth/multiple transactions per microframe in usb audio?
  2020-04-25 18:06   ` Pavel Hofman
@ 2020-04-25 19:50     ` Alexander Tsoy
  2020-04-26  8:55       ` Pavel Hofman
  0 siblings, 1 reply; 6+ messages in thread
From: Alexander Tsoy @ 2020-04-25 19:50 UTC (permalink / raw)
  To: Pavel Hofman, alsa-devel@alsa-project.org

В Сб, 25/04/2020 в 20:06 +0200, Pavel Hofman пишет:
> Dne 25. 04. 20 v 14:06 Alexander Tsoy napsal(a):
> > В Пт, 24/04/2020 в 11:42 +0200, Pavel Hofman пишет:
> > > Hi,
> > > 
> > > Please does the current USB audio driver support multiple
> > > transactions
> > > per microframe (high-bandwidth mode)? I could not find it in
> > > endpoint.c
> > > but it may be there or somewhere else :-)
> > 
> > This should be transparent for the driver. See usb_submit_urb()
> > function from drivers/usb/core/urb.c. It allows packets larger than
> > 1024 for isochronous transfers over High Speed and Super Speed
> > buses.
> 
> Alexander, thanks a lot for the info and hint, indeed at
> https://github.com/torvalds/linux/blob/master/drivers/usb/core/urb.c#L444
> 

And I just noticed that USB-audio driver can't properly parse max
packet size for SuperSpeed and SuperSpeed+ devices yet. See
audio_format_alloc_init().


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: High-bandwidth/multiple transactions per microframe in usb audio?
  2020-04-25 19:50     ` Alexander Tsoy
@ 2020-04-26  8:55       ` Pavel Hofman
  2020-04-27 14:05         ` Takashi Iwai
  0 siblings, 1 reply; 6+ messages in thread
From: Pavel Hofman @ 2020-04-26  8:55 UTC (permalink / raw)
  To: Alexander Tsoy, alsa-devel@alsa-project.org

Dne 25. 04. 20 v 21:50 Alexander Tsoy napsal(a):
> В Сб, 25/04/2020 в 20:06 +0200, Pavel Hofman пишет:
> 
> And I just noticed that USB-audio driver can't properly parse max
> packet size for SuperSpeed and SuperSpeed+ devices yet. See
> audio_format_alloc_init().

Very good catch. IIUC there are two basically equivalent calculations
for HighSpeed -

https://elixir.bootlin.com/linux/v5.6.7/source/drivers/usb/core/urb.c#L445


https://elixir.bootlin.com/linux/v5.6.7/source/sound/usb/stream.c#L691


And audio_format_alloc_init missing the sections for SS, SS+ in
usb_submit_urb . Perhpas a common method to make the calculation for all
cases would make it more robust?

Thanks,

Pavel.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: High-bandwidth/multiple transactions per microframe in usb audio?
  2020-04-26  8:55       ` Pavel Hofman
@ 2020-04-27 14:05         ` Takashi Iwai
  0 siblings, 0 replies; 6+ messages in thread
From: Takashi Iwai @ 2020-04-27 14:05 UTC (permalink / raw)
  To: Pavel Hofman; +Cc: Alexander Tsoy, alsa-devel@alsa-project.org

On Sun, 26 Apr 2020 10:55:32 +0200,
Pavel Hofman wrote:
> 
> Dne 25. 04. 20 v 21:50 Alexander Tsoy napsal(a):
> > В Сб, 25/04/2020 в 20:06 +0200, Pavel Hofman пишет:
> > 
> > And I just noticed that USB-audio driver can't properly parse max
> > packet size for SuperSpeed and SuperSpeed+ devices yet. See
> > audio_format_alloc_init().
> 
> Very good catch. IIUC there are two basically equivalent calculations
> for HighSpeed -
> 
> https://elixir.bootlin.com/linux/v5.6.7/source/drivers/usb/core/urb.c#L445
> 
> 
> https://elixir.bootlin.com/linux/v5.6.7/source/sound/usb/stream.c#L691
> 
> 
> And audio_format_alloc_init missing the sections for SS, SS+ in
> usb_submit_urb . Perhpas a common method to make the calculation for all
> cases would make it more robust?

Yes, a common USB helper function sounds like a good idea.


thanks,

Takashi

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-04-27 14:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-24  9:42 High-bandwidth/multiple transactions per microframe in usb audio? Pavel Hofman
2020-04-25 12:06 ` Alexander Tsoy
2020-04-25 18:06   ` Pavel Hofman
2020-04-25 19:50     ` Alexander Tsoy
2020-04-26  8:55       ` Pavel Hofman
2020-04-27 14:05         ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox