setMixLevelsOutput not working properly on the ARM build

I am porting a windows application that is completely functional and works great with fmod (in WINDOWS).

I have been working a huge number of hours over the past 3 days, trying to get the setMixLevelsOutput to work in the arm using raspberry pi os lite.

I have tried so far all the combinations rpi3 and rpi4, the 64 bits and 32 bits os version, and the latest versions of 2.02, 2.01 and 2.00 of fmod.

I also tried both alsa and pulseaudio, no luck with both.

I have a usb soundcard connected to the raspberry pi, that has 5.1 analog output.
This one:
Professional External USB Sound Card Channel 5.1 7.1 Optical Audio Card Adapter for PC Computer Laptop Promotion -

This is my aplay -l output:
aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: vc4hdmi1 [vc4-hdmi-1], device 0: MAI PCM i2s-hifi-0 [MAI PCM i2s-hifi-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: ICUSBAUDIO7D [ICUSBAUDIO7D], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0

When I use the speaker test:
speaker-test -t wav -c6 -d surround51:ICUSBAUDIO7D
I can properly hear the sound in each individual channel.

I have an ogg file, that has the same sound in all 6 tracks.

My test usecase is simple: I want to play the ogg file sound only in the center and lfe channels.

To do so, I use the setMixLevelsOutput and set the volume to 0 for all the channels that I do not want to hear sound.

But doesn’t matter what I do, in the raspberry pi, the sound always play in the front left / front right.
this applies for both alsa and pulseaudio.

Worth to mention again, the same file, same code, works perfectly fine in windows using the same soundcard, I can hear only lfe and center channels.

Here is a quick and dirty adaptation of your channel_groups example and as well the sound that I am trying to play in the center and lfe channels.

I have hardcoded the setDriver to 16, this is the:

I think everything I could possible think from my side, I have done, if you have any suggestion, I am more then welcome to try.

Just a bit for info, here is the mediainfo of the soundfile:
mediainfo 1.ogg
Complete name : 1.ogg
Format : Ogg
File size : 13.7 KiB
Duration : 23 ms
Overall bit rate mode : Variable
Overall bit rate : 4 886 kb/s

ID : 515 (0x203)
Format : Vorbis
Format settings, Floor : 1 / 8710
Duration : 23 ms
Bit rate mode : Variable
Bit rate : 1 080 kb/s
Channel(s) : 6 channels
Sampling rate : 44.1 kHz
Compression mode : Lossy
Stream size : 3.03 KiB (22%)
Writing library : libVorbis (Omnipresent) (20120203 (Omnipresent))

GetDriverInfo seems to be returning the correct number of channels…

name surround 51:CARD=ICUSBAUDIO7D,DEV=0
system_rate 48000
speaker_mode 6
speaker_mode_channels 6

Good news and bad news!
I was able to get 5 channels working…
by setting the FMOD::System::SoftwareFormat to 5.1
Both raw channels and speaker mode.

Still have one issue left, I cannot get the lfe to play the sound.

The solution was to set
FMOD::System::SoftwareFormat to 5.1
and use pulse audio.

Now everything works.