diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2020-02-19 07:55:53 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-02-19 18:12:14 +0100 |
commit | ce83baca8526689c332135c0abca2667ba056009 (patch) | |
tree | 7636da5058c60d9df1a93f08909e4f22540dc8d1 /drivers | |
parent | ASoC: tas2562: Add support for ISENSE and VSENSE (diff) | |
download | linux-ce83baca8526689c332135c0abca2667ba056009.tar.xz linux-ce83baca8526689c332135c0abca2667ba056009.zip |
ASoC: soundwaire: qcom: use for_each_rtd_codec_dai() macro
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/87o8tvjcbc.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/soundwire/qcom.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c index 1c6c6a2e0def..fb30bbec999a 100644 --- a/drivers/soundwire/qcom.c +++ b/drivers/soundwire/qcom.c @@ -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 snd_soc_pcm_runtime *rtd = substream->private_data; struct sdw_stream_runtime *sruntime; + struct snd_soc_dai *codec_dai; int ret, i; sruntime = sdw_alloc_stream(dai->name); @@ -602,12 +603,12 @@ static int qcom_swrm_startup(struct snd_pcm_substream *substream, ctrl->sruntime[dai->id] = sruntime; - for (i = 0; i < rtd->num_codecs; i++) { - ret = snd_soc_dai_set_sdw_stream(rtd->codec_dais[i], sruntime, + for_each_rtd_codec_dai(rtd, i, codec_dai) { + ret = snd_soc_dai_set_sdw_stream(codec_dai, sruntime, substream->stream); if (ret < 0 && ret != -ENOTSUPP) { dev_err(dai->dev, "Failed to set sdw stream on %s", - rtd->codec_dais[i]->name); + codec_dai->name); sdw_release_stream(sruntime); return ret; } |