Skip to content

Instantly share code, notes, and snippets.

@subrezon
Last active July 17, 2023 12:38
Show Gist options
  • Save subrezon/02719945ca885bedaa7be8baadab93b0 to your computer and use it in GitHub Desktop.
Save subrezon/02719945ca885bedaa7be8baadab93b0 to your computer and use it in GitHub Desktop.

Create new configuration files in /etc/pipewire/pipewire.conf.d/.

10-audient-id4-split-output.conf:

context.modules = [
	{
		name = libpipewire-module-loopback
		args = {
			node.description = "Audient iD4 Headphones"
			capture.props = {
				node.name = "iD4_Headphones"
				media.class = "Audio/Sink"
				audio.position = [ FL FR ]
			}
			playback.props = {
				node.name = "playback.iD4_Headphones"
				audio.position = [ FL FR ]
				node.target = "alsa_output.usb-Audient_Audient_iD4-00.analog-surround-40"
				stream.dont-remix = true
				node.passive = true
			}
		}
	}
	{
		name = libpipewire-module-loopback
		args = {
			node.description = "Audient iD4 Speakers"
			capture.props = {
				node.name = "iD4_Speakers"
				media.class = "Audio/Sink"
				audio.position = [ FL FR ]
			}
			playback.props = {
				node.name = "playback.iD4_Speakers"
				audio.position = [ FC LFE ]
				node.target = "alsa_output.usb-Audient_Audient_iD4-00.analog-surround-40"
				stream.dont-remix = true
				node.passive = true
			}
		}
	}
]

20-audient-id4-split-input.conf:

context.modules = [
    {
        name = libpipewire-module-loopback
        args = {
            node.description = "Audient iD4 Microphone"
            capture.props = {
                node.name = "capture.iD4_Mic"
                audio.position = [ FL ]
                stream.dont-remix = true
                node.target = "alsa_input.usb-Audient_Audient_iD4-00.analog-surround-40"
                node.passive = true
            }
            playback.props = {
                node.name = "iD4_Mic"
                media.class = "Audio/Source"
                audio.position = [ MONO ]
            }
        }
    }
    {
        name = libpipewire-module-loopback
        args = {
            node.description = "Audient iD4 Instrument"
            capture.props = {
                node.name = "capture.iD4_Instrument"
                audio.position = [ FR ]
                stream.dont-remix = true
                node.target = "alsa_input.usb-Audient_Audient_iD4-00.analog-surround-40"
                node.passive = true
            }
            playback.props = {
                node.name = "iD4_Instrument"
                media.class = "Audio/Source"
                audio.position = [ MONO ]
            }
        }
    }
    {
        name = libpipewire-module-loopback
        args = {
            node.description = "Audient iD4 Loopback"
            capture.props = {
                node.name = "capture.iD4_Loopback"
                audio.position = [ FC LFE ]
                stream.dont-remix = true
                node.target = "alsa_input.usb-Audient_Audient_iD4-00.analog-surround-40"
                node.passive = true
            }
            playback.props = {
                node.name = "iD4_Loopback"
                media.class = "Audio/Source"
                audio.position = [ FL FR ]
            }
        }
    }
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment