* [PATCH v2] ASoC: tas2770: Fix error detection in tas2770_set_dai_tdm_idle
@ 2026-10-25 3:22 James Calligeros
2026-11-02 20:01 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: James Calligeros @ 2026-10-25 3:22 UTC (permalink / raw)
To: Shenghao Ding, Kevin Lu, Baojun Xu, Sen Wang, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai
Cc: linux-sound, linux-kernel, asahi, stable, James Calligeros
snd_soc_component_update_bits returns 1 on a successful update, and
we were returning from tas2770_set_dai_tdm_idle early on any nonzero
return code. Change this so that only negative return codes are
treated as errors.
Fixes: af176d0787d2 ("ASoC: tas2770: expose SDOUT bus keeper via set_tdm_idle")
Cc: stable@vger.kernel.org
Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
---
Changes in v2:
- Make commit header more concise
- CC stable
- Link to v1: https://patch.msgid.link/20261024-tas2770-idle-fix-v1-1-07b02d46ec2e@gmail.com
To: Shenghao Ding <shenghao-ding@ti.com>
To: Kevin Lu <kevin-lu@ti.com>
To: Baojun Xu <baojun.xu@ti.com>
To: Sen Wang <sen@ti.com>
To: Liam Girdwood <lgirdwood@gmail.com>
To: Mark Brown <broonie@kernel.org>
To: Jaroslav Kysela <perex@perex.cz>
To: Takashi Iwai <tiwai@suse.com>
To: James Calligeros <jcalligeros99@gmail.com>
Cc: linux-sound@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
sound/soc/codecs/tas2770.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/sound/soc/codecs/tas2770.c b/sound/soc/codecs/tas2770.c
index 882e19857697..6b9ec8f630fe 100644
--- a/sound/soc/codecs/tas2770.c
+++ b/sound/soc/codecs/tas2770.c
@@ -513,7 +513,7 @@ static int tas2770_set_dai_tdm_idle(struct snd_soc_dai *dai,
ret = snd_soc_component_update_bits(component, TAS2770_DIN_PD,
TAS2770_DIN_PD_SDOUT,
TAS2770_DIN_PD_SDOUT);
- if (ret)
+ if (ret < 0)
return ret;
break;
@@ -521,12 +521,12 @@ static int tas2770_set_dai_tdm_idle(struct snd_soc_dai *dai,
ret = snd_soc_component_update_bits(component, TAS2770_TDM_CFG_REG4,
TAS2770_TDM_CFG_REG4_TX_KEEPER,
TAS2770_TDM_CFG_REG4_TX_KEEPER);
- if (ret)
+ if (ret < 0)
return ret;
ret = snd_soc_component_update_bits(component, TAS2770_TDM_CFG_REG4,
TAS2770_TDM_CFG_REG4_TX_FILL, 0);
- if (ret)
+ if (ret < 0)
return ret;
break;
@@ -534,25 +534,25 @@ static int tas2770_set_dai_tdm_idle(struct snd_soc_dai *dai,
ret = snd_soc_component_update_bits(component, TAS2770_TDM_CFG_REG4,
TAS2770_TDM_CFG_REG4_TX_KEEPER,
TAS2770_TDM_CFG_REG4_TX_KEEPER);
- if (ret)
+ if (ret < 0)
return ret;
ret = snd_soc_component_update_bits(component, TAS2770_TDM_CFG_REG4,
TAS2770_TDM_CFG_REG4_TX_FILL,
TAS2770_TDM_CFG_REG4_TX_FILL);
- if (ret)
+ if (ret < 0)
return ret;
break;
case SND_SOC_DAI_TDM_IDLE_OFF:
ret = snd_soc_component_update_bits(component, TAS2770_DIN_PD,
TAS2770_DIN_PD_SDOUT, 0);
- if (ret)
+ if (ret < 0)
return ret;
ret = snd_soc_component_update_bits(component, TAS2770_TDM_CFG_REG4,
TAS2770_TDM_CFG_REG4_TX_KEEPER, 0);
- if (ret)
+ if (ret < 0)
return ret;
break;
---
base-commit: cc3fc99f1bce93c3ae3771ef98cb91a566da857e
change-id: 20261024-tas2770-idle-fix-b0104e591578
Best regards,
--
James Calligeros <jcalligeros99@gmail.com>
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH v2] ASoC: tas2770: Fix error detection in tas2770_set_dai_tdm_idle
2026-10-25 3:22 [PATCH v2] ASoC: tas2770: Fix error detection in tas2770_set_dai_tdm_idle James Calligeros
@ 2026-11-02 20:01 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2026-11-02 20:01 UTC (permalink / raw)
To: Shenghao Ding, Kevin Lu, Baojun Xu, Sen Wang, Liam Girdwood,
Jaroslav Kysela, Takashi Iwai, James Calligeros
Cc: linux-sound, linux-kernel, asahi, stable
On Sun, 25 Oct 2026 13:22:18 +1000, James Calligeros wrote:
> ASoC: tas2770: Fix error detection in tas2770_set_dai_tdm_idle
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.4
Thanks!
[1/1] ASoC: tas2770: Fix error detection in tas2770_set_dai_tdm_idle
https://git.kernel.org/broonie/sound/c/f65f866dacbb
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-03 0:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-25 3:22 [PATCH v2] ASoC: tas2770: Fix error detection in tas2770_set_dai_tdm_idle James Calligeros
2026-11-02 20:01 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®