All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/8] ASoC: tidyup snd_soc_of_parse_daifmt()
@ 2021-06-14  0:56 Kuninori Morimoto
  2021-06-14  0:56 ` [PATCH v3 1/8] ASoC: soc-core: add snd_soc_daifmt_clock_provider_from_bitmap() Kuninori Morimoto
                   ` (8 more replies)
  0 siblings, 9 replies; 12+ messages in thread
From: Kuninori Morimoto @ 2021-06-14  0:56 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown
  Cc: Alexandre Belloni, Timur Tabi, Xiubo Li, Martin Blumenstingl,
	Shengjiu Wang, Sameer Pujar, Neil Armstrong, Nicolas Ferre,
	Nicolin Chen, Ludovic Desroches, Kevin Hilman, Codrin Ciubotariu,
	alsa-devel, Fabio Estevam, Jerome Brunet


Hi Mark

These are v3 of parsing for daifmt.

I want to add new audio-graph-card2 sound card driver,
and this is last part of necessary soc-core cleanup for it.

Current some drivers are using DT, and then,
snd_soc_of_parse_daifmt() parses daifmt, but bitclock/frame provider
parsing part is one of headache, because we are assuming below both cases.

A)	node {
		bitclock-master;
		frame-master;
		...
	};
    
B)	link {
		bitclock-master = <&xxx>;
		frame-master = <&xxx>;
		...
	};

The original was style A), and style B) was added later.

snd_soc_of_parse_daifmt() parses A) style as original style,
and user need to update to B) style for clock_provider part if needed.

To handle it more flexibile, this patch-set adds new functions
which separates snd_soc_of_parse_daifmt() helper function.

	snd_soc_daifmt_parse_format()			: format part
	snd_soc_daifmt_parse_clock_provider_as_flag()	: clock part for style A)
	snd_soc_daifmt_parse_clock_provider_as_phandl()	: clock part for style B)
	snd_soc_daifmt_parse_clock_provider_as_bitmap()	: clock part use with _from_bitmap

v1 -> v2
	- tidyup parse_clock_provider functions to _as_flag/phandle/bitmap()
	- don't exchange code style on each drivers.

v2 -> v3
	- use daifmt as much as possible (don't use daiclk) on each driver.

Link: https://lore.kernel.org/r/875yypdxlm.wl-kuninori.morimoto.gx@renesas.com
Link: https://lore.kernel.org/r/87czsvdc4o.wl-kuninori.morimoto.gx@renesas.com

Kuninori Morimoto (8):
  ASoC: soc-core: add snd_soc_daifmt_clock_provider_from_bitmap()
  ASoC: soc-core: add snd_soc_daifmt_clock_provider_fliped()
  ASoC: soc-core: add snd_soc_daifmt_parse_format/clock_provider()
  ASoC: atmel: switch to use snd_soc_daifmt_parse_format/clock_provider()
  ASoC: fsl: switch to use snd_soc_daifmt_parse_format/clock_provider()
  ASoC: meson: switch to use snd_soc_daifmt_parse_format/clock_provider()
  ASoC: simple-card-utils: switch to use snd_soc_daifmt_parse_format/clock_provider()
  ASoC: soc-core: remove snd_soc_of_parse_daifmt()

 include/sound/soc.h                   |  21 ++++-
 sound/soc/atmel/mikroe-proto.c        |   9 ++-
 sound/soc/fsl/fsl-asoc-card.c         |   7 +-
 sound/soc/generic/simple-card-utils.c |  16 ++--
 sound/soc/meson/meson-card-utils.c    |   6 +-
 sound/soc/soc-core.c                  | 109 +++++++++++++++++---------
 6 files changed, 106 insertions(+), 62 deletions(-)

-- 
2.25.1


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

end of thread, other threads:[~2021-06-21 18:50 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-14  0:56 [PATCH v3 0/8] ASoC: tidyup snd_soc_of_parse_daifmt() Kuninori Morimoto
2021-06-14  0:56 ` [PATCH v3 1/8] ASoC: soc-core: add snd_soc_daifmt_clock_provider_from_bitmap() Kuninori Morimoto
2021-06-14  0:56 ` [PATCH v3 2/8] ASoC: soc-core: add snd_soc_daifmt_clock_provider_fliped() Kuninori Morimoto
2021-06-14  0:57 ` [PATCH v3 3/8] ASoC: soc-core: add snd_soc_daifmt_parse_format/clock_provider() Kuninori Morimoto
2021-06-14  0:57 ` [PATCH v3 4/8] ASoC: atmel: switch to use snd_soc_daifmt_parse_format/clock_provider() Kuninori Morimoto
2021-06-18 15:04   ` Codrin.Ciubotariu
2021-06-14  0:57 ` [PATCH v3 5/8] ASoC: fsl: " Kuninori Morimoto
2021-06-14  0:58 ` [PATCH v3 6/8] ASoC: meson: " Kuninori Morimoto
2021-06-18 14:26   ` Jerome Brunet
2021-06-14  0:58 ` [PATCH v3 7/8] ASoC: simple-card-utils: " Kuninori Morimoto
2021-06-14  0:58 ` [PATCH v3 8/8] ASoC: soc-core: remove snd_soc_of_parse_daifmt() Kuninori Morimoto
2021-06-21 18:46 ` [PATCH v3 0/8] ASoC: tidyup snd_soc_of_parse_daifmt() Mark Brown

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.