[PATCH 0/7] ASoC: adds new .get_fmt support

Kuninori Morimoto kuninori.morimoto.gx at renesas.com
Thu Apr 22 03:52:57 CEST 2021


Hi Mark

These are a little bit challenging patch-set.

We need to set dai_link->dai_fmt to select CPU/Codec settings,
and it is selected by Sound Card Driver, today.

Because of it, Sound Card user need to know both CPU / Codec
available dai_fmt, and needs to select it.
For example simple-card / audio-graph case, it is selected by
"format" and "bitclock/frame-master/inversion" on DT.

But, it can be automatically selected if both CPU and Codec drivers
indicate it to ALSA SoC Framework, somehow.
If we can use it, Sound Card Driver user no longer need to select it,
and I want to use this style on new audio-graph-card2.

This patch-set adds new .get_fmt callback which indicate available
dai_fmt to ALSA SoC Framework.
Of course Sound Card Driver can still select dai_link->dai_fmt, same as before.
If Sound Card Driver didn't set it, and if both CPU / Codec had
.get_fmt callback, dai_link->dai_fmt will be automatically selected.

Kuninori Morimoto (7):
  ASoC: soc-core: move snd_soc_runtime_set_dai_fmt() to upside
  ASoC: soc-core: add snd_soc_runtime_get_dai_fmt()
  ASoC: ak4613: add .get_fmt support
  ASoC: pcm3168a: add .get_fmt support
  ASoC: rsnd: add .get_fmt support
  ASoC: fsi: add .get_fmt support
  ASoC: hdmi-codec: add .get_fmt support

 include/sound/soc-dai.h       |  35 ++++++
 sound/soc/codecs/ak4613.c     |  10 ++
 sound/soc/codecs/hdmi-codec.c |  19 ++++
 sound/soc/codecs/pcm3168a.c   |  13 +++
 sound/soc/sh/fsi.c            |  13 +++
 sound/soc/sh/rcar/core.c      |  16 +++
 sound/soc/soc-core.c          | 195 +++++++++++++++++++++++-----------
 sound/soc/soc-dai.c           |  19 ++++
 sound/soc/soc-utils.c         |  26 +++++
 9 files changed, 284 insertions(+), 62 deletions(-)

-- 
2.25.1



More information about the Alsa-devel mailing list