this post was submitted on 13 Feb 2024
7 points (76.9% liked)

Linux

48287 readers
657 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
7
submitted 9 months ago* (last edited 9 months ago) by kuneho@lemmy.world to c/linux@lemmy.ml
 

Hello guys!

I'm encountering some strange behaviour with audio controls and volumes, nothing extreme serious, just moderate annoyance source, so I thought maybe you can help me sort this one out! Also I hope this is the right community for this...

(intro)

The thing is, I'm running Debian Bookworm, with Plasma and I have a rather strange audio setup. It has its legacy reasons, but I use a sound card (CMI8738/CMI8768, it has 5.1 output), and as for the speakers, I've got a pair of active 2.0 speakers and an active subwoofer (which was a part of a 2.1 system, but now I just use only the woofer). These are connected separately to the card; the stereo pair goes to the green output jack (front) and the subwoofer goes to another, which I think is the center+woofer output.

For some reason, the center and woofer was swapped on my card, or the subwoofer was hooked to the other channel, no idea, but I was managed to change them in pulsaudio's config /usr/share/pulseaudio/alsa-mixer/profile-sets/default.conf and modifying [Mapping analog-surround-*], changing the order of lfe and front-center in channel-map.

Then I noticed I can't really control the woofer, it worked, the setup was working, but not in the way I wanted to. The goal was to make the system actually control the outputs as intended and think about it as a 2.1. Amongst the profiles, there were no 2.1 option, only stereo, quadrophonic, 5.1 and 7.1.

By adding this line to ~/.config/pulse/default.pa...

load-module module-combine channels=3 channel_map=front-left,front-right,lfe

...and also editing ~/.config/pulse/daemon.conf by adding these to it (tho honestly I don't really remember, why)...

remixing-produce-lfe = yes
remixing-consume-lfe = yes
lfe-crossover-freq = 120
enable-remixing = yes

...I was managed to create a virtual output that behaves actually like 2.1. I can control both left and right channels and also the woofer on its own. Neat!

(the problem)

Now I have two volume controls. One for the "real" output - the 5.1 profile and the virtual one, the 2.1.

In Plasma toolbar, changing the volume with the scroll wheel is unpredictable, or, at least, I haven't really figured out how it works at the moment; sometimes it controls the real output, sometimes the virtual. On my left screen, it usually controls the real, on the right, most of the times it controls the virtual. But it just changed at the moment as I tried out, typing this post. Now both of them controls the real one.

The goal would be to have the real output constantly on 100%, and every volume controlling action should be take place on the virtual output.

Also, another strange thing is that even tho it looks like everything is fine and dandy, the overall output is low. When this happens, usually on the real output the left, right and woofer channels themselves are changed to lower (probably a previous state of the virtual output) volumes.

This all seems pretty random and unpredictable. If it works, it's awesome, and problems doesn't occur for days, but sometimes they do, and I have no idea why.

Any ideas?

(tl;dr)

I'd like to know why my volume controls (scroll wheel, volume keys) have effect on seemingly random outputs, and why do the volume of each channel that is present in my virtual output get change ON the physical setup (so the left, right and subwoofer sliders in the 5.1 output) persistently.

Thanks!

top 3 comments
sorted by: hot top controversial new old
[–] just_another_person@lemmy.world 4 points 9 months ago (1 children)

Okay, so you have a few things going on here, but it's hard to get specific about what the actual issue here due to the number of variables. Here are some places to start looking:

  1. alsamixer (cli) or pavucontrol (gui) will have a lot of easy to configure options for your audio setup. Have a run through those.
  2. this sound card seems to have hardware audio controls that can be problematic while dual-booting Windows, so make sure you have fast boot disabled on Windows, and boot your Linux side twice in a row after turning it off to be sure the state of your devices is cleared
  3. Your audio profile is only half of the equation due to the hardware controls on the card. The port modes need to be set ON the card, as well as power for channels (possible the card does this automagically)

Essentially, if you have a hardware controlled 5.1 cars, it's natural state is probably going to be...5.1. so your first job is telling the CARD what mode it should be in, which should be 2.1/3 in your case. What you've done so far is just set an audio output profile for the speakers, which isn't quite the same thing. Check alsamixer or pavucontrol to try and sort this out.

Next step if the above doesn't work: dig into getting mode and config info from the card itself. The amixer command will be helpful here. If this is the only audio card in the machine, try 'amixer --card=1' (it might be 0), and see what info it has.

Past that, you should be on a path to find a working config. If all else fails, I'm betting you can get a solid hardware controlled card online for dirt cheap, maybe with a chipset that has full or better Linux support.

Hope this helps somewhat.

[–] kuneho@lemmy.world 2 points 9 months ago

thanks for the reply, I'll definitely will look into alsamixer or pavucontrol and dig deeper, to have true 2.1 setup.

I have another, integrated card, but there's no room for the subwoofer output - or so do I thibk, that's why I'm using an external one.

All my pain would end by using a jack splitter/joiner, but where's the fun in that 😅

thanks again, mate. will report, if you are interested

[–] bizdelnick@lemmy.ml 1 points 9 months ago

First of all I would try installing and booting the newest kernel from the backports repo. Your sound device suppport could be fixed there.