X LessTif Mix Version 1.1

	Copyright (C) 1997  Warren W. Gay VE3WWG

This  program is free software; you can redistribute it and/or modify it
under the  terms  of  the GNU General Public License as published by the
Free Software Foundation version 2 of the License.

This  program  is  distributed  in  the hope that it will be useful, but
WITHOUT   ANY   WARRANTY;   without   even  the   implied   warranty  of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License for more details (see enclosed file COPYING).

You  should have received a copy of the GNU General Public License along
with this  program; if not, write to the Free Software Foundation, Inc.,
675 Mass Ave, Cambridge, MA 02139, USA.

Send correspondance to:

	Warren W. Gay VE3WWG
	5536 Montevideo Road #17
	Mississauga, Ontario L5N 2P4

Email:
	wwg@ica.net			(current ISP of the month :-) )
	bx249@freenet.toronto.on.ca	(backup)

------------------------------------------------------------------------

PREREQUISITES:

1.	This has been tested on LINUX Kernel 2.0.23 using GCC 2.7.2.
	Apart  from  support  for  LessTif  and  X, this software is
	fairly independent  of the kernel  release.  Just  about any
	release  of  the  LINUX  kernel that supports X and LessTif,
	should be able to run this software (hardware permitting).

2.	X  Server  installed  (XFree86),  since  this  is an X-based
	application  only, even though mixer.c could be carved up to
	make  a  shell based tool independantly  (perhaps at a later
	date).

3.	LessTif  shared  library installed.  This release was tested
	with the LessTif binary release of 0.77 successfully, though
	a  few  very minor issues still require investigation.  That
	release, or a newer release should work just fine.

	Please make sure all C (C++ not used this time)  and LessTif
	shared libraries are properly installed. Don't forget to use
	ldconfig if you've made library changes.

	Alternatively, if you've purchased MOTIF, then you should be
	able  to  use  that  instead (I  no  longer have access to a
	commercial copy of MOTIF).

4.	I  think  GCC 2.7.2 or later is manditory, largely because I
	believe this is a requirement for LessTif.

5.	This   software   only   supports   the  SoundBlaster-16  or
	SoundBlaster-32 (I think). It might support other cards that
	use a CT1745 Mixer chip. Only you know for sure :)


INSTALLATION:
-------------

RESOURCES INSTALLATION NOTE:

	While  this  application  uses  resources, you do NOT need to
	install a resource file for this application. I my view, this
	type  of utility should be wholy contained if possible as one
	simple to install unit, which it is here.

	However,  if  you do wish to customize its look and feel, you
	can of course install your own resource files. To get an idea
	of  what  the  widget  class  names are,  you can examine the
	fallback_resources[] array in the xltmix.c source file.

	Because  of the way fallback resources work, a resource file
	may  have  to be  more explicit in  order  to  override  the
	existing resource definitions. The alternative, is to modify
	the  fallback  resources  in the xltmix.c program, or export
	those to a file, and #if 0 out the fallback resources in the
	program. Recompile, and re-install.

1.	Edit the Makefile to suit (optional):

	ESSENTIAL CHANGES:

	The  most  important configuration parameter is the paramter
	DEV_BASE  which  must  be  set  to the hex port base address
	value. THIS MUST MATCH YOUR SOUNDBLASTER CARD.

		BASE ADDR:	Mixer Ports used:

		220h		224h & 225h
		240h		244h & 245h
		260h		264h & 265h
		280h		284h & 285h

	DEV_BASE=0x0220 is assumed by default (this implies that the
	mixer ports are 0x0224 and 0x0225).

	If you're configurating for a NON-SoundBlaster card, but one
	that _does_ use the CT1745 mixer chip, you need to determine
	the port address for the "index selector" port, and the port
	address  for  its  data port  (normally  this is ports p and
	p+1).  Once  the the "index selector" port is known (say p),
	then compute the base address as p - 4.  I.e.  if your Mixer
	index  selector  port  is  on a weird port address of 0x534,
	then  the  _BASE_ address  you  must  supply is the value of
	0x0534 - 0x0004 which is the hex value 0x0530.

	Other Parameters you may wish to change:

		INSTDIR=/usr/local/bin/

	Determines where the final executable gets installed.

		INSTALL=install

	This determines the install command name to use.

		CPU= -m486

	I  can't  imagine  running  LessTif on a 386, but if you do,
	then  you'll  need  to  change this.  Speed freaks that have
	Pentiums  and Pros, may get  further gains by an appropriate
	adjustment here.

		OPT=	-O2
		STRIP=	strip

	Normally the above two should be uncommented. When activated
	in  this  way, the  debug options must be commented out (see
	next).

		#DEBUG=	-g
		#STRIP= echo

	As  shipped,  these  are commented out, and should stay that
	way unless  you  enjoy hacking  and  using gdb. Another good
	reason  for turning on debug is when you encounter problems,
	and  want to forward a core file to me for debugging.  But I
	am confident that it won't be necessary :)

2.	$ make real_clean

	This deletes any pesky temp. files etc. Its cheap insurance.

3.	$ make

	This  should  build the executable xltmix, which stripped is
	about 25656 bytes in size.  With debug turned on, it will be
	considerably larger.

3.	$ su root

	If you're not root yet.

4.	$ make install

	To  test,  type xltmix from an xterm session.  If no windows
	come up, note the standard error output for problems.

5.	To make the executable setuid root (optional):

	$ chown root /usr/local/bin/xltmix
	$ chmod u+s /usr/local/bin/xltmix

	The  Makefile could have done this for you, but I don't want
	to be blamed for your security problems. This way, I can say
	that _you_ did it, not me.

	This  software  does  not  use a LINUX driver to control the
	mixer chip. This goes directly to the mixer chip by register
	access. This is both good and bad, and sometimes ugly.

	The  good  part  is  that  you  will have complete and utter
	control  of every feature  offered by the CT1745 mixer chip.
	You  won't  ever  need  to resort to Windoze software to set
	something for your SoundBlaster card (hear millions cheer).

	The  bad  thing  is  that  you  _MUST_  get the port address
	correct, since the driver will not be doing it for you. This
	also  makes  this  program less portable, since it will only
	function for those cards that use the CT1745 mixer chip.

	The  ugly  thing  is  that  if  you  get  the  port  address
	incorrect, you  risk  the  integrity  of your system! If you
	give   it  bad  port  registers,  that  overlap  with  other
	hardware, you  may cause a hang, a crash, or under the worst
	case  scenario, even  wipe out  a  disk or more. I assume no
	responsibility  for your guesswork here. Be sure of what you
	are doing, and make sure you have adequate backups!

	The  other  ugly  aspect, is that this forces you to run the
	program  as setuid root,  or  from  root.  If you run your X
	server as root, this may not be a hardship. Setuid programs,
	as you should know, can be security risks.

6.	To  properly  install  it  in your window manager, fvwm2 for
	example,   you  may   want  to   add   a   button   to  your
	/usr/X11R6/lib/X11/fvwm2/.fvwm2rc file, something like:

		*FvwmButtons Mixer NULL Exec "XLTMix" xltmix

	(for   full   X   Window   manager  installation  (fvwm2  or
	otherwise),  please  be  referred  to  your  Window  manager
	documentation  --  the above  example is by no means, a full
	discourse on Window manager startup scripts).

End.
