summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorjoerg <joerg@FreeBSD.org>1995-12-30 13:56:28 +0000
committerjoerg <joerg@FreeBSD.org>1995-12-30 13:56:28 +0000
commit90efd6ee2fcf8d47b9aa0ccc86adbf49b80c0cbe (patch)
tree9227bdaa42ec7d849ae571a423d44d4cd469ff13 /sys
parent39d74eed6420c57393fd121fe8d242506656c729 (diff)
downloadFreeBSD-src-90efd6ee2fcf8d47b9aa0ccc86adbf49b80c0cbe.zip
FreeBSD-src-90efd6ee2fcf8d47b9aa0ccc86adbf49b80c0cbe.tar.gz
Use a medium_type field of 0 (Default), instead of the value that was
obtained by the MOSE SENSE command. SONY drives are too stupid to eat their own food. Submitted by: stu@solaris.com (Stu Phillips) While i was at it, i've removed two bogus channel numbers in the``set mono'' command, that kept my Toshiba drive complaining. Also remove Julian's misspelling of `stereo'.
Diffstat (limited to 'sys')
-rw-r--r--sys/scsi/cd.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/scsi/cd.c b/sys/scsi/cd.c
index 49b2efe..0bc4cb9 100644
--- a/sys/scsi/cd.c
+++ b/sys/scsi/cd.c
@@ -14,7 +14,7 @@
*
* Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992
*
- * $Id: cd.c,v 1.53 1995/12/14 09:54:18 phk Exp $
+ * $Id: cd.c,v 1.54 1995/12/20 12:02:43 dufault Exp $
*/
#define SPLCD splbio
@@ -830,7 +830,7 @@ cd_ioctl(dev_t dev, int cmd, caddr_t addr, int flag, struct proc *p,
error = cd_get_mode(unit, &data, AUDIO_PAGE);
if (error)
break;
- data.page.audio.port[LEFT_PORT].channels = LEFT_CHANNEL | RIGHT_CHANNEL | 4 | 8;
+ data.page.audio.port[LEFT_PORT].channels = LEFT_CHANNEL | RIGHT_CHANNEL;
data.page.audio.port[RIGHT_PORT].channels = LEFT_CHANNEL | RIGHT_CHANNEL;
data.page.audio.port[2].channels = 0;
data.page.audio.port[3].channels = 0;
@@ -839,7 +839,7 @@ cd_ioctl(dev_t dev, int cmd, caddr_t addr, int flag, struct proc *p,
break;
}
break;
- case CDIOCSETSTERIO:
+ case CDIOCSETSTEREO:
{
struct cd_mode_data data;
error = cd_get_mode(unit, &data, AUDIO_PAGE);
@@ -1093,6 +1093,12 @@ cd_set_mode(unit, data)
scsi_cmd.byte2 |= SMS_PF;
scsi_cmd.length = sizeof(*data) & 0xff;
data->header.data_length = 0;
+ /*
+ * SONY drives do not allow a mode select with a medium_type
+ * value that has just been returned by a mode sense; use a
+ * medium_type of 0 (Default) instead.
+ */
+ data->header.medium_type = 0;
return (scsi_scsi_cmd(SCSI_LINK(&cd_switch, unit),
(struct scsi_generic *) &scsi_cmd,
sizeof(scsi_cmd),
OpenPOWER on IntegriCloud