alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Clemens Ladisch <clemens@ladisch.de>
To: Sarah Sharp <sarah.a.sharp@linux.intel.com>,
	Karsten Wiese <fzu@wemgehoertderstaat.de>
Cc: alsa-devel@alsa-project.org,
	Christoph Lameter <cl@linux-foundation.org>,
	Takashi Iwai <tiwai@suse.de>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	Joe Perches <joe@perches.com>, Tejun Heo <tj@kernel.org>
Subject: Re: Use of start_frame in usbusx2yaudio.c
Date: Wed, 12 May 2010 14:51:52 +0200	[thread overview]
Message-ID: <4BEAA468.7030606@ladisch.de> (raw)
In-Reply-To: <20100512051058.GA32459@xanatos>

Sarah Sharp wrote:
> Are there any drivers in the kernel that set urb->start_frame on every
> URB?
> 
> Could those drivers handle it if only the first URB they submitted to
> the host controller was scheduled for that frame ID, and all the rest of
> the URBs were scheduled ASAP?
> 
> I see there are three drivers that set start_frame (while not setting
> URB_ISO_ASAP):
>  - drivers/isdn/hisax/st5481_d.c
>  - drivers/usb/core/devio.c
>  - sound/usb/usx2y/usbusx2yaudio.c
> 
> I'm not really sure what usbusx2yaudio.c is doing.  I think when one URB
> completes, it sets the next URB's start_frame to the previous URB's
> start_frame plus the number of URBs (2 by default) times the number of
> packets (4 by default).  Isn't this basically like setting URB_ISO_ASAP?

For an audio driver, anything except ASAP (or the equivalent computation)
would not make sense because then there would be a gap in the audio
output.

> What is usbusx2yaudio.c attempting to do?  I've tried to get an overall
> picture of what it expects the isochronous scheduling to look like, but
> I'm finding the driver a bit hard to read.

AFAIK it just wants a continuous stream of packets, like the other
audio drivers.

> I really can't tell what fall back method is if this submission fails.

So I guess xHCI does not support start_frame?  A few other, seldom-used
HC drivers get away with silently ignoring start_frame:

ohci-hcd.c:             /* yes, only URB_ISO_ASAP is supported, and
                         * urb->start_frame is never used as input.
                         */
ehci-sched.c: /* NOTE: assumes URB_ISO_ASAP, to limit complexity/bugs */
 

Regards,
Clemens

  reply	other threads:[~2010-05-12 12:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-12  5:10 Use of start_frame in usbusx2yaudio.c Sarah Sharp
2010-05-12 12:51 ` Clemens Ladisch [this message]
2010-05-12 14:54 ` Alan Stern
     [not found]   ` <Pine.LNX.4.44L0.1005121051040.1962-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2010-05-12 15:21     ` Sarah Sharp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BEAA468.7030606@ladisch.de \
    --to=clemens@ladisch.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=cl@linux-foundation.org \
    --cc=fzu@wemgehoertderstaat.de \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=sarah.a.sharp@linux.intel.com \
    --cc=tiwai@suse.de \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).