summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/rt5670.h
diff options
context:
space:
mode:
authorMengdong Lin <mengdong.lin@intel.com>2015-01-07 10:19:12 +0800
committerMark Brown <broonie@kernel.org>2015-03-02 16:19:46 +0000
commitea232b3f7233f9242e5a1287377fedb6972dfea4 (patch)
tree419e013da85452004f200ef4bcc0113a833a43e0 /sound/soc/codecs/rt5670.h
parent3aebec3a701e70d6fe2816891e5abea066492779 (diff)
downloadlinux-ea232b3f7233f9242e5a1287377fedb6972dfea4.tar.bz2
ASoC: rt5670: add API to select ASRC clock source
When codec is in slave mode, ASRC can suppress noise for asynchronous MCLK and LRCLK or special I2S format. This patch defines an API to select the clock source for specified filters. And the codec driver will turn on ASRC for these filters if ASRC is selected as their clock source. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mengdong Lin <mengdong.lin@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/rt5670.h')
-rw-r--r--sound/soc/codecs/rt5670.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/sound/soc/codecs/rt5670.h b/sound/soc/codecs/rt5670.h
index 82553b1726cd..0a67adbcfbc3 100644
--- a/sound/soc/codecs/rt5670.h
+++ b/sound/soc/codecs/rt5670.h
@@ -1969,6 +1969,21 @@ enum {
RT5670_DMIC_DATA_GPIO5,
};
+/* filter mask */
+enum {
+ RT5670_DA_STEREO_FILTER = 0x1,
+ RT5670_DA_MONO_L_FILTER = (0x1 << 1),
+ RT5670_DA_MONO_R_FILTER = (0x1 << 2),
+ RT5670_AD_STEREO_FILTER = (0x1 << 3),
+ RT5670_AD_MONO_L_FILTER = (0x1 << 4),
+ RT5670_AD_MONO_R_FILTER = (0x1 << 5),
+ RT5670_UP_RATE_FILTER = (0x1 << 6),
+ RT5670_DOWN_RATE_FILTER = (0x1 << 7),
+};
+
+int rt5670_sel_asrc_clk_src(struct snd_soc_codec *codec,
+ unsigned int filter_mask, unsigned int clk_src);
+
struct rt5670_priv {
struct snd_soc_codec *codec;
struct rt5670_platform_data pdata;