Linux Sound subsystem development
 help / color / mirror / Atom feed
* [PATCH v3 0/6] ASoC: extra format on each DAI
@ 2025-01-06  5:48 Kuninori Morimoto
  2025-01-06  5:49 ` [PATCH v3 1/7] ASoC: audio-graph-card2: use __free(device_node) for device node Kuninori Morimoto
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Kuninori Morimoto @ 2025-01-06  5:48 UTC (permalink / raw)
  To: Jaroslav Kysela, Stephen Gordon, Liam Girdwood, Mark Brown,
	Takashi Iwai, linux-sound


Hi Mark
Cc Stephen

Current clock provider/consumer setting is set by dai_link->dai_fmt, and it
is Codec base on Sound Card driver (= SND_SOC_DAIFMT_CBx_CFx).

Current CPU/Codec drivers are already based on its own base
(= SND_SOC_DAIFMT_Bx_Fx). So, Codec clock setting uses dai_link->dai_fmt
as-is, and CPU side clock setting is created from Codec base setting by
flipping. Because of this, we can't set both CPU/Codec clock consumer for
example.

To solve this issue, this patch-set adds new ext_fmt on each DAI.
It can keep compatible with legacy style.

	1. SND_SOC_DAIFMT_FORMAT_MASK
	2. SND_SOC_DAIFMT_CLOCK
	3. SND_SOC_DAIFMT_INV
	4. SND_SOC_DAIFMT_CLOCK_PROVIDER

	dai_fmt : dai_link->dai_fmt = common settings
	ext_fmt : each DAI settings
    
Legacy
	dai_fmt  includes 1, 2, 3, 4
    
New style
	dai_fmt  includes 1, 2, 3
	ext_fmt  includes 4

Audio-Graph-Card2 will use this new style by this patch-set.
By this patch, Card2 default behavior (= no "clock-master / frame-master"
settings on DT) will be changed, but no drivers are using it.

In case of no DAI has "clock-master / frame-master" property on DT,
it will be...

Legacy
	CPU  : provider (because flipped from Codec)
	Codec: consumer

New style
	CPU  : consumer
	Codec: consumer

One note is that Simple-Card, Audio-Graph-Card don't implement
this new style to keep compatiblily.

In Overlay case, port order can be random, so we shouldn't use get_next()
function to get next port.

[1/7] - [4/7] are just cleanup before new feature.
[5/7]         adjust to overlay
[6/7] - [7/7] adds new daifmt

This patch-set needs Stephen's Tested-by

v2 -> v3
	- use of_graph_get_port_by_id() instead of of_graph_get_next_port()

v1 -> v2
	- based on asoc/for-next to avoid conflict issue.
	- Needs Stephen's Tested-by

Link: https://lore.kernel.org/r/87r064cxym.wl-kuninori.morimoto.gx@renesas.com
Link: https://lore.kernel.org/r/8734innkpy.wl-kuninori.morimoto.gx@renesas.com

Kuninori Morimoto (7):
      ASoC: audio-graph-card2: use __free(device_node) for device node
      ASoC: audio-graph-card: use __free(device_node) for device node
      ASoC: simple-card: use __free(device_node) for device node
      ASoC: soc-core: return 0 if np was NULL on snd_soc_daifmt_parse_clock_provider_raw()
      ASoC: audio-graph-card2: use of_graph_get_port_by_id() at graph_get_next_multi_ep()
      ASoC: soc-core: Enable to use extra format on each DAI
      ASoC: audio-graph-card2: Use extra format on each DAI

-- 
2.43.0



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

end of thread, other threads:[~2025-01-13 22:16 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-06  5:48 [PATCH v3 0/6] ASoC: extra format on each DAI Kuninori Morimoto
2025-01-06  5:49 ` [PATCH v3 1/7] ASoC: audio-graph-card2: use __free(device_node) for device node Kuninori Morimoto
2025-01-06  5:49 ` [PATCH v3 2/7] ASoC: audio-graph-card: " Kuninori Morimoto
2025-01-06  5:49 ` [PATCH v3 3/7] ASoC: simple-card: " Kuninori Morimoto
2025-01-06  5:49 ` [PATCH v3 4/7] ASoC: soc-core: return 0 if np was NULL on snd_soc_daifmt_parse_clock_provider_raw() Kuninori Morimoto
2025-01-06  5:49 ` [PATCH v3 5/7] ASoC: audio-graph-card2: use of_graph_get_port_by_id() at graph_get_next_multi_ep() Kuninori Morimoto
2025-01-06  5:49 ` [PATCH v3 6/7] ASoC: soc-core: Enable to use extra format on each DAI Kuninori Morimoto
2025-01-06  5:49 ` [PATCH v3 7/7] ASoC: audio-graph-card2: Use " Kuninori Morimoto
2025-01-06  8:53 ` [PATCH v3 0/6] ASoC: " Stephen Gordon
2025-01-13 22:16 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox