Can you name a single feature or use case addressed by PulseAudio that isn't addressed by ALSA?
Can you name a single feature or use case addressed by PulseAudio that isn't addressed by ALSA?
If that really is the case you could use dmix and have audio played on both the headphone and speaker output. You would still have to mute the speakers when plugging in the headphones though.
You're stating that Pulseaudio isn't necessary because someone could do the same thing with a combination of dmix and manual intervention? Have you considered the possibility that someone might like the convenience of not needing to do manual intervention?
I just pointed out a possible solution/workaround with ALSA and dmix for redirecting the audio output to two devices/pcm outputs.
After years of using just ALSA and messing around with its config on different computers I am now using Pulseaudio too. Once it's running it's a lot easier to use and more flexible, especially when it comes to hot-plugging and switching between inputs and outputs.
* playing audio from/to another Bluetooth device (with bluez)
* playing audio on a PulseAudio server running somewhere on the network
* transparent encoding of audio output as DTS (for surround support over SPDIF)
I also seem to remember plain ALSA having trouble with multiple applications playing sound at the same time, which is just pathetic.
I'm sure some of these could in theory be built on top of ALSA, but fact is that today's Linux distributions use PulseAudio, and for me it always worked well.
Why write for ALSA when the distro ships with PA, and so all of its configuration tools are PA-focused?
Basically, if you want multiple sounds playing at the same time (e.g. music + desktop notifications) and you don't have hardware mixer (many common sound chips don't and rely on Windows drivers/sound system to provide the functionality), you are out of luck (no, the ancient dmix plugin is not a solution!). Bluetooth audio (headsets) doesn't really work without PA.
Configuring apps to use different devices (music should go to speakers and video conferencing to a headset ...) is a pain without PA - most applications don't let you select the input/output devices.
And many other things. ALSA is good, but without PA the sound support on a modern Linux desktop would be stuck right in the late 90s. Is it necessary? Not strictly, but it is one heck of a convenience that most don't even realize they have.
Here is a good post from 2008 explaining many of the issues PulseAudio solves and addressing some of the old FUD:
http://0pointer.de/blog/projects/jeffrey-stedfast.html
Unfortunately, there are tons of people with strong opinions about both PA and systemd but very little actual knowledge about what these components do and what issues they address in a modern Linux/Unix system. But that doesn't prevent them from spreading BS FUD and conspiracies about this or that group trying to dominate the market or take over the competing Linux distros.
Given that that's exactly what it's for, why isn't it?