Skip to content

Instantly share code, notes, and snippets.

@irgendwr
Created July 20, 2022 22:00
Show Gist options
  • Save irgendwr/0047b2263c4bca938b932bdfe45db2f1 to your computer and use it in GitHub Desktop.
Save irgendwr/0047b2263c4bca938b932bdfe45db2f1 to your computer and use it in GitHub Desktop.
PipeWire configuration to remap channels from an external audio interface to separate virtual devices.
context.modules = [
{ name = libpipewire-module-loopback
args = {
node.description = "i2i Left"
capture.props = {
node.name = "capture.i2i_Left"
audio.position = [ FL ]
stream.dont-remix = true
target.object = "alsa_input.usb-Focusrite_Scarlett_2i2_USB_Y886QAJ09537A9-00.analog-stereo"
#node.dont-reconnect = true
node.passive = true
}
playback.props = {
node.name = "i2i_Left"
media.class = "Audio/Source"
audio.position = [ MONO ]
}
}
}
{ name = libpipewire-module-loopback
args = {
node.description = "i2i Right"
capture.props = {
node.name = "capture.i2i_Right"
audio.position = [ FR ]
stream.dont-remix = true
target.object = "alsa_input.usb-Focusrite_Scarlett_2i2_USB_Y886QAJ09537A9-00.analog-stereo"
#node.dont-reconnect = true
node.passive = true
}
playback.props = {
node.name = "i2i_Right"
media.class = "Audio/Source"
audio.position = [ MONO ]
}
}
}
]
@irgendwr
Copy link
Author

This config above maps the channels of an external audio interface (Focusrite Scarlett 2i2) to separate virtual mono devices.

The config can be placed in /etc/pipewire/pipewire.conf.d/10-i2i.conf for example. Afterwards you need to reload PipeWire, e.g. systemctl --user restart pipewire.service.

More details and examples can be found in the PipeWire documentation:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment