summaryrefslogtreecommitdiff
path: root/include/sound
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2025-12-22 22:41:23 +0300
committerMark Brown <broonie@kernel.org>2025-12-22 22:41:23 +0300
commite9af75df38cd7eb037feca29418d30f92fa4cf7f (patch)
treea56a5582fb015180589c09dc2a634fa4d1ca3e39 /include/sound
parent0bd4b0f583e2a318441fa88ea71b3d7530ecb646 (diff)
parent99a3ef1e81cd1775bc1f8cc2ad188b1fc755d5cd (diff)
downloadlinux-e9af75df38cd7eb037feca29418d30f92fa4cf7f.tar.xz
SDCA Jack Fixups
Merge series from Charles Keepax <ckeepax@opensource.cirrus.com>: Some fixups to the jack handling, adding some necessary hooks to connect things with the machine driver. I have split these out from the system suspend chain as that has been generating a fair amount of discussion and getting these 3 merged is far more important to get basic functionality working smoothly. I will do a spin of the system suspend stuff soon, if either no new comments pop up, or we reach some consensus on how to proceed.
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/sdca_jack.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/include/sound/sdca_jack.h b/include/sound/sdca_jack.h
new file mode 100644
index 000000000000..3ec22046d3eb
--- /dev/null
+++ b/include/sound/sdca_jack.h
@@ -0,0 +1,32 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * The MIPI SDCA specification is available for public downloads at
+ * https://www.mipi.org/mipi-sdca-v1-0-download
+ *
+ * Copyright (C) 2025 Cirrus Logic, Inc. and
+ * Cirrus Logic International Semiconductor Ltd.
+ */
+
+#ifndef __SDCA_JACK_H__
+#define __SDCA_JACK_H__
+
+struct sdca_interrupt;
+struct snd_kcontrol;
+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
+ */
+struct jack_state {
+ struct snd_kcontrol *kctl;
+ struct snd_soc_jack *jack;
+};
+
+int sdca_jack_alloc_state(struct sdca_interrupt *interrupt);
+int sdca_jack_process(struct sdca_interrupt *interrupt);
+int sdca_jack_set_jack(struct sdca_interrupt_info *info, struct snd_soc_jack *jack);
+int sdca_jack_report(struct sdca_interrupt *interrupt);
+
+#endif // __SDCA_JACK_H__