Loading sound/soc/codecs/wcd934x/wcd934x-mbhc.h +35 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ struct wcd934x_mbhc { bool is_hph_recover; }; #ifdef CONFIG_SND_SOC_WCD934X_MBHC extern int tavil_mbhc_init(struct wcd934x_mbhc **mbhc, struct snd_soc_codec *codec, struct fw_info *fw_data); Loading @@ -46,4 +47,38 @@ extern int tavil_mbhc_post_ssr_init(struct wcd934x_mbhc *mbhc, struct snd_soc_codec *codec); extern int tavil_mbhc_get_impedance(struct wcd934x_mbhc *wcd934x_mbhc, uint32_t *zl, uint32_t *zr); #else static inline int tavil_mbhc_init(struct wcd934x_mbhc **mbhc, struct snd_soc_codec *codec, struct fw_info *fw_data) { return 0; } static inline void tavil_mbhc_hs_detect_exit(struct snd_soc_codec *codec) { } static inline int tavil_mbhc_hs_detect(struct snd_soc_codec *codec, struct wcd_mbhc_config *mbhc_cfg) { return 0; } static inline void tavil_mbhc_deinit(struct snd_soc_codec *codec) { } static inline int tavil_mbhc_post_ssr_init(struct wcd934x_mbhc *mbhc, struct snd_soc_codec *codec) { return 0; } static inline int tavil_mbhc_get_impedance(struct wcd934x_mbhc *wcd934x_mbhc, uint32_t *zl, uint32_t *zr) { if (zl) *zl = 0; if (zr) *zr = 0; return -EINVAL; } #endif #endif /* __WCD934X_MBHC_H__ */ Loading
sound/soc/codecs/wcd934x/wcd934x-mbhc.h +35 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ struct wcd934x_mbhc { bool is_hph_recover; }; #ifdef CONFIG_SND_SOC_WCD934X_MBHC extern int tavil_mbhc_init(struct wcd934x_mbhc **mbhc, struct snd_soc_codec *codec, struct fw_info *fw_data); Loading @@ -46,4 +47,38 @@ extern int tavil_mbhc_post_ssr_init(struct wcd934x_mbhc *mbhc, struct snd_soc_codec *codec); extern int tavil_mbhc_get_impedance(struct wcd934x_mbhc *wcd934x_mbhc, uint32_t *zl, uint32_t *zr); #else static inline int tavil_mbhc_init(struct wcd934x_mbhc **mbhc, struct snd_soc_codec *codec, struct fw_info *fw_data) { return 0; } static inline void tavil_mbhc_hs_detect_exit(struct snd_soc_codec *codec) { } static inline int tavil_mbhc_hs_detect(struct snd_soc_codec *codec, struct wcd_mbhc_config *mbhc_cfg) { return 0; } static inline void tavil_mbhc_deinit(struct snd_soc_codec *codec) { } static inline int tavil_mbhc_post_ssr_init(struct wcd934x_mbhc *mbhc, struct snd_soc_codec *codec) { return 0; } static inline int tavil_mbhc_get_impedance(struct wcd934x_mbhc *wcd934x_mbhc, uint32_t *zl, uint32_t *zr) { if (zl) *zl = 0; if (zr) *zr = 0; return -EINVAL; } #endif #endif /* __WCD934X_MBHC_H__ */