All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Steffen Sauder <steffensauder@gmx.de>
Cc: alsa-devel@lists.sourceforge.net
Subject: Re: OSS emulation delays (?)
Date: Tue, 28 Oct 2003 19:30:17 +0100	[thread overview]
Message-ID: <s5h8yn543ly.wl@alsa2.suse.de> (raw)
In-Reply-To: <3F992DF7.9090002@gmx.de>

[-- Attachment #1: Type: text/plain, Size: 1077 bytes --]

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

[-- Attachment #2: pcm-plugin-avail-fix.dif --]
[-- Type: application/octet-stream, Size: 769 bytes --]

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;

  parent reply	other threads:[~2003-10-28 18:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-23 19:45 OSS emulation delays (?) Ryan Pavlik
2003-10-24 13:49 ` Steffen Sauder
2003-10-24 13:08   ` Takashi Iwai
2003-10-25 22:04     ` Ryan Pavlik
2003-10-28 18:30   ` Takashi Iwai [this message]
2003-10-29 18:33     ` Steffen Sauder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5h8yn543ly.wl@alsa2.suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@lists.sourceforge.net \
    --cc=steffensauder@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.