mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-12 21:44:06 +08:00
ASoC: cs35l41: Update DSP1RX5/6 Sources for DSP config
Currently, all ASoC systems are set to use VPMON for DSP1RX5_SRC, however, this is required only for internal boost systems. External boost systems require VBSTMON instead of VPMON to be the input to DSP1RX5_SRC. Shared Boost Active acts like Internal boost (requires VPMON). Shared Boost Passive acts like External boost (requires VBSTMON) All systems require DSP1RX6_SRC to be set to VBSTMON. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://msgid.link/r/20240411142648.650921-1-sbinding@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
2e411e939d
commit
eefb831d2e
@ -1094,6 +1094,7 @@ static int cs35l41_handle_pdata(struct device *dev, struct cs35l41_hw_cfg *hw_cf
|
||||
static int cs35l41_dsp_init(struct cs35l41_private *cs35l41)
|
||||
{
|
||||
struct wm_adsp *dsp;
|
||||
uint32_t dsp1rx5_src;
|
||||
int ret;
|
||||
|
||||
dsp = &cs35l41->dsp;
|
||||
@ -1113,16 +1114,29 @@ static int cs35l41_dsp_init(struct cs35l41_private *cs35l41)
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = regmap_write(cs35l41->regmap, CS35L41_DSP1_RX5_SRC,
|
||||
CS35L41_INPUT_SRC_VPMON);
|
||||
if (ret < 0) {
|
||||
dev_err(cs35l41->dev, "Write INPUT_SRC_VPMON failed: %d\n", ret);
|
||||
switch (cs35l41->hw_cfg.bst_type) {
|
||||
case CS35L41_INT_BOOST:
|
||||
case CS35L41_SHD_BOOST_ACTV:
|
||||
dsp1rx5_src = CS35L41_INPUT_SRC_VPMON;
|
||||
break;
|
||||
case CS35L41_EXT_BOOST:
|
||||
case CS35L41_SHD_BOOST_PASS:
|
||||
dsp1rx5_src = CS35L41_INPUT_SRC_VBSTMON;
|
||||
break;
|
||||
default:
|
||||
dev_err(cs35l41->dev, "wm_halo_init failed - Invalid Boost Type: %d\n",
|
||||
cs35l41->hw_cfg.bst_type);
|
||||
goto err_dsp;
|
||||
}
|
||||
ret = regmap_write(cs35l41->regmap, CS35L41_DSP1_RX6_SRC,
|
||||
CS35L41_INPUT_SRC_CLASSH);
|
||||
|
||||
ret = regmap_write(cs35l41->regmap, CS35L41_DSP1_RX5_SRC, dsp1rx5_src);
|
||||
if (ret < 0) {
|
||||
dev_err(cs35l41->dev, "Write INPUT_SRC_CLASSH failed: %d\n", ret);
|
||||
dev_err(cs35l41->dev, "Write DSP1RX5_SRC: %d failed: %d\n", dsp1rx5_src, ret);
|
||||
goto err_dsp;
|
||||
}
|
||||
ret = regmap_write(cs35l41->regmap, CS35L41_DSP1_RX6_SRC, CS35L41_INPUT_SRC_VBSTMON);
|
||||
if (ret < 0) {
|
||||
dev_err(cs35l41->dev, "Write CS35L41_INPUT_SRC_VBSTMON failed: %d\n", ret);
|
||||
goto err_dsp;
|
||||
}
|
||||
ret = regmap_write(cs35l41->regmap, CS35L41_DSP1_RX7_SRC,
|
||||
|
Loading…
Reference in New Issue
Block a user