Date: Sat, 18 Jan 2003 15:12:56 -0500 (EST) From: Andriy Gapon <avg@icyb.net.ua> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/47197: multimedia/xmms cdaudio plugin issues illegal requests to ATAPI CD Message-ID: <200301182012.h0IKCuvq018342@edge.foundation.invalid>
next in thread | raw e-mail | index | archive | help
>Number: 47197 >Category: ports >Synopsis: multimedia/xmms cdaudio plugin issues illegal requests to ATAPI CD >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Jan 18 12:20:00 PST 2003 >Closed-Date: >Last-Modified: >Originator: Andriy Gapon >Release: FreeBSD 4.7-RELEASE-p2 i386 >Organization: >Environment: System: FreeBSD edge.foundation.invalid 4.7-RELEASE-p2 FreeBSD 4.7-RELEASE-p2 #0: Tue Nov 19 17:28:50 EST 2002 avg@edge.foundation.invalid:/sys-devel/obj/sys-devel/src/sys/EDGE i386 xmms-esound-1.2.7_3 from the ports >Description: if a pause between songs is enabled in xmms settings, then, when playing a CD, PAUSE - ILLEGAL REQUEST asc=0x2c ascq=0x00 error=0x00 message will be produced by kernel each time a track changes. this happens bacause cdaudio plugin issues CDIOCPAUSE in between the tracks, despite the fact that CD is in CD_AS_PLAY_COMPLETED state at that time. >How-To-Repeat: make sure you have ATAPI CD-ROM drive enable cdaudio plugin, configure it to play the ATAPI CD enable pause between songs in xmms settings (set it to 1 sec) play an audio CD with more than 1 track wait till playback of the first track finishes and xmms starts to play the next track observe PAUSE - ILLEGAL REQUEST asc=0x2c ascq=0x00 error=0x00 on your console (or in /var/log/messages) >Fix: here's a first take at BSD-specific patch: --- cdaudio.c.patch begins here --- --- Input/cdaudio/cdaudio.c.orig Sat Jan 18 14:36:15 2003 +++ Input/cdaudio/cdaudio.c Sat Jan 18 14:46:11 2003 @@ -84,6 +84,7 @@ static char * cdda_get_title(cdda_disc_toc_t *toc, gint track); static gboolean stop_timeout(gpointer data); +static int get_current_status(void); static void cdda_init(void); static int is_our_file(char *filename); @@ -398,7 +399,9 @@ if (cdda_fd < 0) return; - ioctl(cdda_fd, XMMS_PAUSE); + if(get_current_status() == CD_AS_PLAY_IN_PROGRESS) + ioctl(cdda_fd, XMMS_PAUSE); + close(cdda_fd); cdda_fd = -1; stop_timeout_id = gtk_timeout_add(STOP_DELAY * 100, stop_timeout, NULL); @@ -559,6 +562,19 @@ ioctl(cdda_fd, CDIOCREADSUBCHANNEL, &subchnl); return(LBA(subchnl.data->what.position.absaddr.msf)); +} + +static int get_current_status(void) +{ + struct ioc_read_subchannel subchnl; + struct cd_sub_channel_info subinfo; + subchnl.address_format = CD_MSF_FORMAT; + subchnl.data_format = CD_CURRENT_POSITION; + subchnl.data_len = sizeof(subinfo); + subchnl.data = &subinfo; + ioctl(cdda_fd, CDIOCREADSUBCHANNEL, &subchnl); + + return(subchnl.data->header.audio_status); } static void drive_get_volume(int *l, int *r) --- cdaudio.c.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200301182012.h0IKCuvq018342>