Sunday, November 29, 2015

Focusrite Scarlett 6i6 and Pulseaudio

Oh, pulseaudio, how do I love thee...

The Focusrite Scarlett 6i6 is a 2 Mic, 2 Line, 2 Digital input, 4 Line, 2 Digital output audio interface and is presented to the Linux machine as a 12 output, 6 input USB2.0 class compliant soundcard. Strange, but that's what it is. Now, pulseaudio, not very smart in the first place, gets confused and only ever wants to use this card as a "multichannel" output, with outputs 1/2 deprived of bass, and output 6 (typically mapped to the s/pdif output) being a subwoofer. Not useful when listening over headphones.

After looking through the non-existing pulseaudio-documentation regarding udev, and searching on the web, I've came up with a workaround. This is at least useful to use the card as a normal stereo output.

To get output on the 2nd headphone output, use alsamixer to map Master 2L and Master 2R source to PCM1 and PCM2. The same applies to the S/PDIF output (Master 3L/R).




Bug filed.

➜  ~  cat /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

➜  ~  cat /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"

5 comments:

Unknown said...

Thanks alot. :) With that config and the reference to alsamixer, I finally got my 6i6 in a usable state. I'm playing around with module-remap-sink/source now to see what can be done with that in this case.

Joel Wiramu Pauling said...

I have the 6i6 gen2 - which I have managed to get working by using a windows laptop and setting up hardware routing all inputs out to the 2 monitors. But I only get 3 alsamixer knobs under linux as per: https://imgur.com/gallery/baVW3

lsusb here

https://pastebin.com/iSDHAdPw

Would be useful to see the gen1 lsusb and what you see with alsamixer

Any help getting this working so I can setup input and routing under linux. I don't need the hardware mixer but being able to route the channels and mixers with Jack is kinda inportant to being useful.

Unknown said...
This comment has been removed by the author.
Unknown said...

As of now (May 4th, 2017) the device you have is not explicitly supported as the 1st gen Scarletts were:


Mixer Quirks, last commit d2bb390a2081a36ffe906724d2848d846f2aeb29 Mon Feb 20 09:47:59 2017 +0100



case USB_ID(0x1235, 0x8012): /* Focusrite Scarlett 6i6 */
case USB_ID(0x1235, 0x8002): /* Focusrite Scarlett 8i6 */
case USB_ID(0x1235, 0x8004): /* Focusrite Scarlett 18i6 */
case USB_ID(0x1235, 0x8014): /* Focusrite Scarlett 18i8 */
case USB_ID(0x1235, 0x800c): /* Focusrite Scarlett 18i20 */


Mixer Scarlett, last commit c99b9e853d3951fe521cc7b2357eec93d5c16246 Wed Dec 17 16:09:35 2014 -0600


case USB_ID(0x1235, 0x8012):
info = &s6i6_info;
break;
...and to on.

The lspci you linked to shows


idVendor 0x1235 Focusrite-Novation
idProduct 0x8203


So it's not handled. It seems that just adding the device to the tables doesn't work, one needs to look into detail what the 2nd gen devices do differently:

https://www.spinics.net/lists/alsa-devel/msg60916.html

Joel Wiramu Pauling said...

I've sent a detailed set of usb pcaps from linux and windows including input walks, and focusrite control toggling of everything I could do, to the alsa-devel list.

Hopefully this helps someone in getting it supported, I contacted Focusrite via twitter but they were less than helpful. Dump here:
https://drive.google.com/drive/folders/0Bw2fu74VAaO5bksyUEhMZDBtUE0