Make the Level Meter check compatible with alsa-sim.c

Rather than retrieving the firmware version in alsa_scan_cards(), use
get_elem_by_name() to check if the control is present.

Update alsa-sim.c alsa_config_to_new_elem() to read iface=CARD
controls.
This commit is contained in:
Geoffrey D. Bennett
2023-11-30 00:43:00 +10:30
parent 5b9ff7d457
commit 9890b4939b
4 changed files with 7 additions and 13 deletions

View File

@@ -249,12 +249,13 @@ static int alsa_config_to_new_elem(
}
}
// check iface value; only interested in MIXER and PCM
// check iface value; only interested in CARD, MIXER, and PCM
if (!iface) {
printf("missing iface node in control id %d\n", id);
goto fail;
}
if (strcmp(iface, "MIXER") != 0 &&
if (strcmp(iface, "CARD") != 0 &&
strcmp(iface, "MIXER") != 0 &&
strcmp(iface, "PCM") != 0)
goto fail;