[alsa-devel] [PATCH 00/15][RFC] ASoC: use snd_soc_dai_link_component style for simple card

Kuninori Morimoto kuninori.morimoto.gx at renesas.com
Mon Aug 20 07:09:46 CEST 2018


Hi Mark

I think ALSA SoC framework needs more update for modern style
As 1st step, codec/plaform are updated/converted to component style.
I think 2nd step is DAI/dai_link matching.
We want to use snd_soc_dai_link_component style instead of
legacy style for dai_link matching for CPU/Codec/Platform.
like this.

	[current]
	struct snd_soc_dai_link {
		...
		*cpu_name;
		*cpu_of_node;
		*cpu_dai_name;

		*codec_name;
		*codec_of_node;
		*codec_dai_name;
		*codecs;
		num_codecs;

		*platform_name;
		*platform_of_node;
		...
	}

	[we want]
	struct snd_soc_dai_link {
		...
		*cpus
		num_cpus;

		*codecs;
		num_codecs;

		*platform;
		...
	}

Above sample is still using CPU/Codec/Platform.
We can merge it into same snd_soc_dai_link_component list
if someone wants it. But anyway, CPU/Codec/Platform style
is not so bad, so far.

It will be more useful/simple code if we can use
snd_soc_dai_link_component for DAI instead of
xxx_name / xxx_of_node / xxx_dai_name.

Currently, only Codec is supporting/using snd_soc_dai_link_component
style. But we want to use it for CPU/Platform, too.
I know Shreyas is posting multi CPU style, then, it can support
snd_soc_dai_link_component style.

Using snd_soc_dai_link_component style for Platform is not difficult
I think. [09/15] patch add it on soc-core.
But, I can't test for all boards/platforms, thus,
I added [RFC] for these patches.

Now, we are still missing CPU part, but can use it for Codec/Platform.
These patches use it on simple/audio cards for Codec/Platform.
If these are OK, and if we could have CPU support in the future,
we can convert current legacy style to snd_soc_dai_link_component style
for all sound cards.

 1) -  8) use snd_soc_dai_link_component for Codec    on simple/audio card
 9) - 15) use snd_soc_dai_link_component for Platform on simple/audio card

Kuninori Morimoto (15):
   1) ASoC: simple_card_utils: support snd_soc_dai_link_component style for codec
   2) ASoC: simple-card: support snd_soc_dai_link_component style for codec
   3) ASoC: simple-scu-card: use simple_dai_props
   4) ASoC: simple-scu-card: support snd_soc_dai_link_component style for codec
   5) ASoC: audio-graph-card: support snd_soc_dai_link_component style for codec
   6) ASoC: audio-graph-scu-card: use simple_dai_props
   7) ASoC: audio-graph-scu-card: support snd_soc_dai_link_component style for codec
   8) ASoC: simple-card-util: remove dai_link compatible code for codec
   9) ASoC: soc-core: use snd_soc_dai_link_component for platform
  10) ASoC: simple-card-util: support snd_soc_dai_link_component style for platform
  11) ASoC: simple-card: support snd_soc_dai_link_component style for platform
  12) ASoC: simple-scu-card: support snd_soc_dai_link_component style for platform
  13) ASoC: audio-graph-card: support snd_soc_dai_link_component style for platform
  14) ASoC: audio-graph-scu-card: support snd_soc_dai_link_component style for platform
  15) ASoC: simple-card-util: remove dai_link compatible code for platform

 include/sound/simple_card_utils.h        | 27 ++++++++++------
 include/sound/soc.h                      |  2 ++
 sound/soc/generic/audio-graph-card.c     | 18 +++++++++--
 sound/soc/generic/audio-graph-scu-card.c | 55 +++++++++++++++++++++-----------
 sound/soc/generic/simple-card-utils.c    | 47 ++++++++++++++++++++++++---
 sound/soc/generic/simple-card.c          | 30 ++++++++++++++---
 sound/soc/generic/simple-scu-card.c      | 54 ++++++++++++++++++++-----------
 sound/soc/soc-core.c                     | 48 ++++++++++++++++++++++++----
 8 files changed, 217 insertions(+), 64 deletions(-)

--
2.7.4



More information about the Alsa-devel mailing list