From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: usb-audio: variable periodsize / nframes per callback can shorten latency times Date: Tue, 20 Aug 2002 12:55:32 +0200 Sender: alsa-devel-admin@lists.sourceforge.net Message-ID: References: Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII Return-path: Received: from gate.perex.cz (root@gate.perex.cz [194.212.165.105]) by alsa.alsa-project.org (8.9.3/8.9.3/SuSE Linux 8.9.3-0.1) with ESMTP id NAA07649 for ; Tue, 20 Aug 2002 13:00:36 +0200 Received: from Cantor.suse.de (ns.suse.de [213.95.15.193]) by gate.perex.cz (8.9.3/8.9.3/SuSE Linux 8.9.3-0.1) with ESMTP id NAA24568 for ; Tue, 20 Aug 2002 13:00:34 +0200 In-Reply-To: Errors-To: alsa-devel-admin@lists.sourceforge.net List-Help: List-Post: List-Subscribe: , List-Unsubscribe: , List-Archive: To: Tim Goetze Cc: Karsten Wiese , Alsa-Devel List-Id: alsa-devel@alsa-project.org At Tue, 20 Aug 2002 12:30:11 +0200 (CEST), Tim Goetze wrote: > > Takashi Iwai wrote: > > >> How can we implement the latency-optimal behaviour with alsa-driver > >> framework? > >> Can we implement something like a snd_1ms_elapsed() routine (called from > >> USB-interrupt), which in turn triggers a waiting app with the available > >> period size (which would be 44 or 45 frames for 44100Hz)? > >> I would like to see this in ALSA / JACK. > >> What do you think? > > > >hmm, it's not so easy, since this will break also the assumption of > >constant period "frames" by applications. if we introduce the > >time-based period size, it won't work as compatible as older one, > >e.g. jack wouldn't run properly if the period size changes > >dynamically. > >hence, this should be handled in a special case. > > With the current setup and cycle code for mmap'd IO (like Jack for > example does it), is it possible to use these devices at all? on 48kHz my usb speaker worked fine with 1ms or 2ms period size (not under high loads, though), since the frames per urb becomes integer in this case. on 44.1kHz xrun could happen. > What kind of hw/sw params, especially period size, should one set? the frequency aligned to 1000Hz. > Can one choose larger period sizes (45 frames/cycle is too tough for > a userspace process, at least on this box)? of course, depending on the kernel :) in theory, 1ms latency is enough possible. ciao, Takashi ------------------------------------------------------- This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE! https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390