From alsa-user-owner@alsa.jcu.cz  Thu Sep 17 23:13:57 1998
Received: from knot.iegroup.com (ns.iegroup.com [24.124.2.253])
	by marvin.jcu.cz (8.8.8/8.8.8) with ESMTP id XAA13819
	for <alsa-user@jcu.cz>; Thu, 17 Sep 1998 23:13:41 +0200
Received: from knot.iegroup.com (root@localhost)
	by knot.iegroup.com with ESMTP id QAA01390
	for <alsa-user@jcu.cz>; Thu, 17 Sep 1998 16:13:40 -0500 (CDT)
Received: from iegroup.com (pulsar.iegroup.com [10.0.1.5])
	by knot.iegroup.com with SMTP id QAA01386
	for <alsa-user@jcu.cz>; Thu, 17 Sep 1998 16:13:39 -0500 (CDT)
Received: from iegroup.com by iegroup.com (SMI-8.6/SMI-SVR4)
	id QAA09724; Thu, 17 Sep 1998 16:13:39 -0500
Message-ID: <36017B83.BD639EBF@iegroup.com>
Date: Thu, 17 Sep 1998 16:13:39 -0500
From: John Fulmer <jfulmer@iegroup.com>
MIME-Version: 1.0
To: alsa-user@jcu.cz
Subject: Success with cs4236+ and ALSA
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Reply-To: alsa-user@alsa.jcu.cz
Sender: alsa-user-owner@alsa.jcu.cz
Precedence: list

Hello!

There's been some discussion in the last week on how to get CS4236,7,8
cards running with ALSA. I piped in my 2 cents, which turned out to be
wrong, so here I am to make ammends.

I have an IBM thinkpad 380ED which uses a CS4237 chipset for sound. This
is what I did to get sound running on a new installation of RedHat Linux
5.1. Your milage may vary.


1) Install ALSA
	a) untar the alsa-driver (.2 pre7), alsa-utils, and alsa-lib packages
	b) read the instructions on each, do a ./configure , and then a make
install on each.
	c) run the snddevices script to make all the /dev/* files
	d) copy the alsa-driver/utils/alsasound script to /etc/rc.d/init.d
(redhat 5.x only)

2) Setup /etc/conf.modules
	a) I used the following conf.modules file:

	alias snd-minor-oss-0 snd-mixer
	alias snd-minor-oss-3 snd-pcm1-oss
	alias snd-minor-oss-4 snd-pcm1-oss
	alias snd-minor-oss-5 snd-pcm1-oss
	alias snd-card-0 snd-card-cs4236
	options snd snd_major=14 snd_cards_limit=1
	options snd-card-cs4236 snd_port=0x534 snd_cport=0x538 snd_irq=5
snd_dma=1 snd_dma2=0


3) Activate driver and set mixer

	a) At this point you should be able to do a "
/etc/rc.d/init.d/alsasound start " to activate the driver. You might
check the console to see if there are any error messages. My Thinkpad
clicks when the driver activates.

	b) start alsamixer. Make sure to unmute ( 'm' key) the main and PCM
devices and set the volume up to about 90% or so. 



At this point the driver should be usable. I tested mostly with x11amp
(which seems a bit more demanding on sound drivers than some programs)
and it worked flawlessly. Also



--> conf.modules discussion <--


The trickiest part of this was figuring out the second options line in
the conf.modules. For instance, the docs say to try the snd_cport of
0x120, and on my thinkpad it's 0x538. The meaning of the lines I have
are as follows:

    snd_port    - port # for CS4236+ chip	(Is almost always 0x534)
    snd_cport   - control port # for CS4236+	(???)
    snd_irq     - IRQ # for CS4236+ chip 	(Usually 5 or 7)
    snd_dma1    - first DMA # for CS4236+ chip 	
    snd_dma2    - second DMA # for Yamaha CS4236+

I do not know of an easy way to get the above values for non-pnp systems
(like the thinkpad). What I did was boot up the Win95 partition and go
to control panel/system and look at the properties for the sound driver.
Actually I found two sound driver, one for most of the card, and one for
the control registers (snd_cport). 

Another problem I found, was that the sound card uses port 0x300 for
synth, and so did my PCMCIA ethernet card. This seemed to cause some
repeating behavior in the driver. As soon as I excluded port 0x300 from
the PCMCIA setup, and rebooted, everything came up great. If sound
plays, but skips and jumps, try looking at conflicting ports.

I did try the other options listed in the docs, but could not get the
driver to work until I only had the above. (Side note: It would be nice
of Jaroslav if he could add some better informational messages when the
driver installs. Every error message looked like the other :)

Also not that I am using the cs4236 driver. SUPPOSEDLY the cs4232 driver
SHOULD work with the chipset working in cs4232 emulation mode (like OSS
does), but I didn't get it to work. Of course there is no reason to if
this one works, right? I would assume, however, that a cs4232 would
configure up almost the same as this, except you don't use a c_port
option.


Hope this helps someone out there.

-- 
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ John Fulmer                   | "UNIX was not designed to stop     +
+ Secure Network System         |  you from doing stupid things,     +
+ Lawrence, Kansas              |  because that would also stop you  +
+                               |  from doing clever things."        +
+ jfulmer@iegroup.com           |                                    + 
+ http://www.iegroup.com        |                     -- Larry Wall  +
+   "The opinions contained above may not reflect those of SNS"      +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

