From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: [linux-audio-user] Re: alsaplayer not working with alsa? Date: Thu, 23 Jan 2003 19:33:03 +0100 Sender: alsa-devel-admin@lists.sourceforge.net Message-ID: References: <1040591946.24799.103.camel@Godzilla> <20021223133402.GC28223@ecs.soton.ac.uk> <1040651206.15371.0.camel@Godzilla> <1041029783.1285.18.camel@Godzilla> <1041989867.2166.11.camel@Godzilla> Mime-Version: 1.0 (generated by SEMI 1.14.4 - "Hosorogi") Content-Type: multipart/mixed; boundary="Multipart_Thu_Jan_23_19:33:03_2003-1" Return-path: In-Reply-To: <1041989867.2166.11.camel@Godzilla> Errors-To: alsa-devel-admin@lists.sourceforge.net List-Help: List-Post: List-Subscribe: , List-Unsubscribe: , List-Archive: To: Mark Knecht Cc: Jack Howarth , Alsa-Devel List-Id: alsa-devel@alsa-project.org --Multipart_Thu_Jan_23_19:33:03_2003-1 Content-Type: text/plain; charset=US-ASCII 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 --Multipart_Thu_Jan_23_19:33:03_2003-1 Content-Type: application/octet-stream Content-Disposition: attachment; filename="pcm-unlink-fix.dif" Content-Transfer-Encoding: 7bit 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; --Multipart_Thu_Jan_23_19:33:03_2003-1-- ------------------------------------------------------- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com