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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user