Interesting! My motherboard’s ALC662 has an Auto Mute with three options:
- Disabled
- Speaker Only
- Line Out + Speaker
Presumably that’s because it actually has separate ports for all three: front headphone jack, speaker out (which I guess is an internal header, maybe? there’s nothing connected and I get no sound if I try to use it, I know that), and line out (rear headphone jack, not connected).
My worry is that you can’t, because Pulse is very literal when it comes to hardware, and I don’t think there are two separate ports. IOW, if I’m right about how your chip is wired, there’s only one audio sink that runs to both the headphone out and the speaker out — it would be literally impossible to have different audio routed to each of them at the same time. Hence the auto-muting.
If I’m right, Pulse might be convinced to treat them as ports that can be enabled and disabled at will, but I don’t believe there’s a chance in hell it’d be willing to treat them as two separate devices. When Pulse sees multiple devices, it wants to treat them as separate sinks, and if two sinks point to the same hardware device then it’d end up in contention with itself at some point and probably end up crashing the whole audio subsystem, or locking itself up at the very least.
I don’t know why you’d really need that, TBH. If you switch auto mute off, Pulse can easily switch between ports, and it should end up muting the one that’s not enabled. You don’t ever want them both playing at once, right? Just to switch between them? I feel like Pulse should be able to do that on its own, modulo hardware limitations.
Like, for S&G just now I grabbed my headphones and plugged them into the front port on my system. The interesting thing is, not only did the device switch to the Headphones port, but the Speakers port was automatically labeled as “(unavailable)”. It stays that way as long as the headphones are attached.
But the really interesting thing is, even though Pulse labels it as “Speakers (unavailable)” while the headphones are plugged in, it still lets me switch to it if I want, and if I have alsamixer
open I can even watch it muting/unmuting the various channels and raising/lowering their levels.
As I said, there’s no sound on the Speakers output even when I don’t have headphones connected, so that doesn’t really get me anything. But Pulse seems pretty unperturbed by unavailable devices, it’s happy to try to use them. I suspect, though, that it knows better than I do that its attempts would fail.
I’ve learned never to underestimate what PulseAudio can do. While it’s true that it doesn’t interface directly to hardware, it can talk to ALSA. In my experience, anything that we can convince ALSA to do, PulseAudio is perfectly capable of doing for itself — if not more. It may need the right configs, device quirks, or what have you, but things like switching Auto Mute or whatever are perfectly within its power, if it actually needs to.
Ooh. The ALSA page at wiki.archlinux (thank you Arch Wiki documentarians) just reminded me that if you install alsa-tools
, one of the tools it comes with is hdajackretask
, a routing configuration utility that lets you reconfigure ALSA’s port assignments down to a very fine degree.
(Like, insanely. Never click “Advanced override” unless you want to fear that your sound chip is becoming sentient and plotting to kill you. #ETOOSCARY)
I don’t know that Pulse would necessarily respect those remappings (vs. just rewiring things back the way it expects — like I said, never underestimate what it can do), but it’s at least something to experiment with.