From mboxrd@z Thu Jan 1 00:00:00 1970 From: Abramo Bagnara Subject: Re: PCM API update Date: Sat, 12 Oct 2002 12:24:08 +0200 Sender: alsa-devel-admin@lists.sourceforge.net Message-ID: <3DA7F848.CF341696@libero.it> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from smtp2.libero.it (smtp2.libero.it [193.70.192.52]) by alsa.alsa-project.org (8.9.3/8.9.3/SuSE Linux 8.9.3-0.1) with ESMTP id MAA29837 for ; Sat, 12 Oct 2002 12:25:42 +0200 Errors-To: alsa-devel-admin@lists.sourceforge.net List-Help: List-Post: List-Subscribe: , List-Unsubscribe: , List-Archive: To: Jaroslav Kysela Cc: ALSA development List-Id: alsa-devel@alsa-project.org Jaroslav Kysela wrote: > > On Sat, 12 Oct 2002, Abramo Bagnara wrote: > > > Jaroslav Kysela wrote: > > > > > > > > > In this case, I propose to change snd_pcm_avail() to snd_pcm_hwsync() > > > function with description: "synchronize r/w pointers with hardware". > > > Really, after some thinking, the return value from snd_pcm_avail() cannot > > > be used for nothing serious. I simply don't like that delay() functions > > > do more arithmetic than necessary. Overdesign has been criticized in this > > > list, too. > > > > Let examine kernel level: snd_pcm_{plaback,capture}_delay do a > > snd_pcm_update_hw_ptr and a snd_pcm_{playback_hw,capture}_avail (that's > > only a wrap safe difference). > > > > Are you sure you want to add another ioctl and another API function in > > all the PCM classes just to avoid a subtraction? > > You've already noted that delay() expression might be more complex, so the > code path eats more CPU than needed for sync operation. Actually this might be true in future, although it's hard to know if your proposal will worth that change. If you believe so, I've no further objections. -- Abramo Bagnara mailto:abramo.bagnara@libero.it Opera Unica Phone: +39.546.656023 Via Emilia Interna, 140 48014 Castel Bolognese (RA) - Italy ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf