From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: OSS emulation delays (?) Date: Tue, 28 Oct 2003 19:30:17 +0100 Sender: alsa-devel-admin@lists.sourceforge.net Message-ID: References: <20031023124542.0868bfd8.rpav@mephle.com> <3F992DF7.9090002@gmx.de> Mime-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: multipart/mixed; boundary="Multipart_Tue_Oct_28_19:30:17_2003-1" Return-path: In-Reply-To: <3F992DF7.9090002@gmx.de> Errors-To: alsa-devel-admin@lists.sourceforge.net List-Help: List-Post: List-Subscribe: , List-Unsubscribe: , List-Archive: To: Steffen Sauder Cc: alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org --Multipart_Tue_Oct_28_19:30:17_2003-1 Content-Type: text/plain; charset=US-ASCII At Fri, 24 Oct 2003 14:49:43 +0100, Steffen Sauder wrote: > > > With the xmms ALSA driver, this is not a > >problem. Unfortunately mplayer and ALSA don't seem to get along with > >my card (ice1712... maudio delta-44), but with audio disabled seek > >times are fine. > > > > > Same problem here again, mplayer's alsa-output has been broken for me > since I have that card (1.5 years). Audio seems to be running fine, but > video plays at about one fps, and after few seconds the > "buggy-audio-driver" message pops up. Because mplayer is the only app > having problem with the alsa-driver, I always thought it was mplayer's > bug, but I didn't dare to post on their mailinglists :o). ok, finally i can reproduce this bug, too. this happens when the plug layer is used, e.g. sample-rate or format conversion is needed. that's why this doesn't appear on most machines. the attached patch should fix the problem. (but of course, it has nothing to do with the oss-emulation problem... please let me know if you find the exact alsa version getting broken.) Takashi --Multipart_Tue_Oct_28_19:30:17_2003-1 Content-Type: application/octet-stream Content-Disposition: attachment; filename="pcm-plugin-avail-fix.dif" Content-Transfer-Encoding: 7bit Index: alsa-lib/src/pcm/pcm_plugin.c =================================================================== RCS file: /suse/tiwai/cvs/alsa/alsa-lib/src/pcm/pcm_plugin.c,v retrieving revision 1.44 diff -u -r1.44 pcm_plugin.c --- alsa-lib/src/pcm/pcm_plugin.c 25 Jul 2003 16:56:37 -0000 1.44 +++ alsa-lib/src/pcm/pcm_plugin.c 28 Oct 2003 17:56:39 -0000 @@ -622,8 +622,10 @@ } status->appl_ptr = *pcm->appl.ptr; status->hw_ptr = *pcm->hw.ptr; - status->avail = pcm->buffer_size; - snd_pcm_plugin_delay(pcm, &status->delay); + if (plugin->client_frames) { + status->delay = plugin->client_frames(pcm, status->delay); + status->avail = plugin->client_frames(pcm, status->avail); + } if (!snd_atomic_read_ok(&ratom)) { snd_atomic_read_wait(&ratom); goto _again; --Multipart_Tue_Oct_28_19:30:17_2003-1-- ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/