summaryrefslogtreecommitdiff
path: root/sound/soc/soc-pcm.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2020-03-10 16:51:00 +0300
committerMark Brown <broonie@kernel.org>2020-03-10 16:51:00 +0300
commitc23f044427f36392264861ca40dcb4202272ef11 (patch)
tree75a85f8ffd8116625a587709c5e88db6ae3da566 /sound/soc/soc-pcm.c
parenta3b7343e3f8c4c74516df41827b6d81905e346a1 (diff)
parent14596692631eadbefba8419698cccfc23bfccd2b (diff)
downloadlinux-c23f044427f36392264861ca40dcb4202272ef11.tar.xz
Merge series "ASoC: soc-pcm cleanup step6" from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:
Hi Mark We are using plural form for for_each_xxx() macro. But, for_each_rtd_codec/cpu_dai() are out of this rule. 1) - 7) are for it. 8) - 9) add new for_each_card_xxx() macros. Kuninori Morimoto (9): 1) ASoC: soc.h: add for_each_rtd_codecs/cpus_dai() macro 2) ASoC: Intel: use for_each_rtd_codecs/cpus_dai() macro 3) ASoC: mediatek: use for_each_rtd_codecs/cpus_dai() macro 4) ASoC: meson: use for_each_rtd_codecs/cpus_dai() macro 5) ASoC: qcom: use for_each_rtd_codecs/cpus_dai() macro 6) ASoC: soc: use for_each_rtd_codecs/cpus_dai() macro 7) ASoC: soc.h: remove non plural form for_each_xxx macro 8) ASoC: soc-dapm: add for_each_card_dapms() macro 9) ASoC: soc-dapm: add for_each_card_widgets() macro drivers/soundwire/qcom.c | 2 +- include/sound/soc.h | 28 ++-- sound/soc/intel/boards/cml_rt1011_rt5682.c | 2 +- sound/soc/intel/boards/kbl_da7219_max98927.c | 4 +- sound/soc/intel/boards/kbl_rt5663_max98927.c | 2 +- .../intel/boards/kbl_rt5663_rt5514_max98927.c | 2 +- .../mediatek/mt8173/mt8173-rt5650-rt5514.c | 2 +- .../mediatek/mt8173/mt8173-rt5650-rt5676.c | 2 +- sound/soc/mediatek/mt8173/mt8173-rt5650.c | 2 +- .../mediatek/mt8183/mt8183-da7219-max98357.c | 4 +- sound/soc/meson/axg-card.c | 2 +- sound/soc/meson/meson-card-utils.c | 2 +- sound/soc/qcom/apq8016_sbc.c | 2 +- sound/soc/qcom/sdm845.c | 8 +- sound/soc/soc-core.c | 16 +-- sound/soc/soc-dapm.c | 53 ++++---- sound/soc/soc-pcm.c | 124 +++++++++--------- sound/soc/soc-topology.c | 2 +- 18 files changed, 134 insertions(+), 125 deletions(-) -- 2.17.1
Diffstat (limited to 'sound/soc/soc-pcm.c')
-rw-r--r--sound/soc/soc-pcm.c124
1 files changed, 62 insertions, 62 deletions
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index e7915adaaf0a..fbea005043de 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -265,17 +265,17 @@ static void snd_soc_runtime_action(struct snd_soc_pcm_runtime *rtd,
lockdep_assert_held(&rtd->card->pcm_mutex);
- for_each_rtd_cpu_dai(rtd, i, cpu_dai)
+ for_each_rtd_cpu_dais(rtd, i, cpu_dai)
cpu_dai->stream_active[stream] += action;
- for_each_rtd_codec_dai(rtd, i, codec_dai)
+ for_each_rtd_codec_dais(rtd, i, codec_dai)
codec_dai->stream_active[stream] += action;
- for_each_rtd_cpu_dai(rtd, i, cpu_dai) {
+ for_each_rtd_cpu_dais(rtd, i, cpu_dai) {
cpu_dai->active += action;
cpu_dai->component->active += action;
}
- for_each_rtd_codec_dai(rtd, i, codec_dai) {
+ for_each_rtd_codec_dais(rtd, i, codec_dai) {
codec_dai->active += action;
codec_dai->component->active += action;
}
@@ -455,14 +455,14 @@ static int soc_pcm_params_symmetry(struct snd_pcm_substream *substream,
/* reject unmatched parameters when applying symmetry */
symmetry = rtd->dai_link->symmetric_rates;
- for_each_rtd_cpu_dai(rtd, i, cpu_dai)
+ for_each_rtd_cpu_dais(rtd, i, cpu_dai)
symmetry |= cpu_dai->driver->symmetric_rates;
- for_each_rtd_codec_dai(rtd, i, codec_dai)
+ for_each_rtd_codec_dais(rtd, i, codec_dai)
symmetry |= codec_dai->driver->symmetric_rates;
if (symmetry) {
- for_each_rtd_cpu_dai(rtd, i, cpu_dai) {
+ for_each_rtd_cpu_dais(rtd, i, cpu_dai) {
if (cpu_dai->rate && cpu_dai->rate != rate) {
dev_err(rtd->dev, "ASoC: unmatched rate symmetry: %d - %d\n",
cpu_dai->rate, rate);
@@ -473,14 +473,14 @@ static int soc_pcm_params_symmetry(struct snd_pcm_substream *substream,
symmetry = rtd->dai_link->symmetric_channels;
- for_each_rtd_cpu_dai(rtd, i, cpu_dai)
+ for_each_rtd_cpu_dais(rtd, i, cpu_dai)
symmetry |= cpu_dai->driver->symmetric_channels;
- for_each_rtd_codec_dai(rtd, i, codec_dai)
+ for_each_rtd_codec_dais(rtd, i, codec_dai)
symmetry |= codec_dai->driver->symmetric_channels;
if (symmetry) {
- for_each_rtd_cpu_dai(rtd, i, cpu_dai) {
+ for_each_rtd_cpu_dais(rtd, i, cpu_dai) {
if (cpu_dai->channels &&
cpu_dai->channels != channels) {
dev_err(rtd->dev, "ASoC: unmatched channel symmetry: %d - %d\n",
@@ -492,14 +492,14 @@ static int soc_pcm_params_symmetry(struct snd_pcm_substream *substream,
symmetry = rtd->dai_link->symmetric_samplebits;
- for_each_rtd_cpu_dai(rtd, i, cpu_dai)
+ for_each_rtd_cpu_dais(rtd, i, cpu_dai)
symmetry |= cpu_dai->driver->symmetric_samplebits;
- for_each_rtd_codec_dai(rtd, i, codec_dai)
+ for_each_rtd_codec_dais(rtd, i, codec_dai)
symmetry |= codec_dai->driver->symmetric_samplebits;
if (symmetry) {
- for_each_rtd_cpu_dai(rtd, i, cpu_dai) {
+ for_each_rtd_cpu_dais(rtd, i, cpu_dai) {
if (cpu_dai->sample_bits &&
cpu_dai->sample_bits != sample_bits) {
dev_err(rtd->dev, "ASoC: unmatched sample bits symmetry: %d - %d\n",
@@ -524,13 +524,13 @@ static bool soc_pcm_has_symmetry(struct snd_pcm_substream *substream)
link->symmetric_channels ||
link->symmetric_samplebits;
- for_each_rtd_cpu_dai(rtd, i, cpu_dai)
+ for_each_rtd_cpu_dais(rtd, i, cpu_dai)
symmetry = symmetry ||
cpu_dai->driver->symmetric_rates ||
cpu_dai->driver->symmetric_channels ||
cpu_dai->driver->symmetric_samplebits;
- for_each_rtd_codec_dai(rtd, i, codec_dai)
+ for_each_rtd_codec_dais(rtd, i, codec_dai)
symmetry = symmetry ||
codec_dai->driver->symmetric_rates ||
codec_dai->driver->symmetric_channels ||
@@ -563,7 +563,7 @@ static void soc_pcm_apply_msb(struct snd_pcm_substream *substream)
int i;
unsigned int bits = 0, cpu_bits = 0;
- for_each_rtd_codec_dai(rtd, i, codec_dai) {
+ for_each_rtd_codec_dais(rtd, i, codec_dai) {
pcm_codec = snd_soc_dai_get_pcm_stream(codec_dai, stream);
if (pcm_codec->sig_bits == 0) {
@@ -573,7 +573,7 @@ static void soc_pcm_apply_msb(struct snd_pcm_substream *substream)
bits = max(pcm_codec->sig_bits, bits);
}
- for_each_rtd_cpu_dai(rtd, i, cpu_dai) {
+ for_each_rtd_cpu_dais(rtd, i, cpu_dai) {
pcm_cpu = snd_soc_dai_get_pcm_stream(cpu_dai, stream);
if (pcm_cpu->sig_bits == 0) {
@@ -612,7 +612,7 @@ int snd_soc_runtime_calc_hw(struct snd_soc_pcm_runtime *rtd,
int i;
/* first calculate min/max only for CPUs in the DAI link */
- for_each_rtd_cpu_dai(rtd, i, cpu_dai) {
+ for_each_rtd_cpu_dais(rtd, i, cpu_dai) {
/*
* Skip CPUs which don't support the current stream type.
@@ -635,7 +635,7 @@ int snd_soc_runtime_calc_hw(struct snd_soc_pcm_runtime *rtd,
}
/* second calculate min/max only for CODECs in the DAI link */
- for_each_rtd_codec_dai(rtd, i, codec_dai) {
+ for_each_rtd_codec_dais(rtd, i, codec_dai) {
/*
* Skip CODECs which don't support the current stream type.
@@ -780,10 +780,10 @@ static int soc_pcm_close(struct snd_pcm_substream *substream)
snd_soc_runtime_deactivate(rtd, substream->stream);
- for_each_rtd_cpu_dai(rtd, i, cpu_dai)
+ for_each_rtd_cpu_dais(rtd, i, cpu_dai)
snd_soc_dai_shutdown(cpu_dai, substream);
- for_each_rtd_codec_dai(rtd, i, codec_dai)
+ for_each_rtd_codec_dais(rtd, i, codec_dai)
snd_soc_dai_shutdown(codec_dai, substream);
soc_rtd_shutdown(rtd, substream);
@@ -842,7 +842,7 @@ static int soc_pcm_open(struct snd_pcm_substream *substream)
}
/* startup the audio subsystem */
- for_each_rtd_cpu_dai(rtd, i, cpu_dai) {
+ for_each_rtd_cpu_dais(rtd, i, cpu_dai) {
ret = snd_soc_dai_startup(cpu_dai, substream);
if (ret < 0) {
dev_err(cpu_dai->dev, "ASoC: can't open interface %s: %d\n",
@@ -851,7 +851,7 @@ static int soc_pcm_open(struct snd_pcm_substream *substream)
}
}
- for_each_rtd_codec_dai(rtd, i, codec_dai) {
+ for_each_rtd_codec_dais(rtd, i, codec_dai) {
ret = snd_soc_dai_startup(codec_dai, substream);
if (ret < 0) {
dev_err(codec_dai->dev,
@@ -903,7 +903,7 @@ static int soc_pcm_open(struct snd_pcm_substream *substream)
soc_pcm_apply_msb(substream);
/* Symmetry only applies if we've already got an active stream. */
- for_each_rtd_cpu_dai(rtd, i, cpu_dai) {
+ for_each_rtd_cpu_dais(rtd, i, cpu_dai) {
if (cpu_dai->active) {
ret = soc_pcm_apply_symmetry(substream, cpu_dai);
if (ret != 0)
@@ -911,7 +911,7 @@ static int soc_pcm_open(struct snd_pcm_substream *substream)
}
}
- for_each_rtd_codec_dai(rtd, i, codec_dai) {
+ for_each_rtd_codec_dais(rtd, i, codec_dai) {
if (codec_dai->active) {
ret = soc_pcm_apply_symmetry(substream, codec_dai);
if (ret != 0)
@@ -935,10 +935,10 @@ dynamic:
return 0;
config_err:
- for_each_rtd_codec_dai(rtd, i, codec_dai)
+ for_each_rtd_codec_dais(rtd, i, codec_dai)
snd_soc_dai_shutdown(codec_dai, substream);
cpu_dai_err:
- for_each_rtd_cpu_dai(rtd, i, cpu_dai)
+ for_each_rtd_cpu_dais(rtd, i, cpu_dai)
snd_soc_dai_shutdown(cpu_dai, substream);
soc_rtd_shutdown(rtd, substream);
@@ -1000,7 +1000,7 @@ static int soc_pcm_prepare(struct snd_pcm_substream *substream)
}
}
- for_each_rtd_codec_dai(rtd, i, codec_dai) {
+ for_each_rtd_codec_dais(rtd, i, codec_dai) {
ret = snd_soc_dai_prepare(codec_dai, substream);
if (ret < 0) {
dev_err(codec_dai->dev,
@@ -1010,7 +1010,7 @@ static int soc_pcm_prepare(struct snd_pcm_substream *substream)
}
}
- for_each_rtd_cpu_dai(rtd, i, cpu_dai) {
+ for_each_rtd_cpu_dais(rtd, i, cpu_dai) {
ret = snd_soc_dai_prepare(cpu_dai, substream);
if (ret < 0) {
dev_err(cpu_dai->dev,
@@ -1029,10 +1029,10 @@ static int soc_pcm_prepare(struct snd_pcm_substream *substream)
snd_soc_dapm_stream_event(rtd, substream->stream,
SND_SOC_DAPM_STREAM_START);
- for_each_rtd_codec_dai(rtd, i, codec_dai)
+ for_each_rtd_codec_dais(rtd, i, codec_dai)
snd_soc_dai_digital_mute(codec_dai, 0,
substream->stream);
- for_each_rtd_cpu_dai(rtd, i, cpu_dai)
+ for_each_rtd_cpu_dais(rtd, i, cpu_dai)
snd_soc_dai_digital_mute(cpu_dai, 0, substream->stream);
out:
@@ -1097,7 +1097,7 @@ static int soc_pcm_hw_params(struct snd_pcm_substream *substream,
goto out;
}
- for_each_rtd_codec_dai(rtd, i, codec_dai) {
+ for_each_rtd_codec_dais(rtd, i, codec_dai) {
struct snd_pcm_hw_params codec_params;
/*
@@ -1144,7 +1144,7 @@ static int soc_pcm_hw_params(struct snd_pcm_substream *substream,
snd_soc_dapm_update_dai(substream, &codec_params, codec_dai);
}
- for_each_rtd_cpu_dai(rtd, i, cpu_dai) {
+ for_each_rtd_cpu_dais(rtd, i, cpu_dai) {
/*
* Skip CPUs which don't support the current stream
* type. See soc_pcm_init_runtime_hw() for more details
@@ -1186,7 +1186,7 @@ component_err:
i = rtd->num_cpus;
interface_err:
- for_each_rtd_cpu_dai_rollback(rtd, i, cpu_dai) {
+ for_each_rtd_cpu_dais_rollback(rtd, i, cpu_dai) {
if (!snd_soc_dai_stream_valid(cpu_dai, substream->stream))
continue;
@@ -1197,7 +1197,7 @@ interface_err:
i = rtd->num_codecs;
codec_err:
- for_each_rtd_codec_dai_rollback(rtd, i, codec_dai) {
+ for_each_rtd_codec_dais_rollback(rtd, i, codec_dai) {
if (!snd_soc_dai_stream_valid(codec_dai, substream->stream))
continue;
@@ -1224,7 +1224,7 @@ static int soc_pcm_hw_free(struct snd_pcm_substream *substream)
mutex_lock_nested(&rtd->card->pcm_mutex, rtd->card->pcm_subclass);
/* clear the corresponding DAIs parameters when going to be inactive */
- for_each_rtd_cpu_dai(rtd, i, cpu_dai) {
+ for_each_rtd_cpu_dais(rtd, i, cpu_dai) {
if (cpu_dai->active == 1) {
cpu_dai->rate = 0;
cpu_dai->channels = 0;
@@ -1232,7 +1232,7 @@ static int soc_pcm_hw_free(struct snd_pcm_substream *substream)
}
}
- for_each_rtd_codec_dai(rtd, i, codec_dai) {
+ for_each_rtd_codec_dais(rtd, i, codec_dai) {
if (codec_dai->active == 1) {
codec_dai->rate = 0;
codec_dai->channels = 0;
@@ -1241,7 +1241,7 @@ static int soc_pcm_hw_free(struct snd_pcm_substream *substream)
}
/* apply codec digital mute */
- for_each_rtd_codec_dai(rtd, i, codec_dai) {
+ for_each_rtd_codec_dais(rtd, i, codec_dai) {
int active = codec_dai->stream_active[substream->stream];
if (active == 1)
@@ -1249,7 +1249,7 @@ static int soc_pcm_hw_free(struct snd_pcm_substream *substream)
substream->stream);
}
- for_each_rtd_cpu_dai(rtd, i, cpu_dai) {
+ for_each_rtd_cpu_dais(rtd, i, cpu_dai) {
int active = cpu_dai->stream_active[substream->stream];
if (active == 1)
@@ -1264,14 +1264,14 @@ static int soc_pcm_hw_free(struct snd_pcm_substream *substream)
soc_pcm_components_hw_free(substream, NULL);
/* now free hw params for the DAIs */
- for_each_rtd_codec_dai(rtd, i, codec_dai) {
+ for_each_rtd_codec_dais(rtd, i, codec_dai) {
if (!snd_soc_dai_stream_valid(codec_dai, substream->stream))
continue;
snd_soc_dai_hw_free(codec_dai, substream);
}
- for_each_rtd_cpu_dai(rtd, i, cpu_dai) {
+ for_each_rtd_cpu_dais(rtd, i, cpu_dai) {
if (!snd_soc_dai_stream_valid(cpu_dai, substream->stream))
continue;
@@ -1300,13 +1300,13 @@ static int soc_pcm_trigger_start(struct snd_pcm_substream *substream, int cmd)
return ret;
}
- for_each_rtd_cpu_dai(rtd, i, cpu_dai) {
+ for_each_rtd_cpu_dais(rtd, i, cpu_dai) {
ret = snd_soc_dai_trigger(cpu_dai, substream, cmd);
if (ret < 0)
return ret;
}
- for_each_rtd_codec_dai(rtd, i, codec_dai) {
+ for_each_rtd_codec_dais(rtd, i, codec_dai) {
ret = snd_soc_dai_trigger(codec_dai, substream, cmd);
if (ret < 0)
return ret;
@@ -1323,13 +1323,13 @@ static int soc_pcm_trigger_stop(struct snd_pcm_substream *substream, int cmd)
struct snd_soc_dai *codec_dai;
int i, ret;
- for_each_rtd_codec_dai(rtd, i, codec_dai) {
+ for_each_rtd_codec_dais(rtd, i, codec_dai) {
ret = snd_soc_dai_trigger(codec_dai, substream, cmd);
if (ret < 0)
return ret;
}
- for_each_rtd_cpu_dai(rtd, i, cpu_dai) {
+ for_each_rtd_cpu_dais(rtd, i, cpu_dai) {
ret = snd_soc_dai_trigger(cpu_dai, substream, cmd);
if (ret < 0)
return ret;
@@ -1378,13 +1378,13 @@ static int soc_pcm_bespoke_trigger(struct snd_pcm_substream *substream,
struct snd_soc_dai *codec_dai;
int i, ret;
- for_each_rtd_codec_dai(rtd, i, codec_dai) {
+ for_each_rtd_codec_dais(rtd, i, codec_dai) {
ret = snd_soc_dai_bespoke_trigger(codec_dai, substream, cmd);
if (ret < 0)
return ret;
}
- for_each_rtd_cpu_dai(rtd, i, cpu_dai) {
+ for_each_rtd_cpu_dais(rtd, i, cpu_dai) {
ret = snd_soc_dai_bespoke_trigger(cpu_dai, substream, cmd);
if (ret < 0)
return ret;
@@ -1417,13 +1417,13 @@ static snd_pcm_uframes_t soc_pcm_pointer(struct snd_pcm_substream *substream)
/* base delay if assigned in pointer callback */
delay = runtime->delay;
- for_each_rtd_cpu_dai(rtd, i, cpu_dai) {
+ for_each_rtd_cpu_dais(rtd, i, cpu_dai) {
cpu_delay = max(cpu_delay,
snd_soc_dai_delay(cpu_dai, substream));
}
delay += cpu_delay;
- for_each_rtd_codec_dai(rtd, i, codec_dai) {
+ for_each_rtd_codec_dais(rtd, i, codec_dai) {
codec_delay = max(codec_delay,
snd_soc_dai_delay(codec_dai, substream));
}
@@ -1544,7 +1544,7 @@ static struct snd_soc_pcm_runtime *dpcm_get_be(struct snd_soc_card *card,
if (!be->dai_link->no_pcm)
continue;
- for_each_rtd_cpu_dai(be, i, dai) {
+ for_each_rtd_cpu_dais(be, i, dai) {
w = snd_soc_dai_get_widget(dai, stream);
dev_dbg(card->dev, "ASoC: try BE : %s\n",
@@ -1554,7 +1554,7 @@ static struct snd_soc_pcm_runtime *dpcm_get_be(struct snd_soc_card *card,
return be;
}
- for_each_rtd_codec_dai(be, i, dai) {
+ for_each_rtd_codec_dais(be, i, dai) {
w = snd_soc_dai_get_widget(dai, stream);
if (w == widget)
@@ -1642,7 +1642,7 @@ static int dpcm_prune_paths(struct snd_soc_pcm_runtime *fe, int stream,
/* is there a valid CPU DAI widget for this BE */
do_prune = 1;
- for_each_rtd_cpu_dai(dpcm->be, i, dai) {
+ for_each_rtd_cpu_dais(dpcm->be, i, dai) {
widget = snd_soc_dai_get_widget(dai, stream);
/*
@@ -1657,7 +1657,7 @@ static int dpcm_prune_paths(struct snd_soc_pcm_runtime *fe, int stream,
/* is there a valid CODEC DAI widget for this BE */
do_prune = 1;
- for_each_rtd_codec_dai(dpcm->be, i, dai) {
+ for_each_rtd_codec_dais(dpcm->be, i, dai) {
widget = snd_soc_dai_get_widget(dai, stream);
/* prune the BE if it's no longer in our active list */
@@ -1910,7 +1910,7 @@ static void dpcm_runtime_merge_format(struct snd_pcm_substream *substream,
struct snd_soc_pcm_stream *codec_stream;
int i;
- for_each_rtd_codec_dai(be, i, dai) {
+ for_each_rtd_codec_dais(be, i, dai) {
/*
* Skip CODECs which don't support the current stream
* type. See soc_pcm_init_runtime_hw() for more details
@@ -1948,7 +1948,7 @@ static void dpcm_runtime_merge_chan(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai;
int i;
- for_each_rtd_cpu_dai(be, i, dai) {
+ for_each_rtd_cpu_dais(be, i, dai) {
/*
* Skip CPUs which don't support the current stream
* type. See soc_pcm_init_runtime_hw() for more details
@@ -2003,7 +2003,7 @@ static void dpcm_runtime_merge_rate(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai;
int i;
- for_each_rtd_cpu_dai(be, i, dai) {
+ for_each_rtd_cpu_dais(be, i, dai) {
/*
* Skip CPUs which don't support the current stream
* type. See soc_pcm_init_runtime_hw() for more details
@@ -2020,7 +2020,7 @@ static void dpcm_runtime_merge_rate(struct snd_pcm_substream *substream,
cpu_stream->rates);
}
- for_each_rtd_codec_dai(be, i, dai) {
+ for_each_rtd_codec_dais(be, i, dai) {
/*
* Skip CODECs which don't support the current stream
* type. See soc_pcm_init_runtime_hw() for more details
@@ -2046,7 +2046,7 @@ static void dpcm_set_fe_runtime(struct snd_pcm_substream *substream)
struct snd_soc_dai *cpu_dai;
int i;
- for_each_rtd_cpu_dai(rtd, i, cpu_dai) {
+ for_each_rtd_cpu_dais(rtd, i, cpu_dai) {
/*
* Skip CPUs which don't support the current stream
* type. See soc_pcm_init_runtime_hw() for more details
@@ -2102,7 +2102,7 @@ static int dpcm_apply_symmetry(struct snd_pcm_substream *fe_substream,
if (soc_pcm_has_symmetry(fe_substream))
fe_substream->runtime->hw.info |= SNDRV_PCM_INFO_JOINT_DUPLEX;
- for_each_rtd_cpu_dai (fe, i, fe_cpu_dai) {
+ for_each_rtd_cpu_dais (fe, i, fe_cpu_dai) {
/* Symmetry only applies if we've got an active stream. */
if (fe_cpu_dai->active) {
err = soc_pcm_apply_symmetry(fe_substream, fe_cpu_dai);
@@ -2133,7 +2133,7 @@ static int dpcm_apply_symmetry(struct snd_pcm_substream *fe_substream,
be_substream->runtime->hw.info |= SNDRV_PCM_INFO_JOINT_DUPLEX;
/* Symmetry only applies if we've got an active stream. */
- for_each_rtd_cpu_dai(rtd, i, cpu_dai) {
+ for_each_rtd_cpu_dais(rtd, i, cpu_dai) {
if (cpu_dai->active) {
err = soc_pcm_apply_symmetry(fe_substream,
cpu_dai);
@@ -2142,7 +2142,7 @@ static int dpcm_apply_symmetry(struct snd_pcm_substream *fe_substream,
}
}
- for_each_rtd_codec_dai(rtd, i, codec_dai) {
+ for_each_rtd_codec_dais(rtd, i, codec_dai) {
if (codec_dai->active) {
err = soc_pcm_apply_symmetry(fe_substream,
codec_dai);
@@ -3075,7 +3075,7 @@ int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num)
int cpu_playback = rtd->dai_link->params ?
SNDRV_PCM_STREAM_CAPTURE : SNDRV_PCM_STREAM_PLAYBACK;
- for_each_rtd_codec_dai(rtd, i, codec_dai) {
+ for_each_rtd_codec_dais(rtd, i, codec_dai) {
if (rtd->num_cpus == 1) {
cpu_dai = rtd->cpu_dais[0];
} else if (rtd->num_cpus == rtd->num_codecs) {