diff options
author | Charles Keepax <ckeepax@opensource.cirrus.com> | 2025-06-24 13:28:41 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2025-06-30 16:04:15 +0100 |
commit | 37d2aa62138daa8ecb6442ae4753704e9c92346f (patch) | |
tree | e851b2ad9c2425dd8c5a628009a9ea17766b09d8 | |
parent | b4515fd87cc9a260ae89fb81ca2aa928d496ac86 (diff) |
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>
-rw-r--r-- | include/sound/sdca_function.h | 9 | ||||
-rw-r--r-- | sound/soc/sdca/sdca_asoc.c | 8 |
2 files changed, 13 insertions, 4 deletions
diff --git a/include/sound/sdca_function.h b/include/sound/sdca_function.h index 856b0f40ce5e..4b278513597e 100644 --- a/include/sound/sdca_function.h +++ b/include/sound/sdca_function.h @@ -320,6 +320,15 @@ enum sdca_selected_mode_range { }; /** + * 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 * * Control Selectors for Security & Privacy Unit from SDCA diff --git a/sound/soc/sdca/sdca_asoc.c b/sound/soc/sdca/sdca_asoc.c index 83911dab73ae..dd7b19083c85 100644 --- a/sound/soc/sdca/sdca_asoc.c +++ b/sound/soc/sdca/sdca_asoc.c @@ -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; |