This document is related to kernel patches in 'misc' directory
and 'junk kernel messages'.

ide_cd_doorlock.diff
--------------------
This patch removes hopefully the last problem with IDE CDROM driver,
related to door locking. If the buttons on your CD drive are dead
while sadp is running, and you wonder why you are forced to operate
the drive through the software, don't blame me - this "improvement"
to ide-cd driver was introduced back in 1995 and is really inconstent
with the modern approach, especially with the new unlocking features
required by Unfrom CD-ROM driver specifications. The patch for kernel
2.2.14 supplied here is implemented by Jens Axboe and most probably
have been applied to more recent kernels.


scsi_ioctl_patch.diff
----------------------
This patch has two purposes:
- Fixing a crucial bug in SCSI_TEST_UNIT_READY command. If you use a
  SCSI driver, you probably noticed a hard disk activity when the
  CD tray is empty. This is a result of a wrong status returned by 
  SCSI_TEST_UNIT_READY command. 

- Introducing a new ioctl command SCSI_IOCTL_EMULATED_HOST that allows
  to distinguish between a real and emulated SCSI device (see USING IDE
  SCSI EMULATION section in CDExtension.txt). As opposite to
  SG_EMULATED_HOST available for generic device only, this call will be
  accessible by any SCSI driver. This patch has been tested with kernel
  2.2.9 (this is the latest 2.2.x kernel I have). With more recent kernels
  the patch might not work, or the code 0x5387 used for the command might 
  have been taken for something else. The patch has been sent to Douglas
  Gilbert and Jens Axboe. I hope to get an answer from one hacker at least.

Junk messages.
--------------
This problem is as old as the player. It you use a GUI verion (xsadp), this
should not concern you, however with a text mode version junk messages spoil
the screen. You may press R to restore it, but frequent junk messages are
really annoying.

Hopefully the situation has been substantially improved. Here are the
last two junk messages that still are likely to be produced by recent kernels:


A SCSI CD driver message
------------------------

    ...  SCSI device (ioctl) reports ILLEGAL REQUEST
    
Produced by SCSI (including emulated SCSI) drive, in case the command is not
supported. It might happen when your drive does not support 'get MCN' command
or an extended SCSI command. In this case disabling MCN_SUPPORT and
CD_EXTENSION_SUPPORT will help (a propos both features are disabled by
default). However you can get this message when the disc is not properly
positioned. Press Home, or "First track" button - this should help. Then
refresh the screen.


A Linux Sound Driver message
----------------------------

    Sound: Recording overrun
    
    
That's can be a real disaster. Consider typical situations when it
happens:

- You use a really slow computer (e.g. 386). Increase spectrum analyser bar
  width, use interlaced mode, or buy a new computer - exclusively for sadp :-)
  
- You press a button on your CD drive in order to eject it. The CD driver
  holds the control preventing audio data from being read - the sound driver
  is so upset that it can't hold its rage any longer -- a typical example of
  misconduct behaviour from the drivers ... and its maintainer.
  
  Possible solutions:
    1. Use sadp to eject a disc - it will suspend sound driver and prevent the
       message to appear.    
  
    2. Persuade Alan Cox <alan@lxorguk.ukuu.org.uk> to do appropriate change 
       to the driver. I sent him a message with a suggestion to replace this
       printk with an ioctl call that returns the overrun count in case the
       application cares about loosing input data. He apparently agreed to
       provide the ioctl, but insisted on keeping the printk message ...
       You might be more lucky though.
       
    3. Do the patch yourself: edit 'printk' line in drivers/sound/dmabuf.c
       (line 1080 in 2.2.9 and 2.3.33). You only need to replace KERN_WARNING
       with KERN_INFO. This will put the message level beyond the default range
       used for syslog messages sent to the console. The messages will still
       appear in the log file though - comment out the line, in order to avoid
       that as well.
       
    4. If you don't wish to touch the kernel, you can go the opposite direction:
       reduce the range of syslog messages, sent to the console. This messaging
       is implemented by klogd (kernel log daemon), which is normally activated
       at start up. You need to supply -c4 as a command line argument in call to
       it:
       
            daemon klogd -c4	        # RedHat style
	    /usr/sbin/klogd -c4		# Slackware style
             	               
                 
    Possible location of klogd call:
    
	RedHat:   	/etc/rc.d/init.d/syslog


	Slackware:	/etc/rc.d/rc.M		- no network
	                /etc/rc.d/rc.inet2	- with network support
	If unsure, change both.			
			       
    


  







