From mboxrd@z Thu Jan 1 00:00:00 1970 From: Clemens Ladisch Subject: Re: how to update hw_ptr and appl_ptr Date: Tue, 26 Jun 2012 14:27:04 +0200 Message-ID: <4FE9AA98.7000307@ladisch.de> References: <4FE98239.7050908@ladisch.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by alsa0.perex.cz (Postfix) with ESMTP id 438C92466D for ; Tue, 26 Jun 2012 14:27:40 +0200 (CEST) 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: Zhen Fu Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org Zhen Fu wrote: > when DMA handler called snd_pcm_period_elapsed, so I want to know how > about update hw_ptr in ALSA. snd_pcm_period_elapsed() calls snd_pcm_update_hw_ptr0(), which calls your driver's .pointer callback. The value returned by that callback essentially is the hw_ptr (although it doesn't wrap around at the end of the buffer). Why do you care about hw_ptr? Regards, Clemens