From f8f7ef29b2095621263c748efd7570091d8dcc51 Mon Sep 17 00:00:00 2001 From: Charles Keepax Date: Fri, 8 Sep 2017 16:58:20 +0100 Subject: Update output format for enumerated controls The current format of the data printed for enumeration controls is to list all the control values with no separator between them and to place a comma before the currently selected value. This format is hard to parse as a human and very difficult to parse automatically. Change this to separate individual values with a comma and mark the selected value with a right angle bracket. For example, the following output is given for the "AEC Loopback" control on one of our CODECs: HPOUT1LHPOUT1R, SPKOUTSPKDATLSPKDATR After the change this becomes: HPOUT1L, HPOUT1R, > SPKOUT, SPKDATL, SPKDATR, Signed-off-by: Charles Keepax --- utils/tinymix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/tinymix.c b/utils/tinymix.c index 834766b..ff019cd 100644 --- a/utils/tinymix.c +++ b/utils/tinymix.c @@ -185,7 +185,7 @@ static void tinymix_print_enum(struct mixer_ctl *ctl) for (i = 0; i < num_enums; i++) { string = mixer_ctl_get_enum_string(ctl, i); - printf("%s%s", value == i ? ", " : "", string); + printf("%s%s, ", value == i ? "> " : "", string); } } -- cgit v1.2.3