Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Mark Knecht <markknecht@attbi.com>
Cc: Jack Howarth <howarth@bromo.msbb.uc.edu>,
	Alsa-Devel <alsa-devel@lists.sourceforge.net>
Subject: Re: [linux-audio-user] Re: alsaplayer not	working	with	alsa?
Date: Thu, 23 Jan 2003 19:33:03 +0100	[thread overview]
Message-ID: <s5hznpryaw0.wl@alsa2.suse.de> (raw)
In-Reply-To: <1041989867.2166.11.camel@Godzilla>

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

Hi Mark and Jack,

regarding to the alsaplayer problem:

could you try the attached patch (to cvs version) ?
hope this fixes the nasty bug...


ciao,

Takashi

[-- Attachment #2: pcm-unlink-fix.dif --]
[-- Type: application/octet-stream, Size: 1299 bytes --]

Index: alsa-lib/src/pcm/pcm.c
===================================================================
RCS file: /suse/tiwai/cvs/alsa/alsa-lib/src/pcm/pcm.c,v
retrieving revision 1.122
diff -u -r1.122 pcm.c
--- alsa-lib/src/pcm/pcm.c	19 Dec 2002 11:33:08 -0000	1.122
+++ alsa-lib/src/pcm/pcm.c	23 Jan 2003 18:29:28 -0000
@@ -6291,7 +6291,7 @@
 			goto __found;
 		}
 	}
-	assert(0);
+	/* assert(0); */
 	return;
 
       __found:
Index: alsa-lib/src/pcm/pcm_plug.c
===================================================================
RCS file: /suse/tiwai/cvs/alsa/alsa-lib/src/pcm/pcm_plug.c,v
retrieving revision 1.72
diff -u -r1.72 pcm_plug.c
--- alsa-lib/src/pcm/pcm_plug.c	17 Sep 2002 16:13:12 -0000	1.72
+++ alsa-lib/src/pcm/pcm_plug.c	23 Jan 2003 18:28:24 -0000
@@ -70,6 +70,8 @@
 		return -EINVAL;
 	}
 	if (plug->close_slave) {
+		snd_pcm_unlink_hw_ptr(pcm, plug->req_slave);
+		snd_pcm_unlink_appl_ptr(pcm, plug->req_slave);
 		err = snd_pcm_close(plug->req_slave);
 		if (err < 0)
 			result = err;
@@ -313,6 +315,8 @@
 	snd_pcm_t *slave = plug->req_slave;
 	/* Clear old plugins */
 	if (plug->slave != slave) {
+		snd_pcm_unlink_hw_ptr(pcm, plug->slave);
+		snd_pcm_unlink_appl_ptr(pcm, plug->slave);
 		snd_pcm_close(plug->slave);
 		plug->slave = slave;
 		pcm->fast_ops = slave->fast_ops;

      reply	other threads:[~2003-01-23 18:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-22 21:19 alsaplayer not working with alsa? Mark Knecht
     [not found] ` <20021223133402.GC28223@ecs.soton.ac.uk>
2002-12-23 13:46   ` [linux-audio-user] " Mark Knecht
2002-12-23 14:05     ` Takashi Iwai
2002-12-27 22:56       ` Mark Knecht
2003-01-07 15:58         ` Takashi Iwai
2003-01-08  1:37           ` Mark Knecht
2003-01-23 18:33             ` Takashi Iwai [this message]

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=s5hznpryaw0.wl@alsa2.suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@lists.sourceforge.net \
    --cc=howarth@bromo.msbb.uc.edu \
    --cc=markknecht@attbi.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox