Bug 208211 - Thinkpad X1 Yoga gen 4: built-in mic and audio jack input source are exposed to PulseAudio as different devices, not different ports of the same device
Summary: Thinkpad X1 Yoga gen 4: built-in mic and audio jack input source are exposed ...
Alias: None
Product: Drivers
Classification: Unclassified
Component: Sound(ALSA) (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Jaroslav Kysela
Depends on:
Reported: 2020-06-16 18:10 UTC by Nate Graham
Modified: 2020-06-16 20:14 UTC (History)
0 users

See Also:
Kernel Version: 5.6.14
Tree: Mainline
Regression: No

Different ports vs different devices (732.28 KB, image/png)
2020-06-16 18:10 UTC, Nate Graham

Description Nate Graham 2020-06-16 18:10:15 UTC
Created attachment 289709 [details]
Different ports vs different devices

Using Kernel 5.6.14 and sof-firmware in openSUSE Tumbleweed on a Lenovo ThinkPad X1 Yoga. With this device's audio hardware and sof-firmware, the built-in microphone array and the audio jack input source are presented to PulseAudio as different devices, rather than different ports of the same device. This is different from the speakers and audio jack output, which *are* presented as different ports of the same device.

As a result, plugging in a headset automatically switches the audio *output* to the headset's headphones (which are on another port), but does not automatically switch the *input* to the headset's microphone because it is a different device and output is only switched to different devices upon plug-in if you have the PulseAudio switch-on-connect module loaded, which is not a default setting.

Furthermore, this state of affairs makes the display of devices to the user a little bit messy. See the attachment; in the KDE Plasma audio applet, the speakers and headphones are represented as one item with multiple ports (good), while the microphones have to be displayed as as multiple devices (bad and inconsistent).

I originally reported this against PulseAudio (https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/913) and was told it was a driver issue, so I'm reporting it here.
Comment 1 Jaroslav Kysela 2020-06-16 19:27:31 UTC
There is no reference in the provided link that it's the driver issue. The problem is that this hardware is different than the PA developers considered for their abstraction model (sink / card / port / profile).

The automatic switch should be handled inside PA or the GUI manager (user preferences). The external mic has already higher priority (preference) than the build-in Mic, but nobody care about the priority settings.

There are already some merge requests in PA which are trying to resolve this like:

Comment 2 Nate Graham 2020-06-16 20:14:24 UTC
Thanks for the info. Unfortunately it's pretty far over my head, but I'll test those patches and see if they improve the situation for me.

Note You need to log in before you can comment on or make changes to this bug.