You are not logged in.

#1 2005-04-06 00:49:07

_will
Member
Registered: 2004-07-08
Posts: 123

Alsa and snd_intel8x0

there seem to be a lot of sound problems floating around the wiki and forum, and unforutantly im going to add to them.
[im trying to show friends that linux can be a powerful multimedia editor--using hydrogen, rosegarden, cinerrala, etc. this doesn't work when i can only use one program at a time, and can't listen to music while doing anything]

i want to use alsa (not a something i have to update every 4 mounths) and am led to believe its possible. i have sound with alsa, but only with one program at a time --the wiki solution for this didn't not help.

(!) i find i can't play midi files at all

i read the links listed here and on two particular forum posts: intel and bad hardware identification and intel8x0m troubles

i do not understand the conclusion of the hardware misidentification situation, but hope that it doesnt apply

what i've got:

[~] $ uname -a
Linux MobileEvil 2.6.10-ARCH #1 SMP Tue Jan 18 08:57:22 PST 2005 i686 Intel(R) Pentium(R) M processor 1.80GHz GenuineIntel GNU/Linux
20:41:39 [~] $ groups
wheel users slocate audio sound

HARDWARE DETECT ver 4.6 (simple mode)
  Kernel     : 2.6.10-ARCH
  CPU & Cache: Processor 0 is Intel(R) Pentium(R) M processor 1.80GHz 1794MHz, 2048 KB Cache

  ALSA(sound): Intel Corp.|ICH4 845G/GL Chipset AC'97 Audio Controller module: snd-intel8x0
/usr/bin/mkxcfg: line 106: /usr/sbin/ddcxinfo-arch: No such file or directory
Video      : ATI|....

