* [PATCH] ASoC: codecs: es8326: Fix DTS properties reading
@ 2023-02-04 19:51 Alexey Firago
2023-02-06 8:42 ` Yang Yingliang
2023-02-06 21:37 ` Mark Brown
0 siblings, 2 replies; 3+ messages in thread
From: Alexey Firago @ 2023-02-04 19:51 UTC (permalink / raw)
To: linux-kernel
Cc: alsa-devel, zhuning0077, yangyingliang, yangxiaohua, broonie,
tiwai, Alexey Firago
Seems like properties parsing and reading was copy-pasted,
so "everest,interrupt-src" and "everest,interrupt-clk" are saved into
the es8326->jack_pol variable. This might lead to wrong settings
being saved into the reg 57 (ES8326_HP_DET).
Fix this by using proper variables while reading properties.
Signed-off-by: Alexey Firago <a.firago@yadro.com>
---
sound/soc/codecs/es8326.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/es8326.c b/sound/soc/codecs/es8326.c
index 9ddf6a35e91c..28a0565c2a95 100644
--- a/sound/soc/codecs/es8326.c
+++ b/sound/soc/codecs/es8326.c
@@ -729,14 +729,16 @@ static int es8326_probe(struct snd_soc_component *component)
}
dev_dbg(component->dev, "jack-pol %x", es8326->jack_pol);
- ret = device_property_read_u8(component->dev, "everest,interrupt-src", &es8326->jack_pol);
+ ret = device_property_read_u8(component->dev, "everest,interrupt-src",
+ &es8326->interrupt_src);
if (ret != 0) {
dev_dbg(component->dev, "interrupt-src return %d", ret);
es8326->interrupt_src = ES8326_HP_DET_SRC_PIN9;
}
dev_dbg(component->dev, "interrupt-src %x", es8326->interrupt_src);
- ret = device_property_read_u8(component->dev, "everest,interrupt-clk", &es8326->jack_pol);
+ ret = device_property_read_u8(component->dev, "everest,interrupt-clk",
+ &es8326->interrupt_clk);
if (ret != 0) {
dev_dbg(component->dev, "interrupt-clk return %d", ret);
es8326->interrupt_clk = 0x45;
--
2.34.1
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] ASoC: codecs: es8326: Fix DTS properties reading
2023-02-04 19:51 [PATCH] ASoC: codecs: es8326: Fix DTS properties reading Alexey Firago
@ 2023-02-06 8:42 ` Yang Yingliang
2023-02-06 21:37 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Yang Yingliang @ 2023-02-06 8:42 UTC (permalink / raw)
To: Alexey Firago, linux-kernel
Cc: alsa-devel, zhuning0077, yangxiaohua, broonie, tiwai
Hi,
On 2023/2/5 3:51, Alexey Firago wrote:
> Seems like properties parsing and reading was copy-pasted,
> so "everest,interrupt-src" and "everest,interrupt-clk" are saved into
> the es8326->jack_pol variable. This might lead to wrong settings
> being saved into the reg 57 (ES8326_HP_DET).
>
> Fix this by using proper variables while reading properties.
>
> Signed-off-by: Alexey Firago <a.firago@yadro.com>
Fix tag is needed, it should be 5c439937775d ("ASoC: codecs: add support
for ES8326")
Reviewed-by: Yang Yingliang <yangyingliang@huawei.com
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] ASoC: codecs: es8326: Fix DTS properties reading
2023-02-04 19:51 [PATCH] ASoC: codecs: es8326: Fix DTS properties reading Alexey Firago
2023-02-06 8:42 ` Yang Yingliang
@ 2023-02-06 21:37 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2023-02-06 21:37 UTC (permalink / raw)
To: linux-kernel, Alexey Firago
Cc: alsa-devel, zhuning0077, yangyingliang, yangxiaohua, tiwai
On Sat, 04 Feb 2023 22:51:06 +0300, Alexey Firago wrote:
> Seems like properties parsing and reading was copy-pasted,
> so "everest,interrupt-src" and "everest,interrupt-clk" are saved into
> the es8326->jack_pol variable. This might lead to wrong settings
> being saved into the reg 57 (ES8326_HP_DET).
>
> Fix this by using proper variables while reading properties.
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: codecs: es8326: Fix DTS properties reading
commit: fe1e7e8ce2c47bd8fd9885eab63fca0a522e94c9
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] 3+ messages in thread
end of thread, other threads:[~2023-02-06 21:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-04 19:51 [PATCH] ASoC: codecs: es8326: Fix DTS properties reading Alexey Firago
2023-02-06 8:42 ` Yang Yingliang
2023-02-06 21:37 ` 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®