[PATCH v3 0/6] ASoC: Merge CPU/Codec DAIs

Sridharan, Ranjani ranjani.sridharan at intel.com
Mon Mar 16 18:32:05 CET 2020


On Sun, Mar 15, 2020 at 11:38 PM Kuninori Morimoto <
kuninori.morimoto.gx at renesas.com> wrote:

>
> Hi Mark
>
> Previous v2 patch-set can't be applied
> on top of latest for-5.7 branch.
> This v3 is rebased version on top of it.
>
> Current ALSA SoC has CPU/Codec categorized DAIs.
> But we want to have non-categorized DAIs in the future.
> This was indicated by Lars-Peter before at ELCE.
> But, we *can't* do it right now.
> Because many drivers are considering CPU and Codec separately.
>
> Currently, rtd has both CPU/Codec DAIs array.
>
>         rtd->cpu_dais   = [][][][][][][][][]
>         rtd->codec_dais = [][][][][][][][][]
>
> This patch merges these, like below.
> It still can use rtd->cpu_dais, rtd->codec_dais.
> Of course for_each_rtd_cpu/codec_dais() macro too.
> So we can use/keep existing code/method same as before.
>
>         rtd->dais = [][][][][][][][][][][][][][][][][][]
>                     ^cpu_dais         ^codec_dais
>                     |--- num_cpus ---|--- num_codecs --|
>
>         rtd->cpu_dais   = &rtd->dais[0];
>         rtd->codec_dais = &rtd->dais[dai_link->num_cpus];
>
> There are some code which is doing something *only* for CPU or Codec.
> This patch-set do nothing to such code.
> Maybe it can be updated in the future, maybe not (can't).
>
> I hope this patch-set can be 1st step for non-categorized DAIs.
> But the main purpose so far is that replace the duplicate code
> for borh CPU and Codec.
>
>         -       for_each_rtd_cpu_dais() {
>         -               ...
>         -       }
>         -       for_each_rtd_codec_dais() {
>         -               ...
>         -       }
>         +       for_each_rtd_dais() {
>         +               ...
>         +       }
>
>
> Kuninori Morimoto (6):
>   ASoC: soc-core: Merge CPU/Codec DAIs
>   ASoC: soc-core: Merge for_each_rtd_cpu/codec_dais()
>   ASoC: soc-dapm: Merge for_each_rtd_cpu/codec_dais()
>   ASoC: soc-pcm: Merge for_each_rtd_cpu/codec_dais()
>   ASoC: soc-core: Merge CPU/Codec for soc_dai_pcm_new()
>   ASoC: soc-pcm: Merge CPU/Codec MSB at soc_pcm_apply_msb()

LGTM, thanks Morimoto-san.

Reviewed-by: Ranjani Sridharan <ranjani.sridharan at linux.intel.com>


More information about the Alsa-devel mailing list