I'm talking about this function call:
r = out123_open (sound::mp3_output_handle, "alsa", NULL);
The return value of
r is then
OUT123_OK, but in the same moment, the status LED on my sound card (JustBoom DAC HAT) is switched off, and the card delivers no sounds any more (until I reboot my Pi, at least). The debug messages emitted when
out123_open () is called look quite strange:
[src/libout123/modules/alsa.c:173] debug: open_alsa with (nil) [src/libout123/modules/alsa.c:270] debug: close_alsa with 0x301918 Chosen output module: alsa
Apparently, when calling
init_alsa (), the function
close_alsa () is also called and switches off the sound card.
How can this be? Does everybody know hot to prevent ALSA from shutting down the sound card? Thank you.
UPDATE: Upon another user's advice, I found this when calling
[ 510.964076] pcm512x 1-004d: No SCLK, using BCLK: -2 [ 510.970312] pcm512x 1-004d: Failed to request power down: -5
When calling mpg123 from the command line, though, I do get line 1, but not line 2, and the line with
close_alsa is also missing in the debug output!