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

@@ -473,14 +473,6 @@ static void alsa_add_card_callback(struct alsa_card *card) {
);
}
static void alsa_get_firmware_version(struct alsa_card *card) {
struct alsa_elem *elem = get_elem_by_name(card->elems, "Firmware Version");
if (!elem)
return;
card->firmware_version = alsa_get_elem_value(elem);
}
static void alsa_subscribe(struct alsa_card *card) {
int count = snd_ctl_poll_descriptors_count(card->handle);
@@ -535,7 +527,6 @@ void alsa_scan_cards(void) {
card->handle = ctl;
alsa_get_elem_list(card);
alsa_get_firmware_version(card);
alsa_subscribe(card);
create_card_window(card);