All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/7] ASoC: adds new .get_fmt support
@ 2021-05-12  0:45 Kuninori Morimoto
  2021-05-12  0:45 ` [PATCH v2 1/7] ASoC: soc-core: move snd_soc_runtime_set_dai_fmt() to upside Kuninori Morimoto
                   ` (6 more replies)
  0 siblings, 7 replies; 12+ messages in thread
From: Kuninori Morimoto @ 2021-05-12  0:45 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA


Hi Mark

These are v2 of .get_fmt support.
This is a little bit challenging patch-set.
The idea/code is almost same as v1.

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.

By this patch, dai_fmt can be automatically selected from each
driver if both CPU / Codec driver had .get_dai_fmt callback.
Automatically selectable *field* is depends on each drivers.

For example, some driver want to select format "automatically",
but want to select other fields "manually", because of complex limitation.
Or other example, in case of both CPU and Codec are possible to be
clock provider, but the quality was different.
In these case, user need/want to *manually* select each fields
from Sound Card driver.

It uses Sound Card specified fields preferentially, and try to select
non-specific fields from CPU and Codec driver settings if driver had
callbacks.
In other words, we can select all dai_fmt via Sound Card driver
same as before.

Select dai_fmt 100% automatically is very difficult and will be very complex,
but select automatically some fields only is very easy, I guess.
This patch-set is based on such assumption.

v1 -> v2
	- Add more detail explanation on git-log, code, comment.
	- Possible to be Clock/Frame provider is depends on driver's situation.

Link: https://lore.kernel.org/r/871rb3hypy.wl-kuninori.morimoto.gx@renesas.com

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       |  45 +++++++
 sound/soc/codecs/ak4613.c     |  14 ++
 sound/soc/codecs/hdmi-codec.c |  22 ++++
 sound/soc/codecs/pcm3168a.c   |  19 +++
 sound/soc/sh/fsi.c            |  19 +++
 sound/soc/sh/rcar/adg.c       |   8 ++
 sound/soc/sh/rcar/core.c      |  24 +++-
 sound/soc/sh/rcar/rsnd.h      |   1 +
 sound/soc/soc-core.c          | 234 +++++++++++++++++++++++++---------
 sound/soc/soc-dai.c           |  18 +++
 sound/soc/soc-utils.c         |  32 +++++
 11 files changed, 372 insertions(+), 64 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2021-05-26 23:20 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-12  0:45 [PATCH v2 0/7] ASoC: adds new .get_fmt support Kuninori Morimoto
2021-05-12  0:45 ` [PATCH v2 1/7] ASoC: soc-core: move snd_soc_runtime_set_dai_fmt() to upside Kuninori Morimoto
2021-05-12  0:45 ` [PATCH v2 2/7] ASoC: soc-core: add snd_soc_runtime_get_dai_fmt() Kuninori Morimoto
2021-05-25 23:20   ` Mark Brown
2021-05-26  2:46     ` Kuninori Morimoto
2021-05-26 22:54       ` Kuninori Morimoto
2021-05-26 23:19         ` Mark Brown
2021-05-12  0:45 ` [PATCH v2 3/7] ASoC: ak4613: add .get_fmt support Kuninori Morimoto
2021-05-12  0:45 ` [PATCH v2 4/7] ASoC: pcm3168a: " Kuninori Morimoto
2021-05-12  0:45 ` [PATCH v2 5/7] ASoC: rsnd: " Kuninori Morimoto
2021-05-12  0:45 ` [PATCH v2 6/7] ASoC: fsi: " Kuninori Morimoto
2021-05-12  0:45 ` [PATCH v2 7/7] ASoC: hdmi-codec: " Kuninori Morimoto

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.