Bug 93163 - Focusrite Scarlett and Behringer XR18 forced to Multichannel
Summary: Focusrite Scarlett and Behringer XR18 forced to Multichannel
Status: RESOLVED MOVED
Alias: None
Product: PulseAudio
Classification: Unclassified
Component: daemon (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: pulseaudio-bugs
QA Contact: pulseaudio-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-29 09:17 UTC by Christian Vogel
Modified: 2018-07-30 09:41 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Scarlett pactl and lsusb-v output. (4.51 KB, application/gzip)
2015-11-29 09:17 UTC, Christian Vogel
Details
pactl list excerpts for Behringer XR18 (9.54 KB, text/plain)
2016-02-27 17:24 UTC, Christian Vogel
Details

Description Christian Vogel 2015-11-29 09:17:19 UTC
Created attachment 120193 [details]
Scarlett pactl and  lsusb-v output.

The Focusrite Scarlett 6i6 is a class-compliant multichannel audio interface with 4 analog and 2 digital S/PDIF inputs and outputs each. When using the udev detection pulseaudio only offers the multichannel profile, but I really want to be able to switch to a Stereo Duplex mode.

(manual configuration of a alsa-source/sink in default.pa works, obviously)

Right now, I get high-pass filtered audio on the first 4 channels and the subwoofer signal on the 6th channel, which of course is completely nonsensical.

Profiles:
 input:multichannel-input: Multichannel Input (...)
 output:multichannel-output: Multichannel Output (...)
 output:multichannel-output+input:multichannel-input: (...)
 <--- no more --->

How can I tweak udev-detect to force a particular mapping of channels?

{lsusb and pactl outputs added as compressed .txt file as it's over the 32k limit}
Comment 1 Tanu Kaskinen 2015-11-29 09:32:24 UTC
The multichannel profiles are only used when everything else fails, so it sounds strange that manual configuration with module-alsa-sink works in stereo mode. Or do you mean that you manually configure the sink with 12 channels, but set 10 of them to aux?
Comment 2 Christian Vogel 2015-11-29 11:08:38 UTC
Yes, if I configure it manually, then I have set all except the first two channels mapped to aux<0..N>.

Here's what I came up with for udev-detect so that I can at least use the card for  stereo outputs, for actual audio work I wouldn't use pulseaudio anyway.

➜  /etc/udev/rules.d/99-pulseaudio-local.rules 
: 
: SUBSYSTEM!="sound", GOTO="pulseaudio_local_end"
: ACTION!="change", GOTO="pulseaudio_local_end"
: KERNEL!="card*", GOTO="pulseaudio_local_end"
: SUBSYSTEMS=="usb", GOTO="pulseaudio_local_check_usb"
: 
: LABEL="pulseaudio_local_check_usb"
: 
: ##
: # The Focusrite Scarlett 6i6 only runs as 12 playback and 6 capture channels!
: # (mappable using the internal mixer)
: # Bus 002 Device 004: ID 1235:8012 Focusrite-Novation Scarlett 6i6
: ##
: ATTRS{idVendor}=="1235", ATTRS{idProduct}=="8012", ENV{PULSE_PROFILE_SET}="focusrite-scarlett-6i6.conf"
: 
: LABEL="pulseaudio_local_end"

➜ /usr/share/pulseaudio/alsa-mixer/profile-sets/focusrite-scarlett-6i6.conf 
: ; Based on native-instruments-traktor-audio10.conf
: 
: ;
: ; Focusrite Scarlett 6i6 has 6 physical inputs/outputs
: ; Inputs
: ;  2x  Microphone/Line on front
: ;  2x  Line on back
: ;  2x  S/PDIF coaxial on back
: ; Outputs
: ;  2x  Headphone (Out1/2, Out 3/4) on front
: ;  2x  Line on back (Out 1..4)
: ;  2x  S/PDIF coaxial on back
: ;
: ; It's presented as a 6 input, 12 output interface to the PC, so
: ; we have to create some mappings. Actual routing is configurable
: ; in ALSA mixer. I prefer a 1:1 mapping to physical outputs.
: ;
: 
: [General]
: auto-profiles = no
: 
: [Mapping analog-out]
: description = Analog Outputs
: device-strings = hw:%f
: channel-map = left,right,aux0,aux1,aux2,aux3,aux4,aux5,aux6,aux7,aux8,aux9
: 
: [Mapping analog-in]
: description = Analog Inputs
: device-strings = hw:%f
: channel-map = left,right,aux0,aux1,aux2,aux3
: direction = input
: 
: 
: [Profile output:analog-out+input:analog-in]
: description = Analog Duplex
: output-mappings = analog-out
: input-mappings = analog-in
: priority = 100
: skip-probe = yes
: 

Unfortunately this whols "paths" thing is a undocumented overengineered mess, or so it seems. Any idea how to present this card as three separate In/Out/Duplex interfaces for Inout1/2, Input3/4 and Inout5/6? That would probably be the "perfect" solution for owners of this device....
Comment 3 Tanu Kaskinen 2015-11-29 11:43:17 UTC
(In reply to Christian Vogel from comment #2)
> Any idea how to present this card as three separate
> In/Out/Duplex interfaces for Inout1/2, Input3/4 and Inout5/6? That would
> probably be the "perfect" solution for owners of this device....

So each of those Inout interfaces would have two stereo outs and two mono ins? That's unfortunately not currently supported. One mapping can only have one channel map, and profiles can have multiple mappings only if they are on different devices. module-remap-sink could be used to split a four-channel sink into two stereo sinks, but there are no facilities for loading module-remap-sink automatically when a particular sound card is detected.
Comment 4 Raymond 2015-12-03 17:05:55 UTC
(In reply to Christian Vogel from comment #0)
> Created attachment 120193 [details]
> Scarlett pactl and  lsusb-v output.
> 
> The Focusrite Scarlett 6i6 is a class-compliant multichannel audio interface
> with 4 analog and 2 digital S/PDIF inputs and outputs each. When using the
> udev detection pulseaudio only offers the multichannel profile, but I really
> want to be able to switch to a Stereo Duplex mode.
> 
>
> 
> Right now, I get high-pass filtered audio on the first 4 channels and the
> subwoofer signal on the 6th channel, which of course is completely
> nonsensical.
> 

LFE filtering (hogh pass and low pass) can be disabled
Comment 5 Johannes Maibaum 2016-02-08 14:19:07 UTC
I might add that it seems to be a problem with the whole Focusrite Scarlett product range with more than two ins/outs. I have got a Focusrite Scarlett 18i8, which gets recognized as a 7.1 surround sound device, although it has only 6 analog outputs, which are physically available as one "Monitor" output (two 6,3mm TRS jack connectors), and two headphone outputs, "HP 01" and "HP 02", being a 6,3mm stereo JACK each. The remaining two channels are linked to a S/PDIF output.

As a workaround, I used to switch off LFE remixing and/or remixing altogether, depending on the source material I'm listening to, but it would be great if one could at least switch to a stereo profile (simply mapping the same stereo signal to all stereo outputs).
Comment 6 Christian Vogel 2016-02-27 17:22:18 UTC
Same problem with a Behringer X18R mixer as a 18ch input/output device, this workaround only works when running in 18ch mode. Operation mode is selectable in the Windows/Linux/Mac/Android mixing application to be 2 or 18ch in/out.

http://www.music-group.com/Categories/Behringer/Mixers/Digital-Mixers/XR18/p/P0BI8

By default line-level returns are on channels 17/18, so it makes sense to put front-left/front-right there. So a routing of 16 "aux" channels, then left/right is used.

My /usr/share/pulseaudio/alsa-mixer/profile-sets/behringer_xr18.conf:

: ;
: ; Behringer XR18: 18 inputs, 18 outputs when in 18ch mode
: ;
: ; left,right comes at the end, because in 18ch mode the last two
: ; channels are routed to/from aux-input which is most likely where
: ; you want to have your mp3 player input or jingles or ...
: ;
: 
: [General]
: auto-profiles = no
: 
: [Mapping analog-out]
: description = Analog Outputs
: device-strings = hw:%f
: channel-map = aux0,aux1,aux2,aux3,aux4,aux5,aux6,aux7,aux8,aux9,aux10,aux11,aux12,aux13,aux14,aux15,left,right
: 
: [Mapping analog-in]
: description = Analog Inputs
: device-strings = hw:%f
: channel-map = aux0,aux1,aux2,aux3,aux4,aux5,aux6,aux7,aux8,aux9,aux10,aux11,aux12,aux13,aux14,aux15,left,right
: direction = input
: 
: [Profile output:analog-out+input:analog-in]
: description = Analog Duplex
: output-mappings = analog-out
: input-mappings = analog-in
: priority = 100
: skip-probe = yes


$ lsusb
(...)
Bus 001 Device 014: ID 1397:00d4 BEHRINGER International GmbH
Comment 7 Christian Vogel 2016-02-27 17:24:53 UTC
Created attachment 122002 [details]
pactl list excerpts for Behringer XR18

Relevant parts of pactl list with a Behringer X-Air XR18 mixer connected via USB, using the profile implementing the mentioned workaround putting left/right on ch 17/18.
Comment 8 Raymond 2016-02-29 01:11:50 UTC
What is the usage of those jack modules?

https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Modules/#index42h3


http://git.alsa-project.org/?p=alsa-plugins.git;a=blob;f=doc/README-jack;hb=HEAD

Alsa jack plugin allow you to select whcich ports 

 http://git.alsa-project.org/?p=alsa-plugins.git;a=blob;f=doc/README-pulse;hb=HEAD

Both plugins accept the "server" parameter, specifying which PulseAudio server
  to contact. Both also accept the "device" parameter, which indicate which
  source and sink to use.
Comment 9 David Henningsson 2016-02-29 02:05:12 UTC
module-remap-sink can do all this remapping for you, so what you're actually looking for is some more ergonomic way to either load module-remap-sink or reconfigure the channel mapping without loading module-remap-sink?
Comment 10 Christian Vogel 2016-02-29 07:02:54 UTC
David, thanks your suggestion, but that's not what I'm looking for. I know about remap-sink, and if I would need such a solution, it's easily scripted.

What I expect from pulseaudio is to handle devices that are clearly *not* 5.1 movie-sound as something more sensible, such as offering at least a "Stereo on first two channels" option to make them useful for day-to-day work.

Front/Read/LFE filtering is pretty much the worst option for users of these "semi professional" audio interfaces.
Comment 11 CapsAdmin 2016-06-23 06:07:09 UTC
Same issue here on a scarlett 18i8. I ended up using jack with output to a pulseaudio sink with the pulseaudio jack module to fix the issue.
Comment 12 GitLab Migration User 2018-07-30 09:41:48 UTC
-- 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/99.


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.