mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 04:34:03 +02:00
ASoC: rt766: fix uninitialized stream_config->type
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> Link: https://patch.msgid.link/20260904075737.86525-1-shumingf@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
6b2f3ab85f
commit
4e3bd70fac
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user