Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 55bf9155 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ASoC: wcd934x: Fix mbhc errors upon removing SND_SOC_WCD934X_MBHC" into msm-4.9

parents 20cba1f6 fc0f6a78
Loading
Loading
Loading
Loading
+35 −0
Original line number Diff line number Diff line
@@ -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);
@@ -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__ */