From mboxrd@z Thu Jan 1 00:00:00 1970 From: pl bossart Subject: Re: [PATCH] ALSA: add support for disabling period irq Date: Mon, 8 Nov 2010 15:43:15 -0600 Message-ID: References: <1288649573-31545-1-git-send-email-pierre-louis.bossart@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-yw0-f51.google.com (mail-yw0-f51.google.com [209.85.213.51]) by alsa0.perex.cz (Postfix) with ESMTP id 2F48F2441B for ; Mon, 8 Nov 2010 22:43:17 +0100 (CET) Received: by yws5 with SMTP id 5so4373130yws.38 for ; Mon, 08 Nov 2010 13:43:16 -0800 (PST) In-Reply-To: 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: Jaroslav Kysela Cc: Takashi Iwai , alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org done from the avail_update call invoked from an application. >> >> ok, so I re-implemented all the points found in the reviews except for >> this thread. There's already some code to see if we go beyond the >> buffer boundaries, so I am not sure what the 'linear position' means. > > Linear means that new hw_ptr must be always behind the previous hw_ptr. I got that. But there are already some checks in pcm_lib.c, /* new_hw_ptr might be lower than old_hw_ptr in case when */ /* pointer crosses the end of the ring buffer */ if (new_hw_ptr < old_hw_ptr) { hw_base += runtime->buffer_size; if (hw_base >= runtime->boundary) hw_base = 0; new_hw_ptr = hw_base + pos; } So do I need to add any additional checks? Or did I miss something in your discussion with Takashi? -Pierre