From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: broonie@kernel.org
Cc: lgirdwood@gmail.com, linux-sound@vger.kernel.org,
patches@opensource.cirrus.com, yung-chuan.liao@linux.intel.com,
pierre-louis.bossart@linux.dev, peter.ujfalusi@linux.intel.com
Subject: [PATCH 4/7] ASoC: SDCA: Minor selected/detected mode control fixups
Date: Mon, 9 Jun 2025 13:39:33 +0100 [thread overview]
Message-ID: <20250609123936.292827-5-ckeepax@opensource.cirrus.com> (raw)
In-Reply-To: <20250609123936.292827-1-ckeepax@opensource.cirrus.com>
Make the names a slightly better match for the specification and add
some constants for the values rather than hard coding.
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
---
include/sound/sdca_function.h | 9 +++++++++
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 eaedb54a83227..e5166583d2581 100644
--- a/include/sound/sdca_function.h
+++ b/include/sound/sdca_function.h
@@ -318,6 +318,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
*
diff --git a/sound/soc/sdca/sdca_asoc.c b/sound/soc/sdca/sdca_asoc.c
index 83911dab73ae2..dd7b19083c85f 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;
--
2.39.5
next prev parent reply other threads:[~2025-06-09 12:40 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-09 12:39 [PATCH 0/7] Add SDCA IRQ support and some misc fixups Charles Keepax
2025-06-09 12:39 ` [PATCH 1/7] MAINTAINERS: Add SDCA maintainers entry Charles Keepax
2025-06-09 12:39 ` [PATCH 2/7] ASoC: SDCA: Add missing default in switch in entity_pde_event() Charles Keepax
2025-06-09 12:39 ` [PATCH 3/7] ASoC: SDCA: Fixup some kernel doc errors Charles Keepax
2025-06-09 12:39 ` Charles Keepax [this message]
2025-06-09 12:39 ` [PATCH 5/7] ASoC: SDCA: Add flag for unused IRQs Charles Keepax
2025-06-09 12:39 ` [PATCH 6/7] ASoC: SDCA: Generic interrupt support Charles Keepax
2025-06-10 8:52 ` Pierre-Louis Bossart
2025-06-10 10:21 ` Charles Keepax
2025-06-10 17:55 ` Pierre-Louis Bossart
2025-06-17 9:30 ` Charles Keepax
2025-06-26 11:47 ` Pierre-Louis Bossart
2025-06-09 12:39 ` [PATCH 7/7] ASoC: SDCA: Add some initial IRQ handlers Charles Keepax
2025-06-10 9:07 ` Pierre-Louis Bossart
2025-06-10 12:26 ` Mark Brown
2025-06-10 12:29 ` Charles Keepax
2025-06-10 1:32 ` [PATCH 0/7] Add SDCA IRQ support and some misc fixups Liao, Bard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250609123936.292827-5-ckeepax@opensource.cirrus.com \
--to=ckeepax@opensource.cirrus.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-sound@vger.kernel.org \
--cc=patches@opensource.cirrus.com \
--cc=peter.ujfalusi@linux.intel.com \
--cc=pierre-louis.bossart@linux.dev \
--cc=yung-chuan.liao@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox