Skip to content

Cannot init stream with 24kHz (C/P) after NixOS update, 48kHz yields no audio #1150

@Dich0tomy

Description

@Dich0tomy

Hello.

I've used PortAudio for local debugging of various audio capabilities of my app for quite a while and it's always worked great.
Recently, I updated my NixOS installation after a few months (whew) and since that time PortAudio fails to initialize either a capture or a playback stream.

Here's my NixOS config for audio:

services.pipewire {
	enable = true;
	alsa.enable = true; # enables alsa support
	alsa.support32Bit = true;
}

These are the official recommended settings that have worked for me since the dawn of time flawlessly.

My main devices are:

  • input: Thronmax MDrill One Pro (set as default)
  • output: MoonDrop DAWN PRO2 (DAC)

Both are set as default devices in pavucontrol.

Here's simple, sample the code that fails for me:

PaStream* stream = nullptr;
Pa_Initialize();
Pa_OpenDefaultStream(
	&stream,
	0, // either 1 0 / 0 1
	1,
	paInt16, // sample format
	24000,
	960,
	nullptr,
	nullptr
);

// Dont even need to start the stream, it already crashes on opening

And here are the logs (with debug and log api calls enabled):

Common part:
before paHostApiInitializers[0].
ALSA version (build): 1.2.14
ALSA version (runtime): 1.2.14
BuildDeviceList: Found device [0]: Thronmax MDrill One Pro: USB Audio (hw:0,0)
BuildDeviceList: Found device [1]: HDA ATI HDMI: 0 (hw:1,3)
BuildDeviceList: Found device [2]: HDA ATI HDMI: 1 (hw:1,7)
BuildDeviceList: Found device [3]: HDA ATI HDMI: 2 (hw:1,8)
BuildDeviceList: Found device [4]: HDA ATI HDMI: 3 (hw:1,9)
BuildDeviceList: Found device [5]: HDA ATI HDMI: R27qe (hw:1,10)
BuildDeviceList: Found device [6]: HDA ATI HDMI: 5 (hw:1,11)
BuildDeviceList: Found device [7]: HD-Audio Generic: ALC1220 Analog (hw:2,0)
BuildDeviceList: Found device [8]: HD-Audio Generic: ALC1220 Digital (hw:2,1)
BuildDeviceList: Found device [9]: HD-Audio Generic: ALC1220 Alt Analog (hw:2,2)
BuildDeviceList: Found device [10]: DAWN PRO2: USB Audio (hw:3,0)
BuildDeviceList: Ignoring ALSA plugin device [hw] of type [hw]
BuildDeviceList: Ignoring ALSA plugin device [plughw] of type [plug]
BuildDeviceList: Ignoring ALSA plugin device [plug] of type [plug]
BuildDeviceList: Ignoring ALSA plugin device [shm] of type [shm]
BuildDeviceList: Ignoring ALSA plugin device [tee] of type [file]
BuildDeviceList: Ignoring ALSA plugin device [file] of type [file]
BuildDeviceList: Ignoring ALSA plugin device [null] of type [null]
BuildDeviceList: Ignoring ALSA plugin device [cards] of type [unknown]
BuildDeviceList: Found plugin [sysdefault] of type [unknown]
BuildDeviceList: Found plugin [front] of type [unknown]
BuildDeviceList: Found plugin [rear] of type [unknown]
BuildDeviceList: Found plugin [center_lfe] of type [unknown]
BuildDeviceList: Found plugin [side] of type [unknown]
BuildDeviceList: Found plugin [surround21] of type [unknown]
BuildDeviceList: Found plugin [surround40] of type [unknown]
BuildDeviceList: Found plugin [surround41] of type [unknown]
BuildDeviceList: Found plugin [surround50] of type [unknown]
BuildDeviceList: Found plugin [surround51] of type [unknown]- Access to over 50 games from the game pass library

