From mboxrd@z Thu Jan 1 00:00:00 1970 From: Raymond Yau Subject: Re: Duplicate wake-ups in pcm_lib.c Date: Wed, 20 Jan 2010 15:38:55 +0800 Message-ID: <4f3252891001192338r53b3847dq8f3bfab03cc8a914@mail.gmail.com> References: <6160a5130912231228g29669e4ctfef9ea8f42633120@mail.gmail.com> <6160a5131001062059i1ef74831p4210987579feb759@mail.gmail.com> <4f3252891001102011l603d30cdlbe2a14163bbc7405@mail.gmail.com> <4f3252891001122258j5c3bd7c5u7184cad199f5cf40@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-pz0-f184.google.com (mail-pz0-f184.google.com [209.85.222.184]) by alsa0.perex.cz (Postfix) with ESMTP id C84241037F2 for ; Wed, 20 Jan 2010 08:38:56 +0100 (CET) Received: by pzk14 with SMTP id 14so3041439pzk.23 for ; Tue, 19 Jan 2010 23:38:55 -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: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org 2010/1/13 Jaroslav Kysela > On Wed, 13 Jan 2010, Raymond Yau wrote: > > 2010/1/11 Jaroslav Kysela >> >> On Mon, 11 Jan 2010, Raymond Yau wrote: >>> >>> 2010/1/7 Jaroslav Kysela >>> >>>> >>>> On Wed, 6 Jan 2010, pl bossart wrote: >>>> >>>>> >>>>> >>>>> >>>>> The improved and more clean fix in now in my tree: >>>>> >>>>> >>>>> >>>>> >>>>> http://git.alsa-project.org/?p=alsa-kernel.git;a=commitdiff;h=1250932e48d3b698415b1f04775433cf1da688d6 >>>>> >>>>> Note that you should apply these 4 patches (in reverse order): >>>>> >>>>> 4: ALSA: pcm_lib - optimize wake_up() calls for PCM I/O >>>>> 3: ALSA: pcm_lib - cleanup & merge hw_ptr update functions >>>>> 2: ALSA: pcm_lib - add possibility to log last 10 DMA ring buffer >>>>> positions >>>>> 1: ALSA: pcm_lib.c - convert second xrun_debug() parameter to use >>>>> defines >>>>> >>>>> Patch #3 should definitely fix problems with large avail or delay >>>>> values >>>>> reported in PA. I finally figured the culprit (and decide to cleanup >>>>> all >>>>> relevant code rather do just another workaround). In other words, new >>>>> hw_ptr pointer should never be less than previous one now. >>>>> >>>>> Jaroslav >>>>> >>>>> - >>>>> >>>>> >>>>> using alsa-driver-1.0.22.1.1.g231e3.14.g812cb and Fedora 12 inside >>>> Virtual >>>> Box >>>> >>>> aplay -D plughw:0,0 /usr/share/sounds/alsa/*.wav >>>> >>>> "Front Left" sound as "Front Front Left" when playing "Front_left.wav" >>>> >>>> only when echo 4 > /proc/asound/card0/pcm0p/xrun_debug >>>> >>>> >>> Thanks for testing. >>> >>> It means that with other values is no sound generated? >>> >>> Could you use value 29 for xrun_debug and report all sound related >>> messages >>> from dmesg output after playback of "Front_left.wav"? >>> >>> Jaroslav >>> >>> ----- >>> >> >> >> >> do you mean 27 instead of 29 since the echo only occur when the value >> contain XRUN_DEBUG_JIFFIESCHECK bit ? >> >> aplay -Dplughw:0,0 and mplayer -ao alsa:device=hw=0,0 work normal >> >> except when the value of xrun_debug contain XRUN_DEBUG_JIFFIESCHECK bit >> ( >> same result for the three virtual box audio backend oss, pulseaudio and >> alsa ) >> > > Ok, I understand now. It would be better to use value 101 then - to see > last 10 ring buffer positions when jiffies correction occurs. Also, get > latest snapshot - there is a fix for jiffies check. Thanks. > > Jaroslav > > alsa-driver-1.0.22.1.1.g231e3.61.g42efb copying file alsa/kernel/core/sound.c patchfile file sound.c Hunk# 12 FAILED at 518 1 out of 12 hunks FAILED -- saving rejects to file sound.c.rej seem related to http://git.alsa-project.org/?p=alsa-kernel.git;a=commit;h=8a822c23333694e7d1e6ccb15267e251af6d8f4f