[pulseaudio-discuss] Feature Request: Support for multiple capture devices on the same card

Tim Schumacher tim at timakro.de
Fri Jun 5 17:13:38 UTC 2020


Hi there,

as you can see from "cat /proc/asound/pcm" my sound card has two capture devices

00-00: ALC892 Analog : ALC892 Analog : playback 1 : capture 1
00-02: ALC892 Alt Analog : ALC892 Alt Analog : capture 1
00-03: HDMI 0 : HDMI 0 : playback 1
00-07: HDMI 1 : HDMI 1 : playback 1
00-08: HDMI 2 : HDMI 2 : playback 1
00-09: HDMI 3 : HDMI 3 : playback 1
00-10: HDMI 4 : HDMI 4 : playback 1

This allows me to record e.g. from Line In and Rear Mic simultaneously.
The relevant mixer controls as shown by "amixer -c 0 scontrols" are as
follows:

[...]
Simple mixer control 'Capture',0
Simple mixer control 'Capture',1
[...]
Simple mixer control 'Input Source',0
Simple mixer control 'Input Source',1
[...]

To achieve the aforementioned setup without PulseAudio I'd go into
alsamixer and enable both Capture sliders as well as set Input Source
(that is index 0) to Line In and Input Source 1 to Rear Mic. Now run two
separate arecord instances passing --device=hw:0,0 to the first and
--device=hw:0,2 to the other.

Currently PulseAudio isn't even aware of the second capture device. Even
if it was detected the automatic profile creation is designed in a way that
"combines every input mapping with every output mapping" so a profile
with two inputs wouldn't be created automatically.

Since merge request 213 we are able to reference mixer controls such as
'Input Source',1 in paths files by their index (previously only 'Input Source'
could be used and was referring to 'Input Source',0).
(https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/213)

When this patch finds it's way into a full release I'm sure I'll be able
to hack together profile-sets/paths files for my setup but a general
solution would be nice.

>From a quick glance at the patch it seems to me that indexes as in
'Input Source',1 need to be hardcoded in the paths files. A more dynamic
solution which doesn't require duplication of paths files would be preferable.

Hoping for opinions from people who are more familiar with PulseAudio internals

-Tim


More information about the pulseaudio-discuss mailing list