* [PATCH v2 1/6] ASoC: rt766: fix uninitialized stream_config->type
@ 2026-09-04 7:57 shumingf
2026-09-04 10:53 ` Mark Brown
2026-09-04 16:34 ` Mark Brown
0 siblings, 2 replies; 3+ messages in thread
From: shumingf @ 2026-09-04 7:57 UTC (permalink / raw)
To: broonie, lgirdwood
Cc: linux-sound, lars, flove, oder_chiou, jack.yu, derek.fang,
Shuming Fan
From: Shuming Fan <shumingf@realtek.com>
The stream_config variable was not initialized before being passed to
sdw_stream_add_slave().
This may cause unexpected behavior when configuring the SoundWire stream.
Signed-off-by: Shuming Fan <shumingf@realtek.com>
---
sound/soc/codecs/rt766-sdca.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/sound/soc/codecs/rt766-sdca.c b/sound/soc/codecs/rt766-sdca.c
index 64d763b96a06..5a1c1e10e6d7 100644
--- a/sound/soc/codecs/rt766-sdca.c
+++ b/sound/soc/codecs/rt766-sdca.c
@@ -936,9 +936,8 @@ static int rt766_sdca_pcm_hw_params(struct snd_pcm_substream *substream,
{
struct snd_soc_component *component = dai->component;
struct rt766_sdca_priv *rt766 = snd_soc_component_get_drvdata(component);
- struct sdw_stream_config stream_config;
+ struct sdw_stream_config stream_config = {0};
struct sdw_port_config port_config;
- enum sdw_data_direction direction;
struct sdw_stream_runtime *sdw_stream;
unsigned int sampling_rate;
int retval, port;
@@ -957,7 +956,6 @@ static int rt766_sdca_pcm_hw_params(struct snd_pcm_substream *substream,
/* SoundWire specific configuration */
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
- direction = SDW_DATA_DIR_RX;
if (dai->id == RT766_AIF1)
port = 3;
else if (dai->id == RT766_AIF2)
@@ -965,7 +963,6 @@ static int rt766_sdca_pcm_hw_params(struct snd_pcm_substream *substream,
else
return -EINVAL;
} else {
- direction = SDW_DATA_DIR_TX;
if (dai->id == RT766_AIF1)
port = 12;
else if (dai->id == RT766_AIF3)
--
2.54.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH v2 1/6] ASoC: rt766: fix uninitialized stream_config->type
2026-09-04 7:57 [PATCH v2 1/6] ASoC: rt766: fix uninitialized stream_config->type shumingf
@ 2026-09-04 10:53 ` Mark Brown
2026-09-04 16:34 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2026-09-04 10:53 UTC (permalink / raw)
To: shumingf
Cc: lgirdwood, linux-sound, lars, flove, oder_chiou, jack.yu,
derek.fang
[-- Attachment #1: Type: text/plain, Size: 813 bytes --]
On Fri, Sep 04, 2026 at 03:57:37PM +0800, shumingf@realtek.com wrote:
> From: Shuming Fan <shumingf@realtek.com>
>
> The stream_config variable was not initialized before being passed to
> sdw_stream_add_slave().
> This may cause unexpected behavior when configuring the SoundWire stream.
Not related to this patch specifically but I notice that whenever you
send a patch series you send a bunch of individual messages which don't
end up threaded with each other, this causes issues for tooling so it'd
be good if you could get threading working.
You might want to look at b4 to send the patches, especially it's web
submission endpoint which avoids having to configure mail:
https://b4.docs.kernel.org/en/latest/contributor/overview.html
this will thread things in the expected manner.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2 1/6] ASoC: rt766: fix uninitialized stream_config->type
2026-09-04 7:57 [PATCH v2 1/6] ASoC: rt766: fix uninitialized stream_config->type shumingf
2026-09-04 10:53 ` Mark Brown
@ 2026-09-04 16:34 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2026-09-04 16:34 UTC (permalink / raw)
To: lgirdwood, shumingf
Cc: linux-sound, lars, flove, oder_chiou, jack.yu, derek.fang
On Fri, 04 Sep 2026 15:57:37 +0800, shumingf@realtek.com wrote:
> ASoC: rt766: fix uninitialized stream_config->type
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.3
Thanks!
[1/6] ASoC: rt766: fix uninitialized stream_config->type
https://git.kernel.org/broonie/sound/c/4e3bd70facac
[2/6] ASoC: rt712: fix uninitialized stream_config->type
https://git.kernel.org/broonie/sound/c/0a9bce8a4ff8
[3/6] ASoC: rt1320: fix uninitialized stream_config->type
https://git.kernel.org/broonie/sound/c/2c68c4a0e570
[4/6] ASoC: rt1318: fix uninitialized stream_config->type
https://git.kernel.org/broonie/sound/c/c966210ed5f2
[5/6] ASoC: rt721: fix uninitialized stream_config->type
https://git.kernel.org/broonie/sound/c/0e17e50b9930
[6/6] ASoC: rt722: fix uninitialized stream_config->type
https://git.kernel.org/broonie/sound/c/cff381508c18
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:[~2026-09-04 20:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-04 7:57 [PATCH v2 1/6] ASoC: rt766: fix uninitialized stream_config->type shumingf
2026-09-04 10:53 ` Mark Brown
2026-09-04 16:34 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox