Separate Rear and Front Audio

Seen a lot of post where others are attempting the same thing, but haven’t seen any that actually solved it. For example… [Preformatted text](https://forum.manjaro.org/t/splitting-front-and-rear-outputs-on-realtek-hd-using-indep-hp/72426)

I’ve also attempted that the Splitting Front/Rear that’s mention in the Arch wiki. The Headset & Speaker devices it creates show up, but don’t output any audio. The only way to get audio is to change the “Port” option (either Line Out or Headphone) in System Settings > Audio for the “Starship/Matisse” device. So, using either Headphone or Line Out (rear speaker) when using them one at a time, but no luck separating Line Out and Headphone into different devices to be used at the same time with different applications. Trying this on a “ALCS1200A”

pacmd dump                                                                                 INT ✘ 
### Configuration dump generated at Mon May 22 00:19:41 2023

load-module module-device-restore
load-module module-stream-restore
load-module module-card-restore
load-module module-augment-properties
load-module module-switch-on-port-available
load-module module-udev-detect
load-module module-alsa-card device_id="0" name="pci-0000_09_00.1" card_name="alsa_card.pci-0000_09_00.1" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes avoid_resampling=no card_properties="module-udev-detect.discovered=1"
load-module module-alsa-card device_id="1" name="pci-0000_0b_00.4" card_name="alsa_card.pci-0000_0b_00.4" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes avoid_resampling=no card_properties="module-udev-detect.discovered=1"
load-module module-bluetooth-policy
load-module module-bluetooth-discover
load-module module-bluez5-discover
load-module module-dbus-protocol
load-module module-native-protocol-unix
load-module module-gsettings
load-module module-default-device-restore
load-module module-always-sink
load-module module-intended-roles
load-module module-suspend-on-idle
load-module module-console-kit
load-module module-systemd-login
load-module module-position-event-sounds
load-module module-role-cork
load-module module-filter-heuristics
load-module module-filter-apply
load-module module-alsa-card device_id="2" name="usb-Astro_Gaming_Inc._ASTRO_MixAmp_Pro-00" card_name="alsa_card.usb-Astro_Gaming_Inc._ASTRO_MixAmp_Pro-00" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes avoid_resampling=no card_properties="module-udev-detect.discovered=1"
load-module module-cli-protocol-unix

set-sink-volume alsa_output.pci-0000_09_00.1.hdmi-stereo 0x10000
set-sink-mute alsa_output.pci-0000_09_00.1.hdmi-stereo no
suspend-sink alsa_output.pci-0000_09_00.1.hdmi-stereo yes
set-sink-volume alsa_output.pci-0000_0b_00.4.analog-stereo 0x6c6b
set-sink-mute alsa_output.pci-0000_0b_00.4.analog-stereo no
suspend-sink alsa_output.pci-0000_0b_00.4.analog-stereo no
set-sink-volume alsa_output.usb-Astro_Gaming_Inc._ASTRO_MixAmp_Pro-00.analog-stereo 0x76d3
set-sink-mute alsa_output.usb-Astro_Gaming_Inc._ASTRO_MixAmp_Pro-00.analog-stereo no
suspend-sink alsa_output.usb-Astro_Gaming_Inc._ASTRO_MixAmp_Pro-00.analog-stereo yes

set-source-volume alsa_output.pci-0000_09_00.1.hdmi-stereo.monitor 0x10000
set-source-mute alsa_output.pci-0000_09_00.1.hdmi-stereo.monitor no
suspend-source alsa_output.pci-0000_09_00.1.hdmi-stereo.monitor yes
set-source-volume alsa_output.pci-0000_0b_00.4.analog-stereo.monitor 0x10000
set-source-mute alsa_output.pci-0000_0b_00.4.analog-stereo.monitor no
suspend-source alsa_output.pci-0000_0b_00.4.analog-stereo.monitor no
set-source-volume alsa_input.pci-0000_0b_00.4.analog-stereo 0x50f6
set-source-mute alsa_input.pci-0000_0b_00.4.analog-stereo no
suspend-source alsa_input.pci-0000_0b_00.4.analog-stereo yes
set-source-volume alsa_output.usb-Astro_Gaming_Inc._ASTRO_MixAmp_Pro-00.analog-stereo.monitor 0x10000
set-source-mute alsa_output.usb-Astro_Gaming_Inc._ASTRO_MixAmp_Pro-00.analog-stereo.monitor no
suspend-source alsa_output.usb-Astro_Gaming_Inc._ASTRO_MixAmp_Pro-00.analog-stereo.monitor yes
set-source-volume alsa_input.usb-Astro_Gaming_Inc._ASTRO_MixAmp_Pro-00.mono-fallback 0x10000
set-source-mute alsa_input.usb-Astro_Gaming_Inc._ASTRO_MixAmp_Pro-00.mono-fallback no
suspend-source alsa_input.usb-Astro_Gaming_Inc._ASTRO_MixAmp_Pro-00.mono-fallback yes

set-card-profile alsa_card.pci-0000_09_00.1 output:hdmi-stereo
set-card-profile alsa_card.pci-0000_0b_00.4 output:analog-stereo+input:analog-stereo
set-card-profile alsa_card.usb-Astro_Gaming_Inc._ASTRO_MixAmp_Pro-00 output:analog-stereo+input:mono-fallback

set-default-sink alsa_output.pci-0000_0b_00.4.analog-stereo
set-default-source alsa_input.pci-0000_0b_00.4.analog-stereo

### EOF
sudo alsa-info.sh --upload                                                                     ✔ 
[sudo] password for: 
/usr/bin/alsa-info.sh: line 661: tree: command not found
/usr/bin/alsa-info.sh: line 661: tree: command not found
Uploading information to www.alsa-project.org ... Done!

Your ALSA information is located at http://alsa-project.org/db/?f=d357e2f155fc9598729251ff68219b03b7ce17b8
Please inform the person helping you.

Are there any fixes/workarounds, or is this just not currently supported?

Thanks

I have no problem using different output devices using KDE and the default sound applet…
I just start the app and then select the output device in the tray’s sound applet in the application tab…

Previous forum discussion is not very helpful and OP no longer has a forum profile

First comment about Archwiki method of splitting front/rear using surround 4.0 profile is dismissed as didn’t work, no information to consider how to get it working

OP did manage to implement the parser hint string in hdajackretask to create independent headphone output ALC892 Alt Analog in post#3, but reconfiguring PulseAudio to use both outputs was “way over my head”


Using remap modules with 4.0 surround profile can be tested in a current session before permanently reconfiguring PulseAudio

change onboard audio (Starship/Matisse) to 4.0 surround profile:

pactl set-card-profile alsa_card.pci-0000_0b_00.4 output:analog-surround-40

and load remap modules:

pactl load-module module-remap-sink sink_name=speakers sink_properties="device.description='Speakers'" remix=no master=alsa_output.pci-0000_0b_00.4.analog-surround-40 channels=2 master_channel_map=front-left,front-right channel_map=front-left,front-right
pactl load-module module-remap-sink sink_name=headphones sink_properties="device.description='Headphones'" remix=no master=alsa_output.pci-0000_0b_00.4.analog-surround-40 channels=2 master_channel_map=rear-left,rear-right channel_map=front-left,front-right

If commands work to load additional modules, terminal response should report index number for module created. New virtual sinks for Headphones and Speakers should be visible in audio GUI controls:

Audio streams can be assigned to either remapped output (or Built-in Audio Analog Surround 4.0
to play to both Headphone and Speakers simultaneously)

40-surround-remap-to-2-stereo

Remapped audio sink for Headphones should be audible from the black rear jack used for rear-left and rear-right channels

If the remapped modules work for both outputs, a custom PulseAudio configuration can be created in ~/.config/pulse/default.pa to load the remap modules

To use front headphone socket for remapped headphone output, use hdajackretask to create a boot override to change the channel map for Green Headphone, front side to use rear surround channels

1 Like

Really appreciate the help. How this works is starting to make sense. I didn’t realize before that the Headphone’s output was being sent to the rear Black port. I was also confused by the other tutorials/wiki’s/threads where they said to use “master_channel_map=rear-left,rear-right”, but when I checked the Sinks they never showed any rear audio. I now see how the different profiles change the different card names and make different channel maps available. The Arch " Splitting front/rear" wiki doesn’t specifically say to switch to surround, so all my settings were default (stereo). Their example uses “alsa_output.pci-0000_05_00.0.analog-surround-40”, but then says to just use whatever your card name shows in the “list-sinks”

I noticed if I used the set-card-profile above, the USB Microphone disappeared. Switching to “Analog Surround 4.0 output + Analog Stereo Input” brought it back.

Both of the load-modules worked like you said and I added them to the default.pa. Both work after a reboot. EDIT… Previously when tested this, I was just using the “Test” button and selecting the sound to play the sound. Just tried using these to play a video and it caused a lot of lag/stuttering. Switching Audio to the original Line Out allows it to play normal.

EDIT 2… Removed the boot override to see if that was causing it. Didn’t stop the freezing/studdering. Further testing seems that its only happening with videos in browsers, but not a local video files when using the new load-modules Speakers & Headphones. More testing and it seems intermittent. Now it seems to be working fine in the browser.

So far, unable to get hdajackretask to output audio to the front headphone jack. After configuring it like your screenshot, Install boot override and rebooting, the audio is still coming out of the Black port in the rear. If I use the Apply now, it throws a popup saying it’s busy.

Thanks again!

The Apply Now button in hdajackretask works only if software audio servers (Pulseaudio etc) are stopped. Applied changes are only applied for current session, wheras boot override works every time system is booted (assuming the overrides have been configured to the audio codec)

If the single retask is not working:

  1. Run sudo hdajackretask and click Remove boot override

  2. Create an override for Green Headphone, front side
    change Device from Headphone to Line Out and change Channel (in group) to Back

  3. Create an override for Black Line Out, rear side
    change Connectivity from Jack to Not Connected

  4. click Install boot override and reboot to load new overrides

If both overrides work as expected, the Headphone channels remapped to rear-left and rear-right will only be able to play to the Front jack socket

1 Like

Looks like the additional override is what it needed along with changing the Green Headphone, Front side Channel group to “1”. Default was “2”.

When I left the Channel group as default, the Headset still wasn’t working after a reboot. So, I changed the Channel group to 1 to make it match the Channel group that’s shown for the Black Line Out, Rear side. Installed that boot override, rebooted and so far everything seems to be working the way I need it.

Thanks

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.