Issue with minChansOut on Linux

I have a device (focusrite scarlett 6i6) which has 6 output channels. Problem on Linux: I can’t unselect any of the 6 channels in the juce AudioDeviceSelectorComponent (it works fine on mac and windows).

What happens: the ALSA device reports 6 as both the maxChansOut and minChansOut (in getDevicesProperties in juce_linux_ALSA.cpp). When the card is opened in ALSAThread::open with the requested number of channel, what happens is that the call to ensureMinimumNumBitsSet(outputChannels, (int)minChansOut)) forces all the 6 bits of outputChannels to bit set. It is then this bitfield that is reported back to the AudioDeviceSelectorComponent , so I can’t uncheck any channel.

Just commenting the call to ensureMinimumNumBitsSet seems to work fine, so I’m not completely sure what was its purpose. It was added a lot time ago, in 2013: