home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: Multimed / Multimed.zip / lbmix04.zip / PipeMix / PipeMix.txt < prev    next >
Text File  |  2000-05-05  |  9KB  |  191 lines

  1.         Pipe Mixer set v.0.03 by Lesha Bogdanow.
  2.  
  3. This is free software. It is distributed under GNU General Public License.
  4. See file COPYING for details. There is NO WARRANTY. Use it at your own risk.
  5. This program uses some parts from free IOCTL 90 API demonstration program.
  6.  
  7.  
  8.                 INTRO
  9.  
  10. This is a set of mixer backend demons with pipe interface. These demons can be
  11. used in combination with LBMix mixer front end. This set contains of mixer
  12. backends for IOCTL90 API and Crystal Semi mode 2 chips. The pipe interface is a
  13. simple mixer backend interface which allows easy developing of new mixers. A
  14. side effect of using pipes to communicate is ability to control the mixer
  15. remotely or by REXX scripts.
  16.  
  17.  
  18.             USAGE
  19.  
  20. The demon can be either started a text mode application or detached. Detaching
  21. is recommended. Command line parameters common for all demons:
  22. -pn <pipe name>    - Changes name of the pipe used for communication
  23.           with the demon. Default is \PIPE\MIXER
  24. -v        - Enables verbose mode. The mixer displays incoming commands
  25.           and outgoing responses on stdio. This option significantly
  26.           slows down the command processing speed so you should use
  27.           it only for debugging purposes.
  28.  
  29. You should start LBMix with -p option to use it with pipe mixer backend.
  30.  
  31.  
  32.             IOCTL90 BACKEND (Mix90.exe)
  33.  
  34. This backend works with drivers supporting IOCTL90 mixer API (see
  35. http://www.pompano.net/~joenord/ioctl90/ for more info) It was written
  36. primarily for debugging or demonstration purposes. However it can be used to
  37. control the mixer remotely or by a REXX script. Additional command line
  38. parameters:
  39. -d <device>    - Changes the name of audio device driver. Default is
  40.           MMOS/2 default driver.
  41. -mv        - Enables Master volume support (via IOCTL category 80 API).
  42.  
  43.  
  44.         CRYSTAL SEMI MODE 2 BACKEND (MixCS2.exe)
  45.  
  46. This backend works with audio cards using Crystal Semiconductor chips working
  47. in mode 2 (using drivers v.1.xx). Additional command line parameters are:
  48. -b <base port>    - OBLIGATORY parameter. Specifies base port of the card (value
  49.           of /P parameter of BASEDEV=CWCONFIG.SYS in CONFIG.SYS).
  50. -l <lock rate>    - Specifies the lock rate in milliseconds. The lock rate
  51.           specifies how often locked controls will be re-programmed.
  52.           Locking is turned off on default.
  53. NOTE1: The backend reports that the microphone output mixer is supported while
  54. it is not due to hardware limitations. This is done to enable selecting
  55. microphone as an input.
  56.  
  57.  
  58.        CRYSTAL SEMI MODE 3 MIXER PATCH FOR DRIVER 2.08 (MixCS38.exe)
  59.  
  60. This backend works with Crystal Semiconductor driver v.2.08 and provides
  61. a full functionality of driver v.2.09 (not released at this moment) by
  62. handling some controls by itself and passing the rest to the driver. 
  63. The controls handled by the patch are: Line volume, Mic volume, DAC volume,
  64. ADC gain, 3D processing, Record source multiplexer.
  65. Additional command line parameters are:
  66. -b <base port>    - OBLIGATORY parameter. Specifies base port of the card (value
  67.           of /P parameter of BASEDEV=CWCONFIG.SYS in CONFIG.SYS).
  68. -l <lock rate>    - Specifies the lock rate in milliseconds. The lock rate
  69.           specifies how often locked controls will be re-programmed.
  70.           Locking is turned off on default.
  71. -d <device>    - Changes the name of audio device driver. Default is
  72.           MMOS/2 default driver.
  73. -c <ctl port>    - Set control port base and enable 3D. The control port is
  74.           used to access 3D control registers. It is not the same
  75.           as base port. Usually 120.
  76. -mv        - Enables Master volume support (via IOCTL category 80 API).
  77. NOTE: If your card does not support 3D processing or you don't need it you
  78. should not specify the control port. 3D support was tested only on CS4237B
  79. and I don't know if it will work with other 3D-enhanced mode 3 chips.
  80.  
  81.  
  82.     CRYSTAL SEMI MODE 3 MIXER PATCH FOR DRIVERS 2.09+ (MixCS3.exe)
  83.  
  84. This backend works with Crystal Semiconductor drivers v.2.09+ (not released
  85. at this moment) and can fix non-continuous DAC volume control problem and/or
  86. provide 3D support. Additional command line parameters are:
  87. -d <device>    - Changes the name of audio device driver. Default is
  88.           MMOS/2 default driver.
  89. -c <ctl port>    - Set control port base and enable 3D. The control port is
  90.           used to access 3D control registers. It is not the same
  91.           as base port. Usually 120.
  92. -dac        - Enable patch of non-continuous DAC volume. I'm not sure
  93.           that this problem will persist in the driver when it is
  94.           released so the patch must be turned on explicitly.
  95. -mv        - Enables Master volume support (via IOCTL category 80 API).
  96. NOTE1: If your card does not support 3D processing or you don't need it you
  97. should not specify the control port. 3D support was tested only on CS4237B
  98. and I don't know if it will work with other 3D-enhanced mode 3 chips.
  99. NOTE2: If the driver supports 3D processing -c option will be ignored.
  100. NOTE3: If neither -c nor -dac option is specified the backend behaves as
  101. IOCTL90 backend, just passing the pipe commands to the driver.
  102.  
  103.  
  104.         THE INTERFACE (Advanced info)
  105.  
  106. The interaction between the front end and the back end consists of two stages,
  107. first the front end opens the control pipe and writes a text line with command.
  108. The backend then processes it and writes a text line with its response. The
  109. front end should read it and close the pipe.
  110. The command line consists of one or more tokens separated by spaces. The first
  111. token is the command number in hex that corresponds to IOCTL 90 functions.
  112. The supported commands are:
  113. 80 - Get API level. No other data are required.
  114. 83 - Get Message buffer. No other data are required.
  115. 4x - Set control values. Up to three tokens may follow that contain
  116.      .VolumeL value in dec, .VolumeR value in dec and .Mute value in hex
  117.      (see IOCTL 90 API definition for details). If less than 3 tokens follow
  118.      the command the missing ones are supposed to be 100 100 0.
  119. 01 - Set master volume (not present in IOCTL90). Same syntax as fns. 4x but
  120.      .Mute value is ignored
  121. 6x - Get control values. No other data are required.
  122. 11 - Query master volume (not present in IOCTL90). No other data are required.
  123.  
  124. The responce consists of one or more tokens as well. The first token is
  125. always the command number. The further tokens are:
  126. Common tokens:
  127. "UNSUPPORTED"    - The function is not supported
  128. "FAILED"    - The function is supported but failed to complete.
  129.  
  130. Command specific tokens:
  131. command  80    - API level in dec
  132. command  83    - Message buffer contents.
  133. commands 4x    - "OK"
  134. command  01     - "OK"
  135. commands 6x    - .VolumeL value in dec, .VolumeR value in dec and .Mute value
  136.                   in hex (see IOCTL 90 API definition for details).
  137. command  11     - same as fns. 6x but .Mute value is always 0
  138. The total response length must not exceed 2047 characters.
  139.  
  140.  
  141.         CONTROLLING THE MIXER WITH REXX (Advanced info)
  142.  
  143. To send a mixer command from a REXX script you should do the following:
  144. Open the control pipe by calling stream() function: stream(pipe,'c','open')
  145. Where pipe is a control pipe name.
  146. Write the command by calling lineout() function: lineout(pipe,command)
  147. Where command is command text.
  148. Wait for response by calling charin() function: charin(pipe,,2047)
  149. Close the control pipe by callin stream() function: stream(pipe,'c','close')
  150.  
  151. A simple REXX mixer front end PMixCtl.cmd is provided as a REXX example.
  152. A more complicated and more useful REXX text mode mixer minimix.cmd written by
  153. Franz Bakan <fbakan@gmx.net> is also included.
  154.  
  155.  
  156.         WRITING YOUR OWN MIXER (Advanced info)
  157.  
  158. The suggested mixer demon layout consists of two parts: base and hardware
  159. specific. The base part is common for every mixer and does not need to be
  160. modified. It is called base.c It receives the control upon the program
  161. startup, creates the control pipe, receives and pre-processes the commands
  162. and sends the replies. It calls several subroutines from the hardware specific
  163. parts. They are defined and explained in PipeMixPvt.h.
  164.  
  165.  
  166.             CONTACT
  167.  
  168. You can send your bug reports and suggestions to e-mail
  169. boga@inbox.ru or FIDO 2:5095/9.  The lastest version of the mixer can be
  170. downloaded from http://www.podolsk.ru/~boga/OS2Programs.html where you can
  171. also find a couple of other useful OS/2 programs.
  172.  
  173. IOCTL 90 API and IOCTL 90 API demonstration program were developed
  174. by Joe Nord <nord@crystal.cirrus.com>. API definition is available at
  175. http://www.pompano.net/~joenord/ioctl90/
  176.  
  177. minimix.cmd REXX mixer was developed by Franz Bakan <fbakan@gmx.net>
  178.  
  179.  
  180.             HISTORY
  181.  
  182. 0.01    - Initial release.
  183. 0.02    - Small improvements in the base code.
  184.     - Added support for master volume
  185.     - Fixed disconnecting the pipe before the client read it.
  186.     - Added minimix.cmd REXX mixer by Franz Bakan
  187. 0.03    - Added a new version of minimix.cmd REXX mixer by Franz Bakan
  188.     - Improvement in the base code (now it handles default values for
  189.       set functions itself).
  190.     - Fixed processing multi-line responses in PMixCtl.cmd
  191.