Skip to content

Conversation

@roderickvd
Copy link
Member

Reported on Discord:

When enumerating devices I get a lot of alsa errors:

[2025-10-16T22:38:51Z INFO  alsa] ALSA lib confmisc.c:855:(parse_card) cannot find card '$CARD'
[2025-10-16T22:38:51Z INFO  alsa] ALSA lib conf.c:5205:(_snd_config_evaluate) function snd_func_card_inum returned error: No such device
[2025-10-16T22:38:51Z INFO  alsa] ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings
[2025-10-16T22:38:51Z INFO  alsa] ALSA lib conf.c:5205:(_snd_config_evaluate) function snd_func_concat returned error: No such device
[2025-10-16T22:38:51Z INFO  alsa] ALSA lib confmisc.c:1342:(snd_func_refer) error evaluating name
[2025-10-16T22:38:51Z INFO  alsa] ALSA lib conf.c:5205:(_snd_config_evaluate) function snd_func_refer returned error: No such device
[2025-10-16T22:38:51Z INFO  alsa] ALSA lib conf.c:5728:(snd_config_expand) Evaluate error: No such device
[2025-10-16T22:38:51Z INFO  alsa] ALSA lib conf.c:5541:(parse_args) Unknown parameter CARD
[2025-10-16T22:38:51Z INFO  alsa] ALSA lib conf.c:5712:(snd_config_expand) Parse arguments error: No such file or directory
[2025-10-16T22:38:51Z INFO  alsa] ALSA lib conf.c:5541:(parse_args) Unknown parameter CARD
...

This is due to trying to open devices that were configured as templates in ALSA. Basically this is an ALSA configuration mistake, however, there's no point to cpal trying to open them either, so that's just removed now.

Cleaned up a little while there.

This PR builds on top of #1033, so review just the last commits to see what's changed on top.

Avoid setting period count when BufferSize::Default is used, allowing
PipeWire-ALSA to select optimal buffer and period sizes. This prevents
excessively large periods and high latency on PipeWire-ALSA devices.
@roderickvd
Copy link
Member Author

Note to self: devices() currently returns an empty Vec. Instead, it should return the combination of input and output devices.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant