Commit a242cac1 authored by Maruthi Srinivas Bayyavarapu's avatar Maruthi Srinivas Bayyavarapu Committed by Mark Brown

ASoC: dwc: add quirk to override COMP_PARAM_1 register

DWC for capture in ACP 2.x IP reports playback and capture capabilities
though it supports only capture. Added a quirk to override default value
to represent capture capability only.
Signed-off-by: default avatarMaruthi Bayyavarapu <maruthi.bayyavarapu@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 0032e9db
...@@ -46,6 +46,7 @@ struct i2s_platform_data { ...@@ -46,6 +46,7 @@ struct i2s_platform_data {
u32 snd_rates; u32 snd_rates;
#define DW_I2S_QUIRK_COMP_REG_OFFSET (1 << 0) #define DW_I2S_QUIRK_COMP_REG_OFFSET (1 << 0)
#define DW_I2S_QUIRK_COMP_PARAM1 (1 << 1)
unsigned int quirks; unsigned int quirks;
unsigned int i2s_reg_comp1; unsigned int i2s_reg_comp1;
unsigned int i2s_reg_comp2; unsigned int i2s_reg_comp2;
......
...@@ -500,6 +500,10 @@ static int dw_configure_dai(struct dw_i2s_dev *dev, ...@@ -500,6 +500,10 @@ static int dw_configure_dai(struct dw_i2s_dev *dev,
u32 comp2 = i2s_read_reg(dev->i2s_base, dev->i2s_reg_comp2); u32 comp2 = i2s_read_reg(dev->i2s_base, dev->i2s_reg_comp2);
u32 idx; u32 idx;
if (dev->capability & DWC_I2S_RECORD &&
dev->quirks & DW_I2S_QUIRK_COMP_PARAM1)
comp1 = comp1 & ~BIT(5);
if (COMP1_TX_ENABLED(comp1)) { if (COMP1_TX_ENABLED(comp1)) {
dev_dbg(dev->dev, " designware: play supported\n"); dev_dbg(dev->dev, " designware: play supported\n");
idx = COMP1_TX_WORDSIZE_0(comp1); idx = COMP1_TX_WORDSIZE_0(comp1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment