[unpatch] ide cd-audio broken in 2.2.17preN (N >= 2)

From: Nathan Myers (ncm@zembu.com)
Date: Mon Sep 04 2000 - 18:46:35 EST


The IDE CD audio driver is broken in the 2.2.17pre series, since 2.2.17pre2.
I have attached below the patch fragment that causes the problem, and the
console error messages that appear. Backing out the one change fixes CD
audio playback in 2.2.17pre20, on this machine.

This is on an e-machines 466id, with either

  hdc: SAMSUNG SCR-3232, ATAPI CDROM drive
  hdc: ATAPI 32X CD-ROM drive, 128kB Cache
or
  hdc: SAMSUNG DVD-ROM SD-604, ATAPI CDROM drive
  hdc: ATAPI 32X DVD-ROM drive, 512kB Cache

and kernel built with gcc-2.92.2.

Nathan Myers
ncm@zembu.com

---------

$ cdplay
hdc: packet command error: status=0x51 { DriveReady SeekComplete Error }
hdc: packet command error: error=0x54
ATAPI device hdc:
  Error: Illegal request -- (Sense key=0x05)
  Invalid command operation code -- (asc=0x20, ascq=0x00)
  The failed "Play Audio TrackIndex" packet command was:
  "48 00 00 00 01 01 00 12 63 00 00 00 "
hdc: packet command error: status=0x51 { DriveReady SeekComplete Error }
hdc: packet command error: error=0x54
ATAPI device hdc:
  Error: Illegal request -- (Sense key=0x05)
  Invalid command operation code -- (asc=0x20, ascq=0x00)
  The failed "Play Audio TrackIndex" packet command was:
  "48 00 00 00 01 01 00 12 01 00 00 00 "
cdplay: ioctl cdromplaytrkind

---------

$ lspci
00:00.0 Host bridge: Intel Corporation 440LX/EX - 82443LX/EX Host bridge (rev 03)
00:01.0 PCI bridge: Intel Corporation 440LX/EX - 82443LX/EX AGP bridge (rev 03)
00:07.0 ISA bridge: Intel Corporation 82371AB PIIX4 ISA (rev 02)
00:07.1 IDE interface: Intel Corporation 82371AB PIIX4 IDE (rev 01)
00:07.2 USB Controller: Intel Corporation 82371AB PIIX4 USB (rev 01)
00:07.3 Bridge: Intel Corporation 82371AB PIIX4 ACPI (rev 02)
00:0b.0 Multimedia audio controller: Cirrus Logic CS 4614/22/24 [CrystalClear SoundFusion Audio Accelerator] (rev 01)
00:12.0 Ethernet controller: Digital Equipment Corporation DECchip 21140 [FasterNet] (rev 22)
00:13.0 SCSI storage controller: Adaptec AHA-2940U2/W
01:00.0 VGA compatible controller: ATI Technologies Inc 3D Rage Pro AGP 1X/2X (rev 5c)

---------
[apply the following with -R]

diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/cdrom/cdrom.c linux.17p4/drivers/cdrom/cdrom.c
--- linux.vanilla/drivers/cdrom/cdrom.c Sun Jun 11 21:44:12 2000
+++ linux.17p4/drivers/cdrom/cdrom.c Thu Jun 15 15:30:57 2000
@@ -1956,36 +1968,15 @@
                 }
         case CDROMPLAYTRKIND: {
                 struct cdrom_ti ti;
- struct cdrom_tocentry entry;
- struct cdrom_tochdr tochdr;
 
                 cdinfo(CD_DO_IOCTL, "entering CDROMPLAYTRKIND\n");
                 IOCTL_IN(arg, struct cdrom_ti, ti);
- entry.cdte_format = CDROM_MSF;
-
- /* get toc entry for start and end track */
- if (cdo->audio_ioctl(cdi, CDROMREADTOCHDR, &tochdr))
- return -EINVAL;
- if ((entry.cdte_track = ti.cdti_trk0) > tochdr.cdth_trk1)
- return -EINVAL;
- if (cdo->audio_ioctl(cdi, CDROMREADTOCENTRY, &entry))
- return -EINVAL;
 
- cgc.cmd[3] = entry.cdte_addr.msf.minute;
- cgc.cmd[4] = entry.cdte_addr.msf.second;
- cgc.cmd[5] = entry.cdte_addr.msf.frame;
-
- entry.cdte_track = ti.cdti_trk1 + 1;
- if (entry.cdte_track > tochdr.cdth_trk1)
- entry.cdte_track = CDROM_LEADOUT;
-
- if (cdo->audio_ioctl(cdi, CDROMREADTOCENTRY, &entry))
- return -EINVAL;
-
- cgc.cmd[6] = entry.cdte_addr.msf.minute;
- cgc.cmd[7] = entry.cdte_addr.msf.second;
- cgc.cmd[8] = entry.cdte_addr.msf.frame;
- cgc.cmd[0] = GPCMD_PLAY_AUDIO_MSF;
+ cgc.cmd[0] = GPCMD_PLAY_AUDIO_TI;
+ cgc.cmd[4] = ti.cdti_trk0;
+ cgc.cmd[5] = ti.cdti_ind0;
+ cgc.cmd[7] = ti.cdti_trk1;
+ cgc.cmd[8] = ti.cdti_ind1;
                 return cdo->generic_packet(cdi, &cgc);
                 }
         case CDROMPLAYMSF: {
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Sep 07 2000 - 21:00:20 EST