diff options
author | Rohit kumar <quic_rohkumar@quicinc.com> | 2023-05-30 20:34:51 +0530 |
---|---|---|
committer | Rohit kumar <quic_rohkumar@quicinc.com> | 2023-09-04 15:26:19 +0530 |
commit | 4516c73951d861e974f338540b026285148dc426 (patch) | |
tree | 7a7dd19116ef4adb9c3a41eb570678ef20262b04 /utils | |
parent | a8a581fb422c9c2af2d8858a678c008db80e1e3c (diff) |
utils: tinymix: Print device number associated with mixer controls
For mixer controls with same name and different device number, there
is no clarity in tinymix output. Print device number along with
mixer control name to distinguish between mixer controls with
same name.
Diffstat (limited to 'utils')
-rw-r--r-- | utils/tinymix.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/utils/tinymix.c b/utils/tinymix.c index e272ade..f0e1d95 100644 --- a/utils/tinymix.c +++ b/utils/tinymix.c @@ -201,7 +201,7 @@ static void list_controls(struct mixer *mixer, int print_all) { struct mixer_ctl *ctl; const char *name, *type; - unsigned int num_ctls, num_values; + unsigned int num_ctls, num_values, device; unsigned int i; num_ctls = mixer_get_num_ctls(mixer); @@ -209,9 +209,9 @@ static void list_controls(struct mixer *mixer, int print_all) printf("Number of controls: %u\n", num_ctls); if (print_all) - printf("ctl\ttype\tnum\t%-40svalue\n", "name"); + printf("ctl\ttype\tnum\t%-40s\tdevice\tvalue\n", "name"); else - printf("ctl\ttype\tnum\t%-40s\n", "name"); + printf("ctl\ttype\tnum\t%-40s\tdevice\n", "name"); for (i = 0; i < num_ctls; i++) { ctl = mixer_get_ctl(mixer, i); @@ -219,7 +219,8 @@ static void list_controls(struct mixer *mixer, int print_all) name = mixer_ctl_get_name(ctl); type = mixer_ctl_get_type_string(ctl); num_values = mixer_ctl_get_num_values(ctl); - printf("%u\t%s\t%u\t%-40s", i, type, num_values, name); + device = mixer_ctl_get_dev_num(ctl); + printf("%u\t%s\t%u\t%-40s\t%u", i, type, num_values, name, device); if (print_all) print_control_values(ctl); printf("\n"); |