Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 87240 - alsa-driver: 2 soundcards => incorrect OSS emulation
Summary: alsa-driver: 2 soundcards => incorrect OSS emulation
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Jeremy Huddleston (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-30 03:02 UTC by Ioannis Aslanidis (RETIRED)
Modified: 2005-04-19 10:52 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ioannis Aslanidis (RETIRED) gentoo-dev 2005-03-30 03:02:30 UTC
The problem described below was tested on (~)x86 and (~)amd64.

I have 2 soundcards:

Comment 1 Ioannis Aslanidis (RETIRED) gentoo-dev 2005-03-30 03:02:30 UTC
The problem described below was tested on (~)x86 and (~)amd64.

I have 2 soundcards:

· emu10k1
· intel8x0

bluehat dev # lspci
0000:00:00.0 Host bridge: nVidia Corporation nForce3 250Gb Host Bridge (rev a1)
0000:00:01.0 ISA bridge: nVidia Corporation nForce3 250Gb LPC Bridge (rev a2)
0000:00:01.1 SMBus: nVidia Corporation nForce 250Gb PCI System Management (rev a1)
0000:00:02.0 USB Controller: nVidia Corporation CK8S USB Controller (rev a1)
0000:00:02.1 USB Controller: nVidia Corporation CK8S USB Controller (rev a1)
0000:00:02.2 USB Controller: nVidia Corporation nForce3 EHCI USB 2.0 Controller (rev a2)
0000:00:05.0 Bridge: nVidia Corporation CK8S Ethernet Controller (rev a2)
0000:00:06.0 Multimedia audio controller: nVidia Corporation nForce3 250Gb AC'97 Audio Controller (rev a1)
0000:00:08.0 IDE interface: nVidia Corporation CK8S Parallel ATA Controller (v2.5) (rev a2)
0000:00:0b.0 PCI bridge: nVidia Corporation nForce3 250Gb AGP Host to PCI Bridge (rev a2)
0000:00:0e.0 PCI bridge: nVidia Corporation nForce3 250Gb PCI-to-PCI Bridge (rev a2)
0000:00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration
0000:00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map
0000:00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller
0000:00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control
0000:01:00.0 VGA compatible controller: ATI Technologies Inc RV350 AP [Radeon 9600]
0000:01:00.1 Display controller: ATI Technologies Inc RV350 AP [Radeon 9600] (Secondary)
0000:02:09.0 Multimedia audio controller: Creative Labs SB Live! EMU10k1 (rev 0a)
0000:02:09.1 Input device controller: Creative Labs SB Live! MIDI/Game Port (rev 0a)


I have tried both using the internal kernel driver, alsa-driver-1.0.7 and alsa-1.0.8, all with the same results.

Additionally I have switched the card numbers in /etc/modules.d/alsa with no effects others that the following:

OSS emulation for the first sound card will not work, that is, there is no /dev/sound/dsp nor /dev/sound/mixer, but there is /dev/sound/adsp.

I always get an output similar to the one bellow:
PCI: Setting latency timer of device 0000:00:06.0 to 64
intel8x0_measure_ac97_clock: measured 49952 usecs
intel8x0: clocking to 46860
ALSA /var/tmp/portage/alsa-driver-1.0.7-r3/work/alsa-driver-1.0.7/kbuild/../acore/oss/mixer_oss.c:1272: unable to register OSS mixer device 0:0
ALSA /var/tmp/portage/alsa-driver-1.0.7-r3/work/alsa-driver-1.0.7/kbuild/../acore/oss/pcm_oss.c:2441: unable to register OSS PCM device 0:0


Even though that, ALSA does work perfectly:

bluehat dev # ls -al /dev/snd
total 0
drwxr-xr-x   2 root root      420 Mar 30 12:29 .
drwxrwxrwt  23 root root    14620 Mar 30 12:46 ..
crw-rw----   1 root audio 116,  0 Mar 30 12:28 controlC0
crw-rw----   1 root audio 116, 32 Mar 30 12:28 controlC1
crw-rw----   1 root audio 116, 64 Mar 30 12:28 controlC2
crw-rw----   1 root audio 116,  4 Mar 30 12:28 hwC0D0
crw-rw----   1 root audio 116,  6 Mar 30 12:29 hwC0D2
crw-rw----   1 root audio 116,  8 Mar 30 12:28 midiC0D0
crw-rw----   1 root audio 116,  9 Mar 30 12:29 midiC0D1
crw-rw----   1 root audio 116, 10 Mar 30 12:29 midiC0D2
crw-rw----   1 root audio 116, 24 Mar 30 12:28 pcmC0D0c
crw-rw----   1 root audio 116, 16 Mar 30 12:28 pcmC0D0p
crw-rw----   1 root audio 116, 25 Mar 30 12:28 pcmC0D1c
crw-rw----   1 root audio 116, 26 Mar 30 12:28 pcmC0D2c
crw-rw----   1 root audio 116, 18 Mar 30 12:28 pcmC0D2p
crw-rw----   1 root audio 116, 56 Mar 30 12:29 pcmC1D0c
crw-rw----   1 root audio 116, 48 Mar 30 12:29 pcmC1D0p
crw-rw----   1 root audio 116, 57 Mar 30 12:29 pcmC1D1c
crw-rw----   1 root audio 116, 50 Mar 30 12:29 pcmC1D2p
crw-rw----   1 root audio 116,  1 Mar 30 12:29 seq
crw-rw----   1 root audio 116, 33 Mar 30 12:28 timer


But as stated before, OSS emulation won't work correctly:

bluehat dev # ls -al /dev/sound
total 0
drwxr-xr-x   2 root root     180 Mar 30 12:46 .
drwxrwxrwt  23 root root   14620 Mar 30 12:46 ..
crw-rw----   1 root audio 14, 12 Mar 30 12:46 adsp
crw-rw----   1 root audio 14, 28 Mar 30 12:46 adsp1
crw-rw----   1 root audio 14, 20 Mar 30 12:46 audio1
crw-rw----   1 root audio 14, 19 Mar 30 12:46 dsp1
crw-rw----   1 root audio 14, 16 Mar 30 12:29 mixer1
crw-rw----   1 root audio 14,  1 Mar 30 12:29 sequencer
crw-rw----   1 root audio 14,  8 Mar 30 12:29 sequencer2

Ideas on why the first sound card's OSS emulation is always ommited?


Reproducible: Always
Steps to Reproduce:

Actual Results:  
/dev/sound/dsp and /dev/sound/mixer will not be created for the first soundcard.


bluehat dev # emerge info
Portage 2.0.51.19 (default-linux/amd64/2005.0, gcc-3.4.3-20050110,
glibc-2.3.4.20050125-r1, 2.6.11-gentoo-r4 x86_64)
=================================================================
System uname: 2.6.11-gentoo-r4 x86_64 AMD Athlon(tm) 64 Processor 3000+
Gentoo Base System version 1.6.10
Python:              dev-lang/python-2.3.5 [2.3.5 (#1, Mar 29 2005, 15:58:35)]
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.4 [enabled]
dev-lang/python:     2.3.5
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.5
sys-devel/binutils:  2.15.92.0.2-r7
sys-devel/libtool:   1.5.14
virtual/os-headers:  2.6.8.1-r4
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CFLAGS="-march=k8 -O3 -pipe -momit-leaf-frame-pointer -fomit-frame-pointer
-ftracer -fforce-addr"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env
/usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config
/var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=k8 -O3 -pipe -momit-leaf-frame-pointer -fomit-frame-pointer
-ftracer -fforce-addr"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig buildpkg ccache distlocks sandbox userpriv
usersandbox"
GENTOO_MIRRORS="http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/
http://ftp.ntua.gr/pub/linux/gentoo/ http://ftp.caliu.info/pub/gentoo/
http://linuv.uv.es/mirror/gentoo/ http://mirror.switch.ch/mirror/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="amd64 X aalib acpi alsa arts audiofile avi bash-completion berkdb
bitmap-fonts bzlib ccache cdparanoia cdr crypt ctype cups curl directfb
divx4linux dvd dvdr dvdread encode esd ethereal fam fastcgi fbcon flac flash
font-server foomaticdb fortran ftp gdbm ggi gif gnome gpm gstreamer gtk gtk2 icq
imagemagick imlib ipv6 java jp2 jpeg junit kde lcms lzw lzw-tiff mad mime motif
mozilla mp3 mpeg msn ncurses nls nptl offensive oggvorbis openal opengl oss pam
pdflib perl png portaudio posix ppds python qt quicktime readline recode ruby
samba scanner sdl sndfile spell ssl tcltk tcpd tiff truetype truetype-fonts
type1-fonts unicode usb userlocales wmf xine xml xml2 xmlrpc xmms xpm xrandr xv
xvid zlib"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, PORTDIR_OVERLAY
Comment 2 Jeremy Huddleston (RETIRED) gentoo-dev 2005-03-30 20:01:43 UTC
What is in your /etc/modules.d/alsa file?  Can you please try with 1.0.9_rc2
Comment 3 Ioannis Aslanidis (RETIRED) gentoo-dev 2005-03-31 01:06:12 UTC
I'll proceed to try the new release, meanwhile, there's my config file:

ioannis@bluehat ~ $ cat /etc/modules.d/alsa
# Alsa 0.9.X kernel modules' configuration file.
# $Header: /var/cvsroot/gentoo-x86/media-sound/alsa-utils/files/alsa-modules.conf-rc,v 1.4 2004/11/16 01:31:22 eradicator Exp $

# ALSA portion
alias char-major-116 snd
# OSS/Free portion
alias char-major-14 soundcore

##
## IMPORTANT:
## You need to customise this section for your specific sound card(s)
## and then run `update-modules' command.
## Read alsa-driver's INSTALL file in /usr/share/doc for more info.
##
##  ALSA portion
alias snd-card-0 snd-emu10k1
alias snd-card-1 snd-intel8x0
##  OSS/Free portion
alias sound-slot-0 snd-card-2
alias sound-slot-1 snd-card-1
##

# OSS/Free portion - card #1
alias sound-service-1-0 snd-mixer-oss
alias sound-service-1-1 snd-seq-oss
alias sound-service-1-3 snd-pcm-oss
alias sound-service-1-8 snd-seq-oss
alias sound-service-1-12 snd-pcm-oss
##  OSS/Free portion - card #2
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

alias /dev/mixer snd-mixer-oss
alias /dev/dsp snd-pcm-oss
alias /dev/midi snd-seq-oss

# Set this to the correct number of cards.
options snd cards_limit=3
Comment 4 Ioannis Aslanidis (RETIRED) gentoo-dev 2005-03-31 02:06:59 UTC
I got the same results after upgrading to 1.0.9_rc2:

ACPI: PCI interrupt 0000:02:09.0[A] -> GSI 17 (level, low) -> IRQ 209
ACPI: PCI interrupt 0000:00:06.0[A] -> GSI 21 (level, high) -> IRQ 193
PCI: Setting latency timer of device 0000:00:06.0 to 64
intel8x0_measure_ac97_clock: measured 49588 usecs
intel8x0: clocking to 46824
ALSA /var/tmp/portage/alsa-driver-1.0.9_rc2/work/alsa-driver-1.0.9rc2/acore/oss/mixer_oss.c:1292: unable to register OSS mixer device 0:0
ALSA /var/tmp/portage/alsa-driver-1.0.9_rc2/work/alsa-driver-1.0.9rc2/acore/oss/pcm_oss.c:2452: unable to register OSS PCM device 0:0
Comment 5 Jeremy Huddleston (RETIRED) gentoo-dev 2005-04-01 09:46:30 UTC
Change to this:
alias sound-slot-0 snd-card-0

And this doesn't need to be 3:
options snd cards_limit=2
Comment 6 Ioannis Aslanidis (RETIRED) gentoo-dev 2005-04-01 10:28:49 UTC
That didn't solve the problem... in fact that 2 is a typo... still the same problem:

bluehat ~ # ls /dev/sound
adsp  adsp1  audio1  dsp1  mixer1  sequencer  sequencer2

bluehat ~ # ls /dev/snd
controlC0  hwC0D2    midiC0D2  pcmC0D1c  pcmC0D3p  pcmC1D1c  timer
controlC1  midiC0D0  pcmC0D0c  pcmC0D2c  pcmC1D0c  pcmC1D2p
hwC0D0     midiC0D1  pcmC0D0p  pcmC0D2p  pcmC1D0p  seq

PCI: Setting latency timer of device 0000:00:06.0 to 64
intel8x0_measure_ac97_clock: measured 49627 usecs
intel8x0: clocking to 46861
ALSA /var/tmp/portage/alsa-driver-1.0.9_rc2/work/alsa-driver-1.0.9rc2/acore/oss/mixer_oss.c:1292: unable to register OSS mixer device 0:0
ALSA /var/tmp/portage/alsa-driver-1.0.9_rc2/work/alsa-driver-1.0.9rc2/acore/oss/pcm_oss.c:2452: unable to register OSS PCM device 0:0
Comment 7 Jeremy Huddleston (RETIRED) gentoo-dev 2005-04-01 14:44:43 UTC
Please do:

modprobe -c | grep sound-slot
lsmod
ls -l /dev/dsp*
Comment 8 Ioannis Aslanidis (RETIRED) gentoo-dev 2005-04-01 15:39:13 UTC
bluehat ~ # modprobe -c | grep sound-slot
alias sound-slot-0 snd-emu10k1
alias sound-slot-1 snd-intel8x0
bluehat ~ # lsmod
Module                  Size  Used by
snd_seq_midi            9984  0 
snd_emu10k1_synth       8320  0 
snd_emux_synth         41152  1 snd_emu10k1_synth
snd_seq_virmidi         9088  1 snd_emux_synth
snd_seq_midi_emul       8896  1 snd_emux_synth
snd_pcm_oss            57568  0 
snd_mixer_oss          19840  1 snd_pcm_oss
snd_seq_oss            38464  0 
snd_seq_midi_event      9600  3 snd_seq_midi,snd_seq_virmidi,snd_seq_oss
snd_seq                60800  8 snd_seq_midi,snd_emux_synth,snd_seq_virmidi,snd_seq_midi_emul,snd_seq_oss,snd_seq_midi_event
snd_intel8x0           36480  0 
snd_emu10k1           116772  1 snd_emu10k1_synth
snd_rawmidi            30368  3 snd_seq_midi,snd_seq_virmidi,snd_emu10k1
snd_seq_device         10128  7 snd_seq_midi,snd_emu10k1_synth,snd_emux_synth,snd_seq_oss,snd_seq,snd_emu10k1,snd_rawmidi
snd_ac97_codec         88976  2 snd_intel8x0,snd_emu10k1
snd_pcm               107148  4 snd_pcm_oss,snd_intel8x0,snd_emu10k1,snd_ac97_codec
snd_timer              27592  3 snd_seq,snd_emu10k1,snd_pcm
snd_page_alloc         11208  3 snd_intel8x0,snd_emu10k1,snd_pcm
snd_util_mem            5440  2 snd_emux_synth,snd_emu10k1
snd_hwdep              11808  2 snd_emux_synth,snd_emu10k1
snd                    64552  14 snd_emux_synth,snd_seq_virmidi,snd_pcm_oss,snd_mixer_oss,snd_seq_oss,snd_seq,snd_intel8x0,snd_emu10k1,snd_rawmidi,snd_seq_device,snd_ac97_codec,snd_pcm,snd_timer,snd_hwdep
sd_mod                 17752  0 
fglrx                 267776  9 
vmnet                  33880  12 
vmmon                 175564  0 
ipt_MASQUERADE          4160  1 
ipt_REJECT              7616  4 
ipt_ULOG               10184  12 
ip6table_filter         3392  0 
ip6_tables             20544  1 ip6table_filter
ipt_state               2368  22 
ipt_pkttype             2048  4 
ipt_iprange             2176  0 
ipt_multiport           3008  0 
ipt_conntrack           3008  3 
iptable_mangle          3392  1 
ip_nat_irc              2880  0 
ip_nat_tftp             2240  0 
ip_nat_ftp              3904  0 
iptable_nat            26036  5 ipt_MASQUERADE,ip_nat_irc,ip_nat_tftp,ip_nat_ftp
ip_conntrack_irc       73008  1 ip_nat_irc
ip_conntrack_tftp       5168  1 ip_nat_tftp
ip_conntrack_ftp       73840  1 ip_nat_ftp
ip_conntrack           49572  10 ipt_MASQUERADE,ipt_state,ipt_conntrack,ip_nat_irc,ip_nat_tftp,ip_nat_ftp,iptable_nat,ip_conntrack_irc,ip_conntrack_tftp,ip_conntrack_ftp
iptable_filter          3648  1 
ip_tables              22784  11 ipt_MASQUERADE,ipt_REJECT,ipt_ULOG,ipt_state,ipt_pkttype,ipt_iprange,ipt_multiport,ipt_conntrack,iptable_mangle,iptable_nat,iptable_filter
rfcomm                 40752  0 
l2cap                  28616  5 rfcomm
hci_usb                16776  2 
pwc                    84196  0 
i2c_nforce2             7808  0 
8139too                27648  0 
bluehat ~ # ls -l /dev/dsp*
lrwxrwxrwx  1 root root  4 Apr  1 17:20 /dev/dsp -> dsp1
lrwxrwxrwx  1 root root 10 Apr  1 20:27 /dev/dsp1 -> sound/dsp1
Comment 9 Jeremy Huddleston (RETIRED) gentoo-dev 2005-04-01 18:55:56 UTC
What happens when you try this?
alias snd-card-0 snd-intel8x0
alias snd-card-1 snd-emu10k1
Comment 10 Ioannis Aslanidis (RETIRED) gentoo-dev 2005-04-02 00:27:13 UTC
alias snd-card-0 snd-emu10k1
alias snd-card-1 snd-intel8x0

Now OSS will work for intel8x0 and won't work for emu10k1.

alias snd-card-0 snd-intel8x0
alias snd-card-1 snd-emu10k1

Now OSS will work for emu10k1 and won't work for intel8x0.
Comment 11 Jeremy Huddleston (RETIRED) gentoo-dev 2005-04-19 10:52:38 UTC
Please try resolving this upstream at http://bugtrack.alsa-project.org