summaryrefslogtreecommitdiff
path: root/include/sound/sdca.h
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2025-02-10 13:06:28 +0000
committerMark Brown <broonie@kernel.org>2025-02-10 13:06:28 +0000
commitd1541caab053cf94b114582a23b51a8cb90f4a46 (patch)
treed6714b06895a4764afc0440933cd84d8daf69374 /include/sound/sdca.h
parent3c331bdeececb629669961a80c0f929301c088d2 (diff)
parent9da195880f167ab7c2d595388decf783c9920121 (diff)
Add SDCA DisCo parsing support
Merge series from Charles Keepax <ckeepax@opensource.cirrus.com>: The MIPI SoundWire Device Class for Audio (SDCA) specification defines most details of the hardware in ACPI using the MIPI Discovery and Configuration (DisCo) specification. This patch chain adds support for parsing most of this information into the kernel such that future work can make use of it to construct CODEC devices and soundcards. The most notable outstanding work here, is parsing the separate properties for the Control Numbers (roughly equivalent to channels) within an individual Control. The separate Control Numbers are supported but currently only the scheme were a single default etc. is supplied for all. This should not be super hard to add in the future but isn't currently required by any of the hardware I am working to support.
Diffstat (limited to 'include/sound/sdca.h')
-rw-r--r--include/sound/sdca.h22
1 files changed, 12 insertions, 10 deletions
diff --git a/include/sound/sdca.h b/include/sound/sdca.h
index 973252d0adac..5a5d6de78d72 100644
--- a/include/sound/sdca.h
+++ b/include/sound/sdca.h
@@ -17,29 +17,31 @@ struct sdw_slave;
#define SDCA_MAX_FUNCTION_COUNT 8
/**
- * sdca_device_desc - short descriptor for an SDCA Function
- * @adr: ACPI address (used for SDCA register access)
- * @type: Function topology type
- * @name: human-readable string
+ * struct sdca_function_desc - short descriptor for an SDCA Function
+ * @node: firmware node for the Function.
+ * @name: Human-readable string.
+ * @type: Function topology type.
+ * @adr: ACPI address (used for SDCA register access).
*/
struct sdca_function_desc {
+ struct fwnode_handle *node;
const char *name;
u32 type;
u8 adr;
};
/**
- * sdca_device_data - structure containing all SDCA related information
- * @sdca_interface_revision: value read from _DSD property, mainly to check
- * for changes between silicon versions
- * @num_functions: total number of supported SDCA functions. Invalid/unsupported
+ * struct sdca_device_data - structure containing all SDCA related information
+ * @interface_revision: Value read from _DSD property, mainly to check
+ * for changes between silicon versions.
+ * @num_functions: Total number of supported SDCA functions. Invalid/unsupported
* functions will be skipped.
- * @sdca_func: array of function descriptors
+ * @function: Array of function descriptors.
*/
struct sdca_device_data {
u32 interface_revision;
int num_functions;
- struct sdca_function_desc sdca_func[SDCA_MAX_FUNCTION_COUNT];
+ struct sdca_function_desc function[SDCA_MAX_FUNCTION_COUNT];
};
enum sdca_quirk {