[ltp] Observation: /dev/dsp in kernel 2.6.16 can now be multiply
opened!
wes schreiner
linux-thinkpad@linux-thinkpad.org
Mon, 10 Jul 2006 22:51:55 -0500
Richard Neill wrote:
> Dear All,
>
> I just discovered this, and thought it worth sharing:
>
> 1)Originally, there was /dev/dsp using OSS. Only one application could
> use it at a time.
>
> 2)This resulted in Sound servers as a workaround, like the ghastful
> kludge that is ARtS
>
> 3)Then, there was ALSA, which also emulated OSS. ALSA with dmix
> allowed multiple clients. But /dev/dsp could still only be used once
> at a time.
>
> 4)Then came aoss, and soundwrapper, used to take old-style
> applications (which use /dev/dsp), and redirect them into alsa/dmix.
>
> 5)Now, to my surprise, I discovered that even /dev/dsp can be opened
> by several applications at a time. This definitely never used to be
> the case!
>
> Eg:
> play -d /dev/dsp somefile.ogg & play -d /dev/dsp otherfile.ogg
> or even:
> frozen-bubble & frozen-bubble & frozen-bubble & frozen-bubble &
>
>
> This seems to have occurred as of kernel 2.6.16, and a very nice
> surprise it is too. I only discovered it by accident, so thought it
> worth passing on.
>
> Regards,
>
> Richard
>
This has always been the case, but only for certain hardware that
supports multiple opens. All the mess with dmix or sound servers is to
get around the hardware that only supports a single open. So it isn't
your kernel version that matters, it is the sound hardware. For example,
the Intel ICH5 stuff on the box I'm on now is only single open, even
with 2.6.16. Yet the EMU10K could always do multiple opens, even with
2.4.x and 2.2.x kernels.
What hardware are you using that supports multiple opens? A ThinkPad I'm
guessing, but what model?
wes