diff options
author | Mark Brown <broonie@kernel.org> | 2025-07-16 18:33:28 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2025-07-16 18:33:28 +0100 |
commit | da863e772ece95bcdf4f010bcd8ee1bd404d51c5 (patch) | |
tree | fa481fc4648b42b4ac94138449a4f8f3694898e1 /include/sound/sdca_function.h | |
parent | 03aa2ed9e187e42f25b3871b691d535fc19156c4 (diff) | |
parent | 4ed357f72a0e0a691304e5f14a3323811c8ce862 (diff) |
Add SDCA DAI ops helpers
Merge series from Charles Keepax <ckeepax@opensource.cirrus.com>:
First, a couple of minor code fixups to already submitted code. Then
some patches to add new DAI ops helpers for the SDCA stuff, these allow
configuring things like the sample rate and finding out which SoundWire
port should be used for a specific SDCA streaming input/output terminal.
Still a few bits of outstanding work here (propogation of Cluster
information particularly) but his should be good enough to get some
basic use-cases working.
Hopefully we are getting fairly close to completing a first version of
the SDCA work now. Should be one more series to add FDL (firmware
downloading), then we should be able to send a first version of the
actual SDCA class driver itself.
Diffstat (limited to 'include/sound/sdca_function.h')
-rw-r--r-- | include/sound/sdca_function.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/include/sound/sdca_function.h b/include/sound/sdca_function.h index b4a97ff08729..90d77fc46416 100644 --- a/include/sound/sdca_function.h +++ b/include/sound/sdca_function.h @@ -186,6 +186,14 @@ enum sdca_usage_range { }; /** + * enum sdca_dataport_selector_range - Column definitions for DataPort_Selector + */ +enum sdca_dataport_selector_range { + SDCA_DATAPORT_SELECTOR_NCOLS = 16, + SDCA_DATAPORT_SELECTOR_NROWS = 4, +}; + +/** * enum sdca_mu_controls - SDCA Controls for Mixer Unit * * Control Selectors for Mixer Unit from SDCA specification v1.0 @@ -1269,6 +1277,15 @@ struct sdca_cluster { }; /** + * enum sdca_cluster_range - SDCA Range column definitions for ClusterIndex + */ +enum sdca_cluster_range { + SDCA_CLUSTER_BYTEINDEX = 0, + SDCA_CLUSTER_CLUSTERID = 1, + SDCA_CLUSTER_NCOLS = 2, +}; + +/** * struct sdca_function_data - top-level information for one SDCA function * @desc: Pointer to short descriptor from initial parsing. * @init_table: Pointer to a table of initialization writes. @@ -1316,4 +1333,18 @@ int sdca_parse_function(struct device *dev, struct sdca_function_desc *desc, struct sdca_function_data *function); +struct sdca_control *sdca_selector_find_control(struct device *dev, + struct sdca_entity *entity, + const int sel); +struct sdca_control_range *sdca_control_find_range(struct device *dev, + struct sdca_entity *entity, + struct sdca_control *control, + int cols, int rows); +struct sdca_control_range *sdca_selector_find_range(struct device *dev, + struct sdca_entity *entity, + int sel, int cols, int rows); +struct sdca_cluster *sdca_id_find_cluster(struct device *dev, + struct sdca_function_data *function, + const int id); + #endif |