[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Plug and Pray; My Life with Linux Sound



deloptes <deloptes@gmail.com> writes:
> /etc/modprobe.d/alsa-base.conf
> 
> ## ALSA portion
> alias char-major-116 snd
> alias snd-card-0 snd-hda-intel
> alias snd-card-1 snd-usb-audio

	Thank you. While researching what these lines do, I ran
across what is most likely the true nature of this problem although
I am not there yet. I ran across the following on a wiki posting
about setting up alsa-base.conf:

___________________________________________________________________________
Applications written for OSS can be made to work with ALSA by means of
   either userspace emulation (using the aoss program loader) or
   kernelspace emulation (the snd-*-oss drivers). However, you cannot use
   both ALSA and OSS drivers at the same time.
___________________________________________________________________________

	I jumped when I read that as both the sound-crippled
systems have both OSS and alsa. OSS creates /dev/dspx which I do
use for some programs I wrote in C that process audio. The
mplayer program also uses /dev/dsp so when it doesn't work,
that's really a bad deal.

	When both OSS and alsa modules are active, bad things
happen so one should make sure the OSS modules aren't being
loaded at the same time as the alsa snd- modules. On these
systems, they are both present. The way to get rid of the OSS
modules is to add a blacklist directive to
alsa-base-blacklist.conf which reads as follows:

install soundcore /bin/false

I put that in and, voila, all the sound modules went away
including the alsa modules.

$aplay -l
aplay: device_list:252: no soundcards found...

Always expect the worst and you'll never be disappointed.

	It could be that the two aliases I have for the sound
cards are not pointing to the right module names and when they
do, the modules will be pulled in.

	Despite the fact that neither system has yet to see a
single sound card after blocking the OSS modules, I think I am on
the trail to resolving the issue.

Here are the alsa-base.conf contents.

## ALSA portion
alias char-major-116 snd
#the two actual sound cards on this system
alias snd_card-0 snd-cs4236
alias snd-card-1 snd-sbawe
#Also tried snd_cs4236 with no change.
        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
#
#   Then the access to an OSS device file such as /dev/dsp0 triggers to
#   load the necessary module via KMOD.
#
#   For auto-loading the secondary card device like /dev/dsp1, the
#   following aliases are necessary in addition:
        alias sound-service-1-0 snd-mixer-oss
        alias sound-service-1-3 snd-pcm-oss
        alias sound-service-1-12 snd-pcm-oss
#part of original alsa-base.conf
# autoloader aliases
install sound-slot-0 /sbin/modprobe snd-card-0
install sound-slot-1 /sbin/modprobe snd-card-1
install sound-slot-2 /sbin/modprobe snd-card-2
install sound-slot-3 /sbin/modprobe snd-card-3
install sound-slot-4 /sbin/modprobe snd-card-4
install sound-slot-5 /sbin/modprobe snd-card-5
install sound-slot-6 /sbin/modprobe snd-card-6
install sound-slot-7 /sbin/modprobe snd-card-7
# Cause optional modules to be loaded above generic modules
install snd /sbin/modprobe --ignore-install snd && { /sbin/modprobe --quiet snd-ioctl32 ; /sbin/modprobe --quiet snd-seq ; }
install snd-rawmidi /sbin/modprobe --ignore-install snd-rawmidi && { /sbin/modprobe --quiet snd-seq-midi ; : ; }
install snd-emu10k1 /sbin/modprobe --ignore-install snd-emu10k1 && { /sbin/modprobe --quiet snd-emu10k1-synth ; : ; }

# Prevent abnormal drivers from grabbing index 0
options bt87x index=-2
options cx88_alsa index=-2
options snd-atiixp-modem index=-2
options snd-intel8x0m index=-2
options snd-via82xx-modem index=-2
# Keep snd-pcsp from beeing loaded as first soundcard
options snd-pcsp index=-2
# Keep snd-usb-audio from beeing loaded as first soundcard
options snd-usb-audio index=-2
#using module names that are known to exist
options snd_cs4236 index=0
options snd_sbawe index=1

lsmod shows no sound modules at all.


Reply to: