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

Commit b5809c90 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"

parents d2932199 39651d17
Loading
Loading
Loading
Loading
+36 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
 * Copyright (c) 2015-2017, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -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,6 +47,40 @@ 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__ */