Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux? |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
01-09-2021, 07:46 PM
|
#1
|
Senior Member
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6, CentOS 7 (with Mate), Ubuntu 16.04 Mate
Posts: 2,127
Rep: 
|
Backwards sound card :-(
A year or so back the built in sound card in my Dell Precision workstation died. It was out of warranty but I had purchased it with a Visa credit card. The Visa extended warranty paid me for a replacement system board. Since everything else worked fine I did not really want a refurb system board so I purchased a USB sound dongle for about $15 US and spent the other money on something else. The USB gizmo worked great except that sometimes when I enabled it on a virtual machine (Vmware) and then returned it to the host - the host had no sound and I had to reboot. That is a bit of an engineering task as I have to suspend 2 or 3 virtual machines and then at boot enter the pass phrase for the main partition then after logon unlock and mount another encrypted partition and finally unlock a Veracrypt container of archive data. I try to keep reboots to once a month - when I perform a cold backup of the OS. So...
I purchased an actual PCIe sound card on evilbay for $12 US. I plugged it in this evening. I can access it from the host and a VM at the same time which is neat. However, as I was doing a speaker check - just for a source of test sounds...
I found that the Front Right speaker test sound comes out the left speaker and vice versa. I don't think this matters as the speakers are only a sound bar under the monitor. Is there a way to change this? other than rewiring the speakers?
For what it is worth the system is:
Dell Precision T3620
CentOS 7 with the Mate desktop
CM18738/CM18738 PCI Audio (CM18738/C3DX PCI Audio Device)
The sound profile is Analog Stereo Duplex
TIA,
Ken
|
|
|
01-09-2021, 07:54 PM
|
#2
|
Member
Registered: Jun 2020
Posts: 610
Rep: 
|
How is it physically connected to the speakers? I'm sure there may be a software 'way' to do this (and I'm hoping someone shares), but if you're connected via analog audio I would first ensure the cable itself isn't the problem, and then if that's okay (believe it or not I've gotten cables that really are 'flipped' - as in the color/tape labels don't line up to whats wired, its a simple 'goof' on the factory's end), just flip the L/R channels on the wire between the card and the speakers and call it a day (assuming its truly 'always flipped' and not some misconfiguration in a single application/VM). I'd also check the speakers aren't the culprit (although that's probably unlikely).
|
|
|
01-09-2021, 08:37 PM
|
#3
|
Senior Member
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6, CentOS 7 (with Mate), Ubuntu 16.04 Mate
Posts: 2,127
Original Poster
Rep: 
|
Thanks obobskivich,
The cable is hard wired into the sound bar and the other end has the light green plug which I plugged into the corresponding light green socket on the card. I believe it was stamped "front" on the card.
I have no idea if it worked right and left with the original on-board sound or my USB sound dongle which I had been using. I guess I need to hook the sound cable to another computer and see what happens. Let me try that.
Ken
p.s. The speakers/cable work fine on another computer. Just a dyslexic sound card I guess.
Last edited by taylorkh; 01-09-2021 at 08:46 PM.
Reason: update
|
|
|
01-10-2021, 01:05 AM
|
#4
|
Member
Registered: Jun 2020
Posts: 610
Rep: 
|
So the 'easy' option in hardware here is to get a 3.5mm TRS (male) to 2x RCA (female) adapter, and a 2x RCA (male) to 3.5mm TRS (female) adapter, 'cross the streams' (so red to white and white to red) and there you go. You could use any other permutation of TRS/RCA adapters that let you do this. The next option would be to create your own TRS to TRS cable but that would require crimping/soldering tools.
For example, these two adapters together:
https://www.amazon.com/CERRXIAN-LEME.../dp/B018V7GTNK (plug into the soundcard)
https://www.amazon.com/VCE-2-Pack-Pl.../dp/B06XCR898P (plug into the adapter, 'reversed' and then plug the speakers in here)
You can probably find cheaper options, but I didn't spend a lot of time comparison shopping it - maybe check Monoprice or some other AV supplier.
EDIT
If you don't like that solution, I found this guide from the Arch Wiki for attempting to do the same thing in software: https://wiki.archlinux.org/index.php...right_channels
Also cites here:
https://www.freedesktop.org/wiki/Sof...FAQ/#index34h3
You may have to adapt this for your specific distro/configuration as needed, and may have to do this over again upon re-installation, for VMs, etc (and this is why I admittedly like the 'hardwire' solution - you have known behavior and want a single, constant change). Still, this will probably cost nothing but a few minutes to poke around with.
Last edited by obobskivich; 01-10-2021 at 01:32 AM.
Reason: added some links
|
|
1 members found this post helpful.
|
01-10-2021, 08:40 AM
|
#5
|
Senior Member
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6, CentOS 7 (with Mate), Ubuntu 16.04 Mate
Posts: 2,127
Original Poster
Rep: 
|
Thanks again obobskivich,
Back in the days when Radio Shack was in business and actually carried electronic pieces and parts I might have done the hardware fix. I tried the recommendations on the Arch wiki and all went well until I tried to reload the daemon. That did not work. I reverted the changes to the configuration file. I may make them again next time I need to power down the system for some other reason.
I tried plugging the cable into the blue jack which I think is for the back speakers (this is allegedly a 6 channel card.) The speakers are still backwards.
If this really gets to bugging me I think my hardware fix would be to turn the sound bar upside down. I do not recall how it attaches to the monitor but duct tape can perform miracles
Thanks again,
Ken
|
|
|
01-10-2021, 10:44 PM
|
#6
|
Member
Registered: Jun 2020
Posts: 610
Rep: 
|
Didn't even think about 'turn it upside down' since its a soundbar, but yes that would work too, ha!
The 'blue jack' is supposed to be line-in afaik (under the PC-97 standards: https://en.wikipedia.org/wiki/PC_Sys...tors_and_ports - look under 'Analog Audio') but some onboard audio/soundcards I'm sure use it as a switchable jack or do otherwise 'non-typical' things, so it can either be line-in or some other channels out (so they can be cheap and not include another physical jack, or so they can fit into a given form factor (e.g. if this is a half-height card)).
|
|
|
01-11-2021, 03:46 AM
|
#7
|
Senior Member
Registered: Feb 2003
Distribution: debian
Posts: 4,137
|
With jack sound can be routed and the destinations reversed. My OG pinebook is actually reversed by default, but there's alsamixer settings to swap that around. Various .asoundrc ways to swap speakers. Your soundcard module might have a flag/parameter to pass to change that. And other options qjackctl, aconnect, pactl/pacmd, et cetera. I tend to just use a USB soundcard on an RPi 4B with a pulseaudio server setup. Works for most things. And everything gets to use the same high end stereo setup. Some oddities, snaps, flatpaks, vms, can be a bit quirky. I even multi-user for a game (snap) and have the game use the snd-aloop / Loopback device, and use alsaloop to route that to pulse over the network via another user on the same system and it's configuration. Of course most default behaviors will likely keep your reversed setup, and those routings could be lost with each reboot. So ultimately a hardware fix will keep your sanity (what's left of it).
|
|
|
01-11-2021, 07:28 AM
|
#8
|
Senior Member
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6, CentOS 7 (with Mate), Ubuntu 16.04 Mate
Posts: 2,127
Original Poster
Rep: 
|
Thanks once more obobskivich,
I tried ALL of the jacks. Some made backward sound and some no sound - input jacks no doubt.
Thanks Shadow_7,
I have tried various settings in the Sound Preferences dialog under Control Center. Nothing swaps the speakers.
Bottom line - what can you expect from a $12 evilbay sound card? It makes noise, I can listen to a podcast, online video etc. This is not an audiophile sound system (although the sound card allegedly supports 6 channels.)
Ken
|
|
|
01-12-2021, 01:59 AM
|
#9
|
LQ Veteran
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: Rocky 9.5
Posts: 5,876
|
My (admittedly smart ass) thought:
Turn around so that the left channel is in your right ear, and vice versa.
That said, why do you care if the test plays left in right, etc? Does that change how the music you’re listening to sound differently?

|
|
|
01-12-2021, 04:18 AM
|
#10
|
Senior Member
Registered: Feb 2003
Distribution: debian
Posts: 4,137
|
It can matter on movies with sound effects.
My pulseaudio server actually runs pulse over jackdbus (jack2). And since qjackctl doesn't seem to function on it, I setup a couple scripts for my setup.
Starting jackdbus with pulseaudio talking to it right can be a bit finicky, but it works.
To configure jackdbus I have a script.
FILE: myjackdbus.sh
Code:
#!/bin/bash
#jack_control start
jack_control dps device hw:1
jack_control ds alsa
jack_control eps driver alsa
jack_control eps temporary false
jack_control eps realtime false
jack_control dps rate 48000
jack_control dps nperiods 2
jack_control dps period 1024
exit 0
The soundcard sometimes switches alsa index number on reboots, so I need to modify it sometimes $(jack_control dps device hw:1), depending on what /proc/asound/cards says. It's quirky so I do a few fiddlings to get things playing well together.
$ ./myjackdbus.sh
$ pulseaudio --kill
$ jack_control start
$ pulseaudio --kill
$ pulseaudio --start
$ calfjackhost &
Then I run a script to connect pulse to my 30 band EQ plugin. After going through the GUI steps to add it and set my presets (mostly bumps high end to compensate for my OLD ears).
FILE: mypulseconnections.sh
Code:
#!/bin/bash
##### pulse default INPUT to OUTPUT - OFF
jack_disconnect "PulseAudio JACK Sink:front-left" "system:playback_1"
jack_disconnect "PulseAudio JACK Sink:front-right" "system:playback_2"
##### pulse INPUT to calf INPUT
jack_connect "PulseAudio JACK Sink:front-left" "Calf Studio Gear:Equalizer 30 Band In #1"
jack_connect "PulseAudio JACK Sink:front-right" "Calf Studio Gear:Equalizer 30 Band In #2"
##### calf OUTPUT to pulse(system) OUTPUT - ON
jack_connect "Calf Studio Gear:Equalizer 30 Band Out #1" "system:playback_1"
jack_connect "Calf Studio Gear:Equalizer 30 Band Out #2" "system:playback_2"
exit 0
$ ./mypulseconnections.sh
Various jack_lsp ways to figure out the naming conventions. And all because qjackctl works mostly with jackd (v1). And doesn't work in my situation. Just reverse the _1 and _2 on one of those connection pairs to reverse the sound on system  layback??. Or use jackd (v1) and qjackctl to do that graphically. Although the pulseaudio config needs a couple of lines of mods (from debian defaults) to use jack.
|
|
|
01-12-2021, 07:01 AM
|
#11
|
Senior Member
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6, CentOS 7 (with Mate), Ubuntu 16.04 Mate
Posts: 2,127
Original Poster
Rep: 
|
Thanks scasey,
That is good advice. Perhaps I could stand on my head. That might accomplish the desired effect even better  The only reason I ran the speaker test was that I was in the sound config dialog to switch from the on-board, non working card (which was already disabled in BIOS but still appeared) to the new card. The speakers are less than 10 inches apart in the sound bar so the stereo effect is not very pronounced.
Thanks again Shadow_7,
Very well done. I do not have jack_control or the package which provides it on my CentOS 7 installation. I guess I might go look for it but...
As I said above the stereo effects with the sound bar are minimal. I would not have noticed if I had not happened to run the speaker test. And... I found that my virtual macines are connected to a Sound Blaster clone sort of virtual sound card supplied by Vmware. These channels are also reversed. I do not know if changing the host would fix the problem. I changed the host to Mono and yet on a VM set to stereo I can "test" the backwards left and right speakers.
Years ago I came across an album review on-line of Joan Jett's album "The Hit List." I recall the reviewer saying that it was best listened to through a dashboard speaker after consuming a six pack of beer. Similar to my philosophy when it comes to PC sound systems.
Ken
|
|
|
01-21-2021, 04:35 PM
|
#12
|
Senior Member
Registered: Feb 2003
Distribution: debian
Posts: 4,137
|
I also run my sound through a usb soundcard. With cables to a headphone preamp (has a mute and mono button). And cables from it to the stereo preamp. Any pair of which I could reverse to accomplish that swap of outputs. If you're less inclined for software solutions. In my case a Focusrite 2i2, a presonus HP4, and a NAD C316BEE, to magnapan minnie maggies. Lots of "options".
|
|
|
All times are GMT -5. The time now is 04:52 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|