Patch Name: PHSS_4341 Patch Description: s700 9.X corrections for base system ('non-MPowered') Audio NOTE: This patch installs the 'audio security' mechanism that was introduced as part of MPower2.0. Remote audio clients will not be able to access the local Aserver until audio security is initialized. The section labeled "Audio Security Installation" has the steps needed to initialize audio security. Install this patch on 'non-MPowered' series 700 machines running 9.01, 9.03, 9.05, or 9.07. MPower and/or Teleshare users (those with AUDIO-MP-RUN & AUDIO-MP-SRV installed) should install patch PHSS_4342 instead. This patch supercedes PHSS_2951, PHSS_2991,PHSS_3103,PHSS_4024 Defects fixed by this patch include: - The Aserver consumed large amounts of CPU time if the current active play stream became empty. - The Aserver would crash when record and play streams were opened and closed repetitively. - The Aserver returned the wrong value for the AGMGainRestricted convenience function. - Using Alib made applications unable to catch SIGCHILD. - APutSBucketData was incorrectly calculating the length of a sound bucket after an insertion - The Aserver made it difficult/unreliable to do a recording which started immediately after an audio prompt was played. A change was made to the Aserver to make a workaround for this problem possible. See additional information at the end of this file. - The AFlushAudio command was added to Alib and the Aserver which makes the Aserver discard any data it has buffered for a specified transaction. See additional information at the end of this file. - A method was added to the Aserver for clients to be notified when the the Aserver is idle (no transactions are currently being played or recorded, and there are no transactions which are eligible to be played). See additional information at the end of this file. - The audio security mechanism was modified such that it will work properly in diskless cluster configurations - The audio play and record widgets did not have a "realize" method, which broke some widget based programs If patch PHKL_2837 (9.01) or PHKL_3040 (9.03) is installed in conjunction with this patch, the problem of a thump or click at the beginning and end of audio files is also addressed. The click occurs whenever the data rate or date format of the audio hardware is changed. The combination of this patch and PHKL_2837 or PHKL_3040 minimizes the times when such a change occurs. A click will still be heard at the beginning of a play that is a different format or different data rate from the previous play. A click will also be heard at the beginning and end of a play if monitoring is turned on and the current play rate is not 48k. (monitoring is done at 48k). Path Name: /hp-ux_patches/s700/9.X/PHSS_4341 Effective Date: 94/07/06 Repost: 95/10/13 The patch was modified to allow installation on HP-UX 9.07. OS Release: 9.01 9.03 9.05 9.07 Reboot Required: No Patch Files: /usr/lib/libAt.sl /usr/lib/libAt.a /usr/lib/libAlib.a /usr/include/audio/CUlibP.h /usr/include/audio/Alib.h /usr/audio/examples/examples.tar.Z /usr/audio/examples/ademo.tar.Z /usr/audio/bin/Aserver /usr/audio/bin/acontrol /usr/audio/bin/audio_editor /usr/audio/bin/make_audio_dev /usr/audio/examples/RUN_ME /usr/audio/.version_srv /usr/audio/.version_shlib /usr/audio/bin/asecure /usr/lib/nls/C/aserver.cat /usr/lib/nls/C/asec.cat /usr/include/audio/CUlib.h /usr/include/audio/AlibP.h /usr/include/audio/Record.h /usr/include/audio/Play.h /system/AUDIO-MP-SRV/CDFinfo SR#: 5003164129 app crashes Aserver 5003164715 app can't detect SIGCHILD when using Alib 5003164061 Aserver consumes 100% cpu (empty audio stream) 5003164095 app hangs (alternating open/close record/play) 5003166801 app crashes Aserver 5003166983 need to know when Aserver is busy/idle 1653073932 APutSBucketData does not work 5003167932 AGMGainRestricted returns wrong value 5003172346 No realize method for audio widgets 5003166835 want to flush audio stream "what" string/timestamp: Aserver: HP Aserver Version 3.16, HP-UX A.09.01 & MPower 2.0; Wed Jun 15 15:13:43 EDT 1994 nck version 1.5.1 runtime library ($Date: 94/02/22 09:00:04 $) acontrol: HP libAlib Version 3.14, HP-UX A.09.01 & MPower 2.0; A.03.14 Wed May 25 11:52:14 EDT 1994 HP Audio examples version A.03.10 nck version 1.5.1 runtime library ($Date: 94/02/22 09:00:04 $) asecure: HP asecure v A.03.15 MP Mar 22 1994 17:44:55 audio_editor: HP libAlib Version 3.14, HP-UX A.09.01 & MPower 2.0; A.03.14 Wed May 25 11:52:14 EDT 1994 HP AudioEditor Thu May 26 10:34:04 EDT 1994 nck version 1.5.1 runtime library ($Date: 94/02/22 09:00:04 $) libAlib.a: HP libAlib Version 3.14, HP-UX A.09.01 & MPower 2.0; A.03.14 Wed May 25 11:52:14 EDT 1994 nck version 1.5.1 runtime library ($Date: 94/02/22 09:00:04 $) libAt.a: HP libAt Version 3.12, HP-UX A.09.01 & MPower 2.0; A.03.12 Mon May 16 11:03:38 EDT 1994 libAt.sl: HP libAt Version 3.12, HP-UX A.09.01 & MPower 2.0; A.03.12 Mon May 16 11:03:46 EDT 1994 send_sound: HP libAlib Version 3.14, HP-UX A.09.01 & MPower 2.0; A.03.14 Wed May 25 11:52:14 EDT 1994 HP Audio examples version A.03.10 HP send_sound v0.1 Thu May 26 10:36:03 EDT 1994 nck version 1.5.1 runtime library ($Date: 94/02/22 09:00:04 $) "sum" output: 65415 92 Alib.h 40647 22 AlibP.h 9587 664 Aserver 8006 8 CUlib.h 20841 23 CUlibP.h 46463 7 Play.h 22041 3 RUN_ME 50887 6 Record.h 43967 544 acontrol 26365 376 ademo.tar.Z 57265 9 asec.cat 62973 136 asecure 20684 5 asecure.1m 16876 6 aserver.cat 52345 784 audio_editor 59240 118 examples.tar.Z 23574 495 libAlib.a 8778 84 libAt.a 32233 120 libAt.sl 30944 25 make_audio_dev 12812 528 send_sound Dependencies: None Supersedes: PHSS_2745 PHSS_2951 PHSS_2991 PHSS_3103 PHSS_4024 Patch Package Size: 2120 Kbytes Installation Instructions: Please review all instructions and the Hewlett-Packard SupportLine User Guide or Hewlett-Packard support terms and conditions for precautions, scope of license, restrictions, and, limitations 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 PHSS_4341). 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/PHSS_4341.updt" (this assumes that you are in the /tmp directory where PHSS_4341.updt has been placed). Note: You must enter the complete path name. 5) Press "Done". 6) From here on follow standard directions for update. The customize script that update runs will move the original software to /system/PHSS_4341/orig. HP recommends keeping this software there in order to recover from any potential problems. It is also recommended that you move the PHSS_4341.text file to /system/PHSS_4341/ 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 the update can read: dd if=PHSS_4341.updt of=/dev/rmt/0m bs=2048 Audio Security Initialization ------------------------------- By default, audio security is initialized to allow any application which is run on your local workstation to access audio, and to reject any application which requests audio access from another workstation. If you want to change these defaults, you will need to create an audio security file. You must be a priviledged user to do this. # Execute this as root to create the encoded audio security file # (/etc/opt/audio/audio.sec). You will be asked to supply a password # to be used with future asecure operations. /usr/audio/bin/asecure -C # After the audio security file is created, you can execute the # following to disable security. /usr/audio/bin/asecure -d # Refer to the asecure man page for more information on audio security ############################################################################## Additional Notes ------------------ Prompted Record ----------------- Due to an audio hardware limitation on our high-quality audio equipped platforms, audio data is always moved between the CPU and the audio hardware in 4096 byte blocks. Also, when doing recording and playback simultaneously, the moving of the blocks of record and play data is synchronized - when a 4096 block of record data has just been produced and returned by the driver, the audio playback hardware is at the beginning of the next 4096 byte block of data to be played. This makes doing a prompted recording difficult. A prompted record is a play transaction (the prompt, such as a beep) which is immediately followed by a record transaction. If the playback prompt does not end right before a 4096 byte boundary, and recording is then turned on, the recording will not really begin until the audio hardware reaches the next 4096 byte boundary. This will cause the beginning of the recording to be missing - for example, if the recording was the user saying "1 2 3 4", the recorded audio might actually just be "2 3 4". To do a prompted record, the following method is recommended: 1. Setup your prompts to be just less than a multiple of 4096 bytes in length. If you have a prompt which can't easily have its length changed, put silence values at the beginning of the prompt to round its length to just under 4096 bytes. If you are using linear16 data format, remember to do silencing padding in whole samples (16-bit words), and if you are using stereo, add silence padding in sample pairs. 2. Create a playback stream and connect the stream socket. Specify that you want to get the AETTransCompleted event for the playback stream. 3. Play back the prompt using the playback stream. 4. Wait for the AETTransCompleted event. 5. Create a record stream and connect its stream socket. 6. Read the record data from the stream socket. A possible alternative to this method is to minimize the record startup delay by using stereo, a high sample rate, and linear16 data format. This decreases the amount of time it takes to reach the next 4096 byte boundary. We are investigating methods to make prompted recording easier and more reliable. AFlushAudio ------------- The AFlushAudio command can be used to flush all buffered data for record or play stream transactions. There is no event that tells when this command has been executed. The behaviour of this command when used on SoundBucket transactions is not defined. This command should only be used on streams. This functionality is not currently available on audio-equipped X-terminals, and is only available with Aservers with protocol level 0.6 or higher. Aserver Idle Notification --------------------------- Audio clients can request that they be notified when the Aserver is idle by using ASelectInput with special parameters. The Aserver is defined to be idle when it is not currently doing playback or recording, and it is not about to start playback or recording. The client is sent an AETTransCompleted event with the xid field set to CLIENT_EVENT_MASK when the Aserver becomes idle. The client may recieve multiple idle notification messages - idle notification is done whenever the Aserver processes a command and finds that it is idle. For example, moving the volume slider on AudioCP sends multiple ASetGain commands, and idle notification could be done when each of these commands was processed. This functionality is not currently available on audio-equipped X-terminals, and is only available with Aservers with protocol level 0.6 or higher.