Skip to content

Commit ebbfabc

Browse files
oortcometbroonie
authored andcommitted
ASoC: rt5682: Add CCF usage for providing I2S clks
There is a need to use RT5682 as DAI clock master for other codecs within a platform, which means that the DAI clocks are required to remain, regardless of whether the RT5682 is actually running playback/capture. The RT5682 CCF basic functions are implemented almost by the existing internal functions and asoc apis. It needs a clk provider (rt5682 mclk) to generate the bclk and wclk outputs. The RT5682 CCF supports and restricts as below: 1. Fmt of DAI-AIF1 must be configured to master before using CCF. 2. Only accept a 48MHz clk as the clk provider. 3. Only provide a 48kHz wclk and a set of multiples of wclk as bclk. There are some temporary limitations in this patch until a better implementation. Signed-off-by: Derek Fang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 7036810 commit ebbfabc

File tree

3 files changed

+415
-4
lines changed

3 files changed

+415
-4
lines changed

include/sound/rt5682.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ enum rt5682_jd_src {
2424
RT5682_JD1,
2525
};
2626

27+
enum rt5682_dai_clks {
28+
RT5682_DAI_WCLK_IDX,
29+
RT5682_DAI_BCLK_IDX,
30+
RT5682_DAI_NUM_CLKS,
31+
};
32+
2733
struct rt5682_platform_data {
2834

2935
int ldo1_en; /* GPIO for LDO1_EN */
@@ -32,6 +38,8 @@ struct rt5682_platform_data {
3238
enum rt5682_dmic1_clk_pin dmic1_clk_pin;
3339
enum rt5682_jd_src jd_src;
3440
unsigned int btndet_delay;
41+
42+
const char *dai_clk_names[RT5682_DAI_NUM_CLKS];
3543
};
3644

3745
#endif

0 commit comments

Comments
 (0)