summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2026-05-04 16:24:44 +0300
committerMark Brown <broonie@kernel.org>2026-05-04 16:24:44 +0300
commit50c2f0f086641fb96d4eb67a559ee18d441355b6 (patch)
tree5ac4e8f0414194894d951d05e970fae19f4b24e0 /include
parent0773ee1706036706be5330172d0ec4db563165d7 (diff)
parent250922577ed16c29b994197b84a231dcbe7798e8 (diff)
downloadlinux-50c2f0f086641fb96d4eb67a559ee18d441355b6.tar.xz
ASoC: Improve SDCA support for duplicated features
Charles Keepax <ckeepax@opensource.cirrus.com> says: There are some short comings of the current SDCA class driver with respect to duplicated functions and jacks. Fix some issues in the reporting of jacks when there are multiple jacks represented in the SDCA topology. When a single device contains multiple instances of the same type of SDCA function the current class driver will create duplicate controls, update the code to fix this. Finally whilst working through this also tidy up the handling of the sdca_function_desc pointers as it turns out some duplication has crept into the code on that front.
Diffstat (limited to 'include')
-rw-r--r--include/sound/sdca.h4
-rw-r--r--include/sound/sdca_function.h1
-rw-r--r--include/sound/sdca_jack.h3
3 files changed, 7 insertions, 1 deletions
diff --git a/include/sound/sdca.h b/include/sound/sdca.h
index 67ff3c88705d..2bdf4e333e04 100644
--- a/include/sound/sdca.h
+++ b/include/sound/sdca.h
@@ -26,6 +26,8 @@ struct sdca_dev;
* @name: Human-readable string.
* @type: Function topology type.
* @adr: ACPI address (used for SDCA register access).
+ * @duplicate: Internal flag to indicate if other functions of the same type
+ * exist.
*/
struct sdca_function_desc {
struct fwnode_handle *node;
@@ -33,6 +35,8 @@ struct sdca_function_desc {
const char *name;
u32 type;
u8 adr;
+
+ bool duplicate;
};
/**
diff --git a/include/sound/sdca_function.h b/include/sound/sdca_function.h
index 0e871c786513..b1489178b0ef 100644
--- a/include/sound/sdca_function.h
+++ b/include/sound/sdca_function.h
@@ -1452,7 +1452,6 @@ static inline u32 sdca_range_search(struct sdca_control_range *range,
}
int sdca_parse_function(struct device *dev, struct sdw_slave *sdw,
- struct sdca_function_desc *desc,
struct sdca_function_data *function);
const char *sdca_find_terminal_name(enum sdca_terminal_type type);
diff --git a/include/sound/sdca_jack.h b/include/sound/sdca_jack.h
index 3ec22046d3eb..181541f0f4d8 100644
--- a/include/sound/sdca_jack.h
+++ b/include/sound/sdca_jack.h
@@ -18,10 +18,13 @@ struct snd_soc_jack;
* struct jack_state - Jack state structure to keep data between interrupts
* @kctl: Pointer to the ALSA control attached to this jack
* @jack: Pointer to the ASoC jack struct for this jack
+ * @mask: Possible reported jack status bits for this jack
*/
struct jack_state {
struct snd_kcontrol *kctl;
struct snd_soc_jack *jack;
+
+ unsigned int mask;
};
int sdca_jack_alloc_state(struct sdca_interrupt *interrupt);