xref: /linux/include/sound/sdca_jack.h (revision c17ee635fd3a482b2ad2bf5e269755c2eae5f25e)
13addd63dSCharles Keepax /* SPDX-License-Identifier: GPL-2.0 */
23addd63dSCharles Keepax /*
33addd63dSCharles Keepax  * The MIPI SDCA specification is available for public downloads at
43addd63dSCharles Keepax  * https://www.mipi.org/mipi-sdca-v1-0-download
53addd63dSCharles Keepax  *
63addd63dSCharles Keepax  * Copyright (C) 2025 Cirrus Logic, Inc. and
73addd63dSCharles Keepax  *                    Cirrus Logic International Semiconductor Ltd.
83addd63dSCharles Keepax  */
93addd63dSCharles Keepax 
103addd63dSCharles Keepax #ifndef __SDCA_JACK_H__
113addd63dSCharles Keepax #define __SDCA_JACK_H__
123addd63dSCharles Keepax 
133addd63dSCharles Keepax struct sdca_interrupt;
143addd63dSCharles Keepax struct snd_kcontrol;
15*82e12800SCharles Keepax struct snd_soc_jack;
163addd63dSCharles Keepax 
173addd63dSCharles Keepax /**
183addd63dSCharles Keepax  * struct jack_state - Jack state structure to keep data between interrupts
193addd63dSCharles Keepax  * @kctl: Pointer to the ALSA control attached to this jack
20*82e12800SCharles Keepax  * @jack: Pointer to the ASoC jack struct for this jack
213addd63dSCharles Keepax  */
223addd63dSCharles Keepax struct jack_state {
233addd63dSCharles Keepax 	struct snd_kcontrol *kctl;
24*82e12800SCharles Keepax 	struct snd_soc_jack *jack;
253addd63dSCharles Keepax };
263addd63dSCharles Keepax 
273addd63dSCharles Keepax int sdca_jack_alloc_state(struct sdca_interrupt *interrupt);
283addd63dSCharles Keepax int sdca_jack_process(struct sdca_interrupt *interrupt);
29*82e12800SCharles Keepax int sdca_jack_set_jack(struct sdca_interrupt_info *info, struct snd_soc_jack *jack);
30*82e12800SCharles Keepax int sdca_jack_report(struct sdca_interrupt *interrupt);
313addd63dSCharles Keepax 
323addd63dSCharles Keepax #endif // __SDCA_JACK_H__
33