From mboxrd@z Thu Jan 1 00:00:00 1970 From: Clemens Ladisch Subject: Re: regarding setting of fragment size in usbaudio driver Date: Mon, 13 Dec 2010 14:38:24 +0100 Message-ID: <4D0621D0.1040403@ladisch.de> References: <4D05E19D.7010405@ladisch.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from out3.smtp.messagingengine.com (out3.smtp.messagingengine.com [66.111.4.27]) by alsa0.perex.cz (Postfix) with ESMTP id 83A0D245E2 for ; Mon, 13 Dec 2010 14:35:38 +0100 (CET) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Amit Nagal Cc: alsa-user@lists.sourceforge.net, alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org (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