Bug 445523 - lfe sound not working for 5.1 or 7.1 multichannel audio
Summary: lfe sound not working for 5.1 or 7.1 multichannel audio
Status: RESOLVED FIXED
Alias: None
Product: plasma-pa
Classification: Plasma
Component: general (show other bugs)
Version: 5.24.2
Platform: Debian unstable Linux
: NOR normal
Target Milestone: ---
Assignee: David Rosca
URL:
Keywords:
: 446622 454410 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-11-15 11:42 UTC by gnagflow
Modified: 2023-03-11 23:48 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.24.5


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gnagflow 2021-11-15 11:42:10 UTC
SUMMARY
Line 373 of  .../src/kcm/package/contents/ui/main.qml reads:
373: onClicked: tester.testChannel(modelData === "lfe" ? "rear-center" : modelData)

This has no effect. Although "audio-channel-rear-center.oga" exists within freedesktop,
its sound is redirected to a nonexistent 5.1 (or 7.1) surround channel (and not to lfe) by libcanberra
(due to use of  CA_PROP_CANBERRA_FORCE_CHANNEL I guess). 

In order to fix this I suggest to replace line 373 by
onClicked: tester.testChannel(modelData === "lfe" ? "lfe" : modelData) or even
onClicked: tester.testChannel(modelData)

and link audio-channel-lfe.oga to file audio-channel-rear-center.oga:
../sounds/freedesktop/stereo/audio-channel-lfe.oga -> ../sounds/freedesktop/stereo/audio-channel-rear-center.oga

STEPS TO REPRODUCE
see above 

OBSERVED RESULT
subwoofer button not working for 5.1 or 7.1 multichannel audio. 

EXPECTED RESULT
plays rear-center audio sound.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 5.15.2/5.23.3-1 
KDE Plasma Version: 5.23.3-1
KDE Frameworks Version: 5.86.0-1
Qt Version: 5.15.2
ADDITIONAL INFORMATION
n/a
Comment 1 gnagflow 2022-01-08 12:47:48 UTC
The bug still exists in 5.23.5-1.
Comment 2 Sophie Dexter 2022-03-14 16:07:52 UTC
I experience the same with Fedora 35, Plasma 24 and Pipewire. Perhaps even more so; not only does the subwoofer button not work, but my system then becomes unresponsive until I 'kill' System Settings.

I'm happy to test any fixes.

Kernel 5.16.12
KDE Plasma: 5.24.2
Frameworks: 5.91.0
Qt: 5.15.2
Pipewire: 0.3.47
Comment 3 Sophie Dexter 2022-03-15 18:13:31 UTC
I have now installed KDE development tools and built against today's origin master:
KDE Plasma: 5.24.80
Frameworks: 5.93.0
Qt: 5.15.2

The problem still exists and I went on to re-compile plasma-pa with gnagflow's proposed changes and can confirm that replacing
    onClicked: tester.testChannel(modelData === "lfe" ? "rear-center" : modelData)  (NOTE now at line 409)
with either
    onClicked: tester.testChannel(modelData === "lfe" ? "lfe" : modelData) 
or simply
     onClicked: tester.testChannel(modelData)
does indeed work - for me.

Is this a regression relating to what was apparently fixed by
    https://invent.kde.org/plasma/plasma-pa/-/commit/bc79ca3289903cb641fd29a0b9cf8da17427421a
for
    https://bugs.kde.org/show_bug.cgi?id=427038
?

Personally I prefer the fallback audio-test-signal's 'white noise' for the subwoofer test sound to a rather muffled spoken 'rear center' so I didn't link 'audio-channel-lfe.oga' to 'audio-channel-rear-center.oga'.

For me this is a 15-minute-bug because it causes KDE's 'systemsettings' to hang hint @Nate :-)
    https://pointieststick.com/2022/01/18/the-15-minute-bug-initiative/
        5. I’m experiencing this annoying issue that’s not on the list! Can you add it?
        Maybe. Mention the 15-minute bug initiative in the bug report for it, and KDE’s bug triagers will see if it makes the cut.

