Summary: | module-switch-on-port-available only switches output but leaves input unmodified | ||
---|---|---|---|
Product: | PulseAudio | Reporter: | leonard |
Component: | modules | Assignee: | pulseaudio-bugs |
Status: | RESOLVED MOVED | QA Contact: | pulseaudio-bugs |
Severity: | normal | ||
Priority: | medium | CC: | lennart |
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | pactl list outputs |
Description
leonard
2017-07-16 02:23:28 UTC
I believe this is already fixed: https://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/?id=e3b64d8fd394fdd0b70dfd14a4a9b90c27369a99 Thanks for checking this. Indeed the commit does fix the priorities :). Unfortunately it does not fix the main problem of this bug report, which is not the wrong priorities, but that the input port is not automatically switched from analog-input-internal-mic to analog-input-headset-mic as soon as the latter becomes available. I compiled the current master version of pulseaudio and can confirm that this behaviour is still present. Sorry for not paying attention! The internal mic has higher priority than the headset mic, which explains why the port doesn't get changed. The internal speakers also have higher priority than headphones, but when headphones are plugged in, we mark the internal speakers as unavailable. We use the same trick with some external mic ports, but not with headset-mic or headphone-mic. I believe the reason is that with headset-mic/headphone-mic, the jack information that we get from alsa doesn't include exact information about what was plugged in. We only know that either headphones, a headset or a microphone was plugged in. Marking the internal mic as unavailable would break the common case where headphones without a mic were plugged in. Ubuntu solves this by popping up a GUI that asks what you plugged in. Pulseaudio just doesn't have enough information to automatically always select the right port. Defaulting to the internal mic is safer than the headset mic. I'll mark this as NOTABUG, but if you think there is a solution, feel free to reopen. Thanks for the elaboration! What you say does make sense. I would argue though that there should be an option for .config/pulse/default.pa so that the "marking the internal mic as unavailable as soon as an external input is plugged in" workaround is applied. Or is this already possible with the current config syntax? A configuration option is a reasonable request, thanks for the idea. You can add the following to /usr/share/pulseaudio/alsa-mixer/paths/analog-input-internal-mic.conf: [Jack Headphone Mic] state.plugged = no state.unplugged = unknown [Jack Headset Mic] state.plugged = no state.unplugged = unknown That should make the internal mic become unavailable when something is plugged in. This change will be overwritten whenever pulseaudio is updated, though. It's not currently possible to configure this in the home directory. Thanks Tanu, that works great. I look forward to the inclusion of a home directory configuration option. -- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/194. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.