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:
@@ -210,7 +210,10 @@ void add_mixer_action_map(struct alsa_card *card) {
|
||||
card
|
||||
);
|
||||
|
||||
if (card->firmware_version) {
|
||||
// Hide the levels menu item if there is no "Firmware Version"
|
||||
// control (working kernel support for level meters was added in the
|
||||
// same version as the "Firmware Version" control)
|
||||
if (get_elem_by_name(card->elems, "Firmware Version")) {
|
||||
g_action_map_add_action_entries(
|
||||
G_ACTION_MAP(card->window_main),
|
||||
levels_entries,
|
||||
|
||||
Reference in New Issue
Block a user