summaryrefslogtreecommitdiff
path: root/include/sound/sdca_function.h
diff options
context:
space:
mode:
authorCharles Keepax <ckeepax@opensource.cirrus.com>2025-02-05 11:37:57 +0000
committerMark Brown <broonie@kernel.org>2025-02-07 17:34:05 +0000
commit64fb5af1d1bbcf1b808e9bb092b22fa1b691ae63 (patch)
tree39e731fc5403754d435b058a7363228a73c28b2c /include/sound/sdca_function.h
parent42b144cb6a2d87385fa0b124c975d6cf1e3ec630 (diff)
ASoC: SDCA: Add parsing for Control range structures
DisCo/SDCA contains small buffers of data that hold ranges of valid values for the various SDCA Controls. Add support for parsing these from ACPI. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev> Link: https://patch.msgid.link/20250205113801.3699902-7-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.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/sound/sdca_function.h b/include/sound/sdca_function.h
index 64043090fe76..769ae6841064 100644
--- a/include/sound/sdca_function.h
+++ b/include/sound/sdca_function.h
@@ -613,6 +613,18 @@ enum sdca_access_layer {
};
/**
+ * struct sdca_control_range - SDCA Control range table
+ * @cols: Number of columns in the range table.
+ * @rows: Number of rows in the range table.
+ * @data: Array of values contained in the range table.
+ */
+struct sdca_control_range {
+ unsigned int cols;
+ unsigned int rows;
+ u32 *data;
+};
+
+/**
* struct sdca_control - information for one SDCA Control
* @label: Name for the Control, from SDCA Specification v1.0, section 7.1.7.
* @sel: Identifier used for addressing.
@@ -622,6 +634,7 @@ enum sdca_access_layer {
* Control.
* @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.
* @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.
@@ -637,6 +650,7 @@ struct sdca_control {
int interrupt_position;
u64 cn_list;
+ struct sdca_control_range range;
enum sdca_access_mode mode;
u8 layers;