All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: Mark Brown <broonie@kernel.org>
Cc: Linux-ALSA <alsa-devel@alsa-project.org>
Subject: [PATCH v3 0/6] ASoC: Merge CPU/Codec DAIs
Date: 16 Mar 2020 15:36:26 +0900	[thread overview]
Message-ID: <87y2s0olg6.wl-kuninori.morimoto.gx@renesas.com> (raw)


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()

 include/sound/soc.h  |   7 +-
 sound/soc/soc-core.c |  66 ++++-----
 sound/soc/soc-dapm.c |   9 +-
 sound/soc/soc-pcm.c  | 337 +++++++++++--------------------------------
 4 files changed, 116 insertions(+), 303 deletions(-)

-- 
2.17.1


             reply	other threads:[~2020-03-16  6:37 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-16  6:36 Kuninori Morimoto [this message]
2020-03-16  6:36 ` [PATCH 1/6] ASoC: soc-core: Merge CPU/Codec DAIs Kuninori Morimoto
2020-03-17 14:40   ` Pierre-Louis Bossart
2020-03-16  6:37 ` [PATCH 2/6] ASoC: soc-core: Merge for_each_rtd_cpu/codec_dais() Kuninori Morimoto
2020-03-16  6:37 ` [PATCH 3/6] ASoC: soc-dapm: " Kuninori Morimoto
2020-03-16  6:37 ` [PATCH 4/6] ASoC: soc-pcm: " Kuninori Morimoto
2020-03-20 20:45   ` Applied "ASoC: soc-pcm: Merge for_each_rtd_cpu/codec_dais()" to the asoc tree Mark Brown
2020-03-16  6:37 ` [PATCH 5/6] ASoC: soc-core: Merge CPU/Codec for soc_dai_pcm_new() Kuninori Morimoto
2020-03-16  6:37 ` [PATCH 6/6] ASoC: soc-pcm: Merge CPU/Codec MSB at soc_pcm_apply_msb() Kuninori Morimoto
2020-03-17 19:08   ` Lars-Peter Clausen
2020-03-18  0:07     ` Kuninori Morimoto
2020-03-18 11:48       ` Mark Brown
2020-03-16 17:32 ` [PATCH v3 0/6] ASoC: Merge CPU/Codec DAIs Sridharan, Ranjani
2020-03-17 14:50 ` Pierre-Louis Bossart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y2s0olg6.wl-kuninori.morimoto.gx@renesas.com \
    --to=kuninori.morimoto.gx@renesas.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.