Remove hard-coded values from widget-gain.c and widget-volume.c

Update alsa-sim.c and alsa.c to read the TLV info, and update the gain
and volume widgets to use that info rather than hard-coding the
min/max values.
This commit is contained in:
Geoffrey D. Bennett
2023-11-30 23:57:47 +10:30
parent 197f469bd8
commit be458afcc4
5 changed files with 116 additions and 16 deletions

View File

@@ -115,6 +115,12 @@ struct alsa_elem {
int type;
int count;
// for gain/volume elements, the dB range and step
int min_val;
int max_val;
int min_dB;
int max_dB;
// for the number (or translated letter; A = 1) in the item name
// TODO: move this to struct routing_snk?
int lr_num;