Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[Solved] How to merge Stereo into Mono

Need help with peripherals or devices?
Post Reply
Message
Author
User avatar
MikeLieberman
Posts: 162
Joined: 2013-01-29 17:26
Location: General Santos City, Philippines
Has thanked: 17 times
Been thanked: 2 times

[Solved] How to merge Stereo into Mono

#1 Post by MikeLieberman »

This will probably be a software solution to a hardware issue, if there is any solution.

I am currently on Bullseye and the audio runs through a Realtek ALC897, but I suspect that any solution might need to be more global.

I am totally deaf in my left ear and in general I have a problem with echo and background noise.

I hear best with a headphone, except with a headphone (I use bluetooth headphones) I only hear the right channel. I can use the output balance slide bar to send sound only to my good ear, but that only kills the left channel and does not merge the two channels into a single mono channel, which is what I need. I have looked at AlsaMixer, but for the life of me, I can't see a way to accomplish what I need from that. As this affects all audio and not just a single mpeg, I need a more global fix. While I don't need it to really affect the wired speakers, when not using the headset, a fix that affects them would be OK, if not needed.
Last edited by MikeLieberman on 2023-03-22 03:56, edited 1 time in total.

User avatar
FreewheelinFrank
Global Moderator
Global Moderator
Posts: 2082
Joined: 2010-06-07 16:59
Has thanked: 38 times
Been thanked: 225 times

Re: [Hardware] How to merge Stereo into Mono

#2 Post by FreewheelinFrank »

I haven't done it myself, but looked into it for a case of a laptop with only one speaker.

viewtopic.php?p=750548#p750548

User avatar
sunrat
Administrator
Administrator
Posts: 6412
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 462 times

Re: [Hardware] How to merge Stereo into Mono

#3 Post by sunrat »

In Bullseye with Pulseaudio, you need to create a new module-remap-sink and set that as default in ~/.config/pulse/default.pa for just your user, or /etc/pulse/default.pa for all users.
First find the name of your sound card. Mine is:

Code: Select all

$ pacmd list-sinks | grep name
        name: <alsa_output.pci-0000_03_00.0.analog-stereo>
Then add the new sink to the end of the default.pa file like this:

Code: Select all

# Load the module and re-map
load-module module-remap-sink master=alsa_output.pci-0000_03_00.0.analog-stereo sink_name=mono channels=2 channel_map=mono, mono
# Select the new default mapping
set-default-sink mono
Of course replace the name of the soundcard with your actual one returned by the first pacmd.
Reboot or restart PA and your channels should be remapped to mono. You may have to select that sink as output in pavucontrol.

Edit - copied from post below. If you wish to use the user config file ~/.config/pulse/default.pa - you need to copy the whole /etc/pulse/default.pa to ~/.config/pulse/default.pa and then add the new sink lines to the end of it.

I had a good idea how to do this but borrowed the process from https://blog.desdelinux.net/en/pulseaud ... de-stereo/ . I think they overcomplicated it and made a couple of mistakes which is why I rewrote it. Still not sure it's 100% correct so let us know how it goes. I wasn't able to test it atm.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

User avatar
MikeLieberman
Posts: 162
Joined: 2013-01-29 17:26
Location: General Santos City, Philippines
Has thanked: 17 times
Been thanked: 2 times

Re: [Hardware] How to merge Stereo into Mono

#4 Post by MikeLieberman »

@sunrat

I installed Pulseaudio because it was not on my system. Once installed there as no 'default.pa.' I rebooted, but though there were files in the pulse folder, default.pa was not there. I created it and changed the device name.

I rebooted again and I tried it and it both worked and failed! :-)

What worked: my desktop wired speakers turned into Mono
What failed: I lost my ability to even connect to my Bluetooth devices.

What I had to do to get BT back:
-- first I uninstalled pulse and rebooted | BUT still no BT
-- I purged ~/.config/pulse from the system and rebooted. THAT got BT to work again.

So maybe it was the use of 'default.pa.' I don't know, and I am pretty clueless why it was interfering with communicating to a BT device. Yes, I tried removing and reinstalling BT devices. The BT software would find the device but could not communicate with it. Like I said, I only got BT devices back after the purge of the folder.

User avatar
sunrat
Administrator
Administrator
Posts: 6412
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 462 times

Re: [Hardware] How to merge Stereo into Mono

#5 Post by sunrat »

As I said, I didn't test it. Presumably you don't have mono now you removed the file. The file ~/.config/pulse/default.pa is the user config and overrides the system config in /etc/pulse/default.pa . It is not created as default afaik.
The user file is read before the system file so possibly the system file is ignored completely if the user config exists. Not what I expected. Probably if you use that you need to copy the whole /etc/pulse/default.pa to ~/.config/pulse/default.pa and then add the new sink lines to the end of it. /etc/pulse/default.pa contains lines to load the bluetooth modules.

Also you said you didn't have Pulseaudio. That's weird as it's the default sound server in Bullseye.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

User avatar
MikeLieberman
Posts: 162
Joined: 2013-01-29 17:26
Location: General Santos City, Philippines
Has thanked: 17 times
Been thanked: 2 times

Re: [Hardware] How to merge Stereo into Mono

#6 Post by MikeLieberman »

@sunrat

Thanks for the advice. I will have to put this aside until I return on Monday. It's Friday afternoon here in the Philippines and I will be away from my desk for a few days. But as I see it, here is what my steps will be:
  • Install all the Pulse programs.
  • Reboot and make sure I can still use BT.
  • copy /etc/pulse/default.pa to ~/.config/pulse/default.pa
  • Reboot and make sure I can still use BT.
  • Edit ~/.config/pulse/default.pa
  • Reboot and make sure I can still use BT.
FYI, I do see /etc/pulse/default.pa

CynicalDebian
Posts: 263
Joined: 2023-03-02 05:26
Location: USA
Has thanked: 50 times
Been thanked: 60 times
Contact:

Re: [Hardware] How to merge Stereo into Mono

#7 Post by CynicalDebian »

What failed: I lost my ability to even connect to my Bluetooth devices.
You will need the pulseaudio-module-bluetooth package for bluetooth to work with pulseaudio. But there are a number of reasons bluetooth may not work.

https://wiki.debian.org/BluetoothUser
Also you said you didn't have Pulseaudio. That's weird as it's the default sound server in Bullseye.
I have also had to manually install pulseaudio before, I think if you use the net-inst it is just a desktop environment dependency.
Be seeing you...

User avatar
MikeLieberman
Posts: 162
Joined: 2013-01-29 17:26
Location: General Santos City, Philippines
Has thanked: 17 times
Been thanked: 2 times

Re: [Hardware] How to merge Stereo into Mono

#8 Post by MikeLieberman »

@sunrat,

I finally got the time to get back to this. I reinstalled pulseaudio. I did make sure because of @CynicalDebian's comment that I had the pulseaudio bluetooth module installed. (I already had it. I suspect it came over with the additions I made to install the full pulseaudio software.) I ran the system without making the changes above for a couple of days and all was good. I copied the default.pa from the /etc/pulse folder and without changes, made sure I was still stable. Then and only then did I make the changes and it works! THANK YOU!!!

User avatar
sunrat
Administrator
Administrator
Posts: 6412
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 462 times

Re: [Solved] How to merge Stereo into Mono

#9 Post by sunrat »

@MikeLieberman great news! Thanks for marking solved.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

User avatar
BBQdave
df -h | participant
df -h | participant
Posts: 152
Joined: 2011-09-25 03:38
Location: North Carolina
Has thanked: 9 times
Been thanked: 14 times

Re: [Solved] How to merge Stereo into Mono

#10 Post by BBQdave »

MikeLieberman wrote: 2023-03-17 04:02I am totally deaf in my left ear and in general I have a problem with echo and background noise.
A different thought, would a stereo to mono converter jack or stereo to mono earbud (or headphone) be of use. Or a jack that converts stereo to one channel.

When the kids were little, I purchased an earbud that converted stereo into one channel. With the one earbud I could listen to music and communicate with the kids as the played at a park. One ear for music and one ear for my kids :)

https://scansound.com/earphones/1-bud-s ... earphones/ I have NOT used this product, but the earbud I have is similar.
Sorry I can not remember the company I purchased my earbud from.
On quest for blue smoke and red rings!
Debian 12 Toshiba Satellite C655 | i3 2.3Ghz | Intel HD Graphics 3000 | 8GB RAM | 65GB SSD

User avatar
sunrat
Administrator
Administrator
Posts: 6412
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 462 times

Re: [Solved] How to merge Stereo into Mono

#11 Post by sunrat »

BBQdave wrote: 2023-03-28 21:30A different thought, would a stereo to mono converter jack or stereo to mono earbud (or headphone) be of use. Or a jack that converts stereo to one channel.
Technically, you should have a couple of resistors inserted inline to stop the signal from each channel feeding back to the output stage of the device. Like this:
Image
I'm sure you can buy adapters that just join the two wires together, but some output stages may have issues with that.

Image from: https://www.instructables.com/Simple-Wa ... o-to-Mono/
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

User avatar
BBQdave
df -h | participant
df -h | participant
Posts: 152
Joined: 2011-09-25 03:38
Location: North Carolina
Has thanked: 9 times
Been thanked: 14 times

Re: [Solved] How to merge Stereo into Mono

#12 Post by BBQdave »

@sunrat Thanks for the information. I guess you would have to research to make sure the hardware (headphone or earbud) was set up to properly convert stereo to mono.

I can see the more efficient solution would be to convert stereo to mono on the software side, then it doesn't matter what you plug in earbud wise :)
On quest for blue smoke and red rings!
Debian 12 Toshiba Satellite C655 | i3 2.3Ghz | Intel HD Graphics 3000 | 8GB RAM | 65GB SSD

User avatar
kent_dorfman766
Posts: 535
Joined: 2022-12-16 06:34
Location: socialist states of america
Has thanked: 57 times
Been thanked: 70 times

Re: [Solved] How to merge Stereo into Mono

#13 Post by kent_dorfman766 »

I can see the more efficient solution would be to convert stereo to mono on the software side,
More efficient is the hardware solution given above. More flexible is the mixer filter plugin route in pulseaudio or alsa.

User avatar
sunrat
Administrator
Administrator
Posts: 6412
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 462 times

Re: [Solved] How to merge Stereo into Mono

#14 Post by sunrat »

kent_dorfman766 wrote: 2023-03-29 21:35
I can see the more efficient solution would be to convert stereo to mono on the software side,
More efficient is the hardware solution given above. More flexible is the mixer filter plugin route in pulseaudio or alsa.
Level of efficiency would depend on your skills with a soldering iron. :mrgreen:

As for time efficiency, it would take maybe 2 minutes to configure the software solution.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

User avatar
kent_dorfman766
Posts: 535
Joined: 2022-12-16 06:34
Location: socialist states of america
Has thanked: 57 times
Been thanked: 70 times

Re: [Solved] How to merge Stereo into Mono

#15 Post by kent_dorfman766 »

Level of efficiency would depend on your skills with a soldering iron. :mrgreen:

As for time efficiency, it would take maybe 2 minutes to configure the software solution.
System engineering complexity is usually increased by choosing software solutions. Do in hardware what you can. Two correct resistors and hardware joining the channels has less points of failure than relying open source software stacks...but I digres because it leads to another 21st century engineering bad practice that is too common: designing crappy hardware and expecting the software folks to mitigate it.

User avatar
MikeLieberman
Posts: 162
Joined: 2013-01-29 17:26
Location: General Santos City, Philippines
Has thanked: 17 times
Been thanked: 2 times

Re: [Solved] How to merge Stereo into Mono

#16 Post by MikeLieberman »

@sunrat and @BBQdave
I fail to see how an end user with a bluetooth headset (a sealed unit) is supposed to solder anything nor how it would even be possible. This is NOT a jacked in device.

And for what it is worth, even though it seemed to be solved, it has FAILED --- it isn't at least working anymore. Here is what I get from syslog:

Code: Select all

pulseaudio[18586]: Failed to load module "module-remap-sink" (argument: "master=alsa_output.pci-0000_00_1b.0.analog-stereo sink_name=mono channels=2 channel_map=mono, mono"): initialization failed.

User avatar
BBQdave
df -h | participant
df -h | participant
Posts: 152
Joined: 2011-09-25 03:38
Location: North Carolina
Has thanked: 9 times
Been thanked: 14 times

Re: [Solved] How to merge Stereo into Mono

#17 Post by BBQdave »

Another way to come at this would be the application PulseEffects.

Under Stereo Tools you can set the stereo matrix to mono. Then what ever hardware (earbud, earphone, computer speaker) will play in mono.

I also offer that an earbud that is mono, would be a solution that works with any device, any configuration.
On quest for blue smoke and red rings!
Debian 12 Toshiba Satellite C655 | i3 2.3Ghz | Intel HD Graphics 3000 | 8GB RAM | 65GB SSD

Post Reply