<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/sound/soc/ti, branch master</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>ASoC: ti: davinci-mcasp: McASP code cleanup and clk</title>
<updated>2026-03-10T12:09:17+00:00</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2026-03-10T12:09:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=49c002275a8cabe2fcb3a99b39a1b7fae2351215'/>
<id>49c002275a8cabe2fcb3a99b39a1b7fae2351215</id>
<content type='text'>
Merge series from Sen Wang &lt;sen@ti.com&gt;:

Just two minor patches that aim to tidy up the code a little bit,
as well as fix the aux_div selection in davinci_mcasp_calc_clk_div()
for mid-range dividers (33 &lt;= div &lt;= 4096).

Sen Wang (2):
  ASoC: ti: davinci-mcasp: extract mcasp_is_auxclk_enabled() helper
  ASoC: ti: davinci-mcasp: improve aux_div selection for mid-range dividers

 sound/soc/ti/davinci-mcasp.c | 45 +++++++++++++++++++++++++-----------
 1 file changed, 31 insertions(+), 14 deletions(-)

--
2.43.0
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Merge series from Sen Wang &lt;sen@ti.com&gt;:

Just two minor patches that aim to tidy up the code a little bit,
as well as fix the aux_div selection in davinci_mcasp_calc_clk_div()
for mid-range dividers (33 &lt;= div &lt;= 4096).

Sen Wang (2):
  ASoC: ti: davinci-mcasp: extract mcasp_is_auxclk_enabled() helper
  ASoC: ti: davinci-mcasp: improve aux_div selection for mid-range dividers

 sound/soc/ti/davinci-mcasp.c | 45 +++++++++++++++++++++++++-----------
 1 file changed, 31 insertions(+), 14 deletions(-)

--
2.43.0
</pre>
</div>
</content>
</entry>
<entry>
<title>ASoC: ti: davinci-mcasp: improve aux_div selection for mid-range dividers</title>
<updated>2026-03-09T00:17:29+00:00</updated>
<author>
<name>Sen Wang</name>
<email>sen@ti.com</email>
</author>
<published>2026-03-05T19:58:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a8075ada4a341ce58ebf8bef0188cefe6c2f6487'/>
<id>a8075ada4a341ce58ebf8bef0188cefe6c2f6487</id>
<content type='text'>
When the ideal total divider (sysclk/bclk) is between 33 and 4096 and
AUXCLK is enabled, the driver computes aux_div as ceil(div/32) and then
recomputes bclk_div from the truncated sysclk.

This two-step integer division loses precision due to truncation and can
sometimes produce PPM errors large enough for ALSA's hw_rule_format to
reject otherwise valid sample formats.

For example, on AM62D-EVM (auxclk-fs-ratio=2177, tdm-slots=2, fck=96 MHz),
playing S16_LE at 44100 Hz gives BCLK = 1,411,200 Hz and an ideal total
divider of 68.  The old code picks aux_div = ceil(68/32) = 3,
then bclk_div = (96005700/3) / 1411200 = 22, for a total of 3 x 22 =
66 -- two steps from ideal.  The resulting error exceeds the PPM threshold
and causes S16_LE, S24_LE to be rejected.

Therefore when the total divider fits in the AHCLKXDIV register alone
(&lt;=4096), use it directly as aux_div with bclk_div=1, and compare floor
and ceil to pick the closer match, to ensure the best ideal total dividers.

Dividers at or below 32 never enter this path, and dividers above 4096
still fall through to the existing DIV_ROUND_UP path, so previously
working configurations remains unaffected.

Signed-off-by: Sen Wang &lt;sen@ti.com&gt;
Link: https://patch.msgid.link/20260305195825.9998-3-sen@ti.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When the ideal total divider (sysclk/bclk) is between 33 and 4096 and
AUXCLK is enabled, the driver computes aux_div as ceil(div/32) and then
recomputes bclk_div from the truncated sysclk.

This two-step integer division loses precision due to truncation and can
sometimes produce PPM errors large enough for ALSA's hw_rule_format to
reject otherwise valid sample formats.

For example, on AM62D-EVM (auxclk-fs-ratio=2177, tdm-slots=2, fck=96 MHz),
playing S16_LE at 44100 Hz gives BCLK = 1,411,200 Hz and an ideal total
divider of 68.  The old code picks aux_div = ceil(68/32) = 3,
then bclk_div = (96005700/3) / 1411200 = 22, for a total of 3 x 22 =
66 -- two steps from ideal.  The resulting error exceeds the PPM threshold
and causes S16_LE, S24_LE to be rejected.

Therefore when the total divider fits in the AHCLKXDIV register alone
(&lt;=4096), use it directly as aux_div with bclk_div=1, and compare floor
and ceil to pick the closer match, to ensure the best ideal total dividers.

Dividers at or below 32 never enter this path, and dividers above 4096
still fall through to the existing DIV_ROUND_UP path, so previously
working configurations remains unaffected.

Signed-off-by: Sen Wang &lt;sen@ti.com&gt;
Link: https://patch.msgid.link/20260305195825.9998-3-sen@ti.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ASoC: ti: davinci-mcasp: extract mcasp_is_auxclk_enabled() helper</title>
<updated>2026-03-09T00:17:28+00:00</updated>
<author>
<name>Sen Wang</name>
<email>sen@ti.com</email>
</author>
<published>2026-03-05T19:58:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5bebbfd64b879d1a7220233767be3274e7d442b8'/>
<id>5bebbfd64b879d1a7220233767be3274e7d442b8</id>
<content type='text'>
Move the AUXCLK-enabled check out of davinci_mcasp_calc_clk_div() into
a reusable helper.  No functional change.

Signed-off-by: Sen Wang &lt;sen@ti.com&gt;
Link: https://patch.msgid.link/20260305195825.9998-2-sen@ti.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move the AUXCLK-enabled check out of davinci_mcasp_calc_clk_div() into
a reusable helper.  No functional change.

Signed-off-by: Sen Wang &lt;sen@ti.com&gt;
Link: https://patch.msgid.link/20260305195825.9998-2-sen@ti.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ASoC: ti: davinci-mcasp: Add system suspend/resume support</title>
<updated>2026-02-22T23:52:22+00:00</updated>
<author>
<name>Sen Wang</name>
<email>sen@ti.com</email>
</author>
<published>2026-02-11T22:10:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5879521cb558871472b97c4744dbe634a4286f0e'/>
<id>5879521cb558871472b97c4744dbe634a4286f0e</id>
<content type='text'>
The McASP driver supports runtime PM callbacks for register save/restore
during device idle, but doesn't provide system suspend/resume callbacks.
This causes audio to fail to resume after system suspend.

Since the driver already handles runtime suspend &amp; resume, we can reuse
existing runtime PM logics.

Signed-off-by: Sen Wang &lt;sen@ti.com&gt;
Link: https://patch.msgid.link/20260211221001.155843-1-sen@ti.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The McASP driver supports runtime PM callbacks for register save/restore
during device idle, but doesn't provide system suspend/resume callbacks.
This causes audio to fail to resume after system suspend.

Since the driver already handles runtime suspend &amp; resume, we can reuse
existing runtime PM logics.

Signed-off-by: Sen Wang &lt;sen@ti.com&gt;
Link: https://patch.msgid.link/20260211221001.155843-1-sen@ti.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ASoC: ti: davinci-mcasp: Add asynchronous mode support</title>
<updated>2026-02-04T18:21:52+00:00</updated>
<author>
<name>Sen Wang</name>
<email>sen@ti.com</email>
</author>
<published>2026-02-03T00:37:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9db327083f7e0da702e2ec0169f8a34f3576f371'/>
<id>9db327083f7e0da702e2ec0169f8a34f3576f371</id>
<content type='text'>
McASP has dedicated clock &amp; frame sync registers for both transmit
and receive. Currently McASP driver only supports synchronous behavior and
couples both TX &amp; RX settings.

Add logic that enables asynchronous mode via ti,async-mode property. In
async mode, playback &amp; record can be done simultaneously with different
audio configurations (tdm slots, tdm width, audio bit depth).

Note the ability to have different tx/rx DSP formats (i2s, dsp_a, etc.),
while possible in hardware, remains to be a gap as it require changes
to the corresponding machine driver interface.

Existing IIS (sync mode) and DIT mode logic remains mostly unchanged.
Exceptions are IIS mode logic that previously assumed sync mode, which has
now been made aware of the distinction. And shared logic across all modes
also now checks for McASP tx/rx-specific driver attributes. Those
attributes have been populated according to the original extent, ensuring
no divergence in functionality.

Constraints no longer applicable for async mode are skipped.
Clock selection options have also been added to include rx/tx-only clk_ids,
exposing independent configuration via the machine driver as well.

Note that asynchronous mode is not applicable for McASP in DIT mode,
which is a transmitter-only mode to interface w/ self-clocking formats.

Signed-off-by: Sen Wang &lt;sen@ti.com&gt;
Acked-by: Peter Ujfalusi &lt;peter.ujfalusi@gmail.com&gt;
Tested-by: Paresh Bhagat &lt;p-bhagat@ti.com&gt;
Link: https://patch.msgid.link/20260203003703.2334443-5-sen@ti.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
McASP has dedicated clock &amp; frame sync registers for both transmit
and receive. Currently McASP driver only supports synchronous behavior and
couples both TX &amp; RX settings.

Add logic that enables asynchronous mode via ti,async-mode property. In
async mode, playback &amp; record can be done simultaneously with different
audio configurations (tdm slots, tdm width, audio bit depth).

Note the ability to have different tx/rx DSP formats (i2s, dsp_a, etc.),
while possible in hardware, remains to be a gap as it require changes
to the corresponding machine driver interface.

Existing IIS (sync mode) and DIT mode logic remains mostly unchanged.
Exceptions are IIS mode logic that previously assumed sync mode, which has
now been made aware of the distinction. And shared logic across all modes
also now checks for McASP tx/rx-specific driver attributes. Those
attributes have been populated according to the original extent, ensuring
no divergence in functionality.

Constraints no longer applicable for async mode are skipped.
Clock selection options have also been added to include rx/tx-only clk_ids,
exposing independent configuration via the machine driver as well.

Note that asynchronous mode is not applicable for McASP in DIT mode,
which is a transmitter-only mode to interface w/ self-clocking formats.

Signed-off-by: Sen Wang &lt;sen@ti.com&gt;
Acked-by: Peter Ujfalusi &lt;peter.ujfalusi@gmail.com&gt;
Tested-by: Paresh Bhagat &lt;p-bhagat@ti.com&gt;
Link: https://patch.msgid.link/20260203003703.2334443-5-sen@ti.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ASoC: ti: davinci-mcasp: Streamline pdir behavior across rx &amp; tx streams</title>
<updated>2026-02-04T18:21:51+00:00</updated>
<author>
<name>Sen Wang</name>
<email>sen@ti.com</email>
</author>
<published>2026-02-03T00:37:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=016efcaa470cdbc658df46d968d875f6a1cf9a78'/>
<id>016efcaa470cdbc658df46d968d875f6a1cf9a78</id>
<content type='text'>
Simplify the mcasp_set_clk_pdir caller convention in start/stop stream
function, to make it so that set_clk_pdir gets called regardless when
stream starts and also disables when stream ends.

Functionality-wise, everything remains the same as the previously skipped
calls are now either correctly configured
(when McASP is SND_SOC_DAIFMT_BP_FC - pdir needs to be enabled)
or called with a bitmask of zero (when McASP is SND_SOC_DAIFMT_BC_FC - pdir
gets disabled).

On brief regarding McASP Clock and Frame sync configurations, refer to [0].

[0]:TRM Section 12.1.1.4.2 https://www.ti.com/lit/ug/sprujd4a/sprujd4a.pdf

Signed-off-by: Sen Wang &lt;sen@ti.com&gt;
Acked-by: Peter Ujfalusi &lt;peter.ujfalusi@gmail.com&gt;
Tested-by: Paresh Bhagat &lt;p-bhagat@ti.com&gt;
Link: https://patch.msgid.link/20260203003703.2334443-4-sen@ti.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Simplify the mcasp_set_clk_pdir caller convention in start/stop stream
function, to make it so that set_clk_pdir gets called regardless when
stream starts and also disables when stream ends.

Functionality-wise, everything remains the same as the previously skipped
calls are now either correctly configured
(when McASP is SND_SOC_DAIFMT_BP_FC - pdir needs to be enabled)
or called with a bitmask of zero (when McASP is SND_SOC_DAIFMT_BC_FC - pdir
gets disabled).

On brief regarding McASP Clock and Frame sync configurations, refer to [0].

[0]:TRM Section 12.1.1.4.2 https://www.ti.com/lit/ug/sprujd4a/sprujd4a.pdf

Signed-off-by: Sen Wang &lt;sen@ti.com&gt;
Acked-by: Peter Ujfalusi &lt;peter.ujfalusi@gmail.com&gt;
Tested-by: Paresh Bhagat &lt;p-bhagat@ti.com&gt;
Link: https://patch.msgid.link/20260203003703.2334443-4-sen@ti.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ASoC: ti: davinci-mcasp: Disambiguate mcasp_is_synchronous function</title>
<updated>2026-02-04T18:21:50+00:00</updated>
<author>
<name>Sen Wang</name>
<email>sen@ti.com</email>
</author>
<published>2026-02-03T00:37:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e683cb088fdcbdc86fc30008319312cc0bb80226'/>
<id>e683cb088fdcbdc86fc30008319312cc0bb80226</id>
<content type='text'>
The current mcasp_is_synchronous() function does more than what it
proclaims, it also checks if McASP is a frame producer.

Therefore split the original function into two separate ones and
replace all occurrences with the new equivalent logic.

Signed-off-by: Sen Wang &lt;sen@ti.com&gt;
Acked-by: Peter Ujfalusi &lt;peter.ujfalusi@gmail.com&gt;
Tested-by: Paresh Bhagat &lt;p-bhagat@ti.com&gt;
Link: https://patch.msgid.link/20260203003703.2334443-3-sen@ti.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The current mcasp_is_synchronous() function does more than what it
proclaims, it also checks if McASP is a frame producer.

