Commit ce83baca authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown
parent 69e53129
...@@ -594,6 +594,7 @@ static int qcom_swrm_startup(struct snd_pcm_substream *substream, ...@@ -594,6 +594,7 @@ static int qcom_swrm_startup(struct snd_pcm_substream *substream,
struct qcom_swrm_ctrl *ctrl = dev_get_drvdata(dai->dev); struct qcom_swrm_ctrl *ctrl = dev_get_drvdata(dai->dev);
struct snd_soc_pcm_runtime *rtd = substream->private_data; struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct sdw_stream_runtime *sruntime; struct sdw_stream_runtime *sruntime;
struct snd_soc_dai *codec_dai;
int ret, i; int ret, i;
sruntime = sdw_alloc_stream(dai->name); sruntime = sdw_alloc_stream(dai->name);
...@@ -602,12 +603,12 @@ static int qcom_swrm_startup(struct snd_pcm_substream *substream, ...@@ -602,12 +603,12 @@ static int qcom_swrm_startup(struct snd_pcm_substream *substream,
ctrl->sruntime[dai->id] = sruntime; ctrl->sruntime[dai->id] = sruntime;
for (i = 0; i < rtd->num_codecs; i++) { for_each_rtd_codec_dai(rtd, i, codec_dai) {
ret = snd_soc_dai_set_sdw_stream(rtd->codec_dais[i], sruntime, ret = snd_soc_dai_set_sdw_stream(codec_dai, sruntime,
substream->stream); substream->stream);
if (ret < 0 && ret != -ENOTSUPP) { if (ret < 0 && ret != -ENOTSUPP) {
dev_err(dai->dev, "Failed to set sdw stream on %s", dev_err(dai->dev, "Failed to set sdw stream on %s",
rtd->codec_dais[i]->name); codec_dai->name);
sdw_release_stream(sruntime); sdw_release_stream(sruntime);
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment