Repository navigation
Conversation
Pipewire can only handle a max of 64 channels. PipeWire's SPA library defines SPA_AUDIO_MAX_CHANNELS as 64 (#define SPA_AUDIO_MAX_CHANNELS 64u). When examples/pa_devs.c passes deviceInfo->maxInputChannels (128) into TestParameters(), alsa_snd_pcm_hw_params( pcm, hwParams ) at line 1959 triggers pcm_pipewire.c to configure a PipeWire stream with 128 channels, overflowing 64-element channel arrays in alsa-pipewire. Fixes #1198
|
I did the same experiment using Ubuntu 26.04 running on a Parallels VM. |
|
Do ALL plugins have the 64 channel restriction? Or just pipewire? |
|
Gemini says: Different plugins have different intrinsic limits when queried via snd_pcm_hw_params_get_channels_max: ALSA plug / route (sysdefault, plughw, and default when wrapped by plug): Does not restrict channels to the slave's limit; it reports 10000 max channels because plug can duplicate/route channels in software. (That is why sysdefault and default hit PortAudio's if (isPlug && maxChans > 64) clamp.) PipeWire (pipewire): Bounded by SPA_AUDIO_MAX_CHANNELS = 64. (When default wraps pipewire via plug, plug reports 10000, which previously got clamped to 128 and overflowed PipeWire's 64-channel SPA arrays.) PulseAudio (pulse / libpulse): Bounded by PA_CHANNELS_MAX = 32 (defined in /usr/include/pulse/sample.h:128). |
Pipewire can only handle a max of 64 channels.
PipeWire's SPA library defines SPA_AUDIO_MAX_CHANNELS as 64 (#define SPA_AUDIO_MAX_CHANNELS 64u).
When examples/pa_devs.c passes deviceInfo->maxInputChannels (128) into TestParameters(), alsa_snd_pcm_hw_params( pcm, hwParams ) at line 1959 triggers pcm_pipewire.c to configure a PipeWire stream with 128 channels, overflowing 64-element channel arrays in alsa-pipewire.
Fixes #1198