Copy to a sound device in /dev
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?
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 :)
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 <[email protected]>
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.