Unix Technical Forum

creating /dev/dsp after emerge

This is a discussion on creating /dev/dsp after emerge within the Gentoo Linux Support forums, part of the Unix Operating Systems category; --> Did emerge -uD world for the following: Calculating world dependencies ..... . ...done! [ebuild U ] app-shells/bash-3.0-r11 [2.05b-r9] [ebuild ...


Go Back   Unix Technical Forum > Unix Operating Systems > Gentoo Linux Support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-21-2008, 11:02 AM
oldNbald
 
Posts: n/a
Default creating /dev/dsp after emerge

Did emerge -uD world for the following:

Calculating world dependencies ..... . ...done!
[ebuild U ] app-shells/bash-3.0-r11 [2.05b-r9]
[ebuild U ] sys-libs/readline-5.0-r2 [4.3-r5]
[ebuild U ] media-libs/libmng-1.0.8-r1 [1.0.4]
[ebuild N ] sys-apps/sysvinit-2.86
[ebuild U ] sys-apps/baselayout-1.11.12-r4 [1.9.4-r6]

/dev/dsp is gone after a reboot - consistently. Whenever I execute quake3
there is no sound because "/dev/dsp" file doesn't exist.
However, I can consistently produce /dev/dsp by doing
nano -w .q3a/baseq3/q3config.cfg and changing the line
seta snddevice "/dev/dsp" to "/dev/dsp1". This causes the same error until I
revert to "/dev/dsp" in the file. Then there is a useful /dev/dsp.

Anybody know how to troubleshoot this one?
--
oNb
.... coil my tounge around a bumble bee mouth"
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-21-2008, 11:02 AM
Paul Bredbury
 
Posts: n/a
Default Re: creating /dev/dsp after emerge

oldNbald wrote:
> /dev/dsp is gone after a reboot - consistently. Whenever I execute quake3
> there is no sound because "/dev/dsp" file doesn't exist.
> However, I can consistently produce /dev/dsp by doing
> nano -w .q3a/baseq3/q3config.cfg and changing the line
> seta snddevice "/dev/dsp" to "/dev/dsp1". This causes the same error until I
> revert to "/dev/dsp" in the file. Then there is a useful /dev/dsp.


Check your setup as per http://www.gentoo.org/doc/en/alsa-guide.xml

In /etc/modules.d/alsa, ensure that you have this line:
alias /dev/dsp snd-pcm-oss
Then run "update-modules".

Try re-emerging udev and all the alsa packages you have installed, e.g.:
emerge udev alsa-lib alsa-utils alsa-oss alsa-headers alsa-driver

If you use alsa-driver, perhaps its "oss" flag needs to be set?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-21-2008, 11:02 AM
Paul Bredbury
 
Posts: n/a
Default Re: creating /dev/dsp after emerge

oldNbald wrote:
> /dev/dsp is gone after a reboot - consistently. Whenever I execute quake3
> there is no sound because "/dev/dsp" file doesn't exist.
> However, I can consistently produce /dev/dsp by doing
> nano -w .q3a/baseq3/q3config.cfg and changing the line
> seta snddevice "/dev/dsp" to "/dev/dsp1". This causes the same error until I
> revert to "/dev/dsp" in the file. Then there is a useful /dev/dsp.


It sounds like the oss modules are only being loaded when you run
quake3, rather than at boot. Try this:

1. Reboot
2. Record the output of "lsmod"
3. Run quake3
4. Confirm that /dev/dsp now exists
5. Record the output of "lsmod", and look for changes from step 2

You may find that module "snd_pcm_oss" has now been loaded.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-21-2008, 11:02 AM
oldNbald
 
Posts: n/a
Default Re: creating /dev/dsp after emerge

And so, Paul Bredbury just had to say ...

> Check your setup as per http://www.gentoo.org/doc/en/alsa-guide.xml
>
> In /etc/modules.d/alsa, ensure that you have this line:
> alias /dev/dsp snd-pcm-oss
> Then run "update-modules".


Mine is kernel based. Below is the LONG output of lsmod after
getting /dev/dsp, then booting, and then re-getting /dev/dsp:


Before booting and after using a sound server.

Module Size Used by
snd_pcm_oss 46496 0
snd_mixer_oss 16128 1 snd_pcm_oss
lp 9156 0
ohci_hcd 18440 0
parport_pc 29508 1
parport 30664 2 lp,parport_pc
pcspkr 3300 0
ehci_hcd 27656 0
usb_storage 28032 0
uhci_hcd 28304 0
tulip 47520 0
snd_ens1371 18912 0
snd_rawmidi 18848 1 snd_ens1371
snd_seq_device 6796 1 snd_rawmidi
snd_ac97_codec 68216 1 snd_ens1371
snd_pcm 76040 3 snd_pcm_oss,snd_ens1371,snd_ac97_codec
snd_timer 19588 1 snd_pcm
snd 44388 8
snd_pcm_oss,snd_mixer_oss,snd_ens1371,snd_rawmidi, snd_seq_device,

snd_ac97_codec,snd_pcm,snd_timer

snd_page_alloc 7428 1 snd_pcm
gameport 3712 1 snd_ens1371
via_agp 7424 1
usbcore 99064 5 ohci_hcd,ehci_hcd,usb_storage,uhci_hcd
nvidia 3462204 12
agpgart 27688 2 via_agp,nvidia
==end==

After boot and not using any sound server.

Module Size Used by
lp 9156 0
ohci_hcd 18440 0
parport_pc 29508 1
parport 30664 2 lp,parport_pc
pcspkr 3300 0
ehci_hcd 27656 0
usb_storage 28032 0
uhci_hcd 28304 0
tulip 47520 0
snd_ens1371 18912 0
snd_rawmidi 18848 1 snd_ens1371
snd_seq_device 6796 1 snd_rawmidi
snd_ac97_codec 68216 1 snd_ens1371
snd_pcm 76040 2 snd_ens1371,snd_ac97_codec
snd_timer 19588 1 snd_pcm
snd 44388 6
snd_ens1371,snd_rawmidi,snd_seq_device,snd_ac97_co dec,snd_pcm,snd_timer
snd_page_alloc 7428 1 snd_pcm
gameport 3712 1 snd_ens1371
via_agp 7424 1
usbcore 99064 5 ohci_hcd,ehci_hcd,usb_storage,uhci_hcd
nvidia 3462204 0
agpgart 27688 2 via_agp,nvidia
==end==

After boot and attempt to play Quake3

------- sound initialization -------
/dev/dsp: No such file or directory
Could not open /dev/dsp
------------------------------------

==end==

Output of lsmod after altering quake3 config


Module Size Used by
snd_pcm_oss 46496 0
snd_mixer_oss 16128 1 snd_pcm_oss
lp 9156 0
ohci_hcd 18440 0
parport_pc 29508 1
parport 30664 2 lp,parport_pc
pcspkr 3300 0
ehci_hcd 27656 0
usb_storage 28032 0
uhci_hcd 28304 0
tulip 47520 0
snd_ens1371 18912 0
snd_rawmidi 18848 1 snd_ens1371
snd_seq_device 6796 1 snd_rawmidi
snd_ac97_codec 68216 1 snd_ens1371
snd_pcm 76040 3 snd_pcm_oss,snd_ens1371,snd_ac97_codec
snd_timer 19588 1 snd_pcm
snd 44388 8
snd_pcm_oss,snd_mixer_oss,snd_ens1371,snd_rawmidi, snd_seq_device,

snd_ac97_codec,snd_pcm,snd_timer

snd_page_alloc 7428 1 snd_pcm
gameport 3712 1 snd_ens1371
via_agp 7424 1
usbcore 99064 5 ohci_hcd,ehci_hcd,usb_storage,uhci_hcd
nvidia 3462204 12
agpgart 27688 2 via_agp,nvidia

--
oNb
Warning: abortion has been proven to be fatal to the fetus.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-21-2008, 11:02 AM
Paul Bredbury
 
Posts: n/a
Default Re: creating /dev/dsp after emerge

oldNbald wrote:
> Mine is kernel based. Below is the LONG output of lsmod after
> getting /dev/dsp, then booting, and then re-getting /dev/dsp:


You don't have snd_pcm_oss or snd_mixer_oss being loaded at boot, strangely.

Do you have these lines in /etc/modules.d/alsa:

alias char-major-14 soundcore
alias sound-slot-0 snd-card-0
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

(If you change the file, run "update-modules" after changing it.)

The easy way to make sure they are loaded at boot is to add to
/etc/modules.autoload.d/kernel-2.6:

snd_pcm_oss
snd_mixer_oss
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-21-2008, 11:02 AM
oldNbald
 
Posts: n/a
Default Re: creating /dev/dsp after emerge

And so, Paul Bredbury just had to say ...

> You don't have snd_pcm_oss or snd_mixer_oss being loaded at boot,
> strangely.
>
> Do you have these lines in /etc/modules.d/alsa:
>


Paul, That's just it - there is no /etc/modules.d/alsa ... alsa and oss
emulation are in the kernel.
From http://www.gentoo.org/doc/en/alsa-guide.xml, "Warning: The methods
shown below are mutually exclusive. You cannot have ALSA compiled in your
kernel and use media-sound/alsa-driver. It will fail."
--
oNb
Warning: abortion has been proven to be fatal to the fetus.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-21-2008, 11:02 AM
J.O. Aho
 
Posts: n/a
Default Re: creating /dev/dsp after emerge

oldNbald wrote:
> And so, Paul Bredbury just had to say ...
>
>
>>You don't have snd_pcm_oss or snd_mixer_oss being loaded at boot,
>>strangely.
>>
>>Do you have these lines in /etc/modules.d/alsa:
>>

>
>
> Paul, That's just it - there is no /etc/modules.d/alsa ... alsa and oss
> emulation are in the kernel.
> From http://www.gentoo.org/doc/en/alsa-guide.xml, "Warning: The methods
> shown below are mutually exclusive. You cannot have ALSA compiled in your
> kernel and use media-sound/alsa-driver. It will fail."


Yes, if you have builtin or built modules for alsa in the kernel, then you
can't use the alsa-driver ebuild, the ebuild will check your current klernels
..config to check this, but the /etc/modules.d/alsa is part of alsa-utils,
which includes many usefull tools as alsamixer and amixer.

Noted should that not everyone is pleased with the old alsa drivers that is
included in the kernel, but want to use the latest one and therefore only
compile soundsystem support into the kernel and then emerge alsa-driver.


//Aho
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-21-2008, 11:03 AM
Unruh
 
Posts: n/a
Default Re: creating /dev/dsp after emerge

oldNbald <prefer.privacy@home.okay?> writes:

>And so, Paul Bredbury just had to say ...


>> You don't have snd_pcm_oss or snd_mixer_oss being loaded at boot,
>> strangely.
>>
>> Do you have these lines in /etc/modules.d/alsa:
>>


>Paul, That's just it - there is no /etc/modules.d/alsa ... alsa and oss
>emulation are in the kernel.
>From http://www.gentoo.org/doc/en/alsa-guide.xml, "Warning: The methods
>shown below are mutually exclusive. You cannot have ALSA compiled in your
>kernel and use media-sound/alsa-driver. It will fail."


Fine, so load those modules manually! Put
modprobe snd-pcm-oss
into /etc/rc.local
Put snd-pcm-oss into /etc/modules (if Gentoo uses that). Run a script the
first thing you boot in to load snd-pcm-oss. There are a million ways to
make sure that snd-psm-oss is loaded before you run your game. Pick on. Use
it. Yes, it might be neat to figure out why gentoo is loading them. If that
is your hobby, persue it. If on the other hand you just want to play your
game, then use one of the suggestions.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 02-21-2008, 11:03 AM
Paul Bredbury
 
Posts: n/a
Default Re: creating /dev/dsp after emerge

oldNbald wrote:
> Paul, That's just it - there is no /etc/modules.d/alsa ... alsa and oss
> emulation are in the kernel.
> From http://www.gentoo.org/doc/en/alsa-guide.xml, "Warning: The methods
> shown below are mutually exclusive. You cannot have ALSA compiled in your
> kernel and use media-sound/alsa-driver. It will fail."


/etc/modules.d/alsa is used to configure the alsa driver, regardless of
where the alsa driver was compiled from.

Info at http://gentoo-wiki.com/HOWTO_ALSA_sound_mixer_aka_dmix

Since you effectively have no oss setup, this explains why oss isn't
automatically started I suppose. I'm actually a little surprised that
alsa itself works without a config file.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 02-21-2008, 11:03 AM
oldNbald
 
Posts: n/a
Default Re: creating /dev/dsp after emerge

And so, J.O. Aho just had to say ...

> Yes, if you have builtin or built modules for alsa in the kernel, then you
> can't use the alsa-driver ebuild, the ebuild will check your current
> klernels .config to check this, but the /etc/modules.d/alsa is part of
> alsa-utils, which includes many usefull tools as alsamixer and amixer.
>
> Noted should that not everyone is pleased with the old alsa drivers that
> is included in the kernel, but want to use the latest one and therefore
> only compile soundsystem support into the kernel and then emerge
> alsa-driver.
>


I find this interesting as we've had no sound problems until baselayout was
upgraded via emerge. I'll re-examine the alsa info as Paul, and the ever
patient Unruh, have pointed out.

Thanks all for helping. Let you know how it goes.
--
oNb
Warning: abortion has been proven to be fatal to the fetus.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 07:50 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com