20:37:50 [~] $ lspci 
00:00.0 Host bridge: Intel Corp.: Unknown device 3340 (rev 03)
00:01.0 PCI bridge: Intel Corp.: Unknown device 3341 (rev 03)
00:1d.0 USB Controller: Intel Corp. 82801DB USB (Hub #1) (rev 01)
00:1d.1 USB Controller: Intel Corp. 82801DB USB (Hub #2) (rev 01)
00:1d.2 USB Controller: Intel Corp. 82801DB USB (Hub #3) (rev 01)
00:1d.7 USB Controller: Intel Corp. 82801DB USB EHCI Controller (rev 01)
00:1e.0 PCI bridge: Intel Corp. 82801BAM/CAM PCI Bridge (rev 81)
00:1f.0 ISA bridge: Intel Corp.: Unknown device 24cc (rev 01)
00:1f.1 IDE interface: Intel Corp.: Unknown device 24ca (rev 01)
00:1f.3 SMBus: Intel Corp. 82801DB SMBus (rev 01)
00:1f.5 Multimedia audio controller: Intel Corp. 82801DB AC'97 Audio (rev 01)
00:1f.6 Modem: Intel Corp. 82801DB AC'97 Modem (rev 01)
01:00.0 VGA compatible controller: ATI Technologies Inc: Unknown device 4e50
02:00.0 CardBus bridge: Texas Instruments: Unknown device ac46 (rev 01)
02:00.1 CardBus bridge: Texas Instruments: Unknown device ac46 (rev 01)
02:01.0 Ethernet controller: Intel Corp.: Unknown device 101e (rev 03)
02:02.0 Ethernet controller: Unknown device 168c:1014 (rev 01)
Module                  Size  Used by
usblp                  13312  0 
snd_seq                57232  0 
snd_seq_device          8972  1 snd_seq
fglrx                 235872  9 
nls_cp437               6144  1 
vfat                   14976  1 
fat                    42912  1 vfat
lp                     12296  0 
ohci_hcd               23560  0 
irtty_sir               7424  0 
sir_dev                18492  1 irtty_sir
irda                  144188  1 sir_dev
crc_ccitt               2432  1 irda
parport_pc             28996  1 
parport                38600  2 lp,parport_pc
pcspkr                  4044  0 
ath_pci                59680  0 
ath_rate_onoe           8712  1 ath_pci
wlan                  118876  3 ath_pci,ath_rate_onoe
ath_hal               132944  2 ath_pci
yenta_socket           22400  0 
pcmcia_core            60992  1 yenta_socket
hci_usb                15104  0 
bluetooth              52740  1 hci_usb
i2c_i801                8972  0 
i2c_core               23296  1 i2c_i801
usbhid                 45824  0 
usb_storage            71232  1 
ehci_hcd               35332  0 
uhci_hcd               34576  0 
usbcore               125560  8 usblp,ohci_hcd,hci_usb,usbhid,usb_storage,ehci_h
cd,uhci_hcd
shpchp                100996  0 
pci_hotplug            34748  1 shpchp
tsdev                   8128  0 
joydev                 10560  0 
evdev                   9984  0 
snd_pcm_oss            56612  0 
snd_mixer_oss          21120  2 snd_pcm_oss
snd_intel8x0           34336  5 
snd_ac97_codec         78176  1 snd_intel8x0
snd_pcm               101252  5 snd_pcm_oss,snd_intel8x0,snd_ac97_codec
snd_timer              27140  2 snd_seq,snd_pcm
snd                    59108  15 snd_seq,snd_seq_device,snd_pcm_oss,snd_mixer_os
s,snd_intel8x0,snd_ac97_codec,snd_pcm,snd_timer
soundcore              10848  2 snd
snd_page_alloc         10244  2 snd_intel8x0,snd_pcm
e1000                  90164  0 
rtc                    13128  0 
20:52:22 [~] $ lsdev
Device            DMA   IRQ  I/O Ports
------------------------------------------------
0000:00:1d.0                 1800-181f
0000:00:1d.1                 1820-183f
0000:00:1d.2                 1840-185f
0000:00:1f.0                 1000-107f 1180-11bf
0000:00:1f.1                 1860-186f
0000:00:1f.3                 1880-189f
0000:00:1f.5                 18c0-18ff 1c00-1cff
0000:00:1f.6                 2000-207f 2400-24ff
0000:01:00.0                   3000-30ff
0000:02:01.0                 8000-803f
acpi                      9 
ACPI                             1010-1015
ath0                     11 
cascade             4     2 
dma                          0080-008f
dma1                         0000-001f
dma2                         00c0-00df
e1000                          8000-803f
fpu                          00f0-00ff
GPE0_BLK                         1028-102f
i801-smbus                     1880-188f
i8042                  1 12 
ide0                     14  01f0-01f7 03f6-03f6   1860-1867
ide1                     15  0170-0177 0376-0376   1868-186f
Intel                          18c0-18ff   1c00-1cff
keyboard                     0060-006f
motherboard                    1000-107f   1180-11bf 15e0-15ef 1600-167f
parport0                  7  03bc-03be
PCI                          0cf8-0cff 3000-3fff 4000-40ff 4400-44ff 4800-48ff 4c00-4cff
pic1                         0020-0021
pic2                         00a0-00a1
PM1a_CNT_BLK                     1004-1005
PM1a_EVT_BLK                     1000-1003
PM2_CNT_BLK                      1020-1020
PM_TMR                           1008-100b
rtc                       8  0070-0077
serial                       03f8-03ff
timer                     0 
timer0                       0040-0043
timer1                       0050-0053
uhci_hcd                       1800-181f   1820-183f   1840-185f
vesafb                       03c0-03df
20:34:55 [~] $ cat /etc/modprobe.conf
#
# /etc/modprobe.conf (for v2.6 kernels)
#

# --- BEGIN: Generated by ALSACONF, do not edit. ---
# --- ALSACONF verion 1.0.6 ---
options snd  device_mode=0666
alias ath0 ath_pci
alias eth1 ath_pci
alias snd-card-0 snd-intel8x0
alias sound-slot-0 snd-intel8x0
alias /dev/snd/seq snd-seq
# --- END: Generated by ALSACONF, do not edit. ---
20:42:04 [~] $ cat /etc/asound.conf
#/etc/asound.conf start:
pcm.!default {
  type plug
  slave.pcm "dmixer"
  }
pcm.dsp0 {
  type plug
  slave.pcm "dmixer"
  }
pcm.dmixer {
  type dmix
  ipc_key 1024
 slave {
  pcm "hw:0,0"
  period_time 0
  period_size 1024
 buffer_size 8192
  rate 44100
  }
 bindings {
  0 0
  1 1
  }
  }

ctl.dmixer {
  type hw
  card 0
  }
#end.
ls /dev/sound -l
total 0
crw-rw----  1 root audio 14, 12 1969-12-31 19:00 adsp
crw-rw----  1 root audio 14,  4 1969-12-31 19:00 audio
crw-rw----  1 root audio 14,  3 1969-12-31 19:00 dsp
crw-rw----  1 root audio 14,  0 1969-12-31 19:00 mixer

thats all i can think of
thanks for taking the time to read
will

Offline

#2 2005-04-06 01:10:13

smith
Member
From: Crescent City, CA
Registered: 2005-02-19
Posts: 77

Re: Alsa and snd_intel8x0

You will need timidity++ and a patch set in order to play midi files (i'm assuming your soundcard doesn't have a midi synthesizer).

I don't know a lot about mixing support.  Here's a link to the official alsa doc for your sound driver.
http://www.alsa-project.org/alsa-doc/do … e=intel8x0


I have nothing to say, and I am saying it.

Offline

#3 2005-04-06 01:14:47

neotuli
Lazy Developer
From: London, UK
Registered: 2004-07-06
Posts: 1,204
Website

Re: Alsa and snd_intel8x0

As the wiki says, the dmix solution only applies to programs that use alsa, not those that are working through the oss emulation layer. This might be part of the problem.

As for the midis, this is a bit more complicated. You need to install timidity++ from extra and eawpatches from staging. Installing these two should get you going on the midis, and I think you should be able to play them on the command line with simply "timidity path_to_midi". I seem to remember some fiddling that needed to be done with the eawpatches package, but I don't quite remember right now...try a forum search, the thread is probably around somewhere.


The suggestion box only accepts patches.

Offline

#4 2005-04-06 02:16:34

_will
Member
Registered: 2004-07-08
Posts: 123

Re: Alsa and snd_intel8x0

wow fast replys, thanks

kcontrol has an option to test midi (i don't use kde but was playing with arts)  i thought that'd have worked with out other packages
after pacman -S  timidity++ eawpatches
timidity fails to play the midi's i have, thought i have no way of telling if they uncorrupt files

mplayer, mpd, and gaim all work through alsa (?) .. so they should--if everything was set up right-- be able to play at the same time?

when mpd is doing its thing:

mplayer file

[AO OSS] audio_setup: Can't open audio device /dev/sound/dsp: Device or resource busy
alsa-init: got device=0, subdevice=0
alsa-init: 1 soundcard found, using: default

mplayer -ao alsa file

Checking audio filter chain for 32000Hz/2ch/16bit -> 32000Hz/2ch/16bit...
AF_pre: af format: 2 bps, 2 ch, 32000 hz, little endian signed int
AF_pre: 32000Hz 2ch Signed 16-bit (Little-Endian)
alsa-init: got device=0, subdevice=0
alsa-init: 1 soundcard found, using: default

both do not do anything more than that.. no video no sound

22:27:37 [~] $ cat /etc/mpd.conf | grep ao_driver -C 3
################## AUDIO OUTPUT ##########################
#
# OSS Audio Output
#ao_driver              "oss"
#ao_driver_options      "dsp=/dev/dsp"
#
# ALSA Audio Output
ao_driver               "alsa09"
ao_driver_options       "dev=hw:0,0"
#
# Set this if you have problems 
# playing audio files.

edit:
:oops:   i ran mplayer -ao alsa09 .. and it worked, or well mplayer played the video .. no sound, regardless if something else is running

thanks again
will

Offline

#5 2005-04-06 03:02:14

_will
Member
Registered: 2004-07-08
Posts: 123

Re: Alsa and snd_intel8x0

[put this in a new post.. because its diffrent sort of]

--i have an ibm T42 --

from http://opensrc.org/alsa/index.php?page=intel8x0   (thanks for the link above)

# this is IBM T40 specific, which
# uses the snd_intel8x0, and may
# not work on other laptops
pcm.amix {
    type dmix
    ipc_key 50557
    slave {
        pcm "hw:0,0"
        period_time 0
        period_size 1024
        buffer_size 8192
    }
    bindings {
        0 0
        1 1
    }
}

# route ALSA software through pcm.amix
pcm.!default {
    type plug
    slave.pcm "amix"
}

and

mplayer -ao alsa:device=amix foobar.mp3

doing that hangs mplayer till sound is stoped
doing it before changing asound.conf did the same as -ao alsa09
however, unlike doing alsa09 before, that works when nothing else is playing



i am confused though:
suggested changes to modprobe.conf

# ALSA portion
        alias char-major-116 snd
        alias snd-card-0 snd-intel8x0
    # module options should go here

        # OSS/Free portion
        alias char-major-14 soundcore
        alias sound-slot-0 snd-card-0
   
    # card #1
    alias sound-service-0-0 snd-mixer-oss
    alias sound-service-0-1 snd-seq-oss
    alias sound-service-0-3 snd-pcm-oss
    alias sound-service-0-8 snd-seq-oss
    alias sound-service-0-12 snd-pcm-oss

do i want the oss/free portion
does this change anything

Offline

#6 2005-04-08 21:38:16

_will
Member
Registered: 2004-07-08
Posts: 123

Re: Alsa and snd_intel8x0

hehe, i'll contune to post progress in here incase someone else has this problem

suggested from the helpful link given above

alsaplayer -o alsa -d dmix file &
alsaplayer -o alsa -d dmix file &

will both play as will

alsaplayer -o alsa  file &
alsaplayer -o alsa  file &

and

aoss mpg123 file &
aoss mpg123 file &

i have the suggested (easy) ~/.asoundrc file

pcm.dsp0 {
    type plug
    slave.pcm dmix
}
# mixer0 can stay unchanged, because
# it isn't used anyway, I guess wink
ctl.mixer0 {
    type hw
    card 0

}

mplayer poop/vid/Bad Cops Between Breaths.wmv -ao alsa &

does not work..at all (it works without the &)
but

 
17:33:26 [~] $ alsaplayer music/Lawrence Arms/Lawrence Arms - 3am Qvc Shop
ping Spree Hangover.mp3 &
[6] 11175
17:33:36 [~] $ mplayer poop/vid/Bad Cops Between Breaths.wmv -ao alsa

works fine

nothing will play if mpd is playing
im confused
does anyone know what the config file for mpd should look like to allow me to play more than one thing at a time?

running hydrogen also locks up the sound, so only hydrogen can use it
i'll spend more time with it



thanks
will

Offline

#7 2005-04-08 22:16:58

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: Alsa and snd_intel8x0

Offline

#8 2005-04-08 22:35:33

_will
Member
Registered: 2004-07-08
Posts: 123

Re: Alsa and snd_intel8x0

thats where i started, but the wiki that helped the most
http://wiki2.archlinux.org/index.php/Al … 0at%20once

i thought i had followed both those wiki instructions through (at least twice) but changing ~/.asound  to one suggested in the wiki focusing on gaim and xmms worked

i donno if i failed to notice beause i was using mpd, but xmms, gaim, and hydrogen all share fine, mpd hangs until all are stopped

hydrogen, while working, gave me some errors (besides the normal real time thing)

[ERROR]     AlsaAudioDriver     ALSA: cannot open audio device hw:0: Device or resource busy
[WARNING]   AlsaAudioDriver     [connect] Using alsa device: default
[ERROR]     AlsaAudioDriver     [connect] error in snd_pcm_hw_params_set_period_size: Invalid argument
[WARNING]   Hydrogen            [audioEngine_setupLadspaFX] m_pSong=NULL
[ERROR]     AlsaAudioDriver     Can't set realtime scheduling for ALSA Driver

and i still havn't figured out how to play the mid's hyrdogen produces


sorry for this mess of posts
thanks
will

Offline

#9 2005-04-08 22:47:01

_will
Member
Registered: 2004-07-08
Posts: 123

Re: Alsa and snd_intel8x0

yay ... sound for everything!

looking at the hyrdogen error got me to change a line in mpd.conf

ao_driver_options       "dev=default"

from dev=hw...

for anyone who ends up here in a search:

18:41:07 [~] $ cat /etc/mpd.conf | grep -v "#"

port                    "6600"
music_directory         "~/music"
playlist_directory      "~/.mpd/playlists"
log_file                "~/.mpd/mpd.log"
error_file              "~/.mpd/mpd.error"

db_file         "~/.mpd/mpd.db"
state_file              "~/.mpd/mpdstate"

mixer_type              "alsa"
mixer_device            "default"
mixer_control           "PCM"

ao_driver               "alsa09"
ao_driver_options       "dev=default"

user            "will"

18:42:31 [~] $ cat .asoundrc
pcm.dsp0 { ## This is accessed by oss applications
     type plug
     slave.pcm "dmixer"
}
ctl.mixer0 {  ## This ties mixer controls for oss mixer programs
     type hw
     card 0
}
pcm.dmixer {  ## This is a softward driven mixer, alsa's 'dmix'
     type dmix
     ipc_key 1024 ## this can be any unique value
     slave {
          pcm "hw:0,0" ## pointing to your card
          period_time 0
          period_size 1024 ## These options are tweakable,
          buffer_size 4096 ## but use powers of 2 for sizes
          rate 48000 ## the sample rate
          periods 518
     }
     bindings {  ## this binds channel 'n's input to channel 'n' output
          0 0
          1 1
     }
}
pcm.!default { ## The default sound driver, a wrapper for dmixer
     type plug
     slave.pcm "dmixer"
}

18:43:07 [~] $ cat /etc/asound.conf
/etc/asound.conf start:
pcm.!default {
  type plug
  slave.pcm "dmixer"
  }
pcm.dsp0 {
  type plug
  slave.pcm "dmixer"
  }
pcm.dmixer {
  type dmix
  ipc_key 1024
 slave {
  pcm "hw:0,0"
  period_time 0
  period_size 1024
 buffer_size 8192
  rate 44100
  }
 bindings {
  0 0
  1 1
  }
  }

ctl.dmixer {
  type hw
  card 0
  }
#end.

18:43:39 [~] $ cat /etc/modprobe.conf | grep -v "#"

options snd  device_mode=0666
alias ath0 ath_pci
alias eth1 ath_pci
alias snd-card-0 snd-intel8x0
alias /dev/snd/seq snd-seq
        
alias sound-slot-0 snd-card-0

thanks snowman, neotuli, and smith for helping

will

Offline

#10 2005-04-08 23:01:23

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Alsa and snd_intel8x0

why do you have 2 dmix setups? shouldn't you only need one?

Offline

#11 2005-04-09 02:16:26

_will
Member
Registered: 2004-07-08
Posts: 123

Re: Alsa and snd_intel8x0

if i get adventurous i'll toggle everything, but now im content it works

Offline

#12 2005-05-07 20:40:58

josephmc
Member
From: Texas,USA
Registered: 2005-03-16
Posts: 51
Website

Re: Alsa and snd_intel8x0

i am having a problem with dmix and mpd and all your mpd config does it freeze it up. I have set it up to use alsa but it won't use dmix. Very frustrating. Commenting out the ao_driver_options freezes it too.

EDIT:i checked SO many times to see if anything was using the sound card. nothing. finally i rebooted just for the heck of it and it was fixed. very odd. lsof didn't show anything using any sound devs either.

Offline

#13 2005-05-08 03:12:34

_will
Member
Registered: 2004-07-08
Posts: 123

Re: Alsa and snd_intel8x0

i think i can empathize with sound config fustrations

hopefully this will be helpful in some way
the whole of my (working..as far as i know) mpd config looks like this

23:09:35 [~] $ cat /etc/mpd.conf | grep -v "#"

port                    "6600"
music_directory         "~/music"
playlist_directory      "~/.mpd/playlists"
log_file                "~/.mpd/mpd.log"
error_file              "~/.mpd/mpd.error"



db_file         "~/.mpd/mpd.db"
state_file              "~/.mpd/mpdstate"


mixer_type              "alsa"
mixer_device            "default"
mixer_control           "PCM"


ao_driver               "alsa09"
ao_driver_options       "dev=default"

user            "will"

Offline

Board footer

Powered by FluxBB