[ltp] Sound in FC3 (udev)

Bert Haskins linux-thinkpad@linux-thinkpad.org
Mon, 21 Feb 2005 12:48:52 -0500


Jo Jo wrote:

> Well, she's working now. Actually, all I had to was turn on the quick 
> boot. /dev/dsp then appeared, but I had to try a whole lot of things 
> over and over again until I got sound.  However, even after I got 
> sound I couldn't get those volume bars in KDE's sound mixer to turn 
> yellow. They are still gray. What does one do about that? I'd also 
> appreciate it if someone could tell me how to supress that 
> ear-splitting feedback

I've had ESFB from having the microphone volume (gain) set too high.

> that occurs around the time that the harddrive parameters are being set.
>
>
>> Jo Jo wrote:
>>
>>> I've run ps2.exe on the ThinkPad and all the settings it lists for 
>>> the audio are the same in your modprobe.conf.  However, there are a 
>>> few settings in the conf that ps2.exe didn't give:
>>> index=0: I take it this has nothing to do w/the sound board settings...
>>> id=CARD_0: nor this.
>>
>>
>>
>> They do if you have more than one sound device.  I also use a USB 
>> audio device and that gets index=1 and id=CARD_1.  But with one card 
>> those entries can just be the default settings.  So no, PS2 doesn't 
>> report those values, they are something you can set in the driver.
>>
>>> port=0x530: same
>>
>>
>>
>> This is the primary audio device port!
>>
>>> cport=0x538: There's an "ADDress   : 538" in the AUDIOCTRL settings
>>
>>
>>
>> That's it
>>
>>> sb_port=0x220: same
>>
>>
>>
>> This is part of the sound device.  If you have different settings in 
>> BIOS and driver then you won't be able to control parts of the sound 
>> device, if the driver loads at all.
>>
>>> fm_port=0x388: ps2.exe doesn't show this
>>
>>
>>
>> It's always 0x388.  This is for the internal FM synth.  But the 
>> driver doesn't know that so that's why it is on the options line.
>>
>>> irq=5: same
>>
>>
>>
>> This is the main sound device interrupt.  If you don't have this 
>> right nothing will work!
>>
>>> dma1=1 and dma2=0: ps2.exe had "DMA   : 0 1". does order matter?
>>
>>
>>
>> Most definitely it matters.  But the order that PS2.EXE gives doesn't 
>> necessarily correspond to what the snd-cs4236 module wants, so if you 
>> think you have everything else right, try swapping the values of dma1 
>> and dma2.
>>
>>> mpu_port=0x330: There's an "ADDress   : 330" in the MIDIport settings
>>> mpu_irq=9: There's an "IRQ    : 9" in the MIDIport settings
>>> The MIDIport settings also have "Disabled"
>>
>>
>>
>> Disabled is OK, if you don't want to use external MIDI.  If you want 
>> MIDI you need a docking station in order to have the port available.  
>> But it's not needed for basic audio.
>>
>>>
>>> But I feel that this has more to do with the driver and chipset. The 
>>> error I get on startup from insmod is that there is no such device. 
>>> I guess I don't blame it for thinking that since lspci also seems to 
>>> think there's a different model in there.
>>
>>
>>
>> No, it isn't doing any such "thinking" as the snd-cs4236 driver does 
>> not look at the output of lspci.  The difficulty here is that until 
>> you get the settings right you will only get misleading error 
>> messages.  The is no "almost", it has to be right or nothing 
>> happens.  Do you also have "Quickboot" turned off?  That is required 
>> in order for the BIOS to actually configure the sound hardware.
>>
>> Since you seem to doubt that this all does work, here follows the 
>> output from various commands on my 600E.  You already have seen the 
>> sound device parts of my /etc/modules.conf (I'm running a 2.4.x 
>> kernel, but that doesn't make a difference here).
>>
>> lspci output.  Yes, this shows a CS 4610/11, but forget about that, 
>> you can't use that driver the way the 600E is wired up.  This is with 
>> my wi-fi card inserted.
>>
>> 0000:00:00.0 Host bridge: Intel Corp. 440BX/ZX/DX - 82443BX/ZX/DX 
>> Host bridge (rev 03)
>> 0000:00:01.0 PCI bridge: Intel Corp. 440BX/ZX/DX - 82443BX/ZX/DX AGP 
>> bridge (rev 03)
>> 0000:00:02.0 CardBus bridge: Texas Instruments PCI1251A
>> 0000:00:02.1 CardBus bridge: Texas Instruments PCI1251A
>> 0000:00:06.0 Multimedia audio controller: Cirrus Logic CS 4610/11 
>> [CrystalClear SoundFusion Audio Accelerator] (rev 01)
>> 0000:00:07.0 Bridge: Intel Corp. 82371AB/EB/MB PIIX4 ISA (rev 02)
>> 0000:00:07.1 IDE interface: Intel Corp. 82371AB/EB/MB PIIX4 IDE (rev 01)
>> 0000:00:07.2 USB Controller: Intel Corp. 82371AB/EB/MB PIIX4 USB (rev 
>> 01)
>> 0000:00:07.3 Bridge: Intel Corp. 82371AB/EB/MB PIIX4 ACPI (rev 02)
>> 0000:01:00.0 VGA compatible controller: Neomagic Corporation NM2200 
>> [MagicGraph 256AV] (rev 12)
>> 0000:02:00.0 Ethernet controller: Atheros Communications, Inc. AR5212 
>> 802.11abg NIC (rev 01)
>>
>> lsmod output.  This also shows USB audio modules because I use them 
>> often and thus always have them loaded.  ALL of the sound modules are 
>> automatically loaded with "modprobe snd-cs4236" followed by "modprobe 
>> snd-usb-audio", though I just have the two modules listed in 
>> /etc/modules so that the modprobes happen at boot time.  This also 
>> shows wi-fi modules, the module for the modem, and USB modules.  The 
>> madwifi modules for my atheros wi-fi card taints the kernel.
>>
>> Module                  Size  Used by    Tainted: P 
>> wlan_wep                3744   1  (autoclean)
>> mwave                  32360   4
>> ath_pci                40464   1
>> ath_rate_onoe           3976   0  [ath_pci]
>> wlan                   85464   1  [wlan_wep ath_pci ath_rate_onoe]
>> ath_hal               118992   1  [ath_pci]
>> usb-uhci               24144   0  (unused)
>> snd-usb-audio          43520   0  (unused)
>> snd-usb-lib             8292   0  [snd-usb-audio]
>> usbcore                65100   1  [usb-uhci snd-usb-audio snd-usb-lib]
>> snd-cs4236              2272   0
>> snd-cs4236-lib         11824   0  [snd-cs4236]
>> snd-pcm-oss            38560   0  (unused)
>> snd-mixer-oss          13528   0  [snd-pcm-oss]
>> snd-opl3-lib            6692   0  [snd-cs4236]
>> snd-hwdep               4640   0  [snd-opl3-lib]
>> snd-cs4231-lib         17004   0  [snd-cs4236 snd-cs4236-lib]
>> snd-pcm                62312   0  [snd-usb-audio snd-cs4236-lib 
>> snd-pcm-oss snd-cs4231-lib]
>> snd-timer              15236   0  [snd-opl3-lib snd-cs4231-lib snd-pcm]
>> snd-mpu401-uart         3792   0  [snd-cs4236]
>> snd-rawmidi            13728   0  [snd-usb-lib snd-mpu401-uart]
>> snd-seq-device          4164   0  [snd-opl3-lib snd-rawmidi]
>> snd                    34692   0  [snd-usb-audio snd-usb-lib 
>> snd-cs4236 snd-cs4236-lib snd-pcm-oss snd-mixer-oss snd-opl3-lib 
>> snd-hwdep snd-cs4231-lib snd-pcm snd-timer snd-mpu401-uart 
>> snd-rawmidi snd-seq-device]
>> snd-page-alloc          4968   0  [snd-usb-audio snd-mixer-oss 
>> snd-hwdep snd-cs4231-lib snd-pcm snd-timer snd-rawmidi snd-seq-device 
>> snd]
>>
>>
>> cat /proc/interrupts
>> See how the sound device interrupt 5 actually gets claimed by 
>> "CS4231", just to be confusing.  Also interrupt 9 is claimed by the 
>> raw MIDI driver.
>>           CPU0       0:      75126          XT-PIC  timer
>>  1:        396          XT-PIC  keyboard
>>  2:          0          XT-PIC  cascade
>>  5:          0          XT-PIC  CS4231
>>  7:          1          XT-PIC  parport0
>>  8:          4          XT-PIC  rtc
>>  9:          0          XT-PIC  MPU401 UART
>> 10:          7          XT-PIC  mwave_3780i
>> 11:       1069          XT-PIC  Texas Instruments PCI1251A, Texas 
>> Instruments PCI1251A (#2), usb-uhci, ath0
>> 12:         83          XT-PIC  PS/2 Mouse
>> 14:      17283          XT-PIC  ide0
>> 15:          5          XT-PIC  ide1
>> NMI:          0
>> ERR:          0
>>
>>
>> cat /proc/ioports  Note how ALL of the ports I have in the options 
>> line (and then some) show up as belonging to some part of the sound 
>> hardware.
>>
>> 0000-001f : dma1
>> 0020-003f : pic1
>> 0040-005f : timer
>> 0060-006f : keyboard
>> 0070-007f : rtc
>> 0080-008f : dma page reg
>> 00a0-00bf : pic2
>> 00c0-00df : dma2
>> 00f0-00ff : fpu
>> 0130-013f : mwave_3780i
>> 0170-0177 : ide1
>> 01f0-01f7 : ide0
>> 0220-022f : CS4236+ SB
>> 02f8-02ff : serial(set)
>> 0330-0331 : MPU401 UART
>> 0376-0376 : ide1
>> 0388-0389 : OPL2/3 (left)
>> 038a-038b : OPL2/3 (right)
>> 03bc-03be : parport0
>> 03c0-03df : vga+
>> 03f6-03f6 : ide0
>> 03f8-03ff : serial(set)
>> 0530-0533 : CS4231
>> 0538-053f : CS4232 Control
>> 07bc-07be : parport0
>> 0cf8-0cff : PCI conf1
>> 4000-40ff : PCI CardBus #02
>> 4400-44ff : PCI CardBus #02
>> 4800-48ff : PCI CardBus #05
>> 4c00-4cff : PCI CardBus #05
>> 8400-841f : Intel Corp. 82371AB/EB/MB PIIX4 USB
>>  8400-841f : usb-uhci
>> d000-dfff : PCI Bus #01
>> ef00-ef3f : Intel Corp. 82371AB/EB/MB PIIX4 ACPI
>> efa0-efbf : Intel Corp. 82371AB/EB/MB PIIX4 ACPI
>> fcf0-fcff : Intel Corp. 82371AB/EB/MB PIIX4 IDE
>>  fcf0-fcf7 : ide0
>>  fcf8-fcff : ide1
>>
>>
>> cat /proc/asound/cards  (USB audio device not inserted at this time, 
>> so just CARD_0 appears)
>>
>> 0 [CARD_0         ]: CS4239 - CS4239
>>                     CS4239 at 0x530, irq 5, dma 1&0
>>
>>
>> cat /proc/asound/devices   These are your basic audio devices.
>>
>>  8: [0- 0]: raw midi
>>  4: [0- 0]: hardware dependent
>> 16: [0- 0]: digital audio playback
>> 24: [0- 0]: digital audio capture
>>  0: [0- 0]: ctl
>> 33:       : timer
>>
>>
>> cat /proc/asound/hwdep   The FM synth.
>>
>> 00-00: OPL3 FM
>>
>>
>> cat /proc/asound/pcm   The digital audio ins and outs.  Again 
>> confusingly, CS4231 and CS4239 are showing, yet one gets this by 
>> modprobing the snd-cs4236 module!
>>
>> 00-00: CS4231 : CS4239 : playback 1 : capture 1
>>
>>
>> cat /proc/asound/version  While this was built last week, I don't 
>> think I've had to touch the config since about version 1.03 or so, 
>> over a year ago.
>>
>> Advanced Linux Sound Architecture Driver Version 1.0.8.
>> Compiled on Feb 10 2005 for kernel 2.4.28-lck15 with versioned symbols.
>>
>>
>> Well there you have it, examples from a working 600E with everything 
>> related to sound configured and working.  Sure, you might not care 
>> about MIDI or the FM synth, and those two are optional, but 
>> everything else is required to get the full use out of the sound 
>> device.  Remember there is absolutely no auto probing going on here, 
>> you have to get the settings right or nothing happens!  That's why 
>> getting sound working on a 600E and others with the same sound 
>> hardware is so difficult, there is no help from the software, you 
>> have to get the settings right yourself.  Keep trying and good luck!
>>
>> wes
>> -- 
>> The linux-thinkpad mailing list home page is at:
>> http://mailman.linux-thinkpad.org/mailman/listinfo/linux-thinkpad
>
>
> _________________________________________________________________
> Scan and help eliminate destructive viruses from your inbound and 
> outbound e-mail and attachments. 
> http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines 
>  Start enjoying all the benefits of MSNŽ Premium right now and get the 
> first two months FREE*.
>