xref: /linux/sound/soc/qcom/usb_offload_utils.h (revision e47a324d6f07c9ef252cfce1f14cfa5110cbed99)
1 /* SPDX-License-Identifier: GPL-2.0
2  *
3  * Copyright (c) 2022-2025 Qualcomm Innovation Center, Inc. All rights reserved.
4  */
5 #ifndef __QCOM_SND_USB_OFFLOAD_UTILS_H__
6 #define __QCOM_SND_USB_OFFLOAD_UTILS_H__
7 
8 #include <sound/soc.h>
9 
10 #if IS_ENABLED(CONFIG_SND_SOC_QCOM_OFFLOAD_UTILS)
11 int qcom_snd_usb_offload_jack_setup(struct snd_soc_pcm_runtime *rtd,
12 				    struct snd_soc_jack *jack, bool *jack_setup);
13 
14 int qcom_snd_usb_offload_jack_remove(struct snd_soc_pcm_runtime *rtd,
15 				     bool *jack_setup);
16 #else
17 static inline int qcom_snd_usb_offload_jack_setup(struct snd_soc_pcm_runtime *rtd,
18 						  struct snd_soc_jack *jack,
19 						  bool *jack_setup)
20 {
21 	return -ENODEV;
22 }
23 
24 static inline int qcom_snd_usb_offload_jack_remove(struct snd_soc_pcm_runtime *rtd,
25 						   bool *jack_setup)
26 {
27 	return -ENODEV;
28 }
29 #endif /* IS_ENABLED(CONFIG_SND_SOC_QCOM_OFFLOAD_UTILS) */
30 #endif /* __QCOM_SND_USB_OFFLOAD_UTILS_H__ */
31