LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   sound and the OSS vs ALSA (https://www.linuxquestions.org/questions/linux-hardware-18/sound-and-the-oss-vs-alsa-295802/)

jkassemi 02-28-2005 06:30 AM

sound and the OSS vs ALSA
 
Hey everybody. Thanks for taking the time to help me out here.

I'm running slack 10.1 on an hp ze4420us laptop... and I've actually got it almost working completely. I've got wireless internet up... which only took me about two weeks :). I've also got my usb keyboard and mouse working, and I have one more thing I haven't yet gotten to work: sound.

Here's the output of lpsci -v

Code:

00:00.0 Host bridge: ATI Technologies Inc AGP Bridge [IGP 320M] (rev 13)
        Flags: bus master, 66Mhz, medium devsel, latency 32
        Memory at e8000000 (32-bit, prefetchable) [size=64M]
        Memory at e4400000 (32-bit, prefetchable) [size=4K]
        I/O ports at 8090 [disabled] [size=4]
        Capabilities: [a0] AGP version 2.0

00:01.0 PCI bridge: ATI Technologies Inc PCI Bridge [IGP 320M] (rev 01) (prog-if 00 [Normal decode])
        Flags: bus master, 66Mhz, medium devsel, latency 99
        Bus: primary=00, secondary=01, subordinate=01, sec-latency=68
        I/O behind bridge: 00009000-00009fff
        Memory behind bridge: e4100000-e41fffff
        Prefetchable memory behind bridge: ec000000-edffffff

00:02.0 USB Controller: ALi Corporation USB 1.1 Controller (rev 03) (prog-if 10 [OHCI])
        Subsystem: Hewlett-Packard Company: Unknown device 0024
        Flags: bus master, medium devsel, latency 64, IRQ 10
        Memory at e4000000 (32-bit, non-prefetchable) [size=4K]
        Capabilities: [60] Power Management version 2

00:06.0 Multimedia audio controller: ALi Corporation M5451 PCI AC-Link Controller Audio Device (rev 02)
        Subsystem: Hewlett-Packard Company: Unknown device 0024
        Flags: bus master, medium devsel, latency 64, IRQ 5
        I/O ports at 8400 [size=256]
        Memory at e4001000 (32-bit, non-prefetchable) [size=4K]
        Capabilities: [dc] Power Management version 2

00:07.0 ISA bridge: ALi Corporation M1533 PCI to ISA Bridge [Aladdin IV]
        Subsystem: ALi Corporation ALI M1533 Aladdin IV ISA Bridge
        Flags: bus master, medium devsel, latency 0
        Capabilities: [a0] Power Management version 1

00:08.0 Modem: ALi Corporation Intel 537 [M5457 AC-Link Modem] (prog-if 00 [Generic])
        Subsystem: Hewlett-Packard Company: Unknown device 0024
        Flags: medium devsel, IRQ 3
        Memory at e4002000 (32-bit, non-prefetchable) [size=4K]
        I/O ports at 8800 [size=256]
        Capabilities: [40] Power Management version 2

00:0a.0 CardBus bridge: O2 Micro, Inc. OZ6912 Cardbus Controller
        Flags: bus master, stepping, slow devsel, latency 168, IRQ 11
        Memory at 1f800000 (32-bit, non-prefetchable) [size=4K]
        Bus: primary=00, secondary=02, subordinate=05, sec-latency=176
        Memory window 0: 1fc00000-1ffff000 (prefetchable)
        Memory window 1: 20000000-203ff000
        I/O window 0: 00004000-000040ff
        I/O window 1: 00004400-000044ff
        16-bit legacy interface ports at 0001

00:10.0 IDE interface: ALi Corporation M5229 IDE (rev c4) (prog-if b0)
        Subsystem: Hewlett-Packard Company: Unknown device 0024
        Flags: bus master, medium devsel, latency 32
        I/O ports at 8080 [size=16]
        Capabilities: [60] Power Management version 2

00:11.0 Bridge: ALi Corporation M7101 PMU
        Subsystem: Hewlett-Packard Company: Unknown device 0024
        Flags: medium devsel

00:12.0 Ethernet controller: National Semiconductor Corporation DP83815 (MacPhyter) Ethernet Controller
        Subsystem: Hewlett-Packard Company: Unknown device 0024
        Flags: bus master, medium devsel, latency 90, IRQ 11
        I/O ports at 8c00 [size=256]
        Memory at e4003000 (32-bit, non-prefetchable) [size=4K]
        Expansion ROM at <unassigned> [disabled] [size=64K]
        Capabilities: [40] Power Management version 2

01:05.0 VGA compatible controller: ATI Technologies Inc Radeon Mobility U1 (prog-if 00 [VGA])
        Subsystem: Hewlett-Packard Company: Unknown device 0024
        Flags: bus master, stepping, fast Back2Back, 66Mhz, medium devsel, latency 66, IRQ 10
        Memory at ec000000 (32-bit, prefetchable) [size=32M]
        I/O ports at 9000 [size=256]
        Memory at e4100000 (32-bit, non-prefetchable) [size=64K]
        Expansion ROM at <unassigned> [disabled] [size=128K]
        Capabilities: [58] AGP version 2.0
        Capabilities: [50] Power Management version 2

02:00.0 Network controller: Texas Instruments ACX 111 54Mbps Wireless Interface
        Subsystem: Linksys: Unknown device 0033
        Flags: bus master, medium devsel, latency 64, IRQ 11
        Memory at 20020000 (32-bit, non-prefetchable) [size=8K]
        Memory at 20000000 (32-bit, non-prefetchable) [size=128K]
        Capabilities: [40] Power Management version 2

I looked up the multmedia audio controller, found out that it was ?trident? controlled, so enabled the OSS with the trident module in my kernel. Recompiled, and ran. Now the system beep works when I hit backspace one too many times, but whenever I load up into a windows manager to run xmms it fails to load the sound server.

I think I've learned a lot through installing slack on my laptop and my desktop, but please, I don't think I'm an expert yet :). If anybody could start me off on the path to a solution I'd dearly appreciate it,

Sincerely,

James Kassemi
http://www.jameskassemi.com

hw-tph 02-28-2005 06:45 AM

James, according to the Alsa sound card matrix you have a card compatible with the Alsa snd-ali5451 driver module. See if you have the driver built and installed already by typing modinfo snd-ali5451. If the module isn't found you will have to install the Alsa drivers, either from your distribution (the version needs to match your kernel version exactly) or by building it from source (this requires the headers and/or sources for your running kernel to be installed).

You can find more information here.


Håkan

jkassemi 02-28-2005 08:44 AM

Compiling the kernel with the ALSA support right now... Hopefully it works. I'm going to have to reboot when it's done, but I'll post with results. Thanks for your help though.

James

jkassemi 02-28-2005 11:29 AM

Okay... I've compiled about four more times getting the drivers to install without an error coming from my rc.alsa script... Here's the message I get now:

Code:

Loading ALSA mixer settings:  /usr/sbin/alsactl restore
Loading OSS compatibility modules for ALSA.

But unfortunately I get the following system message from dmesg:

Code:

Advanced Linux Sound Architecture Driver Version 1.0.6 (Sun Aug 15 07:17:53 2004 UTC).
ALSA device list:
  No soundcards found.

And in case you're not familiar with the rc.alsa script in slackware 10:

Code:

#!/bin/sh
# Load the mixer settings and OSS compatibility for ALSA.
# (the Advanced Linux Sound Architecture)

# A function to load the ALSA mixer settings:
load_alsa_mixer() {
  if [ -r /etc/asound.state ]; then
    echo "Loading ALSA mixer settings:  /usr/sbin/alsactl restore"
    /usr/sbin/alsactl restore
  else
    echo "ALSA warning:  No mixer settings found in /etc/asound.state."
    echo "  Sound may be muted.  Use 'alsamixer' to unmute your sound card,"
    echo "  and then 'alsactl store' to save the default ALSA mixer settings"
    echo "  to be loaded at boot."
  fi
}

# A function to load the ALSA OSS compat modules:
load_alsa_oss_modules() {
  if ! cat /proc/modules | grep -w snd-pcm-oss 1> /dev/null 2> /dev/null ; then
    echo "Loading OSS compatibility modules for ALSA."
    modprobe snd-pcm-oss
    modprobe snd-mixer-oss
  fi
}

# If hotplug or something else has loaded the ALSA modules, then
# simply load the mixer settings and make sure the OSS compat
# modules are loaded:
if [ -d /proc/asound ]; then
  load_alsa_mixer
  load_alsa_oss_modules
else
  # If there are ALSA modules defined in /etc/modules.conf, but
  # ALSA is not yet loaded, then load the modules now:
  DRIVERS=`modprobe -c | grep -E "^[[:space:]]*alias[[:space:]]+snd-card-[[:digit:]]" | awk '{ print $3 }'`
  if [ ! "$DRIVERS" = "" ]; then
    echo "Loading ALSA kernel modules."
    for module in $DRIVERS; do
      modprobe $module
    done
  fi
  # If ALSA is now up, then load the mixer settings and OSS modules:
  if [ -d /proc/asound ]; then
    load_alsa_mixer
    load_alsa_oss_modules
  fi
fi

Due to my lack of experience with linux, I really don't know much about what the above actually does.

And in case it helps, /proc/modules content:

Code:

ndiswrapper 120980 0 - Live 0xe0459000
snd_pcm_oss 47908 0 - Live 0xe0427000
snd_mixer_oss 17344 1 snd_pcm_oss, Live 0xe0412000
pcspkr 3048 0 - Live 0xe03a6000
usbhid 23104 0 - Live 0xe03cb000
ohci_hcd 18632 0 - Live 0xe03d8000
snd_ali5451 19588 0 - Live 0xe03d2000
snd_ac97_codec 71840 1 snd_ali5451, Live 0xe03f8000
snd_pcm 81544 3 snd_pcm_oss,snd_ali5451,snd_ac97_codec, Live 0xe03e3000
snd_page_alloc 7492 1 snd_pcm, Live 0xe03be000
pcmcia 17348 2 - Live 0xe03c5000
yenta_socket 18944 1 - Live 0xe03a9000
pcmcia_core 47552 2 pcmcia,yenta_socket, Live 0xe03b1000


hw-tph 02-28-2005 02:51 PM

Did you try running alsaconf? If it's not included with your distribution you can grab it from the Alsa FTP archive in the driver directory, IIRC.


Håkan

jkassemi 03-05-2005 08:01 AM

Okay. I tweaked with it a little bit, and turns out that I had the kernel configuration wrong... For how long I don't know... as I forgot to turn my speakers back up... Here's what I've got in the kernel now, and it works:

Code:

#
# Advanced Linux Sound Architecture
#
CONFIG_SND=y
CONFIG_SND_TIMER=y
CONFIG_SND_PCM=y
CONFIG_SND_RAWMIDI=y
CONFIG_SND_SEQUENCER=y
# CONFIG_SND_SEQ_DUMMY is not set
CONFIG_SND_OSSEMUL=y
CONFIG_SND_MIXER_OSS=y
CONFIG_SND_PCM_OSS=y
CONFIG_SND_SEQUENCER_OSS=y
CONFIG_SND_VERBOSE_PRINTK=y
CONFIG_SND_DEBUG=y
# CONFIG_SND_DEBUG_MEMORY is not set
CONFIG_SND_DEBUG_DETECT=y

Hope this helps some other kid when they're in need :)

Thanks for the help everyone!

James Kassemi


All times are GMT -5. The time now is 03:59 PM.