From: Takashi Iwai Subject: Re: Couple of questions Date: Fri, 17 Mar 2006 11:13:32 +0100 Message-ID: References: <1142467271.9298.7.camel@localhost.localdomain> <1142552045.9236.9.camel@localhost.localdomain> <1142554597.9395.25.camel@mindpipe> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: Received: from mx1.suse.de (mail.suse.de [195.135.220.2]) by alsa.jcu.cz (ALSA's E-mail Delivery System) with ESMTP id DCE621C4 for ; Fri, 17 Mar 2006 11:13:47 +0100 (MET) In-Reply-To: <1142554597.9395.25.camel@mindpipe> 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: Lee Revell Cc: Adrian McMenamin , alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Thu, 16 Mar 2006 19:16:36 -0500, Lee Revell wrote: > > On Thu, 2006-03-16 at 23:34 +0000, Adrian McMenamin wrote: > > On Thu, 2006-03-16 at 11:42 +0100, Takashi Iwai wrote: > > > At Thu, 16 Mar 2006 00:01:11 +0000, > > > Adrian McMenamin wrote: > > > > > > > > If my driver declares this: > > > > > > > > .info = (SNDRV_PCM_INFO_NONINTERLEAVED), > > > > > > > > Can I expect samples to come in all left followed by all right, or how? > > > > > > Yes. It's the non-interleaved format (LLLLLLLL....RRRRRR.....). > > > > > Will the middle layer still copy over data in the same period size as > > for mono in this case? > > Yes. One 4 frame period interleaved is LRLRLRLR, non-interleaved > LLLLRRRR. The period size is same, but the copy is not done like LLLLRRRR. As default, the whole buffer is divided to number of channels. For example, using two channels, |LLLLLLL..|RRRRRRR....| |<--- buffer_size --->| and using six channels, |1111....|2222....|.....|6666....| |<-------- buffer_size --------->| where each channel has a length of (period_size * periods) samples. Unless the buffer size is changed, this assignment of each channel also isn't changed. The above is the default behavior. You can change the assignment as you like by defining proper copy and silence callback, too. For mmap, you need to define CHANNEL_INFO ioctl, too. Takashi ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642