Commit 3de7c420 authored by Vinod Koul's avatar Vinod Koul Committed by Mark Brown

ASoC: core: refactor soc_link_dai_widgets()

In soc_link_dai_widgets() we refer to local widget variables as
playback/capture_widget, but they are really sink/source widgets,
so change the names accordingly
Suggested-by: default avatarMark Brown <broonie@kernel.org>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 8005c49d
...@@ -1283,35 +1283,35 @@ static int soc_link_dai_widgets(struct snd_soc_card *card, ...@@ -1283,35 +1283,35 @@ static int soc_link_dai_widgets(struct snd_soc_card *card,
{ {
struct snd_soc_dai *cpu_dai = rtd->cpu_dai; struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
struct snd_soc_dai *codec_dai = rtd->codec_dai; struct snd_soc_dai *codec_dai = rtd->codec_dai;
struct snd_soc_dapm_widget *play_w, *capture_w; struct snd_soc_dapm_widget *sink, *source;
int ret; int ret;
if (rtd->num_codecs > 1) if (rtd->num_codecs > 1)
dev_warn(card->dev, "ASoC: Multiple codecs not supported yet\n"); dev_warn(card->dev, "ASoC: Multiple codecs not supported yet\n");
/* link the DAI widgets */ /* link the DAI widgets */
play_w = codec_dai->playback_widget; sink = codec_dai->playback_widget;
capture_w = cpu_dai->capture_widget; source = cpu_dai->capture_widget;
if (play_w && capture_w) { if (sink && source) {
ret = snd_soc_dapm_new_pcm(card, dai_link->params, ret = snd_soc_dapm_new_pcm(card, dai_link->params,
dai_link->num_params, capture_w, dai_link->num_params,
play_w); source, sink);
if (ret != 0) { if (ret != 0) {
dev_err(card->dev, "ASoC: Can't link %s to %s: %d\n", dev_err(card->dev, "ASoC: Can't link %s to %s: %d\n",
play_w->name, capture_w->name, ret); sink->name, source->name, ret);
return ret; return ret;
} }
} }
play_w = cpu_dai->playback_widget; sink = cpu_dai->playback_widget;
capture_w = codec_dai->capture_widget; source = codec_dai->capture_widget;
if (play_w && capture_w) { if (sink && source) {
ret = snd_soc_dapm_new_pcm(card, dai_link->params, ret = snd_soc_dapm_new_pcm(card, dai_link->params,
dai_link->num_params, capture_w, dai_link->num_params,
play_w); source, sink);
if (ret != 0) { if (ret != 0) {
dev_err(card->dev, "ASoC: Can't link %s to %s: %d\n", dev_err(card->dev, "ASoC: Can't link %s to %s: %d\n",
play_w->name, capture_w->name, ret); sink->name, source->name, ret);
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