summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/nau8824.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2026-09-11 20:46:25 +0100
committerMark Brown <broonie@kernel.org>2026-09-11 20:46:25 +0100
commit1d7a22ed0d375cff97fc766423a72238b457de4d (patch)
tree034ba65cb020afc771f83e5947710736a56c36e0 /sound/soc/codecs/nau8824.c
parent04c3ee0f5d158f6e2027c7ef617044cb649ab4ab (diff)
parent93a0091f9745d0ba3043ae3d1f7365e347906c55 (diff)
downloadlinux-next-1d7a22ed0d375cff97fc766423a72238b457de4d.tar.gz
linux-next-1d7a22ed0d375cff97fc766423a72238b457de4d.zip
ASoC: codec: use .auto_selectable_formats
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> says: This is v3 of Step2 of "use .auto_selectable_formats" patch-set o: done x: this patch-set [o] Step1: ASoC: a to b [x] Step2: ASoC: codec: ... [ ] Step3: ASoC: d to r [ ] Step4: ASoC: r to x Current ASoC supports snd_soc_daifmt_parse_format() which can specify DAI format by "dai-format" property from DT. But strictly speaking, it is SW settings, so doesn't match to DT's policy. Current ASoC is supporting auto format select via snd_soc_dai_ops :: .auto_selectable_formats. But the user is very few today. DT doesn't need to specify the DAI format via "dai-format", if both CPU and Codec drivers were supporting .auto_selectable_formats. It will be automatically selected from .auto_selectable_formats. One note is that auto select might not find best format on some CPU/Codec combination. So "dai-format" is necessary anyway. Link: https://lore.kernel.org/r/87cxvyyazi.wl-kuninori.morimoto.gx@renesas.com Link: https://lore.kernel.org/r/877bm2vjjn.wl-kuninori.morimoto.gx@renesas.com Link: https://patch.msgid.link/87o6eivpyd.wl-kuninori.morimoto.gx@renesas.com
Diffstat (limited to 'sound/soc/codecs/nau8824.c')
-rw-r--r--sound/soc/codecs/nau8824.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sound/soc/codecs/nau8824.c b/sound/soc/codecs/nau8824.c
index 426a488ff2a3..853eb9472af9 100644
--- a/sound/soc/codecs/nau8824.c
+++ b/sound/soc/codecs/nau8824.c
@@ -1580,11 +1580,22 @@ static const struct snd_soc_component_driver nau8824_component_driver = {
.endianness = 1,
};
+static const u64 nau8824_selectable_formats =
+ SND_SOC_POSSIBLE_DAIFMT_I2S |
+ SND_SOC_POSSIBLE_DAIFMT_RIGHT_J |
+ SND_SOC_POSSIBLE_DAIFMT_LEFT_J |
+ SND_SOC_POSSIBLE_DAIFMT_DSP_A |
+ SND_SOC_POSSIBLE_DAIFMT_DSP_B |
+ SND_SOC_POSSIBLE_DAIFMT_NB_NF |
+ SND_SOC_POSSIBLE_DAIFMT_IB_NF;
+
static const struct snd_soc_dai_ops nau8824_dai_ops = {
.startup = nau8824_dai_startup,
.hw_params = nau8824_hw_params,
.set_fmt = nau8824_set_fmt,
.set_tdm_slot = nau8824_set_tdm_slot,
+ .auto_selectable_formats = &nau8824_selectable_formats,
+ .num_auto_selectable_formats = 1,
};
#define NAU8824_RATES SNDRV_PCM_RATE_8000_192000