From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: pcm_oss: Can period_bytes - buffer_used be less than 0? Date: Thu, 05 Mar 2009 08:57:08 +0100 Message-ID: References: <49AE9F07.1000904@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 mx1.suse.de (cantor.suse.de [195.135.220.2]) by alsa0.perex.cz (Postfix) with ESMTP id 827E41037FC for ; Thu, 5 Mar 2009 08:57:08 +0100 (CET) In-Reply-To: <49AE9F07.1000904@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: Roel Kluin Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Wed, 04 Mar 2009 16:32:23 +0100, Roel Kluin wrote: > > vi sound/core/oss/pcm_oss.c +1572 (in linus' git tree) and note: > > static int snd_pcm_oss_sync(struct snd_pcm_oss_file *pcm_oss_file) > { > ... > size_t size; > ... :1608 > size = runtime->oss.period_bytes - runtime->oss.period_ptr; > > can this period_bytes - buffer_used become less than 0? You mean "period_bytes - period_ptr"? Then no, period_ptr is always smaller than period_bytes. Takashi