[pulseaudio-tickets] [Bug 101798] New: module-switch-on-port-available only switches output but leaves input unmodified

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sun Jul 16 02:23:28 UTC 2017


https://bugs.freedesktop.org/show_bug.cgi?id=101798

            Bug ID: 101798
           Summary: module-switch-on-port-available only switches output
                    but leaves input unmodified
           Product: PulseAudio
           Version: unspecified
          Hardware: Other
                OS: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: modules
          Assignee: pulseaudio-bugs at lists.freedesktop.org
          Reporter: leonard at lausen.nl
        QA Contact: pulseaudio-bugs at lists.freedesktop.org
                CC: lennart at poettering.net

Created attachment 132700
  --> https://bugs.freedesktop.org/attachment.cgi?id=132700&action=edit
pactl list outputs

Having module-switch-on-port-available loaded and plugging in a headphone,
pulseaudio correctly switches the active output port from analog-output-speaker
to analog-output-headphones. It does not change the input ports, even though a
headset microphone becomes available

> diff pactl_list_noheadset pactl_list_headset
> <               analog-input-headphone-mic: Microphone (priority: 8700, not available)
> <               analog-input-headset-mic: Headset Microphone (priority: 8700, not available)
> ---
> >               analog-input-headphone-mic: Microphone (priority: 8700)
> >               analog-input-headset-mic: Headset Microphone (priority: 8700)

I.e.the expected behaviour would be that also the input port is switched:

> diff pactl_list_headset pactl_list_headset_expected
> <       Active Port: analog-input-internal-mic
> ---
> >       Active Port: analog-input-headset-mic

The ports are detected by default as follows

>                analog-input-internal-mic: Internal Microphone (priority: 8900, latency offset: 0 usec)                                                                                              
>                        Properties:                                                                                                                                                                  
>                                device.icon_name = "audio-input-microphone"                                                                                                                                                                                                                                                                                            
>                analog-input-headphone-mic: Microphone (priority: 8700, latency offset: 0 usec, not available)                                                                                       
>                        Properties:                                                                                                                                                                  
>                                device.icon_name = "audio-input-microphone"                                                                                                                                                                                                                        
>                analog-input-headset-mic: Headset Microphone (priority: 8700, latency offset: 0 usec, not available)                                                      
>                        Properties:                                                                                                   
>                                device.icon_name = "audio-input-microphone"                                                                                                      

Note that both input-headset-mic and input-headphone-mic have the same
priority. On my system only input-headset-works correctly and I would expect it
to be the preferred port. (But maybe this depends on the type of headset being
plugged in, in which case the default might be sensible?)

However, even changing the priorities to prefer input-headset-mic over
input-headphone-mic does not fix the bug (i.e. when plugging in the headset,
the active port stays input-internal-mic).

>                analog-input-internal-mic: Internal Microphone (priority: 8900, latency offset: 0 usec)                                                                                              
>                        Properties:                                                                                                                                                                  
>                                device.icon_name = "audio-input-microphone"                                                                                                                                                                                                                                                                                            
>                analog-input-headphone-mic: Microphone (priority: 8700, latency offset: 0 usec, not available)                                                                                       
>                        Properties:                                                                                                                                                                  
>                                device.icon_name = "audio-input-microphone"                                                                                                                                                                                                                        
>                analog-input-headset-mic: Headset Microphone (priority: 8500, latency offset: 0 usec, not available)                                                      
>                        Properties:                                                                                                   
>                                device.icon_name = "audio-input-microphone"                                                                                                      


I am attaching the complete pactl list outputs.

Pulseaudio is built on Gentoo with the following useflags:

➜  ~ equery uses pulseaudio
[ Legend : U - final flag setting for installation]
[        : I - package is installed with flag     ]
[ Colors : set, unset                             ]
 * Found these USE flags for media-sound/pulseaudio-10.0:
 U I
 + + X              : Build the X11 publish module to export PulseAudio
information through X11 protocol for clients to make use. Don't enable this
flag if you want to use a system wide instance.
                      If unsure, enable this flag.
 + + abi_x86_32     : 32-bit (x86) libraries
 + + alsa           : Add support for media-libs/alsa-lib (Advanced Linux Sound
Architecture)
 + + alsa-plugin    : Request installing media-plugins/alsa-plugins with
PulseAudio plugin enabled. This ensures that clients supporting ALSA only will
use PulseAudio.
 + + asyncns        : Use libasyncns for asynchronous name resolution.
 + + bluetooth      : Enable Bluetooth Support
 + + caps           : Use Linux capabilities library to control privilege
 + + dbus           : Enable dbus support for anything that needs it (gpsd,
gnomemeeting, etc)
 - - doc            : Build the doxygen-described API documentation.
 - - equalizer      : Enable the equalizer module (requires sci-libs/fftw).
 + + gdbm           : Use sys-libs/gdbm to store PulseAudio databases.
Recommended for desktop usage. This flag causes the whole package to be
licensed under GPL-2 or later.
 + + glib           : Add support to dev-libs/glib-based mainloop for the
libpulse client library, to allow using libpulse on glib-based programs.
 + + gnome          : Use GConf to store user preferences on streams and so on.
Don't enable this flag if you want to use a system wide instance. If unsure,
enable this flag.
 + + gtk            : Add support for x11-libs/gtk+ (The GIMP Toolkit)
 + + ipv6           : Add support for IP version 6
 - - jack           : Add support for the JACK Audio Connection Kit
 - - libressl       : Use dev-libs/libressl as SSL provider (might need ssl USE
flag), packages should not depend on this USE flag
 - - libsamplerate  : Build with support for converting sample rates using
libsamplerate
 - - lirc           : Add support for lirc (Linux's Infra-Red Remote Control)
 - - native-headset : Build with native HSP backend for bluez 5.
 - - ofono-headset  : Build with oFono HFP backend for bluez 5, requires
net-misc/ofono.
 + + orc            : Use dev-lang/orc for just-in-time optimization of array
operations
 + + qt4            : Add support for the Qt GUI/Application Toolkit version
4.x
 - - realtime       : (Restricted to >=media-sound/pulseaudio-0.9.21.2-r1)
                      Makes PulseAudio use RealtimeKit (sys-auth/rtkit) to get
real-time priority while running.
 - - sox            : Add support for Sound eXchange (SoX)
 + + ssl            : Use dev-libs/openssl to provide support for RAOP
(AirPort) streaming.
 + + systemd        : Build with sys-apps/systemd support to replace standalone
ConsoleKit.
 + + tcpd           : Add support for TCP wrappers
 - - test           : Workaround to pull in packages needed to run with
FEATURES=test. Portage-2.1.2 handles this internally, so don't set it in
make.conf/package.use anymore
 + + udev           : Enable virtual/udev integration (device discovery, power
and storage device support, etc)
 + + webrtc-aec     : Uses the webrtc.org AudioProcessing library for enhancing
VoIP calls greatly in applications that support it by performing acoustic echo
cancellation, analog gain control,
                      noise suppression and other processing.
 + + zeroconf       : Support for DNS Service Discovery (DNS-SD)

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-bugs/attachments/20170716/b18db00c/attachment-0001.html>


More information about the pulseaudio-bugs mailing list