NetBSD Problem Report #11768
Received: (qmail 10512 invoked from network); 18 Dec 2000 18:01:06 -0000
Message-Id: <200012181800.eBII0Mf01652@mono.org>
Date: Mon, 18 Dec 2000 18:00:22 GMT
From: abs@mono.org
Reply-To: abs@mono.org
To: gnats-bugs@gnats.netbsd.org
Subject: 'cdplay status' stops cd
X-Send-Pr-Version: 3.95
>Number: 11768
>Category: bin
>Synopsis: 'cdplay status' stops cd
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: ad
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Dec 18 18:02:00 +0000 2000
>Closed-Date: Mon Aug 20 11:41:09 +0000 2001
>Last-Modified: Mon Aug 20 11:41:09 +0000 2001
>Originator: David Brownlee
>Release: 1.5
>Organization:
>Environment:
System: NetBSD odysseus 1.5 NetBSD 1.5 (_ODYSSEUS_) #1: Mon Dec 18 11:18:48 GMT 2000 abs@odysseus:/home/netbsd/src/sys/arch/i386/compile/_ODYSSEUS_ i386
>Description:
If nothing else has the cd device open when 'cdplay status' is
run the CD is stopped when the device is closed.
>How-To-Repeat:
cdplay play
<cd plays>
cdplay status
<cd is stoped>
>Fix:
leave cdplay open in another window, or give up trying to map keys
to control your CD player.
>Release-Note:
>Audit-Trail:
From: Sergey Svishchev <svs@ropnet.ru>
To: gnats-bugs@gnats.netbsd.org
Cc:
Subject: Re: bin/11768
Date: Wed, 11 Jul 2001 15:57:29 +0400
--i0/AhcQY5QxfSsSZ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Instead of unconditionally issuing START UNIT command, the code should check
if CD is playing or paused first. (The patch does this.)
--
Sergey Svishchev
--i0/AhcQY5QxfSsSZ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="my-kern-11768.pch"
Index: cd.c
===================================================================
RCS file: /cvsroot/syssrc/sys/dev/scsipi/cd.c,v
retrieving revision 1.151
diff -u -r1.151 cd.c
--- cd.c 2001/06/26 15:32:03 1.151
+++ cd.c 2001/07/10 18:49:28
@@ -323,6 +323,7 @@
struct cd_softc *cd;
struct scsipi_periph *periph;
struct scsipi_adapter *adapt;
+ struct cd_sub_channel_info data;
int unit, part;
int error;
@@ -376,6 +377,11 @@
goto out;
}
+ error = cd_read_subchannel(cd, CD_LBA_FORMAT, CD_CURRENT_POSITION,
+ 0, &data, sizeof(data), XS_CTL_DATA_ONSTACK);
+ if(!error && (data.header.audio_status == 0x11 ||
+ data.header.audio_status == 0x12))
+ goto nostart;
/*
* Start the pack spinning if necessary. Always allow the
* raw parition to be opened, for raw IOCTLs. Data transfers
@@ -393,6 +399,7 @@
goto out;
}
+nostart:
periph->periph_flags |= PERIPH_OPEN;
/* Lock the pack in. */
--i0/AhcQY5QxfSsSZ--
Responsible-Changed-From-To: bin-bug-people->ad
Responsible-Changed-By: ad
Responsible-Changed-When: Mon Aug 20 10:49:22 BST 2001
Responsible-Changed-Why:
I'm working on this.
State-Changed-From-To: open->closed
State-Changed-By: ad
State-Changed-When: Mon Aug 20 12:41:01 BST 2001
State-Changed-Why:
Fixed.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.