From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: Mark Brown <broonie@kernel.org>
Cc: linux-sound@vger.kernel.org, Stephen Gordon <gordoste@iinet.net.au>
Subject: [PATCH 0/6] ASoC: extra format on each DAI
Date: Tue, 17 Dec 2024 01:48:11 +0000 [thread overview]
Message-ID: <8734innkpy.wl-kuninori.morimoto.gx@renesas.com> (raw)
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, its default behavior (= no "clock-master / frame-master"
settings on DT) will be changed, but no drivers are having it.
In case of no DAI has "clock-master / frame-master" settings on DT
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.
2nd note is that [1/6] - [4/6] are normal patch-set,
[5/6] - [6/6] are [RFC]
Kuninori Morimoto (6):
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: soc-core: Enable to use extra format on each DAI
ASoC: audio-graph-card2: Use extra format on each DAI
include/sound/soc.h | 11 ++
sound/soc/generic/audio-graph-card.c | 48 ++---
sound/soc/generic/audio-graph-card2.c | 248 ++++++++++----------------
sound/soc/generic/simple-card.c | 58 ++----
sound/soc/soc-core.c | 30 +++-
5 files changed, 167 insertions(+), 228 deletions(-)
--
2.43.0
next reply other threads:[~2024-12-17 1:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-17 1:48 Kuninori Morimoto [this message]
2024-12-17 1:48 ` [PATCH 1/6] ASoC: audio-graph-card2: use __free(device_node) for device node Kuninori Morimoto
2024-12-17 1:48 ` [PATCH 2/6] ASoC: audio-graph-card: " Kuninori Morimoto
2024-12-17 1:48 ` [PATCH 3/6] ASoC: simple-card: " Kuninori Morimoto
2024-12-17 1:48 ` [PATCH 4/6] ASoC: soc-core: return 0 if np was NULL on snd_soc_daifmt_parse_clock_provider_raw() Kuninori Morimoto
2024-12-17 1:49 ` [PATCH 6/6] ASoC: audio-graph-card2: Use extra format on each DAI Kuninori Morimoto
2024-12-17 13:06 ` Stephen Gordon
2024-12-18 6:29 ` Kuninori Morimoto
2024-12-18 13:26 ` Mark Brown
2024-12-19 0:37 ` Kuninori Morimoto
2024-12-17 1:50 ` [PATCH 5/6] ASoC: soc-core: Enable to use " Kuninori Morimoto
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8734innkpy.wl-kuninori.morimoto.gx@renesas.com \
--to=kuninori.morimoto.gx@renesas.com \
--cc=broonie@kernel.org \
--cc=gordoste@iinet.net.au \
--cc=linux-sound@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox