Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ALSA with mono sound
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1074
Location: EU or US

PostPosted: Sun Oct 02, 2016 10:30 pm    Post subject: ALSA with mono sound Reply with quote

Is there a way to send stereo mixed down to mono to the left channel? I have only mono amplifier and a mono plug (TS) available.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7128
Location: almost Mile High in the USA

PostPosted: Sun Oct 02, 2016 10:55 pm    Post subject: Reply with quote

Swiped from the following reference, seems that something like this in your ~/.asoundrc

Code:
pcm.!default {
    type plug
    slave.pcm {
        type asym
        playback.pcm {
            type route
            slave.pcm "dmix:0"
            ttable.0.0 0.5
            ttable.0.1 0.5
            ttable.1.0 0.5
            ttable.1.1 0.5
        }
        capture.pcm "hw:0"
    }
}

and restart all your alsa apps. This will send the mixed sound to both R and L channels, and your amp wouldn't know any better if it pulled just the left channel.

Pulseaudio needs to do something different, can't use this alsa hack - for any others who want to do the same thing under PA.

Anyway, interesting problem, see if this works. Using software to fix a hardware problem: the way things should work. Never use hardware to fix software problems...

Reference: https://ubuntuforums.org/showthread.php?t=1384860&p=8689164
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1074
Location: EU or US

PostPosted: Sun Oct 02, 2016 11:03 pm    Post subject: Reply with quote

I saw that thread when I did my search, but was too lazy to try it out. Couldn't understand it ... :oops:
Trying now. Thanks!
Back to top
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1074
Location: EU or US

PostPosted: Sun Oct 02, 2016 11:13 pm    Post subject: Reply with quote

No cigar. I found some old headphones with stereo plug, cutting and soldering now.
Code:
~ $ speaker-test -t wav -c 2

speaker-test 1.1.2

Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
WAV file(s)
ALSA lib /home/portagetmp/portage/media-libs/alsa-lib-1.1.2/work/alsa-lib-1.1.2/src/pcm/pcm_route.c:1180:(_snd_pcm_route_load_ttable) Invalid type for 0
Playback open error: -22,Invalid argument


P. S. I still don't understand this code. Maybe some reading is in order.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum