xref: /linux/include/sound/sdca_jack.h (revision 0432fe32c129780f89fd5426059cb1ddd8e50858)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * The MIPI SDCA specification is available for public downloads at
4  * https://www.mipi.org/mipi-sdca-v1-0-download
5  *
6  * Copyright (C) 2025 Cirrus Logic, Inc. and
7  *                    Cirrus Logic International Semiconductor Ltd.
8  */
9 
10 #ifndef __SDCA_JACK_H__
11 #define __SDCA_JACK_H__
12 
13 struct sdca_interrupt;
14 struct snd_kcontrol;
15 struct snd_soc_jack;
16 
17 /**
18  * struct jack_state - Jack state structure to keep data between interrupts
19  * @kctl: Pointer to the ALSA control attached to this jack
20  * @jack: Pointer to the ASoC jack struct for this jack
21  */
22 struct jack_state {
23 	struct snd_kcontrol *kctl;
24 	struct snd_soc_jack *jack;
25 };
26 
27 int sdca_jack_alloc_state(struct sdca_interrupt *interrupt);
28 int sdca_jack_process(struct sdca_interrupt *interrupt);
29 int sdca_jack_set_jack(struct sdca_interrupt_info *info, struct snd_soc_jack *jack);
30 int sdca_jack_report(struct sdca_interrupt *interrupt);
31 
32 #endif // __SDCA_JACK_H__
33