diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2019-05-13 03:07:43 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-05-13 07:45:59 -0400 |
commit | ca58221d2212aff4f41d05b99b1e2ed288b24ccc (patch) | |
tree | da3a7285ffcea3173c3a497d30ce5e23b0fe4b67 /sound/soc/soc-pcm.c | |
parent | 7426af5010d1b4a109e5d7ee639f3c3e0e5b3cdd (diff) |
ASoC: soc-pcm: do cpu_dai related operation at same place
cpu_dai related operation is separated by component operation at
soc_pcm_hw_params() somehow.
It is not readable, let's do it at same place
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-pcm.c')
-rw-r--r-- | sound/soc/soc-pcm.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index 0a4f60c7a188..ad560d9bf06a 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c | |||
@@ -990,6 +990,14 @@ static int soc_pcm_hw_params(struct snd_pcm_substream *substream, | |||
990 | if (ret < 0) | 990 | if (ret < 0) |
991 | goto interface_err; | 991 | goto interface_err; |
992 | 992 | ||
993 | /* store the parameters for each DAIs */ | ||
994 | cpu_dai->rate = params_rate(params); | ||
995 | cpu_dai->channels = params_channels(params); | ||
996 | cpu_dai->sample_bits = | ||
997 | snd_pcm_format_physical_width(params_format(params)); | ||
998 | |||
999 | snd_soc_dapm_update_dai(substream, params, cpu_dai); | ||
1000 | |||
993 | for_each_rtdcom(rtd, rtdcom) { | 1001 | for_each_rtdcom(rtd, rtdcom) { |
994 | component = rtdcom->component; | 1002 | component = rtdcom->component; |
995 | 1003 | ||
@@ -1007,14 +1015,6 @@ static int soc_pcm_hw_params(struct snd_pcm_substream *substream, | |||
1007 | } | 1015 | } |
1008 | component = NULL; | 1016 | component = NULL; |
1009 | 1017 | ||
1010 | /* store the parameters for each DAIs */ | ||
1011 | cpu_dai->rate = params_rate(params); | ||
1012 | cpu_dai->channels = params_channels(params); | ||
1013 | cpu_dai->sample_bits = | ||
1014 | snd_pcm_format_physical_width(params_format(params)); | ||
1015 | |||
1016 | snd_soc_dapm_update_dai(substream, params, cpu_dai); | ||
1017 | |||
1018 | ret = soc_pcm_params_symmetry(substream, params); | 1018 | ret = soc_pcm_params_symmetry(substream, params); |
1019 | if (ret) | 1019 | if (ret) |
1020 | goto component_err; | 1020 | goto component_err; |