BuildDeviceList: Found plugin [surround71] of type [unknown]
BuildDeviceList: Found plugin [iec958] of type [unknown]
BuildDeviceList: Found plugin [spdif] of type [unknown]
BuildDeviceList: Found plugin [hdmi] of type [unknown]
BuildDeviceList: Found plugin [dmix] of type [unknown]
BuildDeviceList: Ignoring ALSA plugin device [dsnoop] of type [unknown]
BuildDeviceList: Found plugin [modem] of type [unknown]
BuildDeviceList: Found plugin [phoneline] of type [unknown]
BuildDeviceList: Found plugin [pipewire] of type [pipewire]
BuildDeviceList: Found plugin [default] of type [pipewire]
BuildDeviceList: Filling device info for 30 devices
FillInDevInfo: Filling device info for: Thronmax MDrill One Pro: USB Audio (hw:0,0)
OpenPcm: Failed to open busy device 'hw:0,0'
GropeDevice: collecting info ..
Default output device: Thronmax MDrill One Pro: USB Audio (hw:0,0)
FillInDevInfo: Adding device Thronmax MDrill One Pro: USB Audio (hw:0,0): 0
FillInDevInfo: Filling device info for: HDA ATI HDMI: 0 (hw:1,3)
GropeDevice: collecting info ..
FillInDevInfo: Adding device HDA ATI HDMI: 0 (hw:1,3): 1
FillInDevInfo: Filling device info for: HDA ATI HDMI: 1 (hw:1,7)
GropeDevice: collecting info ..
FillInDevInfo: Adding device HDA ATI HDMI: 1 (hw:1,7): 2
FillInDevInfo: Filling device info for: HDA ATI HDMI: 2 (hw:1,8)
GropeDevice: collecting info ..
FillInDevInfo: Adding device HDA ATI HDMI: 2 (hw:1,8): 3
FillInDevInfo: Filling device info for: HDA ATI HDMI: 3 (hw:1,9)
GropeDevice: collecting info ..
FillInDevInfo: Adding device HDA ATI HDMI: 3 (hw:1,9): 4
FillInDevInfo: Filling device info for: HDA ATI HDMI: R27qe (hw:1,10)
GropeDevice: collecting info ..
FillInDevInfo: Adding device HDA ATI HDMI: R27qe (hw:1,10): 5
FillInDevInfo: Filling device info for: HDA ATI HDMI: 5 (hw:1,11)
GropeDevice: collecting info ..
FillInDevInfo: Adding device HDA ATI HDMI: 5 (hw:1,11): 6
FillInDevInfo: Filling device info for: HD-Audio Generic: ALC1220 Analog (hw:2,0)
OpenPcm: Failed to open busy device 'hw:2,0'
GropeDevice: collecting info ..
FillInDevInfo: Adding device HD-Audio Generic: ALC1220 Analog (hw:2,0): 7
FillInDevInfo: Filling device info for: HD-Audio Generic: ALC1220 Digital (hw:2,1)
GropeDevice: collecting info ..
FillInDevInfo: Adding device HD-Audio Generic: ALC1220 Digital (hw:2,1): 8
FillInDevInfo: Filling device info for: HD-Audio Generic: ALC1220 Alt Analog (hw:2,2)
GropeDevice: collecting info ..
Default input device: HD-Audio Generic: ALC1220 Alt Analog (hw:2,2)
FillInDevInfo: Adding device HD-Audio Generic: ALC1220 Alt Analog (hw:2,2): 9
FillInDevInfo: Filling device info for: DAWN PRO2: USB Audio (hw:3,0)
GropeDevice: collecting info ..
FillInDevInfo: Adding device DAWN PRO2: USB Audio (hw:3,0): 10
FillInDevInfo: Filling device info for: sysdefault
ALSA lib pcm_dsnoop.c:567:(snd_pcm_dsnoop_open) unable to open slave
OpenPcm: Failed to open busy device 'sysdefault'
GropeDevice: collecting info ..
GropeDevice: Limiting number of plugin channels to 128
FillInDevInfo: Adding device sysdefault: 11
FillInDevInfo: Filling device info for: front
GropeDevice: collecting info ..
FillInDevInfo: Adding device front: 12
FillInDevInfo: Filling device info for: rear
ALSA lib pcm.c:2793:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
OpenPcm: Opened device 'rear' ptr[(nil)] - result: [-2:No such file or directory]
FillInDevInfo: Skipped device: rear, all channels == 0
FillInDevInfo: Filling device info for: center_lfe
ALSA lib pcm.c:2793:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
OpenPcm: Opened device 'center_lfe' ptr[(nil)] - result: [-2:No such file or directory]
FillInDevInfo: Skipped device: center_lfe, all channels == 0
FillInDevInfo: Filling device info for: side
ALSA lib pcm.c:2793:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
OpenPcm: Opened device 'side' ptr[(nil)] - result: [-2:No such file or directory]
FillInDevInfo: Skipped device: side, all channels == 0
FillInDevInfo: Filling device info for: surround21
OpenPcm: Failed to open busy device 'surround21'
GropeDevice: collecting info ..
FillInDevInfo: Failed groping surround21 for playback
FillInDevInfo: Filling device info for: surround40
GropeDevice: collecting info ..
FillInDevInfo: Adding device surround40: 13
FillInDevInfo: Filling device info for: surround41
GropeDevice: collecting info ..
FillInDevInfo: Failed groping surround41 for playback
FillInDevInfo: Filling device info for: surround50
GropeDevice: collecting info ..
FillInDevInfo: Failed groping surround50 for playback
FillInDevInfo: Filling device info for: surround51
GropeDevice: collecting info ..
FillInDevInfo: Failed groping surround51 for playback
FillInDevInfo: Filling device info for: surround71
GropeDevice: collecting info ..
FillInDevInfo: Failed groping surround71 for playback
FillInDevInfo: Filling device info for: iec958
GropeDevice: collecting info ..
FillInDevInfo: Adding device iec958: 14
FillInDevInfo: Filling device info for: spdif
OpenPcm: Failed to open busy device 'spdif'
GropeDevice: collecting info ..
FillInDevInfo: Adding device spdif: 15
FillInDevInfo: Filling device info for: hdmi
ALSA lib confmisc.c:1377:(snd_func_refer) Unable to find definition 'cards.0.pcm.hdmi.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:5205:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5728:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2793:(snd_pcm_open_noupdate) Unknown PCM hdmi
OpenPcm: Opened device 'hdmi' ptr[(nil)] - result: [-2:No such file or directory]
ALSA lib confmisc.c:1377:(snd_func_refer) Unable to find definition 'cards.0.pcm.hdmi.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:5205:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5728:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2793:(snd_pcm_open_noupdate) Unknown PCM hdmi
OpenPcm: Opened device 'hdmi' ptr[(nil)] - result: [-2:No such file or directory]
FillInDevInfo: Skipped device: hdmi, all channels == 0
FillInDevInfo: Filling device info for: modem
ALSA lib confmisc.c:1377:(snd_func_refer) Unable to find definition 'cards.0.pcm.modem.0:CARD=0'
ALSA lib conf.c:5205:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5728:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2793:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline:CARD=0,DEV=0
OpenPcm: Opened device 'modem' ptr[(nil)] - result: [-2:No such file or directory]
ALSA lib confmisc.c:1377:(snd_func_refer) Unable to find definition 'cards.0.pcm.modem.0:CARD=0'
ALSA lib conf.c:5205:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5728:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2793:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline:CARD=0,DEV=0
OpenPcm: Opened device 'modem' ptr[(nil)] - result: [-2:No such file or directory]
FillInDevInfo: Skipped device: modem, all channels == 0
FillInDevInfo: Filling device info for: phoneline
ALSA lib confmisc.c:1377:(snd_func_refer) Unable to find definition 'cards.0.pcm.modem.0:CARD=0'
ALSA lib conf.c:5205:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5728:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2793:(snd_pcm_open_noupdate) Unknown PCM phoneline
OpenPcm: Opened device 'phoneline' ptr[(nil)] - result: [-2:No such file or directory]
ALSA lib confmisc.c:1377:(snd_func_refer) Unable to find definition 'cards.0.pcm.modem.0:CARD=0'
ALSA lib conf.c:5205:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5728:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2793:(snd_pcm_open_noupdate) Unknown PCM phoneline
OpenPcm: Opened device 'phoneline' ptr[(nil)] - result: [-2:No such file or directory]
FillInDevInfo: Skipped device: phoneline, all channels == 0
FillInDevInfo: Filling device info for: pipewire
ALSA lib pcm.c:2713:(snd_pcm_open_conf) Either /nix/store/nn129jwsznqv7k888wb05m5whpyndqrf-pipewire-1.6.2/lib/alsa-lib/libasound_module_pcm_pipewire.so cannot be opened or _snd_pcm_pipewire_open was not defined inside
ALSA lib pcm.c:2713:(snd_pcm_open_conf) Either /nix/store/grd9mxcrg34y3qqxvv52v06rmz182fkv-pipewire-1.6.2/lib/alsa-lib/libasound_module_pcm_pipewire.so cannot be opened or _snd_pcm_pipewire_open was not defined inside
OpenPcm: Opened device 'pipewire' ptr[(nil)] - result: [-6:No such device or address]
ALSA lib pcm.c:2713:(snd_pcm_open_conf) Either /nix/store/nn129jwsznqv7k888wb05m5whpyndqrf-pipewire-1.6.2/lib/alsa-lib/libasound_module_pcm_pipewire.so cannot be opened or _snd_pcm_pipewire_open was not defined inside
ALSA lib pcm.c:2713:(snd_pcm_open_conf) Either /nix/store/grd9mxcrg34y3qqxvv52v06rmz182fkv-pipewire-1.6.2/lib/alsa-lib/libasound_module_pcm_pipewire.so cannot be opened or _snd_pcm_pipewire_open was not defined inside
OpenPcm: Opened device 'pipewire' ptr[(nil)] - result: [-6:No such device or address]
FillInDevInfo: Skipped device: pipewire, all channels == 0
FillInDevInfo: Filling device info for: dmix
GropeDevice: collecting info ..
FillInDevInfo: Adding device dmix: 16
FillInDevInfo: Filling device info for: default
ALSA lib pcm.c:2713:(snd_pcm_open_conf) Either /nix/store/nn129jwsznqv7k888wb05m5whpyndqrf-pipewire-1.6.2/lib/alsa-lib/libasound_module_pcm_pipewire.so cannot be opened or _snd_pcm_pipewire_open was not defined inside
ALSA lib pcm.c:2713:(snd_pcm_open_conf) Either /nix/store/grd9mxcrg34y3qqxvv52v06rmz182fkv-pipewire-1.6.2/lib/alsa-lib/libasound_module_pcm_pipewire.so cannot be opened or _snd_pcm_pipewire_open was not defined inside
OpenPcm: Opened device 'default' ptr[(nil)] - result: [-6:No such device or address]
ALSA lib pcm.c:2713:(snd_pcm_open_conf) Either /nix/store/nn129jwsznqv7k888wb05m5whpyndqrf-pipewire-1.6.2/lib/alsa-lib/libasound_module_pcm_pipewire.so cannot be opened or _snd_pcm_pipewire_open was not defined inside
ALSA lib pcm.c:2713:(snd_pcm_open_conf) Either /nix/store/grd9mxcrg34y3qqxvv52v06rmz182fkv-pipewire-1.6.2/lib/alsa-lib/libasound_module_pcm_pipewire.so cannot be opened or _snd_pcm_pipewire_open was not defined inside
OpenPcm: Opened device 'default' ptr[(nil)] - result: [-6:No such device or address]
FillInDevInfo: Skipped device: default, all channels == 0
BuildDeviceList: Building device list took 0.137493 seconds
after paHostApiInitializers[0].
before paHostApiInitializers[1].
JACK port found: Thronmax MDrill One Pro Analog Stereo:capture_FL
JACK port found: Thronmax MDrill One Pro Analog Stereo:capture_FR
JACK port found: Starship/Matisse HD Audio Controller Analog Stereo:capture_FL
JACK port found: Starship/Matisse HD Audio Controller Analog Stereo:capture_FR
JACK port found: Zen:output_FL
JACK port found: Zen:output_FR
JACK port found: DAWN PRO2 Analog Stereo:playback_FL
JACK port found: DAWN PRO2 Analog Stereo:playback_FR
JACK port found: DAWN PRO2 Analog Stereo:monitor_FL
JACK port found: DAWN PRO2 Analog Stereo:monitor_FR
JACK port found: Thronmax MDrill One Pro Analog Stereo:playback_FL
JACK port found: Thronmax MDrill One Pro Analog Stereo:playback_FR
JACK port found: Thronmax MDrill One Pro Analog Stereo:monitor_FL
JACK port found: Thronmax MDrill One Pro Analog Stereo:monitor_FR
JACK port found: Starship/Matisse HD Audio Controller Digital Stereo (IEC958):playback_FL
JACK port found: Starship/Matisse HD Audio Controller Digital Stereo (IEC958):playback_FR
JACK port found: Starship/Matisse HD Audio Controller Digital Stereo (IEC958):monitor_FL
JACK port found: Starship/Matisse HD Audio Controller Digital Stereo (IEC958):monitor_FR
JACK port found: Navi 21/23 HDMI/DP Audio Controller Digital Stereo (HDMI 5):playback_FL
JACK port found: Navi 21/23 HDMI/DP Audio Controller Digital Stereo (HDMI 5):playback_FR
JACK port found: Navi 21/23 HDMI/DP Audio Controller Digital Stereo (HDMI 5):monitor_FL
JACK port found: Navi 21/23 HDMI/DP Audio Controller Digital Stereo (HDMI 5):monitor_FR
JACK port found: PulseAudio Volume Control:input_FL
JACK port found: PulseAudio Volume Control:input_FR
JACK port found: PulseAudio Volume Control:monitor_FL
JACK port found: PulseAudio Volume Control:monitor_FR
JACK port found: PulseAudio Volume Control:input_FL-167
JACK port found: PulseAudio Volume Control:input_FR-168
JACK port found: PulseAudio Volume Control:monitor_FL-169
JACK port found: PulseAudio Volume Control:monitor_FR-170
JACK port found: PulseAudio Volume Control:input_FL-464
JACK port found: PulseAudio Volume Control:input_FR-465
JACK port found: PulseAudio Volume Control:monitor_FL-466
JACK port found: PulseAudio Volume Control:monitor_FR-467
JACK port found: PulseAudio Volume Control:input_FL-198
JACK port found: PulseAudio Volume Control:input_FR-199
JACK port found: PulseAudio Volume Control:monitor_FL-200
JACK port found: PulseAudio Volume Control:monitor_FR-201
Adding JACK device Thronmax MDrill One Pro Analog Stereo with 4 input channels and 2 output channels
Adding JACK device Starship/Matisse HD Audio Controller Analog Stereo with 2 input channels and 0 output channels
Adding JACK device Zen with 2 input channels and 0 output channels
Adding JACK device DAWN PRO2 Analog Stereo with 2 input channels and 2 output channels
Adding JACK device Starship/Matisse HD Audio Controller Digital Stereo (IEC958) with 2 input channels and 2 output channels
Adding JACK device Navi 21/23 HDMI/DP Audio Controller Digital Stereo (HDMI 5) with 2 input channels and 2 output channels
Adding JACK device PulseAudio Volume Control with 8 input channels and 8 output channels
JackSrCb: Acting on change in JACK samplerate: 48000.000000
after paHostApiInitializers[1].

