Showing posts with label remap. Show all posts
Showing posts with label remap. Show all posts

2008-12-22

Solving the mono problem

In an earlier post I showed you my sink-remapping which sent audio either to my speakers or my headphones. The problem with this setup is that I needed to disable remixing, effectively muting all mono sounds (and probably screw up surround sound, haven't tried that). The solution, or rather fix, is as follows:


#mono mappings
load-module module-remap-sink sink_name=mono-spk master=sound_card channels=2 master_channel_map=front-left,front-right channel_map=mono,mono
load-module module-remap-sink sink_name=mono-head master=sound_card channels=2 master_channel_map=rear-left,rear-right channel_map=mono,mono


This lets me hear audio from mono sources by sending them to these upmixing sinks.

The two drawbacks with this solution is that I have to switch sink manually and applications playing both mono and stereo will still be muted for either mono or stereo (although I haven't used any such application)

I did try to remix the sinks without success:

load-module module-combine sink_name=speakers-comb slaves=speakers,mono-spk channels=2 channel_map=front-left,front-right

If anyone got this working, please tell me how :)

2008-11-01

Pulseaudio and speakers+headphones remapping

Just thought I should share my pulseaudio configuration. It allows me to move audio streams between my speakers and my headphones. The drawback is that I had to connect my headphones to the rear-speaker output, effectively stopping any surround usage. The perfect setup would have been if I could instead have used the audio output on the front of my computer (I know this should work as the Realtek utilitiy in Windows is able to do it).

For sanity I just share the relevant parts of my system.pa

#### I do this by hand for the remaps
# ### Automatically load driver modules depending on the hardware available
# .ifexists module-hal-detect.so
# load-module module-hal-detect
# .else
# ### Alternatively use the static hardware detection module (for systems that
# ### lack HAL support)
# load-module module-detect
#.endif

### Automatically suspend sinks/sources that become idle for too long
#load-module module-suspend-on-idle
#bug: http://pulseaudio.org/ticket/326


# Set the speakers as the default device
set-default-sink speakers

# Map device 0 to sound_card (this is my sound card) and use 4 channels
load-module module-alsa-sink sink_name=sound_card device_id=0 channels=4 channel_map=front-left,front-right,rear-left,rear-right

# Map the front channels to the speakers sink
load-module module-remap-sink sink_name=speakers master=sound_card channels=2 master_channel_map=front-left,front-right channel_map=front-left,front-right

# Map the rear channels to the headphones sink
load-module module-remap-sink sink_name=headphones master=sound_card channels=2 master_channel_map=rear-left,rear-right channel_map=front-left,front-right


And here's what I changed in daemon.conf:

;make channel-splitting work (may destroy mono to stereo on mono files)
disable-remixing = yes

default-sample-channels = 4



Unfortunately the sink names are not shown in PulseAudio Volume Control but some trial and error (choosing 1 out of to 2 :P) will tell you which sink is the speakers and which is the headphones.