From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: full/half duplex support Date: Fri, 19 Nov 2004 13:13:26 +0100 Message-ID: References: <1100801204.490.4.camel@wonder> Mime-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: <1100801204.490.4.camel@wonder> Sender: alsa-devel-admin@lists.sourceforge.net Errors-To: alsa-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: Luuk van Dijk Cc: alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org At 18 Nov 2004 19:06:45 +0100, Luuk van Dijk wrote: > > On Thu, 2004-11-18 at 14:17, Takashi Iwai wrote: > > At Mon, 15 Nov 2004 17:03:21 +0100, > > Luuk van Dijk wrote: > > > > > Sorry, the situation is not clear for me. > > Do you mean substream as the ALSA term? > > yes. > > > So, you have two or more substreams assigned to a single PCM device, > > and the DMAs are free-running when the substreams are unused? > > yes, one capture and one playback substream, both of 2,4,6 or 8 > channels. when one of the two is not used the dma is free running and I > disable its irq's. the problem is: they have to be started and stopped > simultaneously and cannot be paused. > > i think the problem would be solved if the mid layer would just accept > the current pointer, and adjust its communication to userspace based on > that instead of trying to force the dma to sync with its idea of what it > should be. but I could be talking out of my *ss here, since I'm > relatively new to alsa. (this is my first alsa driver :-) Hmm, I don't understand your proposal here. AFAIUC, the problem is that the trigger callback is called twice, for playback and capture, on the full-duplex mode. Basically ALSA assumes that the playback and the capture streams are accessible independently, so no such restriction is implemented (yet). If my understanding is right -- I'd recommend to add a code in the trigger callback just to check whether another stream has been already triggered, then simply ignore the second trigger call. Also, it'd be better to provide the sync start option so that the full-duplex app triggers only once. Takashi ------------------------------------------------------- This SF.Net email is sponsored by: InterSystems CACHE FREE OODBMS DOWNLOAD - A multidimensional database that combines robust object and relational technologies, making it a perfect match for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8