From nobody@FreeBSD.ORG Mon Sep 13 01:57:07 1999 Return-Path: Received: by hub.freebsd.org (Postfix, from userid 32767) id 7B9BA14F78; Mon, 13 Sep 1999 01:57:07 -0700 (PDT) Message-Id: <19990913085707.7B9BA14F78@hub.freebsd.org> Date: Mon, 13 Sep 1999 01:57:07 -0700 (PDT) From: esk@ira.uka.de Sender: nobody@FreeBSD.ORG To: freebsd-gnats-submit@freebsd.org Subject: acd0c unable to detect media change X-Send-Pr-Version: www-1.0 >Number: 13715 >Category: misc >Synopsis: acd0c unable to detect media change >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: closed >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Sep 13 02:00:02 PDT 1999 >Closed-Date: Mon Sep 13 10:29:24 PDT 1999 >Last-Modified: Mon Sep 13 10:30:06 PDT 1999 >Originator: Espen Skoglund >Release: 4.0-CURRENT (27081999) >Organization: Universität Karlsruhe >Environment: FreeBSD i30nb2 4.0-CURRENT FreeBSD 4.0-CURRENT #6: Sat Sep 11 11:18:34 GMT 1999 root@i30nb2:/usr/src/sys/compile/ESK i386 >Description: I'm doing audiocd support for xmms, but I've experienced some problems with the acd0c driver. The problem is that the driver is not able to detect MEDIA_CHANGED if I use the hardware eject button. (This might also be a hardware problem. I'm currently using an IBM ThinkPad 600E with a .) When I insert a new CD, the driver will only give me the old toc entries. This is of course kind of annoying when you're just going to play a single track from a CD. If I use the ioctl eject functionality on the other hand, things work just fine. I've also tried issuing a ioctl(CDIOCRESET) before reading the TOC. I would think that this would force the new toc to be read from the CD, but no such luck. However, if I use cdcontrol to do the exact same ioctl RESET command, the new toc _will_ be read from thr CD (I'm thinking that I might probably be doing something wrong here. *hrmf*) Well. Is this a known problem? Or is it just some peculiar hardware problem? >How-To-Repeat: Pick an atapi cd player. Insert a CD. Play it with e.g. xcdplayer. Press hardware eject and insert a new CD. Start playing some tracks from the new CD. These tracks will have correct data, but the toc information will be messed up (so that you might for instance play parts of track 2 and 3 when you really wanted to play inly track 2). >Fix: >Release-Note: >Audit-Trail: From: Espen Skoglund To: freebsd-gnats-submit@freebsd.org Cc: Subject: Re: misc/13715: acd0c unable to detect media change Date: Mon, 13 Sep 1999 14:42:19 +0000 (GMT) Uhm... silly me. It seems that my problems stemmed from opening the device with O_NONBLOCK flag set. (It still seems like a strange behaviour though. Certainly not the way I expected the device to behave.) eSk State-Changed-From-To: open->closed State-Changed-By: sheldonh State-Changed-When: Mon Sep 13 10:29:24 PDT 1999 State-Changed-Why: Originator discovered that the problem was caused by his opening the device O_NONBLOCK. >Unformatted: