From dece0d8975fc4d7013c7b18643a14eaab0a266b6 Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Thu, 19 Feb 2015 21:32:43 -0500 Subject: [PATCH] s1245: Textual descriptions of tone curves. --- backend_shinkos1245.c | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/backend_shinkos1245.c b/backend_shinkos1245.c index b990940..990a957 100644 --- a/backend_shinkos1245.c +++ b/backend_shinkos1245.c @@ -805,6 +805,41 @@ static char *shinkos1245_status_str(struct shinkos1245_resp_status *resp) } } +static char* shinkos1245_tonecurves(int type, int table) +{ + switch (type) { + case TONE_TABLE_STANDARD: + switch (table) { + case PARAM_TABLE_STANDARD: + return "Standard/Standard"; + case PARAM_TABLE_FINE: + return "Standard/Fine"; + default: + return "Standard/Unknown"; + } + case TONE_TABLE_USER: + switch (table) { + case PARAM_TABLE_STANDARD: + return "User/Standard"; + case PARAM_TABLE_FINE: + return "User/Fine"; + default: + return "User/Unknown"; + } + case TONE_TABLE_CURRENT: + switch (table) { + case PARAM_TABLE_STANDARD: + return "Current/Standard"; + case PARAM_TABLE_FINE: + return "Current/Fine"; + default: + return "Current/Unknown"; + } + default: + return "Unknown"; + } +} + static void shinkos1245_dump_status(struct shinkos1245_resp_status *sts) { char *detail; @@ -893,7 +928,7 @@ static int get_tonecurve(struct shinkos1245_ctx *ctx, int type, int table, char struct shinkos1245_cmd_tone cmd; struct shinkos1245_resp_status resp; - INFO("Dump %d/%d Tone Curve to '%s'\n", type, table, fname); // XXX + INFO("Dump %s Tone Curve to '%s'\n", shinkos1245_tonecurves(type, table), fname); /* Issue a tone_read_start */ shinkos1245_fill_hdr(&cmd.hdr);