| b5b00a57 | 10-Sep-2026 |
Richard Fitzgerald <rf@opensource.cirrus.com> |
ASoC: sdw_utils: cs_amp: Delete bogus and incorrect capture channel fixup
Delete the asoc_sdw_cs_spk_feedback_rtd_init(). This is not needed now that the ASoC bug it was working around has been fixe
ASoC: sdw_utils: cs_amp: Delete bogus and incorrect capture channel fixup
Delete the asoc_sdw_cs_spk_feedback_rtd_init(). This is not needed now that the ASoC bug it was working around has been fixed. And it was broken anyway because it didn't match the way the core SoundWire code mapped codec channels to frame bitslots.
This code was added to avoid a problem where multiple codec DP outputs were mapped to the same SoundWire frame bit slot. This would allow a user to break the SoundWire bus just by enabling mixer outputs using ALSA controls.
As no production system has used the capture stream, this workaround was of little consequence and the problem of conflicting DP mappings was not investigated.
The ASoC bug that enabled too many channels on each codec has now been fixed. So this workaround can be completely deleted.
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20260910114500.1586637-6-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
show more ...
|
| 290845e1 | 10-Sep-2026 |
Richard Fitzgerald <rf@opensource.cirrus.com> |
ASoC: sdw_utils: Set snd_soc_dai_link_ch_map.codec_ch_mask for capture
In asoc_sdw_hw_params() set the codec_ch_mask member of struct snd_soc_dai_link_ch_map for capture streams. ASoC will then pass
ASoC: sdw_utils: Set snd_soc_dai_link_ch_map.codec_ch_mask for capture
In asoc_sdw_hw_params() set the codec_ch_mask member of struct snd_soc_dai_link_ch_map for capture streams. ASoC will then pass the correct number of channels to each codec hw_params(). This prevents trying to enable more channels on the codec DP than have been allocated bitslots in the SoundWire frame, which would cause bus clash errors.
In theory codec_ch_mask could also be set for playback streams, but for those the CPU is the only sender so there is no risk of bus clash. For playback streams codec_ch_mask is set to 0 to preserve the existing behavior and avoid introducing bugs.
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20260910114500.1586637-5-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
show more ...
|
| 9d4843ac | 20-Aug-2026 |
Niranjan H Y <niranjan.hy@ti.com> |
ASoC: sdw_utils: Set component_name for tac5xx2 codec family
* With component_name set in the codec_info_list DAI entries, "amixer -D hw:<card> info" includes the 'spk' identifier for each tac5xx2 s
ASoC: sdw_utils: Set component_name for tac5xx2 codec family
* With component_name set in the codec_info_list DAI entries, "amixer -D hw:<card> info" includes the 'spk' identifier for each tac5xx2 speaker component. This allows userspace to identify the speaker codec at runtime and enables UCM card matching for the tac5xx2 family. * Set component_name for the speaker, mic, and UAJ DAI entries for all tac5xx2 family variants.
Signed-off-by: Niranjan H Y <niranjan.hy@ti.com> Link: https://patch.msgid.link/20260820115114.1203-1-niranjan.hy@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
show more ...
|
| fc56d1e6 | 19-Aug-2026 |
Mark Brown <broonie@kernel.org> |
ASoC: tas2783: prepare the port again on the resume path
Andrey Golovko <andrey.golovko@gmail.com> says:
v1 was a single patch that powered the SDCA Function up in the port PRE_PREP callback:
ht
ASoC: tas2783: prepare the port again on the resume path
Andrey Golovko <andrey.golovko@gmail.com> says:
v1 was a single patch that powered the SDCA Function up in the port PRE_PREP callback:
https://lore.kernel.org/all/20260813001500.9218-1-andrey.golovko@gmail.com/
Mark asked whether that does the right thing when userspace restarts the stream with SNDRV_PCM_IOCTL_RESUME instead of preparing it, and pointed out that a stream can also be suspended while prepared; Vijendar agreed.
The answer to the first question is no, and it is reproducible on this machine, so v2 adds a patch to fix that path. The second case turns out to be a wider gap that neither patch closes; it is described at the end.
Measured on an ASUS ProArt PX13 HN7306EAC (AMD ACP7.0, two TAS2783 on SDW1). A test program plays a 440/660 Hz tone straight to the hw device, the machine goes through an s2idle cycle, and on -ESTRPIPE the program calls snd_pcm_resume() only - never snd_pcm_prepare(). The tone is measured through the internal microphone against the noise floor of the same run, and the peripheral registers are read out of band.
With v1 alone (broonie/sound for-next + v1):
before suspend after snd_pcm_resume() DP1 PrepareCtrl 0x1 / 0x2 0x0 / 0x0 PDE23 req / act 0x0 / 0x0 0x3 / 0x3 tone 440 / 660 Hz +65.5 / +75.2 dB -1.7 / +1.8 dB
snd_pcm_resume() returned 0 and the PCM stayed RUNNING, so nothing in the stack reported a failure - the speakers were simply silent. The ports were never prepared again, so the PRE_PREP callback v1 relies on was never reached.
With this series:
before suspend after snd_pcm_resume() DP1 PrepareCtrl 0x1 / 0x2 0x1 / 0x2 PDE23 req / act 0x0 / 0x0 0x0 / 0x0 tone 440 / 660 Hz +73.7 / +88.3 dB +73.7 / +88.5 dB
ChannelEn also moved to the other bank across the cycle, as it should when the ports are prepared afresh.
The ordinary path is unaffected. The same test recovering with snd_pcm_prepare() instead of snd_pcm_resume(), on the same build, gives +79.8 / +86.9 dB after the cycle with the ports prepared and the bank switched back.
This also explains the negative test Robin Everaars reported for v1 on the same board earlier today: playback opened without an error, both amplifiers stayed attached, and the speakers were silent - which is what this path looks like from userspace.
The case this series does not cover ===================================
A stream that is suspended while merely PREPARED never sees a trigger at all: snd_pcm_do_suspend() returns early when the stream is not running, and snd_pcm_do_resume() returns early unless the suspended state was RUNNING or DRAINING. Userspace then calls snd_pcm_start(), the ports are enabled, and the peripheral has lost its port state without anything in the path noticing. Patch 1 cannot help there - the SoundWire stream is still SDW_STREAM_PREPARED, so sdw_prepare_stream() is a no-op by design - and neither can the codec, which has no way to tell the core that its ports went away.
The bus does know: the peripheral goes UNATTACHED and comes back uninitialized. Making that invalidate the prepared state of the streams it takes part in looks like the right place to me, but it is a core change and I have not written it. Say if it belongs in this series.
Link: https://patch.msgid.link/20260813194000.10412-1-andrey.golovko@gmail.com
show more ...
|
| a1332be2 | 26-Jun-2026 |
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> |
ASoC: sdw_utils: tidyup asoc_sdw_parse_sdw_endpoints()
We can avoid to use *card. Tidyup it.
Current code makes old style / new style conversion difficult. To make future conversions easier to unde
ASoC: sdw_utils: tidyup asoc_sdw_parse_sdw_endpoints()
We can avoid to use *card. Tidyup it.
Current code makes old style / new style conversion difficult. To make future conversions easier to understand, this patch clean up the code a little. but no functional change.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://patch.msgid.link/87ik75etxw.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
show more ...
|
| 4ff4fc6f | 13-May-2026 |
Zhang Yi <zhangyi@everest-semi.com> |
ASoC: sdw_utils: add ES9356 in codec_info_list
Add ES9356 in codec_info_list
Signed-off-by: Zhang Yi <zhangyi@everest-semi.com> Link: https://patch.msgid.link/20260513031554.5422-3-zhangyi@everest-
ASoC: sdw_utils: add ES9356 in codec_info_list
Add ES9356 in codec_info_list
Signed-off-by: Zhang Yi <zhangyi@everest-semi.com> Link: https://patch.msgid.link/20260513031554.5422-3-zhangyi@everest-semi.com Signed-off-by: Mark Brown <broonie@kernel.org>
show more ...
|
| 5d03a4f3 | 13-May-2026 |
Zhang Yi <zhangyi@everest-semi.com> |
ASoC: sdw_utils: add soc_sdw_es9356
Add a utility program for handling ES9356 in the universal machine driver
Signed-off-by: Zhang Yi <zhangyi@everest-semi.com> Link: https://patch.msgid.link/20260
ASoC: sdw_utils: add soc_sdw_es9356
Add a utility program for handling ES9356 in the universal machine driver
Signed-off-by: Zhang Yi <zhangyi@everest-semi.com> Link: https://patch.msgid.link/20260513031554.5422-2-zhangyi@everest-semi.com Signed-off-by: Mark Brown <broonie@kernel.org>
show more ...
|
| 5a30862d | 12-May-2026 |
Cássio Gabriel <cassiogabrielcontato@gmail.com> |
ASoC: sdw_utils: Check speaker component string allocation
devm_kasprintf() can fail while building the temporary speaker component string. If that happens, spk_components is set to NULL, but the cu
ASoC: sdw_utils: Check speaker component string allocation
devm_kasprintf() can fail while building the temporary speaker component string. If that happens, spk_components is set to NULL, but the current code can still pass it to strlen() on a later loop iteration or after the loop when appending the speaker component list to card->components.
Use NULL to represent the initial "no speaker components" state, and return -ENOMEM immediately if building spk_components fails.
Fixes: 0f60ecffbfe3 ("ASoC: sdw_utils: generate combined spk components string") Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com> Link: https://patch.msgid.link/20260512-asoc-sdw-utils-spk-components-alloc-v1-1-c9bbd6d2e123@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
show more ...
|
| 56ba9699 | 11-May-2026 |
Mark Brown <broonie@kernel.org> |
ASoC: soc_sdw_utils: skip aux device if it is not present
Bard Liao <yung-chuan.liao@linux.intel.com> says:
ASoC: soc_sdw_utils: skip aux device if it is not present
Similarly to codec endpoints t
ASoC: soc_sdw_utils: skip aux device if it is not present
Bard Liao <yung-chuan.liao@linux.intel.com> says:
ASoC: soc_sdw_utils: skip aux device if it is not present
Similarly to codec endpoints that may not be used [1], aux devices (like HID) also may not be used. Hence skip aux devices which are not present.
Also update the comment above is_sdca_endpoint_present().
[1] https://lore.kernel.org/all/20250414063239.85200-12-yung-chuan.liao@linux.intel.com/
Link: https://patch.msgid.link/20260508094750.1246796-1-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
show more ...
|
| 21bcd34e | 08-May-2026 |
Maciej Strozek <mstrozek@opensource.cirrus.com> |
ASoC: soc_sdw_utils: Change comment into proper kernel doc
Update the comment above is_sdca_endpoint_present().
Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com> Signed-off-by: Bard Li
ASoC: soc_sdw_utils: Change comment into proper kernel doc
Update the comment above is_sdca_endpoint_present().
Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://patch.msgid.link/20260508094750.1246796-3-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
show more ...
|