Skip to content

Instantly share code, notes, and snippets.

@fsimonis
Created February 27, 2021 12:58
Show Gist options
  • Save fsimonis/6fa2b6862830b54d8054b97fe94405c4 to your computer and use it in GitHub Desktop.
Save fsimonis/6fa2b6862830b54d8054b97fe94405c4 to your computer and use it in GitHub Desktop.
Focusrite Scarlett 2i4 pulseaudio profile
# File /lib/udev/rules.d/91-pulseaudio-focusrite.rules
# To get the idVendor and idProduct first unplug the device, then start dmesg -w and plug the device back in. It should show up on the screen.
SUBSYSTEM!="sound", GOTO="pulseaudio_end"
ACTION!="change", GOTO="pulseaudio_end"
KERNEL!="card*", GOTO="pulseaudio_end"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1235", ATTRS{idProduct}=="8200", ENV{PULSE_PROFILE_SET}="focusrite-2i4.conf"
LABEL="pulseaudio_end"
# File /usr/share/pulseaudio/alsa-mixer/profile-sets/focusrite-2i4.conf
[General]
auto-profiles = no
# Output mapping only uses the left and right channels, which map to the output 1 and 2 as well as the headphone jack.
# The ouputs 3 and 4 are mapped to aux0 and aux1, which are not used on normal playback.
[Mapping analog-out]
description = Analog Outputs
device-strings = front:%f hw:%f
channel-map = left,right,aux0,aux1
direction = output
# Output mapping which maps input 1 to a mono source (aka your mic) and input 2 to aux0.
# The mono input works nicely with software such as firefox.
# If you are using 2 mics for stereo input use: channel-map = left, right
[Mapping analog-in]
description = Analog Input
device-strings = front:%f hw:%f
channel-map = mono,aux0
direction = input
[Profile output:analog-out+input:analog-in]
description = Analog Stereo
output-mappings = analog-out
input-mappings = analog-in
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment