mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-04 01:49:36 +00:00
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>
This commit is contained in:
parent
7426af5010
commit
ca58221d22
1 changed files with 8 additions and 8 deletions
|
@ -990,6 +990,14 @@ static int soc_pcm_hw_params(struct snd_pcm_substream *substream,
|
|||
if (ret < 0)
|
||||
goto interface_err;
|
||||
|
||||
/* store the parameters for each DAIs */
|
||||
cpu_dai->rate = params_rate(params);
|
||||
cpu_dai->channels = params_channels(params);
|
||||
cpu_dai->sample_bits =
|
||||
snd_pcm_format_physical_width(params_format(params));
|
||||
|
||||
snd_soc_dapm_update_dai(substream, params, cpu_dai);
|
||||
|
||||
for_each_rtdcom(rtd, rtdcom) {
|
||||
component = rtdcom->component;
|
||||
|
||||
|
@ -1007,14 +1015,6 @@ static int soc_pcm_hw_params(struct snd_pcm_substream *substream,
|
|||
}
|
||||
component = NULL;
|
||||
|
||||
/* store the parameters for each DAIs */
|
||||
cpu_dai->rate = params_rate(params);
|
||||
cpu_dai->channels = params_channels(params);
|
||||
cpu_dai->sample_bits =
|
||||
snd_pcm_format_physical_width(params_format(params));
|
||||
|
||||
snd_soc_dapm_update_dai(substream, params, cpu_dai);
|
||||
|
||||
ret = soc_pcm_params_symmetry(substream, params);
|
||||
if (ret)
|
||||
goto component_err;
|
||||
|
|
Loading…
Reference in a new issue