mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-23 12:14:10 +08:00
ASoC: rt721-sdca: change interrupt mask from XU to GE
Change interrupt mask from XU to GE to fix jack detection interrupt issue. Signed-off-by: Jack Yu <jack.yu@realtek.com> Link: https://patch.msgid.link/cbc81e324673467a96b70e4e219766b5@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
ed4bcfbcf4
commit
b3cb7f2a3a
@ -203,7 +203,7 @@ static int rt721_sdca_update_status(struct sdw_slave *slave,
|
||||
* This also could sync with the cache value as the rt721_sdca_jack_init set.
|
||||
*/
|
||||
sdw_write_no_pm(rt721->slave, SDW_SCP_SDCA_INTMASK1,
|
||||
SDW_SCP_SDCA_INTMASK_SDCA_6);
|
||||
SDW_SCP_SDCA_INTMASK_SDCA_0);
|
||||
sdw_write_no_pm(rt721->slave, SDW_SCP_SDCA_INTMASK2,
|
||||
SDW_SCP_SDCA_INTMASK_SDCA_8);
|
||||
}
|
||||
@ -280,7 +280,7 @@ static int rt721_sdca_read_prop(struct sdw_slave *slave)
|
||||
}
|
||||
|
||||
/* set the timeout values */
|
||||
prop->clk_stop_timeout = 900;
|
||||
prop->clk_stop_timeout = 1380;
|
||||
|
||||
/* wake-up event */
|
||||
prop->wake_capable = 1;
|
||||
@ -337,11 +337,6 @@ static int rt721_sdca_interrupt_callback(struct sdw_slave *slave,
|
||||
SDW_SCP_SDCA_INT_SDCA_0, SDW_SCP_SDCA_INT_SDCA_0);
|
||||
if (ret < 0)
|
||||
goto io_error;
|
||||
} else if (ret & SDW_SCP_SDCA_INTMASK_SDCA_6) {
|
||||
ret = sdw_update_no_pm(rt721->slave, SDW_SCP_SDCA_INT1,
|
||||
SDW_SCP_SDCA_INT_SDCA_6, SDW_SCP_SDCA_INT_SDCA_6);
|
||||
if (ret < 0)
|
||||
goto io_error;
|
||||
}
|
||||
ret = sdw_read_no_pm(rt721->slave, SDW_SCP_SDCA_INT2);
|
||||
if (ret < 0)
|
||||
@ -475,7 +470,7 @@ static int __maybe_unused rt721_sdca_dev_system_suspend(struct device *dev)
|
||||
mutex_lock(&rt721_sdca->disable_irq_lock);
|
||||
rt721_sdca->disable_irq = true;
|
||||
ret1 = sdw_update_no_pm(slave, SDW_SCP_SDCA_INTMASK1,
|
||||
SDW_SCP_SDCA_INTMASK_SDCA_0 | SDW_SCP_SDCA_INTMASK_SDCA_6, 0);
|
||||
SDW_SCP_SDCA_INTMASK_SDCA_0, 0);
|
||||
ret2 = sdw_update_no_pm(slave, SDW_SCP_SDCA_INTMASK2,
|
||||
SDW_SCP_SDCA_INTMASK_SDCA_8, 0);
|
||||
mutex_unlock(&rt721_sdca->disable_irq_lock);
|
||||
@ -502,7 +497,7 @@ static int __maybe_unused rt721_sdca_dev_resume(struct device *dev)
|
||||
if (!slave->unattach_request) {
|
||||
mutex_lock(&rt721->disable_irq_lock);
|
||||
if (rt721->disable_irq == true) {
|
||||
sdw_write_no_pm(slave, SDW_SCP_SDCA_INTMASK1, SDW_SCP_SDCA_INTMASK_SDCA_6);
|
||||
sdw_write_no_pm(slave, SDW_SCP_SDCA_INTMASK1, SDW_SCP_SDCA_INTMASK_SDCA_0);
|
||||
sdw_write_no_pm(slave, SDW_SCP_SDCA_INTMASK2, SDW_SCP_SDCA_INTMASK_SDCA_8);
|
||||
rt721->disable_irq = false;
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ static void rt721_sdca_jack_detect_handler(struct work_struct *work)
|
||||
return;
|
||||
|
||||
/* SDW_SCP_SDCA_INT_SDCA_6 is used for jack detection */
|
||||
if (rt721->scp_sdca_stat1 & SDW_SCP_SDCA_INT_SDCA_6) {
|
||||
if (rt721->scp_sdca_stat1 & SDW_SCP_SDCA_INT_SDCA_0) {
|
||||
rt721->jack_type = rt_sdca_headset_detect(rt721->regmap,
|
||||
RT721_SDCA_ENT_GE49);
|
||||
if (rt721->jack_type < 0)
|
||||
@ -286,7 +286,7 @@ static void rt721_sdca_jack_init(struct rt721_sdca_priv *rt721)
|
||||
mutex_lock(&rt721->calibrate_mutex);
|
||||
if (rt721->hs_jack) {
|
||||
sdw_write_no_pm(rt721->slave, SDW_SCP_SDCA_INTMASK1,
|
||||
SDW_SCP_SDCA_INTMASK_SDCA_0 | SDW_SCP_SDCA_INTMASK_SDCA_6);
|
||||
SDW_SCP_SDCA_INTMASK_SDCA_0);
|
||||
sdw_write_no_pm(rt721->slave, SDW_SCP_SDCA_INTMASK2,
|
||||
SDW_SCP_SDCA_INTMASK_SDCA_8);
|
||||
dev_dbg(&rt721->slave->dev, "in %s enable\n", __func__);
|
||||
@ -298,6 +298,8 @@ static void rt721_sdca_jack_init(struct rt721_sdca_priv *rt721)
|
||||
regmap_write(rt721->regmap,
|
||||
SDW_SDCA_CTL(FUNC_NUM_JACK_CODEC, RT721_SDCA_ENT_XU0D,
|
||||
RT721_SDCA_CTL_SELECTED_MODE, 0), 0);
|
||||
rt_sdca_index_write(rt721->mbq_regmap, RT721_HDA_SDCA_FLOAT,
|
||||
RT721_XU_REL_CTRL, 0x0000);
|
||||
rt_sdca_index_update_bits(rt721->mbq_regmap, RT721_HDA_SDCA_FLOAT,
|
||||
RT721_GE_REL_CTRL1, 0x4000, 0x4000);
|
||||
}
|
||||
|
@ -133,6 +133,7 @@ struct rt721_sdca_dmic_kctrl_priv {
|
||||
#define RT721_HDA_LEGACY_UAJ_CTL 0x02
|
||||
#define RT721_HDA_LEGACY_CTL1 0x05
|
||||
#define RT721_HDA_LEGACY_RESET_CTL 0x06
|
||||
#define RT721_XU_REL_CTRL 0x0c
|
||||
#define RT721_GE_REL_CTRL1 0x0d
|
||||
#define RT721_HDA_LEGACY_GPIO_WAKE_EN_CTL 0x0e
|
||||
#define RT721_GE_SDCA_RST_CTRL 0x10
|
||||
|
Loading…
Reference in New Issue
Block a user