<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lwn.git/sound/soc/codecs/es8328.c, branch docs-fixes</title>
<subtitle>Linux kernel documentation tree maintained by Jonathan Corbet</subtitle>
<id>http://mirrors.hust.edu.cn/git/lwn.git/atom?h=docs-fixes</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/lwn.git/atom?h=docs-fixes'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/'/>
<updated>2026-02-02T12:50:03+00:00</updated>
<entry>
<title>ASoC: es8328: Add error unwind in resume</title>
<updated>2026-02-02T12:50:03+00:00</updated>
<author>
<name>Hsieh Hung-En</name>
<email>hungen3108@gmail.com</email>
</author>
<published>2026-01-30T16:00:17+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=8232e6079ae6f8d3a61d87973cb427385aa469b9'/>
<id>urn:sha1:8232e6079ae6f8d3a61d87973cb427385aa469b9</id>
<content type='text'>
Handle failures in the resume path by unwinding previously enabled
resources.

If enabling regulators or syncing the regcache fails, disable regulators
and unprepare the clock to avoid leaking resources and leaving the device
in a partially resumed state.

Signed-off-by: Hsieh Hung-En &lt;hungen3108@gmail.com&gt;
Link: https://patch.msgid.link/20260130160017.2630-6-hungen3108@gmail.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: es8328: Use cached regmap on resume</title>
<updated>2026-02-02T12:50:02+00:00</updated>
<author>
<name>Hsieh Hung-En</name>
<email>hungen3108@gmail.com</email>
</author>
<published>2026-01-30T16:00:16+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=9917d99f44231b531a1c704bbbd58059e78c2f59'/>
<id>urn:sha1:9917d99f44231b531a1c704bbbd58059e78c2f59</id>
<content type='text'>
Use the regmap stored in the driver private data when restoring the
register cache on resume, instead of looking it up from the device.

This keeps the resume path consistent with the regmap instance used by
the driver and avoids relying on a separate dev_get_regmap() lookup.

Signed-off-by: Hsieh Hung-En &lt;hungen3108@gmail.com&gt;
Link: https://patch.msgid.link/20260130160017.2630-5-hungen3108@gmail.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: es8328: Check errors in set_dai_fmt()</title>
<updated>2026-02-02T12:50:01+00:00</updated>
<author>
<name>Hsieh Hung-En</name>
<email>hungen3108@gmail.com</email>
</author>
<published>2026-01-30T16:00:15+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=3570e8eef217e60178d23eb490a34d64249bee45'/>
<id>urn:sha1:3570e8eef217e60178d23eb490a34d64249bee45</id>
<content type='text'>
Check and propagate return values from snd_soc_component_update_bits() in
es8328_set_dai_fmt().

This avoids silent failures when register updates fail and ensures the DAI
format is not left in an inconsistent state.

Signed-off-by: Hsieh Hung-En &lt;hungen3108@gmail.com&gt;
Link: https://patch.msgid.link/20260130160017.2630-4-hungen3108@gmail.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: es8328: Propagate errors in set_bias_level()</title>
<updated>2026-02-02T12:50:00+00:00</updated>
<author>
<name>Hsieh Hung-En</name>
<email>hungen3108@gmail.com</email>
</author>
<published>2026-01-30T16:00:14+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=0801a03a317b4848ca8c10a98f9b84028b7c8fc6'/>
<id>urn:sha1:0801a03a317b4848ca8c10a98f9b84028b7c8fc6</id>
<content type='text'>
Register writes and updates in set_bias_level() ignored return values,
potentially masking I/O failures during bias level transitions.

Check and propagate errors from component register writes and updates.

Signed-off-by: Hsieh Hung-En &lt;hungen3108@gmail.com&gt;
Link: https://patch.msgid.link/20260130160017.2630-3-hungen3108@gmail.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: es8328: Fix DAC deemphasis control handling</title>
<updated>2026-02-02T12:49:59+00:00</updated>
<author>
<name>Hsieh Hung-En</name>
<email>hungen3108@gmail.com</email>
</author>
<published>2026-01-30T16:00:13+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=4c6b74d58766ce7cd66ae8e14babf877039adef6'/>
<id>urn:sha1:4c6b74d58766ce7cd66ae8e14babf877039adef6</id>
<content type='text'>
The DAC deemphasis control updated the hardware before updating the cached
state, causing the previous setting to be applied.

Update the cached deemphasis state first and then apply the setting.

