Mate and Kodi living together, ore alsa, pulse audio and pipewire living

Hallo !

I thought I should upgrade my old media computer from Ubuntu 18.3 and even old i386 configuration, he!

For the record, I had turn off the main soundcard in bios.

Also thought I should be a bit on the front with latest sound technology, so I installed Pipewire with Wireplumber, following this guide:

So I got Kodi to function, but had to mask Pulseaudio and also had to choose Alsa card (in main card choice, in Kodi) to my soundreceiver, as Alsa on Pipewire did some gitter on passthrough.

I also hade a Maverick external dac, and that also function to choose.
So far so good.

Then I thought it would be nice to be able to use the computer as a desktop also, so at first I installed Cinnamon. Did not function so good with applications like Rhythm-box (also read on internet that it do not funvtion without pulseaudio).
So I installed Mate instead (almost every thing extra).

Well the main card to my surround receiver over Pipewire function the Mate app did not pic up it as main controls. I could change sound level to it though, through the menu.
So far so good.

Then I thought it would be nice to be able to use my Maverick dac in the desktop also. I could not pic it and choose it in then app (but I could control sound levels directly on the Alsa card). I try to add my self to the sound group, but that did not change it.

So I then did two scripts to turn on and off pulseaudio, both start it and set session (and also mask and unmask it) . That function quite good, but with one problem, I had to switch the soundcard from 7.1 to 5.1 (ore vise versa) and for my Maverick I had to switch between Usb audio and Spif, every time I change output card (change output in my receiver). I also tested with pulseaudio simultanious installation, but that crached whole computer. Gues that conflicted with wireplumper/pipewire.

So, my question is, is this the best I have to live with? I would prefer if it was like in Kodi, that i could choose between the alsa cards directly, in Ubuntu Mate.

I did a lot of configurations, from the start my machine is picking the Usb card as default (arch), so I had to change that at first in /etc/modpobe.d/alsa-base.conf.
Machine now pic the hdmi card as default.

I also did some configurations in /etc/pulse/default.pa, like seting default card and also added both cards hardware sinks.

I am a bit novice this days on Linux, mainly work with web-programming. Tell me with configuration files I need to upload.

Great full for any help!
Klas

I got a solution so I do not have to flip flop the hdmi channels from 7.1 to 5.1 (ore vise versa and back), followed this guide:

Have to add;
default-sample-rate = 6
in ~/config/pulse/daemon.conf
..also

If some one know how to configure both card to a main channel configuration, I would be glad.
I tried to do this in default.pa:

(for surround, hdmi)

load module-alsa-sink device=hw,3,0 module-combine channels=6 channel_map=front-left,front-right,rear-left,rear-right,front-center,lfe

(for two channel USB):

load module-alsa-sink device=hw,0,1 module-combine channels=2 channel_map=front-left,front-right

but that did not function.

1 Like

Well i figured out what the problem was, that I have to flip flop controls every time I change soundcard output (except the first time Pulseaudio loads, what I configurated in my last post here) . It is Piperwire session manager fault. If I only have Pulseaudio (and Alsa), I do not have to flip flop controls, both card functions direct when I change card!

So I removed the symlink that Wireplumper created (and restarted computer), and now I can run my script to enable and disable Pulseaudio in Mate and the direct change function. Looks like ther is sound out from Pipewire also, as default (without the session manger), at least in Mate.

Kodi also function good (after turning off Pulseaudio with my off script). As long as I do not click on the disabled Pipewire config for sound, i.e. using Alsa directly, in Kodi there is no problem. The sound level was also heigher, as Pipewire set sound out to som stupid 54% in its Alsa config for the hdmi surround.

I read that Pipewire are going to bee default session manager and already is in Fedora. I hope they fixed this problem for Ubuntu though, if it's going to be the main installation. Guess I do not use it by now, though.