From: Takashi Iwai Subject: Re: snd_pcm_runtime.buffer_size question Date: Wed, 11 Feb 2009 18:27:03 +0100 Message-ID: References: <49930907.2090108@klingt.org> 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 mx1.suse.de (ns.suse.de [195.135.220.2]) by alsa0.perex.cz (Postfix) with ESMTP id 8680B10380A for ; Wed, 11 Feb 2009 18:27:04 +0100 (CET) In-Reply-To: <49930907.2090108@klingt.org> 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: Tim Blechmann Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Wed, 11 Feb 2009 18:21:11 +0100, Tim Blechmann wrote: > > hi all, > i am currently fighting with the snd_pcm_runtime.buffer_size. how is the > value defined? > > i would expect: > channels * periods * period_size * sample_bits/8 > (in my case 64*5*128*3) > > however in the code, i am working on, it seems to be: > periods * period_size > (in my case 5*128) > > am i missing something obvious? There is a difference between buffer_size and buffer_bytes. The former is in "frame" unit while the latter is in bytes. In ALSA, 1 frame corresponds to (channels*sample_bits/8) bytes. Takashi