aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Keepax <ckeepax@opensource.cirrus.com>2017-09-08 16:58:20 +0100
committerCharles Keepax <ckeepax@opensource.cirrus.com>2018-04-11 15:57:52 +0100
commitf8f7ef29b2095621263c748efd7570091d8dcc51 (patch)
tree7b6f8e046a18360fb9adaa4485a16a15d438c5c7
parent9ed7df6bea6e996b7ff2e0d22898425f2ae0feee (diff)
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 <ckeepax@opensource.cirrus.com>
-rw-r--r--utils/tinymix.c2
1 files changed, 1 insertions, 1 deletions
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);
}
}