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>
このコミットが含まれているのは:
Mengdong Lin
2015-01-07 10:19:12 +08:00
committed by Mark Brown
コミット ea232b3f72
2個のファイルの変更98行の追加0行の削除

ファイルの表示

@@ -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;