summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/da7213.h
diff options
context:
space:
mode:
authorAdam Thomson <Adam.Thomson.Opensource@diasemi.com>2016-05-10 16:11:05 +0100
committerMark Brown <broonie@kernel.org>2016-05-10 19:24:19 +0100
commitd575b0b0f01a805508c5cf48b540f004e9b5de07 (patch)
tree823dd5f75ad5728872306deeada77d9d7146e994 /sound/soc/codecs/da7213.h
parenta0d5caeaebfd00853efa0080afc850e10be7b39a (diff)
downloadlinux-d575b0b0f01a805508c5cf48b540f004e9b5de07.tar.bz2
ASoC: da7213: Add checking of SRM lock status before enabling DAI
When the codec is DAI clk slave, and the SRM feature of the PLL is being used, the enabling of the DAI should occur only after the PLL has locked to the incoming WCLK. This update adds checking to the the DAI widget event, so it waits for SRM to lock. There is also a timeout if that lock doesn't occur within a given time. Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/da7213.h')
-rw-r--r--sound/soc/codecs/da7213.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/soc/codecs/da7213.h b/sound/soc/codecs/da7213.h
index 5de5c2997e0c..af75340dea63 100644
--- a/sound/soc/codecs/da7213.h
+++ b/sound/soc/codecs/da7213.h
@@ -142,6 +142,9 @@
* Bit fields
*/
+/* DA7213_PLL_STATUS = 0x03 */
+#define DA7219_PLL_SRM_LOCK (0x1 << 1)
+
/* DA7213_SR = 0x22 */
#define DA7213_SR_8000 (0x1 << 0)
#define DA7213_SR_11025 (0x2 << 0)
@@ -502,6 +505,7 @@
#define DA7213_PLL_INDIV_10_20_MHZ_VAL 4
#define DA7213_PLL_INDIV_20_40_MHZ_VAL 8
#define DA7213_PLL_INDIV_40_54_MHZ_VAL 16
+#define DA7213_SRM_CHECK_RETRIES 8
enum da7213_clk_src {
DA7213_CLKSRC_MCLK = 0,