LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
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


Reply
  Search this Thread
Old 01-09-2021, 07:46 PM   #1
taylorkh
Senior Member
 
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6, CentOS 7 (with Mate), Ubuntu 16.04 Mate
Posts: 2,127

Rep: Reputation: 174Reputation: 174
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
 
Old 01-09-2021, 07:54 PM   #2
obobskivich
Member
 
Registered: Jun 2020
Posts: 610

Rep: Reputation: Disabled
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).
 
Old 01-09-2021, 08:37 PM   #3
taylorkh
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: Reputation: 174Reputation: 174
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
 
Old 01-10-2021, 01:05 AM   #4
obobskivich
Member
 
Registered: Jun 2020
Posts: 610

Rep: Reputation: Disabled
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.
Old 01-10-2021, 08:40 AM   #5
taylorkh
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: Reputation: 174Reputation: 174
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
 
Old 01-10-2021, 10:44 PM   #6
obobskivich
Member
 
Registered: Jun 2020
Posts: 610

Rep: Reputation: Disabled
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)).
 
Old 01-11-2021, 03:46 AM   #7
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 875Reputation: 875Reputation: 875Reputation: 875Reputation: 875Reputation: 875Reputation: 875
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).
 
Old 01-11-2021, 07:28 AM   #8
taylorkh
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: Reputation: 174Reputation: 174
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
 
Old 01-12-2021, 01:59 AM   #9
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: Rocky 9.5
Posts: 5,876

Rep: Reputation: 2289Reputation: 2289Reputation: 2289Reputation: 2289Reputation: 2289Reputation: 2289Reputation: 2289Reputation: 2289Reputation: 2289Reputation: 2289Reputation: 2289
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?
 
Old 01-12-2021, 04:18 AM   #10
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 875Reputation: 875Reputation: 875Reputation: 875Reputation: 875Reputation: 875Reputation: 875
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 systemlayback??. 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.
 
Old 01-12-2021, 07:01 AM   #11
taylorkh
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: Reputation: 174Reputation: 174
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
 
Old 01-21-2021, 04:35 PM   #12
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 875Reputation: 875Reputation: 875Reputation: 875Reputation: 875Reputation: 875Reputation: 875
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".
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Time goes backwards DoubleLetter Linux - General 6 11-02-2007 05:38 PM
perl script to create a backwards file?! WorldBuilder Programming 16 10-30-2003 10:05 PM
one step ahead...two steps backwards dbear Linux - Newbie 1 07-07-2003 05:42 AM
Question re: backwards compatibility.... sankeny Slackware 5 11-21-2002 07:13 PM
Backwards PCI cards?? paavaka General 4 11-06-2001 05:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 04:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration