ASoC: SDCA: Minor selected/detected mode control fixups

Make the names a slightly better match for the specification and add
some constants for the values rather than hard coding.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Link: https://patch.msgid.link/20250624122844.2761627-5-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Charles Keepax 2025-06-24 13:28:41 +01:00 committed by Mark Brown
parent b4515fd87c
commit 37d2aa6213
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
2 changed files with 13 additions and 4 deletions

View File

@ -319,6 +319,15 @@ enum sdca_selected_mode_range {
SDCA_SELECTED_MODE_NCOLS = 2,
};
/**
* enum sdca_detected_mode_values - Predefined GE Detected Mode values
*/
enum sdca_detected_mode_values {
SDCA_DETECTED_MODE_JACK_UNPLUGGED = 0,
SDCA_DETECTED_MODE_JACK_UNKNOWN = 1,
SDCA_DETECTED_MODE_DETECTION_IN_PROGRESS = 2,
};
/**
* enum sdca_spe_controls - SDCA Controls for Security & Privacy Unit
*

View File

@ -246,12 +246,12 @@ static int entity_early_parse_ge(struct device *dev,
if (!values)
return -ENOMEM;
texts[0] = "No Jack";
texts[0] = "Jack Unplugged";
texts[1] = "Jack Unknown";
texts[2] = "Detection in Progress";
values[0] = 0;
values[1] = 1;
values[2] = 2;
values[0] = SDCA_DETECTED_MODE_JACK_UNPLUGGED;
values[1] = SDCA_DETECTED_MODE_JACK_UNKNOWN;
values[2] = SDCA_DETECTED_MODE_DETECTION_IN_PROGRESS;
for (i = 0; i < range->rows; i++) {
enum sdca_terminal_type type;