Check Firmware Version before enabling Levels menu item

The level meters don't work correctly on earlier kernel versions, so
they shouldn't be displayed in that case. The "Firmware Version" ALSA
control was added to the kernel at the same time as the level meters
were fixed, so use the presence of that to determine whether or not to
enable the menu item.
This commit is contained in:
Geoffrey D. Bennett
2023-11-19 13:12:50 +10:30
parent abee3e537c
commit befce0824f
3 changed files with 23 additions and 1 deletions

View File

@@ -145,6 +145,7 @@ struct alsa_card {
char *name;
snd_ctl_t *handle;
struct pollfd pfd;
int firmware_version;
GArray *elems;
struct alsa_elem *sample_capture_elem;
struct alsa_elem *level_meter_elem;