summaryrefslogtreecommitdiff
path: root/include/sound/sdca_function.h
diff options
context:
space:
mode:
authorCharles Keepax <ckeepax@opensource.cirrus.com>2025-03-12 17:22:03 +0000
committerMark Brown <broonie@kernel.org>2025-03-16 23:27:56 +0000
commit2a4667f3d589524bd2fbfe4f7dc0e2f12b832e10 (patch)
tree90ef77f77c56e0c82333285a3cc9fe3327c484ae /include/sound/sdca_function.h
parent49680c9f13b64c13e79e1312c7616d0ab9775e4a (diff)
ASoC: SDCA: Add type flag for Controls
SDCA Controls come in a variety of data formats, to simplify later parsing work out this data type as the control is parsed and stash it for later use. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20250312172205.4152686-5-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/sound/sdca_function.h')
-rw-r--r--include/sound/sdca_function.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/include/sound/sdca_function.h b/include/sound/sdca_function.h
index f001ab643fed..ca0376903e87 100644
--- a/include/sound/sdca_function.h
+++ b/include/sound/sdca_function.h
@@ -601,6 +601,27 @@ enum sdca_entity0_controls {
#define SDCA_CTL_DEVICE_SDCA_VERSION_NAME "Device SDCA Version"
/**
+ * enum sdca_control_datatype - SDCA Control Data Types
+ *
+ * Data Types as described in the SDCA specification v1.0 section
+ * 7.3.
+ */
+enum sdca_control_datatype {
+ SDCA_CTL_DATATYPE_ONEBIT,
+ SDCA_CTL_DATATYPE_INTEGER,
+ SDCA_CTL_DATATYPE_SPEC_ENCODED_VALUE,
+ SDCA_CTL_DATATYPE_BCD,
+ SDCA_CTL_DATATYPE_Q7P8DB,
+ SDCA_CTL_DATATYPE_BYTEINDEX,
+ SDCA_CTL_DATATYPE_POSTURENUMBER,
+ SDCA_CTL_DATATYPE_DP_INDEX,
+ SDCA_CTL_DATATYPE_BITINDEX,
+ SDCA_CTL_DATATYPE_BITMAP,
+ SDCA_CTL_DATATYPE_GUID,
+ SDCA_CTL_DATATYPE_IMPDEF,
+};
+
+/**
* enum sdca_access_mode - SDCA Control access mode
*
* Access modes as described in the SDCA specification v1.0 section
@@ -653,6 +674,7 @@ struct sdca_control_range {
* @cn_list: A bitmask showing the valid Control Numbers within this Control,
* Control Numbers typically represent channels.
* @range: Buffer describing valid range of values for the Control.
+ * @type: Format of the data in the Control.
* @mode: Access mode of the Control.
* @layers: Bitmask of access layers of the Control.
* @deferrable: Indicates if the access to the Control can be deferred.
@@ -669,6 +691,7 @@ struct sdca_control {
u64 cn_list;
struct sdca_control_range range;
+ enum sdca_control_datatype type;
enum sdca_access_mode mode;
u8 layers;