[v3,0/8] ASoC: tidyup snd_soc_of_parse_daifmt()

Message ID 87bl89w9fw.wl-kuninori.morimoto.gx@renesas.com
Headers show
Series
  • ASoC: tidyup snd_soc_of_parse_daifmt()
Related show

Message

Kuninori Morimoto June 14, 2021, 12:56 a.m.
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(-)

Comments

Mark Brown June 21, 2021, 6:46 p.m. | #1
On 14 Jun 2021 09:56:19 +0900, Kuninori Morimoto wrote:
> 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.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/8] ASoC: soc-core: add snd_soc_daifmt_clock_provider_from_bitmap()
      commit: 91ae447762517c814672e2e5ff2383348101a032
[2/8] ASoC: soc-core: add snd_soc_daifmt_clock_provider_fliped()
      commit: b44a67f89366597364693e07e814660d5df8c66f
[3/8] ASoC: soc-core: add snd_soc_daifmt_parse_format/clock_provider()
      commit: 7766861d1f8d3afc35361ab599eee6851fcd4416
[4/8] ASoC: atmel: switch to use snd_soc_daifmt_parse_format/clock_provider()
      commit: 22108b9c2248f187d2b50af14e48807a0fb3db79
[5/8] ASoC: fsl: switch to use snd_soc_daifmt_parse_format/clock_provider()
      commit: 3bba9414512fc16c96c4cd25ee6447c8da4b4a76
[6/8] ASoC: meson: switch to use snd_soc_daifmt_parse_format/clock_provider()
      commit: 0c4c7a9667daf52c88cfc7fe44201ff653eab8f9
[7/8] ASoC: simple-card-utils: switch to use snd_soc_daifmt_parse_format/clock_provider()
      commit: 2c7fd9de8956ea1d8ea18b11d33fcf2fde9da81e
[8/8] ASoC: soc-core: remove snd_soc_of_parse_daifmt()
      commit: 8439c5861cf0c88037f6e9cdd3ba5f1c472f847a

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark