Attempt to allow up to 31 channels of output, up from a limit of 8. Modify the mixdown setting so that "auto" only mixes downwards, e.g. 7.1 to 5.1, and never upwards, e.g. stereo to 5.1. Upmixing is not functional anyway, as the upmixing matrices are all such that the input channels are copied to their equivalent output channels and other output channels remain silent.

This commit is contained in:
Mike Brady
2026-05-07 14:06:00 +01:00
parent 281fb34d57
commit a50eed043e
3 changed files with 34 additions and 7 deletions
+7 -1
View File
@@ -146,7 +146,13 @@ typedef enum {
// these sets omit the _UNKNOWN, _AUTO and _ILLEGAL values
#define SPS_FORMAT_SET (((1 << (SPS_FORMAT_HIGHEST_NATIVE + 1)) - 1) - (1 << SPS_FORMAT_UNKNOWN))
#define SPS_RATE_SET (((1 << (SPS_RATE_HIGHEST + 1)) - 1) - (1 << SPS_RATE_UNKNOWN))
#define SPS_CHANNEL_SET (((1 << (8 + 1)) - 1) - (1 << 0)) // channels 1 to 8, not 0-based!
// in SPS_CHANNEL_SET, bit 0 set means a channel set of no channels, bit 1 set means a channel set of 1 channel
// and so on to bit 31 meaning a channel set of 31 channels. We want to consider all possible channel sets
// apart from channel set 0.
#define SPS_GREATEST_CHANNEL_COUNT 31 // should be 32 to be fully in line with ALSA limits
#define SPS_CHANNEL_SET 0xFFFFFFFE // channel sets 31 to 1, but no channel set 0
// #define SPS_CHANNEL_SET (((1 << (SPS_GREATEST_CHANNEL_COUNT + 1)) - 1) - (1 << 0)) // channels 1 to 31, not 0-based!
#ifndef CONFIG_AIRPLAY_2
#define SPS_FORMAT_NON_FFMPEG_SET SPS_FORMAT_SET