# No sound with Dell Latitude CPi 266

## Guest

I can't seem to get the cs4236 sound module working in alsa. I have sound support compiled into the kernel, I emerged alsa, but when I try to do this... 

modprobe snd-card-cs4236 snd_port=0x534 snd_cport=0x120 snd_mpu_port=-1 snd_fm_port=0x388 snd_irq=5 snd_dma1=0 snd_dma2=1

I get this...

/lib/modules/2.4.19-r1/misc/snd-card-cs4236.o: init_module: No such device

Hint: insmod errors can be caused by incorrect module parameters, including invalid IO or IRQ parameters

/lib/modules/2.4.19-r1/misc/snd-card-cs4236.o: insmod /lib/modules/2.4.19-r1/misc/snd-card-cs4236.o failed

/lib/modules/2.4.19-r1/misc/snd-card-cs4236.o: insmod snd-card-cs4236 failed

Can anyone help?

----------

## dArkMaGE

do you really need all those command line options?

also make sure you dont have any kernel sound drivers loaded.

those are for oss and will prevent the alsa drivers from loading

----------

## Guest

The alsa mini-HOWTO (http://www.alsa-project.org/~valentyn/Alsa-sound-mini-HOWTO-5.html#ss5.3) said they were required, but I dont know. 

Also, I don't have any other sound modules loaded just kernel sound support. 

To be honest, I'm about to give up on sound with this old laptop. Even under RedHat and OSS the sound tended to crackle and snap each time I played a sound. I've been running w/o sound now for a week, and I can't say I miss it. I must admit however, the next time I get a laptop I'm making sure that the sound card is supported by alsa with an AUTOPROBING module. I'm not sure how anyone would expect someone to know things like the control port IO address and the mpu_irq unless they designed the hardware.

----------

## clacour

I have a Latitude CP, which uses the same driver (mine has a CS4237B sound chip.)

I have gotten absolutely nowhere with it so far. By changing the the snd_port address to 0x530, I got it to at least admit the card existed, but it said that port 0x120 was invalid for the control port. (I had recompiled alsa-driver with a debug configuration option.)

I did some searching and managed to find a PDF document from Cirrus that gave all the technical details, and it confirmed that 0x120 was the preferred address for the control port.

Oddly enough, I WAS able to get the snd-card-cs4232 driver to load (using the same parameters as stated in the doc for the 4236). Still didn't get sound out of it, though.

I'm certain the hardware is ok -- I've got a big drive on this machine, with several versions of Linux. Red Hat 7.2 and sndconfig got it working, no problem. That's not ALSA, though.

I'm trying one last set of things to see if I can if I can get it to work.

I've seen several references to compiling the kernel with modular sound support ONLY. I had all the individual drivers compiled as modules, but I had overall sound support set to "yes".

Also, I've seen several suggestions to add "alsa" and/or "oss" to the "USE" variable in /etc/make.conf.

I've made the changes to the USE variable, and I'm recompiling the kernel. I've got a couple of other packages to try recompiling if that doesn't work, and then I'm going to give up and try going the OSS route.

This is mostly a rhetorical question, but if anybody actually knows the answer, I'd appreciate it: "Why the hell is sound so complicated?!?"

Possibly relevant stuff:

Using kernel 2.4.19-r1 (upgraded a 1.0 system to 1.1a).

Using KDE 3.0

All packages (alsa, kde-multimedia, arts, etc.) have been built within the last week. On several occasions I did an "emerge rsync" and deleted the tarballs, so everything should be pretty recent.

To save anyone the effort, I copied over the Red Hat sndconfig stuff. It didn't help.

----------

## earlclick

I'm the guest that originally posted about the sound problem with my Dell laptop. I was just going to toss in the towel, but clacour put in so much work into finding a solution, I feel I should at least put two cents in.

   Before Gentoo I had Mandrake and Redhat on this laptop. I got OSS-lite working on the laptop using sndconfig, but everytime I played something it would start and end with a clicking/cracking noise that really bugged me. The pay version of OSS doesn't have the clicking problem. Go figure. I never got any version of alsa to work on that laptop at all. So I would guess that this is an alsa issue and not a gentoo or ebuild issue (ie. no amount of USE variables will fix this) I guess if enough people had the same problem the issue could be taken up with the maintainer of the driver, but to be honest I don't think alsa cares very much about this sound card, it a pain in the butt.

    As for why sound is so complicated. Writing a sound card driver is HARD. Even if you have the guy who designed the card next to you, it is still hard. Doing it from a written spec without the benefit of having things explained to you must have been murder. I surprised it was done at all. However, I do wish you could remove a card with a history of bad drivers and add your own. Maybe I'll try USB sound or something.... 

 *clacour wrote:*   

> I have a Latitude CP, which uses the same driver (mine has a CS4237B sound chip.)
> 
> I have gotten absolutely nowhere with it so far. By changing the the snd_port address to 0x530, I got it to at least admit the card existed, but it said that port 0x120 was invalid for the control port. (I had recompiled alsa-driver with a debug configuration option.)
> 
> I did some searching and managed to find a PDF document from Cirrus that gave all the technical details, and it confirmed that 0x120 was the preferred address for the control port.
> ...

 

----------

## bartjuh

I'm not using the ALSA stuff, but the OSS kernel stuff.

when I do :

```
modprobe sound

insmod ad1848

insmod uart401

insmod cs4232 io=0x530 irq=5 dma=1 dma2=0 mpuio=0x330
```

everthing seems to work. no errors, /dev/dsp and /dev/mixer are present.

during 'mpg123 blah.mp3', 'lsmod' shows that the cs4234 module is realy in use.

but I don't hear anything. (like clacour said)

Why does it work on redhat? what does redhat use?

I search the RH website, without results. I don't have enough space to install RH.

----------

## bart

I tried alsa-0.9.0-rc1.

```
modprobe snd-cs4236-lib

modprobe snd-opl3-synth

modprobe snd-mpu401 snd_port=0x330 snd_irq=9

insmod snd-cs4236 snd_port=0x530 snd_cport=0x210 snd_mpu_port=-1 snd_fm_port=-1 snd_irq=5 snd_dma1=0 snd_dma2=1

```

All modules load without errors. But with the last one (snd-cs4236) you hear a loud 'blop' and from then no sound is possible, also the simple speaker-beep dies.

The only way to get the speaker-beep back is completely (power off) shutdown and then boot. I also tried with 'snd_port=0x534', but that gives a 'No such device ... invalid IO or IRQ parameters'...

help!   :Crying or Very sad: 

----------

## rlyacht

This post might be of interest to watchers of this thread.  I think that the chip on my Thinkpad 560X is the same one you are trying to get working (which I did):

https://forums.gentoo.org/viewtopic.php?t=1808

----------

## bart

I tried it the 'rlyacht-'way  :Smile: . Still nothing...

lilo.conf append line:

```
append="cs4232=0x530,5,1,0,0x330,7"
```

(<io>,<irq>,<dma>,<dma2>,<mpuio>,<mpuirq>)

kernel: linux-2.4.19-gentoo-r1

interesting kernel options:

Plug and Play configuration

CONFIG_PNP=y (Plug and Play support)

CONFIG_ISAPNP=y (ISA Plug and Play support)

Sound

CONFIG_SOUND=y (Sound card support)

CONFIG_SOUND_OSS=y (OSS sound modules)

CONFIG_SOUND_TRACEINIT=y (Verbose initialisation)

CONFIG_SOUND_DMAP=y (Persistant DMA buffers)

CONFIG_SOUND_CS4232=y (Crystal CS4232 based (PnP) cards)

All not really essention kernel stuff is disabled (MTRR, APIC, PCMCIA, ACPI, APM, parport, floppy, SCSI, Network device, IrDA, USB, etc).

During booting (or running 'dmesg') I see:

...

Kernel command line: BOOT_IMAGE=gentoo ro root=307 cs4232=0x530,5,1,0,0x330,7

...

isapnp: Scanning for PnP cards...

isapnp: No Plug & Play device found

...

<Crystal audio controller (CS4238)> at 0x530 irq 5 dma 1,0

ad1848/cs4248 codec driver Copyright (C) by Hannu Savolainen 1993-1996

ad1848: No ISAPnP cards found, trying standard ones...

...

When playing a mp3 with mpg123 my /var/log/kern.log becomes filled with 'Sound: DMA (output) timed out - IRQ/DRQ config error?' (exactly every second a line), without hearing anything  :Smile: 

Oh btw, a 1:47 min length mp3 takes almost 5 minutes to finish.

Anybody an idea?

----------

## bart

It's working!

Forget the cs4232 stuff. Build 'Sound card support', 'OSS sound modules' and '100% Sound Blaster compatibles' support into the kernel.

Then, when u are using lilo add `append = "sb=0x220,5,0,1"` to the lilo config.

With grub, just add `sb=0x220,5,0,1` to the 'kernel='-line

Thanx to rlyacht  :Smile: 

----------

## Smooth

Hey,

This might not apply to all laptops in question here, but since I spent SO MUCH time a while ago trying to get my sound to work, I thought I'd share it here in case somebody comes up against the same problem.

On my Thinkpad 600 (CS4236-based) I had to go into the BIOS and disable an option called "Quick Boot." Linux was not allocating the resources for my sound card before I disabled that. Once I disabled it, I was able to identify that the sound card was present, and I just used the SB-Awe32 OSS drivers with the resources as indicated a few posts above and the sound worked alright (though only in 8-bit mode due to the OSS limitations if ur using their free version). I just got my wireless card to work under gentoo (wohoo!), so now I'll get started on trying to make the alsa drivers work with my sound card so that I can get the "full" 16-bit sound quality going.

----------

## Smooth

Sweet, I got the Alsa CS4236 modules to work for my TP600  :Smile:  It works much better than the OSS drivers.

To fix the "init_module: no such device found..." error, you must make sure to include the option isapnp=0 together with the irq=5 dma1=1 dma2=0 etc options in your /etc/modules.conf file. After doing that, the modules are loaded without any problems.

Laters!

----------

## mat_the_w

Hello everyone! There is another similar thread to this one. I got the cs4232 alsa driver to work quite nicely, and I posted my procedures to that other thread. I hope it can help some of you:

https://forums.gentoo.org/viewtopic.php?t=48124&highlight=

----------

