Patch Name: PHKL_4665 Patch Description: s700 9.01 audio driver patch This problem was originally reported on 747i/745i systems with 9.01 and with PHKL_2837. I found out the source of the problem to be in PHKL_2837 that prevents the beeper from working in 745/747 workstations. This bug was introduced in PHKL_2837 and undid the functionality delivered by PHKL_2712. The problem lies in the way we maintain the audio_descriptor's open_count (audio_des->open_count). PHKL_2837 allowed this count to be initialized to -1 (it used to be initialized to 0 in the pre-2837 world) so that a distinction could be made between the first open and a secondary open on that audio device. We increment this count in audio_open() to count the number of times this audio device is open. In audio_close(), we check this count and return ENODEV if audio_des->open_count is <= 0. And this is exactly where PHKL_2837 breaks the beeping functionality!! audio_close(..) { ...... if (audio_des->open_count <= 0) return(ENODEV); /* This should never happen! */ ..... } In audio_open(), with PHKL_2837, audio_des->open_count goes from -1 to 0 (where as in pre-2837, it goes from 0 to 1) and hence returns ENODEV without ever getting a chance to reset the AUD_F_RWOPEN flag that was earlier set in audio_open(). Consequently, when a Ctrl-G is pressed on the keyboard, audio_beeper() gets called and does not beep since the audio device is still thought to be open. audio_beeper (..) { ..... /* Don't beep if read/write is device open */ if (audio_des->flags & AUD_F_RWOPEN) return; ..... } The fix consists of bumping the open_count to go from -1 to 1 by the end of audio_open() to reflect the actual number of opens on that audio device. PHKL_4665 incorporates this fix in r9.01. ==================================================================== PHKL_2837: This is a change to the Audio Driver which will minimize the "clicking" which occurrs when opens and closes are sent to the audio device. Every time the sample rate, gain and sound format of an audio device is changed, an audible "click" will be heard on the speaker. This is unavoidable due to the programming of the audio hardware. This patch in conjunction with PHSS_2991 attempts to minimize the clicking which occurs by modifying the way the driver sets the defaults on opens and closes. As well as how the Aserver handles monitoring. If both this patch (PHKL_2837) and PHSS_2991 are not used together, clicking will still occurr. This is because changes are needed in the driver (PHKL_2837) as well as the Aserver (PHSS_2991). Prior to this patch, the audio driver would reset the sample rate, data format and gain when the last close of the audio device occurred (open count = 1). It would also ensure that audio dma had completed on the next subsequent open (open count = 0). With this particular change in place, the audio driver reacts slightly different. The audio driver will now never reset the audio system to default sample rate, data format and gain. Instead it will use the last configured rate as the default for the next open of the device. This has the side-effect that anyone who attempts to cat a sound file to the device file will now not be able to depend on the default settings of the audio driver. However, it is extremely unlikely that anyone was using this interface because the Aserver currently keeps the device open and in a different configuration than 8000khz/mulaw which the driver uses. So, you get different results today depending on if the Aserver is running or not. When used in conjunction with PHSS_2991, sound quality will be improved for users who are continually playing the same sound sample rate, data format and gain. If any of these parameters is adjusted in order to play a sound sample, a subtle "click" will be heard the first time the audio hardware is programmed to this configuration. Subsequent attempts at playing the sound will be clean. The Aserver implements a "monitor" mode which is controlled via the utility AudioCP. When "monitor" mode is enabled, a click will be heard when the Aserver reconfigures the sample rate and audio format for monitoring to work. PHKL_2712: Internal beeper and microphone (external speaker) jack do not transmit system beeps. This problem was seen on 747i and 745i 9.01 systems. On 747i and 745i 9.01 systems, internal beeper and microphone (external speaker) jack do not transmit system beeps. This is because the speaker circuit is wired differently than on other platforms, and the audio chip sends beeps to a port which is not connected. The driver is changed to send the beep to the port which is wired up to the internal beeper and microphone jack. Path Name: /hp-ux_patches/s700/9.X/PHKL_4665 Effective Date: 940823 OS Release: 9.01 Reboot Required: Yes Patch Files: /system/PHKL_4665/new/audio.o SR#: "what" string/timestamp: audio.o: audio.c $Revision: 1.2.81.7 $ $Date: 94/08/23 13:49:59 $ PATCH_9.01 (PHKL_4665) "sum" output: 56167 68 audio.o Dependencies: None Supersedes: PHKL_2712 PHKL_2837 Patch Package Size: 93 Kbytes Installation Instructions: Please review all instructions and the Hewlett-Packard SupportLine User Guide or your Hewlett-Packard support terms and conditions for precautions, scope of license, restrictions, and, limitation of liability and warranties, before installing this patch. Note: Please back up your system before you patch. --------------------------------------------------------------------------- After getting the patch onto your machine, unshar the patch (sh PHKL_4665). To install this patch do the following: 1) Run /etc/update (Note: you must be logged in as root to update a system). 2) Once in the update "Main Menu" move the highlighted line to "Change Source or Destination ->" and press "Return" or "Select Item". 3) Make sure the highlighted item in the "Change Source or Destination" window is "From Tape Device to Local System ...", then press "Return" or "Select Item". 4) You should now be in the "From Tape Device to Local System" window. Change the "Source: /dev/rmt/0m" to "Source: /tmp/PHKL_4665.updt" (this assumes that you are in the /tmp directory where PHKL_4665.updt has been placed). Note: You must enter the complete path name. 5) Press "Done". 6) From here on follow the standard directions for update. The customized script that update runs will move the original software to /system/PHKL_4665/orig. HP recommends keeping this software there in order to recover from any potential problems. It is also recommended that you move the PHKL_4665.text file to /system/PHKL_4665 to be retained for future reference. If you wish to put this patch on a magnetic tape and update from the tape drive, dd a copy of the patch to the tape drive. As an example the following will create a copy of the patch that update can read: dd if=PHKL_4665.updt of=/dev/rmt/0m bs=2048