diff options
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/codecs/tlv320aic3x.c | 6 | ||||
-rw-r--r-- | sound/soc/codecs/tlv320aic3x.h | 8 |
2 files changed, 14 insertions, 0 deletions
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c index 0d2f8c44999d..b94f81ffed34 100644 --- a/sound/soc/codecs/tlv320aic3x.c +++ b/sound/soc/codecs/tlv320aic3x.c | |||
@@ -1002,6 +1002,12 @@ static int aic3x_set_dai_sysclk(struct snd_soc_dai *codec_dai, | |||
1002 | struct snd_soc_codec *codec = codec_dai->codec; | 1002 | struct snd_soc_codec *codec = codec_dai->codec; |
1003 | struct aic3x_priv *aic3x = snd_soc_codec_get_drvdata(codec); | 1003 | struct aic3x_priv *aic3x = snd_soc_codec_get_drvdata(codec); |
1004 | 1004 | ||
1005 | /* set clock on MCLK or GPIO2 or BCLK */ | ||
1006 | snd_soc_update_bits(codec, AIC3X_CLKGEN_CTRL_REG, PLLCLK_IN_MASK, | ||
1007 | clk_id << PLLCLK_IN_SHIFT); | ||
1008 | snd_soc_update_bits(codec, AIC3X_CLKGEN_CTRL_REG, CLKDIV_IN_MASK, | ||
1009 | clk_id << CLKDIV_IN_SHIFT); | ||
1010 | |||
1005 | aic3x->sysclk = freq; | 1011 | aic3x->sysclk = freq; |
1006 | return 0; | 1012 | return 0; |
1007 | } | 1013 | } |
diff --git a/sound/soc/codecs/tlv320aic3x.h b/sound/soc/codecs/tlv320aic3x.h index 5da5eb3f4cc0..149338b254f6 100644 --- a/sound/soc/codecs/tlv320aic3x.h +++ b/sound/soc/codecs/tlv320aic3x.h | |||
@@ -195,6 +195,14 @@ | |||
195 | #define PLL_CLKIN_SHIFT 4 | 195 | #define PLL_CLKIN_SHIFT 4 |
196 | #define MCLK_SOURCE 0x0 | 196 | #define MCLK_SOURCE 0x0 |
197 | #define PLL_CLKDIV_SHIFT 0 | 197 | #define PLL_CLKDIV_SHIFT 0 |
198 | #define PLLCLK_IN_MASK 0x30 | ||
199 | #define PLLCLK_IN_SHIFT 4 | ||
200 | #define CLKDIV_IN_MASK 0xc0 | ||
201 | #define CLKDIV_IN_SHIFT 6 | ||
202 | /* clock in source */ | ||
203 | #define CLKIN_MCLK 0 | ||
204 | #define CLKIN_GPIO2 1 | ||
205 | #define CLKIN_BCLK 2 | ||
198 | 206 | ||
199 | /* Software reset register bits */ | 207 | /* Software reset register bits */ |
200 | #define SOFT_RESET 0x80 | 208 | #define SOFT_RESET 0x80 |