Input specific part
PaAlsaStreamComponent_Initialize: Host Chans C 2
AlsaOpen: Opening device hw:2,2
PaAlsaStreamComponent_InitialConfigure: device MMAP SND_PCM_ACCESS_MMAP_INTERLEAVED: YES
PaAlsaStreamComponent_InitialConfigure: device MMAP SND_PCM_ACCESS_MMAP_NONINTERLEAVED: NO
PaAlsaStreamComponent_InitialConfigure: device can MMAP: YES
PaAlsaStreamComponent_InitialConfigure: Wanted 44100.000, closest sample rate was 1.000
Expression 'paInvalidSampleRate' failed in '/home/epitome/epitome/game-server/external/portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 2050
Expression 'PaAlsaStreamComponent_InitialConfigure( &self->capture, inParams, self->primeBuffers, hwParamsCapture, &realSr )' failed in '/home/epitome/epitome/game-server/external/portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 2721
Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters, sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode )' failed in '/home/epitome/epitome/game-server/external/portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 2845
OpenStream: Stream in error, terminating
Logs for output
PaAlsaStreamComponent_Initialize: Host Chans P 2
AlsaOpen: Opening device hw:0,0
PaAlsaStreamComponent_InitialConfigure: device MMAP SND_PCM_ACCESS_MMAP_INTERLEAVED: YES
PaAlsaStreamComponent_InitialConfigure: device MMAP SND_PCM_ACCESS_MMAP_NONINTERLEAVED: NO
PaAlsaStreamComponent_InitialConfigure: device can MMAP: YES
PaAlsaStreamComponent_InitialConfigure: Wanted 22050.000, closest sample rate was 1.000
Expression 'paInvalidSampleRate' failed in '/home/epitome/epitome/game-server/external/portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 2050
Expression 'PaAlsaStreamComponent_InitialConfigure( &self->playback, outParams, self->primeBuffers, hwParamsPlayback, &realSr )' failed in '/home/epitome/epitome/game-server/external/portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 2724
Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters, sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode )' failed in '/home/epitome/epitome/game-server/external/portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 2845
OpenStream: Stream in error, terminating

