Skip to content

Commit 3ac1b2e

Browse files
bardliaobroonie
authored andcommitted
ASoC: rt5682: add default pdata for i2s mode
Add a default pdata which can fit most HW design. So we don't need to add a lot of DMI checking in this driver. Signed-off-by: Bard liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 9019ab1 commit 3ac1b2e

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

sound/soc/codecs/rt5682.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ static const char *rt5682_supply_names[RT5682_NUM_SUPPLIES] = {
4343
"VBAT",
4444
};
4545

46+
static const struct rt5682_platform_data i2s_default_platform_data = {
47+
.dmic1_data_pin = RT5682_DMIC1_DATA_GPIO2,
48+
.dmic1_clk_pin = RT5682_DMIC1_CLK_GPIO3,
49+
.jd_src = RT5682_JD1,
50+
};
51+
4652
struct rt5682_priv {
4753
struct snd_soc_component *component;
4854
struct rt5682_platform_data pdata;
@@ -2534,6 +2540,8 @@ static int rt5682_i2c_probe(struct i2c_client *i2c,
25342540

25352541
i2c_set_clientdata(i2c, rt5682);
25362542

2543+
rt5682->pdata = i2s_default_platform_data;
2544+
25372545
if (pdata)
25382546
rt5682->pdata = *pdata;
25392547
else

0 commit comments

Comments
 (0)