cpal icon indicating copy to clipboard operation
cpal copied to clipboard

ALSA lib pcm_route.c:878:(find_matching_chmap) Found no matching channel map

Open TornaxO7 opened this issue 10 months ago • 0 comments

Hello! I'm somehow getting some weird artifacts if I try to iterate through the available devices:

ALSA lib pcm_dmix.c:1000:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:1000:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_route.c:878:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:878:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:878:(find_matching_chmap) Found no matching channel map

Reproduction steps

Cargo.toml

# [packages] omitted

[dependencies]
cpal = "0.15"

main.rs

use cpal::traits::{DeviceTrait, HostTrait};

fn main() {
    for device in cpal::default_host().output_devices().unwrap() {
        if let Ok(name) = device.name() {
            println!("From my code: {}", name);
        }
    }
}

Output after cargo run:

From my code: pipewire
From my code: default
ALSA lib pcm_dmix.c:1000:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:1000:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_route.c:878:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:878:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:878:(find_matching_chmap) Found no matching channel map
From my code: iec958:CARD=PCH,DEV=0
From my code: hdmi:CARD=HDMI,DEV=0
From my code: hdmi:CARD=HDMI,DEV=1
From my code: hdmi:CARD=HDMI,DEV=2
From my code: hdmi:CARD=HDMI,DEV=3
From my code: hdmi:CARD=HDMI,DEV=4
ALSA lib pcm_dmix.c:1000:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:1000:(snd_pcm_dmix_open) unable to open slave

but I expected

From my code: pipewire
From my code: default
From my code: iec958:CARD=PCH,DEV=0
From my code: hdmi:CARD=HDMI,DEV=0
From my code: hdmi:CARD=HDMI,DEV=1
From my code: hdmi:CARD=HDMI,DEV=2
From my code: hdmi:CARD=HDMI,DEV=3
From my code: hdmi:CARD=HDMI,DEV=4

TornaxO7 avatar Feb 14 '25 09:02 TornaxO7