On windows the same code works fine, the same code has worked previously on NixOS as well.

I'm curently on:
nixos gen.: (nixpkgs) 26.05.20260414.4bd9165 (kernel) 6.19.12-xanmod1
portaudio: 19.7.0 (when I checked latest master the logs were a tad bit different, but the issue persisted)

When I switch back to the previous generation:
nixos gen.: (nixpkgs) 26.05.20251205.f61125a (kernel) 6.17.10-xanmod1

Everything works fine. The pipewire version difference between those: 1.6.2 -> 1.4.9.

Currently I'm coping by using the older version manually, I'll try to find the version at which it breaks when I get some more time.

And here are the logs:

Common part:
before paHostApiInitializers[0].
ALSA version (build): 1.2.14
ALSA version (runtime): 1.2.14
BuildDeviceList: Found device [0]: Thronmax MDrill One Pro: USB Audio (hw:0,0)
BuildDeviceList: Found device [1]: HDA ATI HDMI: 0 (hw:1,3)
BuildDeviceList: Found device [2]: HDA ATI HDMI: 1 (hw:1,7)
BuildDeviceList: Found device [3]: HDA ATI HDMI: 2 (hw:1,8)
BuildDeviceList: Found device [4]: HDA ATI HDMI: 3 (hw:1,9)
BuildDeviceList: Found device [5]: HDA ATI HDMI: R27qe (hw:1,10)
BuildDeviceList: Found device [6]: HDA ATI HDMI: 5 (hw:1,11)
BuildDeviceList: Found device [7]: HD-Audio Generic: ALC1220 Analog (hw:2,0)
BuildDeviceList: Found device [8]: HD-Audio Generic: ALC1220 Digital (hw:2,1)
BuildDeviceList: Found device [9]: HD-Audio Generic: ALC1220 Alt Analog (hw:2,2)
BuildDeviceList: Found device [10]: DAWN PRO2: USB Audio (hw:3,0)
BuildDeviceList: Ignoring ALSA plugin device [hw] of type [hw]
BuildDeviceList: Ignoring ALSA plugin device [plughw] of type [plug]
BuildDeviceList: Ignoring ALSA plugin device [plug] of type [plug]
BuildDeviceList: Ignoring ALSA plugin device [shm] of type [shm]
BuildDeviceList: Ignoring ALSA plugin device [tee] of type [file]
BuildDeviceList: Ignoring ALSA plugin device [file] of type [file]
BuildDeviceList: Ignoring ALSA plugin device [null] of type [null]
BuildDeviceList: Ignoring ALSA plugin device [cards] of type [unknown]
BuildDeviceList: Found plugin [sysdefault] of type [unknown]
BuildDeviceList: Found plugin [front] of type [unknown]
BuildDeviceList: Found plugin [rear] of type [unknown]
BuildDeviceList: Found plugin [center_lfe] of type [unknown]
BuildDeviceList: Found plugin [side] of type [unknown]
BuildDeviceList: Found plugin [surround21] of type [unknown]
BuildDeviceList: Found plugin [surround40] of type [unknown]
BuildDeviceList: Found plugin [surround41] of type [unknown]
BuildDeviceList: Found plugin [surround50] of type [unknown]
BuildDeviceList: Found plugin [surround51] of type [unknown]
BuildDeviceList: Found plugin [surround71] of type [unknown]
BuildDeviceList: Found plugin [iec958] of type [unknown]
BuildDeviceList: Found plugin [spdif] of type [unknown]
BuildDeviceList: Found plugin [hdmi] of type [unknown]
BuildDeviceList: Found plugin [dmix] of type [unknown]
BuildDeviceList: Ignoring ALSA plugin device [dsnoop] of type [unknown]
BuildDeviceList: Found plugin [modem] of type [unknown]
BuildDeviceList: Found plugin [phoneline] of type [unknown]
BuildDeviceList: Found plugin [pipewire] of type [pipewire]
BuildDeviceList: Found plugin [default] of type [pipewire]
BuildDeviceList: Filling device info for 30 devices
FillInDevInfo: Filling device info for: Thronmax MDrill One Pro: USB Audio (hw:0,0)
OpenPcm: Failed to open busy device 'hw:0,0'
OpenPcm: Failed to open busy device 'hw:0,0'
FillInDevInfo: Skipped device: Thronmax MDrill One Pro: USB Audio (hw:0,0), all channels == 0
FillInDevInfo: Filling device info for: HDA ATI HDMI: 0 (hw:1,3)
GropeDevice: collecting info ..
Default output device: HDA ATI HDMI: 0 (hw:1,3)
FillInDevInfo: Adding device HDA ATI HDMI: 0 (hw:1,3): 0
FillInDevInfo: Filling device info for: HDA ATI HDMI: 1 (hw:1,7)
GropeDevice: collecting info ..
FillInDevInfo: Adding device HDA ATI HDMI: 1 (hw:1,7): 1
FillInDevInfo: Filling device info for: HDA ATI HDMI: 2 (hw:1,8)
GropeDevice: collecting info ..
FillInDevInfo: Adding device HDA ATI HDMI: 2 (hw:1,8): 2
FillInDevInfo: Filling device info for: HDA ATI HDMI: 3 (hw:1,9)
GropeDevice: collecting info ..
FillInDevInfo: Adding device HDA ATI HDMI: 3 (hw:1,9): 3
FillInDevInfo: Filling device info for: HDA ATI HDMI: R27qe (hw:1,10)
OpenPcm: Failed to open busy device 'hw:1,10'
FillInDevInfo: Skipped device: HDA ATI HDMI: R27qe (hw:1,10), all channels == 0
FillInDevInfo: Filling device info for: HDA ATI HDMI: 5 (hw:1,11)
GropeDevice: collecting info ..
FillInDevInfo: Adding device HDA ATI HDMI: 5 (hw:1,11): 4
FillInDevInfo: Filling device info for: HD-Audio Generic: ALC1220 Analog (hw:2,0)
OpenPcm: Failed to open busy device 'hw:2,0'
GropeDevice: collecting info ..
FillInDevInfo: Adding device HD-Audio Generic: ALC1220 Analog (hw:2,0): 5
FillInDevInfo: Filling device info for: HD-Audio Generic: ALC1220 Digital (hw:2,1)
OpenPcm: Failed to open busy device 'hw:2,1'
FillInDevInfo: Skipped device: HD-Audio Generic: ALC1220 Digital (hw:2,1), all channels == 0
FillInDevInfo: Filling device info for: HD-Audio Generic: ALC1220 Alt Analog (hw:2,2)
GropeDevice: collecting info ..
Default input device: HD-Audio Generic: ALC1220 Alt Analog (hw:2,2)
FillInDevInfo: Adding device HD-Audio Generic: ALC1220 Alt Analog (hw:2,2): 6
FillInDevInfo: Filling device info for: DAWN PRO2: USB Audio (hw:3,0)
OpenPcm: Failed to open busy device 'hw:3,0'
FillInDevInfo: Skipped device: DAWN PRO2: USB Audio (hw:3,0), all channels == 0
FillInDevInfo: Filling device info for: sysdefault
ALSA lib pcm_dsnoop.c:567:(snd_pcm_dsnoop_open) unable to open slave
OpenPcm: Failed to open busy device 'sysdefault'
ALSA lib pcm_dmix.c:1000:(snd_pcm_dmix_open) unable to open slave
OpenPcm: Failed to open busy device 'sysdefault'
FillInDevInfo: Skipped device: sysdefault, all channels == 0
FillInDevInfo: Filling device info for: front
OpenPcm: Failed to open busy device 'front'
FillInDevInfo: Skipped device: front, all channels == 0
FillInDevInfo: Filling device info for: rear
ALSA lib pcm.c:2793:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
OpenPcm: Opened device 'rear' ptr[(nil)] - result: [-2:No such file or directory]
FillInDevInfo: Skipped device: rear, all channels == 0
FillInDevInfo: Filling device info for: center_lfe
ALSA lib pcm.c:2793:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
OpenPcm: Opened device 'center_lfe' ptr[(nil)] - result: [-2:No such file or directory]
FillInDevInfo: Skipped device: center_lfe, all channels == 0
FillInDevInfo: Filling device info for: side
ALSA lib pcm.c:2793:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
OpenPcm: Opened device 'side' ptr[(nil)] - result: [-2:No such file or directory]
FillInDevInfo: Skipped device: side, all channels == 0
FillInDevInfo: Filling device info for: surround21
OpenPcm: Failed to open busy device 'surround21'
OpenPcm: Failed to open busy device 'surround21'
FillInDevInfo: Skipped device: surround21, all channels == 0
FillInDevInfo: Filling device info for: surround40
OpenPcm: Failed to open busy device 'surround40'
FillInDevInfo: Skipped device: surround40, all channels == 0
FillInDevInfo: Filling device info for: surround41
OpenPcm: Failed to open busy device 'surround41'
FillInDevInfo: Skipped device: surround41, all channels == 0
FillInDevInfo: Filling device info for: surround50
OpenPcm: Failed to open busy device 'surround50'
FillInDevInfo: Skipped device: surround50, all channels == 0
FillInDevInfo: Filling device info for: surround51
OpenPcm: Failed to open busy device 'surround51'
FillInDevInfo: Skipped device: surround51, all channels == 0
FillInDevInfo: Filling device info for: surround71
OpenPcm: Failed to open busy device 'surround71'
FillInDevInfo: Skipped device: surround71, all channels == 0
FillInDevInfo: Filling device info for: iec958
OpenPcm: Failed to open busy device 'iec958'
FillInDevInfo: Skipped device: iec958, all channels == 0
FillInDevInfo: Filling device info for: spdif
OpenPcm: Failed to open busy device 'spdif'
OpenPcm: Failed to open busy device 'spdif'
FillInDevInfo: Skipped device: spdif, all channels == 0
FillInDevInfo: Filling device info for: hdmi
ALSA lib confmisc.c:1377:(snd_func_refer) Unable to find definition 'cards.0.pcm.hdmi.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:5205:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5728:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2793:(snd_pcm_open_noupdate) Unknown PCM hdmi
OpenPcm: Opened device 'hdmi' ptr[(nil)] - result: [-2:No such file or directory]
ALSA lib confmisc.c:1377:(snd_func_refer) Unable to find definition 'cards.0.pcm.hdmi.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:5205:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5728:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2793:(snd_pcm_open_noupdate) Unknown PCM hdmi
OpenPcm: Opened device 'hdmi' ptr[(nil)] - result: [-2:No such file or directory]
FillInDevInfo: Skipped device: hdmi, all channels == 0
FillInDevInfo: Filling device info for: modem
ALSA lib confmisc.c:1377:(snd_func_refer) Unable to find definition 'cards.0.pcm.modem.0:CARD=0'
ALSA lib conf.c:5205:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5728:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2793:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline:CARD=0,DEV=0
OpenPcm: Opened device 'modem' ptr[(nil)] - result: [-2:No such file or directory]
ALSA lib confmisc.c:1377:(snd_func_refer) Unable to find definition 'cards.0.pcm.modem.0:CARD=0'
ALSA lib conf.c:5205:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5728:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2793:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline:CARD=0,DEV=0
OpenPcm: Opened device 'modem' ptr[(nil)] - result: [-2:No such file or directory]
FillInDevInfo: Skipped device: modem, all channels == 0
FillInDevInfo: Filling device info for: phoneline
ALSA lib confmisc.c:1377:(snd_func_refer) Unable to find definition 'cards.0.pcm.modem.0:CARD=0'
ALSA lib conf.c:5205:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5728:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2793:(snd_pcm_open_noupdate) Unknown PCM phoneline
OpenPcm: Opened device 'phoneline' ptr[(nil)] - result: [-2:No such file or directory]
ALSA lib confmisc.c:1377:(snd_func_refer) Unable to find definition 'cards.0.pcm.modem.0:CARD=0'
ALSA lib conf.c:5205:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5728:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2793:(snd_pcm_open_noupdate) Unknown PCM phoneline
OpenPcm: Opened device 'phoneline' ptr[(nil)] - result: [-2:No such file or directory]
FillInDevInfo: Skipped device: phoneline, all channels == 0
FillInDevInfo: Filling device info for: pipewire
GropeDevice: collecting info ..
GropeDevice: collecting info ..
FillInDevInfo: Adding device pipewire: 7
FillInDevInfo: Filling device info for: dmix
ALSA lib pcm_dmix.c:1000:(snd_pcm_dmix_open) unable to open slave
OpenPcm: Failed to open busy device 'dmix'
FillInDevInfo: Skipped device: dmix, all channels == 0
FillInDevInfo: Filling device info for: default
GropeDevice: collecting info ..
GropeDevice: collecting info ..
Default input device: default
Default output device: default
FillInDevInfo: Adding device default: 8
BuildDeviceList: Building device list took 0.031692 seconds
after paHostApiInitializers[0].
before paHostApiInitializers[1].
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
PaJack_Initialize: Couldn't connect to JACK, status: 17
after paHostApiInitialCannot init stream with 24kHz (C/P) after NixOS update, 48kHz yields no audio
izers[1].
Input specific part
PaAlsaStreamComponent_Initialize: Host Chans C 1
AlsaOpen: Opening device default
PaAlsaStreamComponent_InitialConfigure: device MMAP SND_PCM_ACCESS_MMAP_INTERLEAVED: YES
PaAlsaStreamComponent_InitialConfigure: device MMAP SND_PCM_ACCESS_MMAP_NONINTERLEAVED: YES
PaAlsaStreamComponent_InitialConfigure: device can MMAP: YES
PaAlsaStreamComponent_DetermineFramesPerBuffer: user-buffer (frames)           = 960
PaAlsaStreamComponent_DetermineFramesPerBuffer: user-buffer (sec)              = 0.040000
PaAlsaStreamComponent_DetermineFramesPerBuffer: suggested latency (sec)        = 0.034830
PaAlsaStreamComponent_DetermineFramesPerBuffer: suggested host buffer (frames) = 1920
PaAlsaStreamComponent_DetermineFramesPerBuffer: suggested host buffer (sec)    = 0.080000
PaAlsaStreamComponent_DetermineFramesPerBuffer: periods min = 2, max = 1024, req = 4
PaAlsaStreamComponent_DetermineFramesPerBuffer: suggested host buffer period   = 960
PaAlsaStreamComponent_DetermineFramesPerBuffer: device period minimum          = 64
PaAlsaStreamComponent_DetermineFramesPerBuffer: device period maximum          = 1048576
PaAlsaStreamComponent_DetermineFramesPerBuffer: host buffer period             = 960
PaAlsaStreamComponent_DetermineFramesPerBuffer: host buffer period latency     = 0.040000
PaAlsaStream_Configure: Capture period size: 960, latency: 0.040000
OpenStream: Stream: framesPerBuffer = 960, maxFramesPerHostBuffer = 960, latency i=0.040000, o=0.000000
Logs for output
PaAlsaStreamComponent_Initialize: Host Chans P 1
AlsaOpen: Opening device default
PaAlsaStreamComponent_InitialConfigure: device MMAP SND_PCM_ACCESS_MMAP_INTERLEAVED: YES
PaAlsaStreamComponent_InitialConfigure: device MMAP SND_PCM_ACCESS_MMAP_NONINTERLEAVED: YES
PaAlsaStreamComponent_InitialConfigure: device can MMAP: YES
PaAlsaStreamComponent_DetermineFramesPerBuffer: user-buffer (frames)           = 960
PaAlsaStreamComponent_DetermineFramesPerBuffer: user-buffer (sec)              = 0.040000
PaAlsaStreamComponent_DetermineFramesPerBuffer: suggested latency (sec)        = 0.034830
PaAlsaStreamComponent_DetermineFramesPerBuffer: suggested host buffer (frames) = 1920
PaAlsaStreamComponent_DetermineFramesPerBuffer: suggested host buffer (sec)    = 0.080000
PaAlsaStreamComponent_DetermineFramesPerBuffer: periods min = 2, max = 1024, req = 4
PaAlsaStreamComponent_DetermineFramesPerBuffer: suggested host buffer period   = 960
PaAlsaStreamComponent_DetermineFramesPerBuffer: device period minimum          = 64
PaAlsaStreamComponent_DetermineFramesPerBuffer: device period maximum          = 1048576
PaAlsaStreamComponent_DetermineFramesPerBuffer: host buffer period             = 960
PaAlsaStreamComponent_DetermineFramesPerBuffer: host buffer period latency     = 0.040000
PaAlsaStream_Configure: Playback period size: 960, latency: 0.040000
OpenStream: Stream: framesPerBuffer = 960, maxFramesPerHostBuffer = 960, latency i=0.000000, o=0.040000

Please let me know what other information and context I should provide.

In the broken case, when I set the sample rate to 48kHz instead of 24kHz it initializes "fine", but it fails to capture sound and play it.

It also seems to mix up devices? For input it tries to open [9]: HD-Audio Generic: ALC1220 Alt Analog (hw:2,2), for output [0]: Thronmax MDrill One Pro: USB Audio (hw:0,0).

In the proper, working case PortAudio properly finds the DAWN DAC, in the broken case it doesn't.

I'm asking here because the problem seems to only exist with PortAudio and with a very simple code. Every other app streams audio properly both ways in both NixOS generations. If you have any clues as to any system settings, portaudio specific edge cases and such that could apply here please let me know :/.

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions