summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/da7219.h
diff options
context:
space:
mode:
authorAdam Thomson <Adam.Thomson.Opensource@diasemi.com>2017-06-19 10:56:33 +0100
committerMark Brown <broonie@kernel.org>2017-06-19 16:39:15 +0100
commit2a0c2189d8170d52da64543cbf955f0908c15e70 (patch)
treebc4dbaf82523eaa0f01a92f74f3e41eac04fe7b3 /sound/soc/codecs/da7219.h
parent2ea659a9ef488125eb46da6eb571de5eae5c43f6 (diff)
downloadlinux-2a0c2189d8170d52da64543cbf955f0908c15e70.tar.bz2
ASoC: da7219: Fix HP detection procedure for all MCLK frequencies
Currently when HP detection procedure runs for certain MCLK frequencies, when PLL is bypassed, the procedure will incorrectly report Lineout instead of Headphones due to timing incosistencies. To avoid this problem, the PLL is temporarily enabled (if currently bypassed and MCLK present) to provide consistent timings for the procedure, regardless of MCLK frequency. Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> Acked-by: Sathyanarayana Nujella <sathyanarayana.nujella@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/da7219.h')
-rw-r--r--sound/soc/codecs/da7219.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/soc/codecs/da7219.h b/sound/soc/codecs/da7219.h
index 6baba7455fa1..8d6c3c8c8026 100644
--- a/sound/soc/codecs/da7219.h
+++ b/sound/soc/codecs/da7219.h
@@ -810,7 +810,8 @@ struct da7219_priv {
bool wakeup_source;
struct regulator_bulk_data supplies[DA7219_NUM_SUPPLIES];
struct regmap *regmap;
- struct mutex lock;
+ struct mutex ctrl_lock;
+ struct mutex pll_lock;
struct clk *mclk;
unsigned int mclk_rate;
@@ -821,4 +822,6 @@ struct da7219_priv {
u8 gain_ramp_ctrl;
};
+int da7219_set_pll(struct snd_soc_codec *codec, int source, unsigned int fout);
+
#endif /* __DA7219_H */