Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Years ago i was able to pipe the kernel to the sound device via

cat /vmlinuz > /dev/dsp

However, i do not have the sound device in Natty 11.04 anymore. Any idea, how i can do this in this new version of Ubuntu?

share|improve this question
2  
You mean this? cat /vmlinuz | aplay –  arrange Aug 29 '11 at 10:06
    
Err... sorry for my ignorance, but.. what would be the point of this? You want to literally hear the bits and bytes of your kernel binary code in your speakers? –  MestreLion Aug 31 '11 at 6:08

2 Answers 2

up vote 3 down vote accepted

This, in a terminal:

cat /vmlinuz | padsp tee /dev/dsp > /dev/null

Ubuntu uses PulseAudio as its sound server (before I think ALSA's dmix was used, I believe. I don't remember.)

padsp is a PulseAudio tool that wraps /dev/dsp to PulseAudio.

The oss-compat package, as suggested by MrShunz, enables ALSA's OSS compatibility layer, so it has to go through ALSA to get to PulseAudio which finally uses ALSA to access the sound device. So:

oss-compat: OSS->ALSA->PulseAudio->ALSA
padsp: OSS->PulseAudio->ALSA

padsp is also already installed by default, I think. If it isn't though, bash will tell you which package contains it :)

share|improve this answer

Newer versions of alsa have the sound devices under the directory /dev/snd/. Look for pcmXXXX devices.

Or you can always install the oss-compat package to have the /dev/dsp back:

# aptitude show oss-compat

Package: oss-compat                      
State: not installed
Version: 0.0.4+nmu3
Priority: extra
Section: universe/sound
Maintainer: Ubuntu MOTU Developers <ubuntu-motu@lists.ubuntu.com>
Uncompressed Size: 61.4 k
Depends: module-init-tools | modutils | hurd
Description: OSS compatibility package
 This package ensures that OSS support is provided in some way.  On Linux, it enables the ALSA compatibility modules.  On other
 kernels where OSS is the default interface, no action is taken. 

 The purpose of this package is for applications that only support OSS to depend on it, hence preventing common "/dev/dsp not found"
 errors that would confuse unexperienced users.
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.