I'd fix this in the KDE repository if I knew how, but (noob alert) I don't... and I'm not even sure if this is a good fix or a nasty hack (no offence gnagflow)
Comment 4 Sophie Dexter 2022-04-19 20:35:49 UTC
This bug and a proposed fix has been around for a while now.

@gnagflow are you able to submit a merge request with your proposed changes for this bug?
Comment 5 Ismael Asensio 2022-04-20 00:09:09 UTC
(In reply to Sophie Dexter from comment #2)
> I experience the same with Fedora 35, Plasma 24 and Pipewire. Perhaps even
> more so; not only does the subwoofer button not work, but my system then
> becomes unresponsive until I 'kill' System Settings.
> 
> I'm happy to test any fixes.

I just got aware of this bug report now. 

Since I don't have a system with a subwoofer, could you please try https://invent.kde.org/plasma/plasma-pa/-/merge_requests/121 to see if that fixes the issue? 

Thanks
Comment 6 Sophie Dexter 2022-04-20 17:08:13 UTC
(In reply to Ismael Asensio from comment #5)
> (In reply to Sophie Dexter from comment #2)
> > 
> > I'm happy to test any fixes.
> 
> I just got aware of this bug report now. 
> 
> Since I don't have a system with a subwoofer, could you please try
> https://invent.kde.org/plasma/plasma-pa/-/merge_requests/121 to see if that
> fixes the issue? 
> 
> Thanks

Hi Ismael,

I have re-compiled plasma-pa with your changes and can confirm that Speakertest now works for my 5.1 setup, spoken 'rear-center' audio is played through the subwoofer, albeit that it sounds rather muffled of course :rolleyes: :-).

Many thanks to you for preparing the merge request and to Nicolas for reviewing.
Comment 7 gnagflow 2022-04-20 18:10:49 UTC
Hi,
thx to all who helped, esp. Sophie, whose persistence did the heavy lifting.
Comment 8 Ismael Asensio 2022-04-28 20:03:40 UTC
Git commit 0608769ea10b345d072a135dc15898fdbe550803 by Ismael Asensio.
Committed on 25/04/2022 at 21:14.
Pushed by iasensio into branch 'master'.

SpeakerTest: Fix subwoofer test

Move the workaround to use a different sound for the subwoofer test
to C++, so we can still use the `lfe` channel and the `rear-center`
sound file.

Doing otherwise seems to be specially problematic on pipewire
FIXED-IN: 5.24.5

M  +1    -2    src/kcm/package/contents/ui/main.qml
M  +3    -1    src/speakertest.cpp

https://invent.kde.org/plasma/plasma-pa/commit/0608769ea10b345d072a135dc15898fdbe550803
Comment 9 Ismael Asensio 2022-04-28 20:07:52 UTC
Git commit 183a26d9a668e1613605e708d613bceb2ffa3396 by Ismael Asensio.
Committed on 28/04/2022 at 20:02.
Pushed by iasensio into branch 'Plasma/5.24'.

SpeakerTest: Fix subwoofer test

Move the workaround to use a different sound for the subwoofer test
to C++, so we can still use the `lfe` channel and the `rear-center`
sound file.

Doing otherwise seems to be specially problematic on pipewire
FIXED-IN: 5.24.5

(cherry-picked from commit 0608769ea10b345d072a135dc15898fdbe550803)

M  +1    -2    src/kcm/package/contents/ui/main.qml
M  +3    -1    src/speakertest.cpp

https://invent.kde.org/plasma/plasma-pa/commit/183a26d9a668e1613605e708d613bceb2ffa3396
Comment 10 Nate Graham 2022-05-26 17:05:40 UTC
*** Bug 454410 has been marked as a duplicate of this bug. ***
Comment 11 Ismael Asensio 2023-03-11 23:48:10 UTC
*** Bug 446622 has been marked as a duplicate of this bug. ***