Therefore split the original function into two separate ones and
replace all occurrences with the new equivalent logic.

Signed-off-by: Sen Wang &lt;sen@ti.com&gt;
Acked-by: Peter Ujfalusi &lt;peter.ujfalusi@gmail.com&gt;
Tested-by: Paresh Bhagat &lt;p-bhagat@ti.com&gt;
Link: https://patch.msgid.link/20260203003703.2334443-3-sen@ti.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ASoC: renesas: rz-ssi: Cleanups</title>
<updated>2026-01-20T18:17:02+00:00</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2026-01-20T18:17:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9ef552fcf0e0fbc0d8a7d6a5903a08a90eb97f34'/>
<id>9ef552fcf0e0fbc0d8a7d6a5903a08a90eb97f34</id>
<content type='text'>
Merge series from Claudiu &lt;claudiu.beznea@tuxon.dev&gt;:

This series adds cleanups for the Renesas RZ SSI driver.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Merge series from Claudiu &lt;claudiu.beznea@tuxon.dev&gt;:

This series adds cleanups for the Renesas RZ SSI driver.
</pre>
</div>
</content>
</entry>
<entry>
<title>ASoC: davinci-evm: Fix reference leak in davinci_evm_probe</title>
<updated>2026-01-08T17:31:15+00:00</updated>
<author>
<name>Kery Qi</name>
<email>qikeyu2017@gmail.com</email>
</author>
<published>2026-01-07T15:48:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5b577d214fcc109707bcb77b4ae72a31cfd86798'/>
<id>5b577d214fcc109707bcb77b4ae72a31cfd86798</id>
<content type='text'>
The davinci_evm_probe() function calls of_parse_phandle() to acquire
device nodes for "ti,audio-codec" and "ti,mcasp-controller". These
functions return device nodes with incremented reference counts.

However, in several error paths (e.g., when the second of_parse_phandle(),
snd_soc_of_parse_card_name(), or devm_snd_soc_register_card() fails),
the function returns directly without releasing the acquired nodes,
leading to reference leaks.

This patch adds an error handling path 'err_put' to properly release
the device nodes using of_node_put() and clean up the pointers when
an error occurs.

Signed-off-by: Kery Qi &lt;qikeyu2017@gmail.com&gt;
Link: https://patch.msgid.link/20260107154836.1521-2-qikeyu2017@gmail.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The davinci_evm_probe() function calls of_parse_phandle() to acquire
device nodes for "ti,audio-codec" and "ti,mcasp-controller". These
functions return device nodes with incremented reference counts.

However, in several error paths (e.g., when the second of_parse_phandle(),
snd_soc_of_parse_card_name(), or devm_snd_soc_register_card() fails),
the function returns directly without releasing the acquired nodes,
leading to reference leaks.

This patch adds an error handling path 'err_put' to properly release
the device nodes using of_node_put() and clean up the pointers when
an error occurs.

Signed-off-by: Kery Qi &lt;qikeyu2017@gmail.com&gt;
Link: https://patch.msgid.link/20260107154836.1521-2-qikeyu2017@gmail.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ASoC: davinci-mcasp: remove unneeded #ifdef</title>
<updated>2025-12-14T10:37:33+00:00</updated>
<author>
<name>Bartosz Golaszewski</name>
<email>bartosz.golaszewski@oss.qualcomm.com</email>
</author>
<published>2025-12-05T09:05:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0c1db366642172e85ee98eeed7c127b80eb609a3'/>
<id>0c1db366642172e85ee98eeed7c127b80eb609a3</id>
<content type='text'>
The enablement of the CONFIG_OF_GPIO switch has nothing to do with the
"gpio-controller" property which may as well come from software nodes
and GPIOLIB can still be enabled separately.

This driver does not call any symbols from gpiolib-of.h so has no need
to check this option at all. Just use the generic device property
accessor.

Signed-off-by: Bartosz Golaszewski &lt;bartosz.golaszewski@oss.qualcomm.com&gt;
Link: https://patch.msgid.link/20251205090534.27845-1-bartosz.golaszewski@oss.qualcomm.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The enablement of the CONFIG_OF_GPIO switch has nothing to do with the
"gpio-controller" property which may as well come from software nodes
and GPIOLIB can still be enabled separately.

This driver does not call any symbols from gpiolib-of.h so has no need
to check this option at all. Just use the generic device property
accessor.

Signed-off-by: Bartosz Golaszewski &lt;bartosz.golaszewski@oss.qualcomm.com&gt;
Link: https://patch.msgid.link/20251205090534.27845-1-bartosz.golaszewski@oss.qualcomm.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