Also check and propagate errors from es8328_set_deemph() in hw_params().

Signed-off-by: Hsieh Hung-En &lt;hungen3108@gmail.com&gt;
Link: https://patch.msgid.link/20260130160017.2630-2-hungen3108@gmail.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: es8328: Propagate error codes from regmap updates</title>
<updated>2026-01-15T18:58:22+00:00</updated>
<author>
<name>Hsieh Hung-En</name>
<email>hungen3108@gmail.com</email>
</author>
<published>2026-01-15T16:13:59+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=4711b292b440a8404833df0e0ba96dad86600a84'/>
<id>urn:sha1:4711b292b440a8404833df0e0ba96dad86600a84</id>
<content type='text'>
In es8328_hw_params(), the return value of
snd_soc_component_update_bits() was ignored. This could lead to silent
failures where the hardware is left in an inconsistent state if a
regmap write fails.

Check the return value of regmap updates and propagate any errors back
to the ALSA core. Return 0 on success to match the DAI ops convention.

Signed-off-by: Hsieh Hung-En &lt;hungen3108@gmail.com&gt;
Link: https://patch.msgid.link/20260115161359.41979-1-hungen3108@gmail.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: es8328: Remove duplicate DAPM routes</title>
<updated>2026-01-05T13:18:58+00:00</updated>
<author>
<name>Hsieh Hung-En</name>
<email>hungen3108@gmail.com</email>
</author>
<published>2025-12-31T08:45:54+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=52ddc0106c77ff0eacf07b309833ae6e6a4e8587'/>
<id>urn:sha1:52ddc0106c77ff0eacf07b309833ae6e6a4e8587</id>
<content type='text'>
The DAPM routes for "Left Line Mux" and "Right Line Mux" are defined
twice in es8328_dapm_routes[]. The redundant entries appear after
the "Mic Bias" route and duplicate the definitions found earlier in
the array.

Remove the duplicate entries to clean up the code.

Tested on Rockchip RK3588 with ES8328 codec. Verified that removing
the duplicate routes does not alter the DAPM graph or the mixer
controls. Both 'tinymix' output and DAPM widget lists remain
identical to the baseline.

Signed-off-by: Hsieh Hung-En &lt;hungen3108@gmail.com&gt;
Link: https://patch.msgid.link/20251231084554.265916-1-hungen3108@gmail.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: codecs: es8328: convert to snd_soc_dapm_xxx()</title>
<updated>2025-11-17T00:15:17+00:00</updated>
<author>
<name>Kuninori Morimoto</name>
<email>kuninori.morimoto.gx@renesas.com</email>
</author>
<published>2025-11-11T00:22:22+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=a5511a6e10f1e1462d61aec8420d6ac4cd9e3efe'/>
<id>urn:sha1:a5511a6e10f1e1462d61aec8420d6ac4cd9e3efe</id>
<content type='text'>
This patch converts below functions.

dapm-&gt;dev					-&gt; snd_soc_dapm_to_dev()
dapm-&gt;card					-&gt; snd_soc_dapm_to_card()
dapm-&gt;component					-&gt; snd_soc_dapm_to_component()

dapm_kcontrol_get_value()			-&gt; snd_soc_dapm_kcontrol_get_value()

snd_soc_component_enable_pin()			-&gt; snd_soc_dapm_enable_pin()
snd_soc_component_enable_pin_unlocked()		-&gt; snd_soc_dapm_enable_pin_unlocked()
snd_soc_component_disable_pin()			-&gt; snd_soc_dapm_disable_pin()
snd_soc_component_disable_pin_unlocked()	-&gt; snd_soc_dapm_disable_pin_unlocked()
snd_soc_component_nc_pin()			-&gt; snd_soc_dapm_nc_pin()
snd_soc_component_nc_pin_unlocked()		-&gt; snd_soc_dapm_nc_pin_unlocked()
snd_soc_component_get_pin_status()		-&gt; snd_soc_dapm_get_pin_status()
snd_soc_component_force_enable_pin()		-&gt; snd_soc_dapm_force_enable_pin()
snd_soc_component_force_enable_pin_unlocked()	-&gt; snd_soc_dapm_force_enable_pin_unlocked()
snd_soc_component_force_bias_level()		-&gt; snd_soc_dapm_force_bias_level()
snd_soc_component_get_bias_level()		-&gt; snd_soc_dapm_get_bias_level()
snd_soc_component_init_bias_level()		-&gt; snd_soc_dapm_init_bias_level()
snd_soc_component_get_dapm()			-&gt; snd_soc_component_to_dapm()

snd_soc_dapm_kcontrol_component()		-&gt; snd_soc_dapm_kcontrol_to_component()
snd_soc_dapm_kcontrol_widget()			-&gt; snd_soc_dapm_kcontrol_to_widget()
snd_soc_dapm_kcontrol_dapm()			-&gt; snd_soc_dapm_kcontrol_to_dapm()
snd_soc_dapm_np_pin()				-&gt; snd_soc_dapm_disable_pin()

Signed-off-by: Kuninori Morimoto &lt;kuninori.morimoto.gx@renesas.com&gt;
Reviewed-by: Charles Keepax &lt;ckeepax@opensource.cirrus.com&gt;
Link: https://patch.msgid.link/87qzu55sg1.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: codecs: es8328: use snd_kcontrol_chip() instead of snd_soc_kcontrol_component()</title>
<updated>2025-10-20T01:42:50+00:00</updated>
<author>
<name>Kuninori Morimoto</name>
<email>kuninori.morimoto.gx@renesas.com</email>
</author>
<published>2025-10-14T04:21:45+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=13c4c81b7bc819d533c6e0aaa1bf495cd0dfd8f6'/>
<id>urn:sha1:13c4c81b7bc819d533c6e0aaa1bf495cd0dfd8f6</id>
<content type='text'>
We have very similar name functions (A)(B). Both gets component from
snd_kcontrol, but (A) is used in callback functions which is registered
through snd_soc_add_component_controls(), (B) is used through
snd_soc_dapm_new_widgets().

	(A) snd_soc_kcontrol_component()
	(B) snd_soc_dapm_kcontrol_component()

(B) is using very picky way to get component but using it is necessary in
ASoC. But (A) is just wrapper function to snd_kcontrol_chip(), and directly
using it without wrapper is very common way on ALSA.
To reduce confusions of similar function, let's use common way on (A).

Signed-off-by: Kuninori Morimoto &lt;kuninori.morimoto.gx@renesas.com&gt;
Link: https://patch.msgid.link/87ecr6ru3r.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: es8328: fix route from DAC to output</title>
<updated>2025-02-24T15:00:47+00:00</updated>
<author>
<name>Nicolas Frattaroli</name>
<email>nicolas.frattaroli@collabora.com</email>
</author>
<published>2025-02-22T19:39:57+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=5b0c02f9b8acf2a791e531bbc09acae2d51f4f9b'/>
<id>urn:sha1:5b0c02f9b8acf2a791e531bbc09acae2d51f4f9b</id>
<content type='text'>
The ES8328 codec driver, which is also used for the ES8388 chip that
appears to have an identical register map, claims that the output can
either take the route from DAC-&gt;Mixer-&gt;Output or through DAC-&gt;Output
directly. To the best of what I could find, this is not true, and
creates problems.

Without DACCONTROL17 bit index 7 set for the left channel, as well as
DACCONTROL20 bit index 7 set for the right channel, I cannot get any
analog audio out on Left Out 2 and Right Out 2 respectively, despite the
DAPM routes claiming that this should be possible. Furthermore, the same
is the case for Left Out 1 and Right Out 1, showing that those two don't
have a direct route from DAC to output bypassing the mixer either.

Those control bits toggle whether the DACs are fed (stale bread?) into
their respective mixers. If one "unmutes" the mixer controls in
alsamixer, then sure, the audio output works, but if it doesn't work
without the mixer being fed the DAC input then evidently it's not a
direct output from the DAC.

ES8328/ES8388 are seemingly not alone in this. ES8323, which uses a
separate driver for what appears to be a very similar register map,
simply flips those two bits on in its probe function, and then pretends
there is no power management whatsoever for the individual controls.
Fair enough.

My theory as to why nobody has noticed this up to this point is that
everyone just assumes it's their fault when they had to unmute an
additional control in ALSA.

Fix this in the es8328 driver by removing the erroneous direct route,
then get rid of the playback switch controls and have those bits tied to
the mixer's widget instead, which until now had no register to play
with.

Fixes: 567e4f98922c ("ASoC: add es8328 codec driver")
Signed-off-by: Nicolas Frattaroli &lt;nicolas.frattaroli@collabora.com&gt;
Link: https://patch.msgid.link/20250222-es8328-route-bludgeoning-v1-1-99bfb7fb22d9@collabora.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
</feed>
