ASoC: rt722: change the interrupt mask for jack type detection
Subsystems (3)
PATCH 1/1 ASoC: rt722: change the interrupt mask for jack type detection
From: Shuming Fan <[email protected]>
This patch changed the interrupt mask from XU to GE.
--- sound/soc/codecs/rt722-sdca-sdw.c | 12 ++++-------- sound/soc/codecs/rt722-sdca.c | 7 ++++--- 2 files changed, 8 insertions(+), 11 deletions(-)
sound/soc/codecs/rt722-sdca-sdw.c +4 -8
@@ -177,7 +177,7 @@ static int rt722_sdca_update_status(struct sdw_slave *slave,* This also could sync with the cache value as the rt722_sdca_jack_init set. */ sdw_write_no_pm (rt722->slave,SDW_SCP_SDCA_INTMASK1 , -SDW_SCP_SDCA_INTMASK_SDCA_6 ); +SDW_SCP_SDCA_INTMASK_SDCA_0 );sdw_write_no_pm (rt722->slave,SDW_SCP_SDCA_INTMASK2 ,SDW_SCP_SDCA_INTMASK_SDCA_8 ); }
@@ -308,12 +308,8 @@ static int rt722_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 (rt722->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 (rt722->slave,SDW_SCP_SDCA_INT2 );if (ret <0 ) goto io_error;
@@ -444,7 +440,7 @@ static int __maybe_unused rt722_sdca_dev_system_suspend(struct device *dev)mutex_lock (&rt722_sdca->disable_irq_lock); rt722_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 (&rt722_sdca->disable_irq_lock);
@@ -471,7 +467,7 @@ static int __maybe_unused rt722_sdca_dev_resume(struct device *dev)if (!slave->unattach_request) {mutex_lock (&rt722->disable_irq_lock);if (rt722->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 ); rt722->disable_irq = false; }
sound/soc/codecs/rt722-sdca.c +4 -3
@@ -190,8 +190,8 @@ static void rt722_sdca_jack_detect_handler(struct work_struct *work)if (!rt722->component->card || !rt722->component->card->instantiated)return ; -/* SDW_SCP_SDCA_INT_SDCA_6 is used for jack detection */ -if (rt722->scp_sdca_stat1 &SDW_SCP_SDCA_INT_SDCA_6 ) { +/* SDW_SCP_SDCA_INT_SDCA_0 is used for jack detection */ +if (rt722->scp_sdca_stat1 &SDW_SCP_SDCA_INT_SDCA_0 ) { ret =rt722_sdca_headset_detect (rt722);if (ret <0 )return ;
@@ -294,7 +294,7 @@ static void rt722_sdca_jack_init(struct rt722_sdca_priv *rt722)if (rt722->hs_jack) {/* set SCP_SDCA_IntMask1[0]=1 */ sdw_write_no_pm (rt722->slave,SDW_SCP_SDCA_INTMASK1 , -SDW_SCP_SDCA_INTMASK_SDCA_0 |SDW_SCP_SDCA_INTMASK_SDCA_6 ); +SDW_SCP_SDCA_INTMASK_SDCA_0 );/* set SCP_SDCA_IntMask2[0]=1 */ sdw_write_no_pm (rt722->slave,SDW_SCP_SDCA_INTMASK2 ,SDW_SCP_SDCA_INTMASK_SDCA_8 );
@@ -308,6 +308,7 @@ static void rt722_sdca_jack_init(struct rt722_sdca_priv *rt722)regmap_write (rt722->regmap,SDW_SDCA_CTL (FUNC_NUM_JACK_CODEC ,RT722_SDCA_ENT_XU0D ,RT722_SDCA_CTL_SELECTED_MODE ,0 ),0 ); +rt722_sdca_index_write (rt722,RT722_VENDOR_HDA_CTL ,RT722_GE_RELATED_CTL1 ,0x0000 );/* trigger GE interrupt */ rt722_sdca_index_update_bits (rt722,RT722_VENDOR_HDA_CTL ,RT722_GE_RELATED_CTL2 ,0x4000 ,0x4000 );
Signature · 1 line
2.34.1
Mark Brown
maintainerQuoted 3 lines · On Tue, 05 Nov 2024 18:05:57 +0800, [email protected] wrote:
This patch changed the interrupt mask from XU to GE.
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: rt722: change the interrupt mask for jack type detection
commit: 93b763a5ab13509e9a2bcbcac3002607736e601b
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark