From: Takashi Iwai Subject: Re: Understanding _snd_pcm_channel_area Struct (PCM Interface)! Date: Tue, 30 Jun 2009 17:13:03 +0200 Message-ID: References: <4A3DEAF9.80508@free.fr> <4A406AD3.2050002@gmail.com> <4A458A6B.2070305@gmail.com> <4A4A23D4.4090505@gmail.com> <4A4A28E1.8040201@gmail.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 3C248103837 for ; Tue, 30 Jun 2009 17:13:03 +0200 (CEST) In-Reply-To: <4A4A28E1.8040201@gmail.com> 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: Guilherme Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Tue, 30 Jun 2009 12:01:53 -0300, Guilherme wrote: > > Hum... > > so .. the code > > if ((areas[chn].step % 16) !=0 ) > > is because a 16bits format's been used. > > If I wanted a 32bits sample format I should change that for > if ((areas[chn].step % 32) !=0 ) ?? Depends. The step field doesn't specify the sample format. It specifies the bits to the next sample of the given channel. For such a purpose, checking the sample format bits via snd_pcm_format_width() or snd_pcm_format_physical_width() would be more suitable. > and the offset for the first doen's need any changes, is it? > > Just a opinion about all this, I think that alsa developers should design graphs for these things, as has in gstreamer documentation. > It is a lot easer to understand that way. > > It is because I dont understand very well yet, but as I am going to work with sound stuff especially in linux environment, Ill be very soon offering help for this! Well, usually you don't have to care about the channel_info. It's just for mmap, and unless you really do want it inevitably, the mmap access isn't needed. Takashi