All of lore.kernel.org
 help / color / mirror / Atom feed
From: Clemens Ladisch <clemens@ladisch.de>
To: Amit Nagal <helloin.amit@gmail.com>
Cc: alsa-user@lists.sourceforge.net, alsa-devel@alsa-project.org
Subject: Re: regarding setting of fragment size in usbaudio driver
Date: Mon, 13 Dec 2010 14:38:24 +0100	[thread overview]
Message-ID: <4D0621D0.1040403@ladisch.de> (raw)
In-Reply-To: <AANLkTi=S732=Wj572Th860PpBYE0fkJ97JH2CwitZ4ah@mail.gmail.com>

(please don't top-post)

Amit Nagal wrote:
> i used SNDCTL_DSP_GETBLKSIZE ioctl to find the fragment size of driver
> . i found it to be 16k .
> 
> 1) now if the application reads 4k data from userspace , read call
> will remain blocked for audio driver's fragment size usb data read (
> 16k)
>  or app_request_size(4k) ?

If, when read() is called, there is enough data in the buffer, it will
return that data and return immediately.  Otherwise, it will wait for
the hardware to reach the next period boundary (in OSS: fragment
boundary) and try again.

If you want to have shorter waits, use lower fragment sizes.


Regards,
Clemens

  reply	other threads:[~2010-12-13 13:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-11  9:16 regarding setting of fragment size in usbaudio driver Amit Nagal
2010-12-13  9:04 ` Clemens Ladisch
2010-12-13  9:56   ` Amit Nagal
2010-12-13 13:38     ` Clemens Ladisch [this message]
2010-12-13 14:11       ` Amit Nagal
2010-12-14 16:23         ` Clemens Ladisch
     [not found]   ` <27661_1292234220_1292234220_AANLkTi=S732=Wj572Th860PpBYE0fkJ97JH2CwitZ4ah@mail.gmail.com>
2010-12-13 10:05     ` [Alsa-user] " Bill Unruh

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=4D0621D0.1040403@ladisch.de \
    --to=clemens@ladisch.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=alsa-user@lists.sourceforge.net \
    --cc=helloin.amit@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.