Linux kernel and device drivers for NXP i.MX platforms
 help / color / mirror / Atom feed
* [PATCH 00/83] ASoC: use .auto_selectable_formats
@ 2026-05-26  1:58 Kuninori Morimoto
  2026-05-26  1:58 ` [PATCH 01/83] ASoC: remove SND_SOC_POSSIBLE_xBx_xFx Kuninori Morimoto
                   ` (15 more replies)
  0 siblings, 16 replies; 22+ messages in thread
From: Kuninori Morimoto @ 2026-05-26  1:58 UTC (permalink / raw)
  To: Zhang Yi, Yixun Lan, Xiubo Li, Vladimir Zapolskiy,
	Vishwas A Deshpande, Vijendar Mukunda, Venkata Prasad Potturu,
	Uwe Kleine-König, Tzung-Bi Shih, Troy Mitchell, Tim Bird,
	Thierry Reding, Takashi Iwai, Sylwester Nawrocki,
	Support Opensource, Steven Eckhoff, Shengjiu Wang, Shenghao Ding,
	Sharique Mohammad, Sen Wang, Scott Branden, Sascha Hauer,
	Samuel Holland, Robert Jarzmik, Richard Fitzgerald, Ray Jui,
	Qianfeng Rong, Piotr Wojtaszczyk, Peter Rosin, Paul Cercueil,
	Olivier Moysan, Oder Chiou, Nuno Sá, Nicolin Chen,
	Nicolas Frattaroli, Nicolas Ferre, Neil Armstrong,
	Maxime Coquelin, Max Filippov, Matthias Brugger, Masami Hiramatsu,
	Martin Povišer, Martin Blumenstingl, Mark Brown,
	M R Swami Reddy, Luca Ceresoli, Linux-Renesas, Linux-ARM,
	Linux-ALSA, Liam Girdwood, Lars-Peter, Lad Prabhakar,
	Kunihiko Hayashi, Krzysztof Kozlowski, Kiseok Jo,
	Kirill Marinushkin, Kevin Lu, Kevin Hilman, Kevin Cernekee,
	Jonathan Hunter, Jihed Chaibi, Jerome Brunet, Jernej Skrabec,
	Jaroslav Kysela, Jarkko Nikula, James Ogletree, J.M.B. Downing,
	Hsieh Hung-En, Herve Codina, Heiko Stuebner, HariKrishna Sagala,
	Haojian Zhuang, Guoqing Jiang, Guenter Roeck, Geert Uytterhoeven,
	Fred Treven, Frank Li, Florian Fainelli, Fabio Estevam,
	David Rhodes, Dario Binacchi, Daniel Mack, Cristian Ciocaltea,
	Claudiu Beznea, Cheng-Yi Chiang, Chen-Yu Tsai, Charles Keepax,
	Bram Vlerick, Binbin Zhou, Biju Das, Benson Leung, Ben Bright,
	Bartosz Golaszewski, Baojun Xu, Arnaud Pouliquen,
	AngeloGioacchino Del Regno, Alvin Šipraga, Alexandre Torgue,
	Alexandre Belloni, spacemit, linux-riscv, linux-mips, imx,
	chrome-platform


Hi Mark, all

I have posted this patch as [RFC] when below. There was no objection
until today, so I post full patch-set.

	Date: Wed, 13 May 2026 00:11:35 +0000

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.

But, I noticed that current auto format select method can't handle all cases.
For example, current .auto_selectable_formats is like below

	static u64 xxx_auto_formats[] = {
(A)		/* First Priority */
		SND_SOC_POSSIBLE_DAIFMT_I2S	|
		SND_SOC_POSSIBLE_DAIFMT_LEFT_J	|
		SND_SOC_POSSIBLE_DAIFMT_NB_NF	|
		SND_SOC_POSSIBLE_DAIFMT_NB_IF	|	(x)
		SND_SOC_POSSIBLE_DAIFMT_IB_NF	|
		SND_SOC_POSSIBLE_DAIFMT_IB_IF,		(x)

		/* Second Priority */
(B)		SND_SOC_POSSIBLE_DAIFMT_DSP_A	|	(y)
		SND_SOC_POSSIBLE_DAIFMT_DSP_B,		(y)
	};

It try to find DAI format from (A) first, and next it will use (A | B).
But it can't handle the format if some format were independent.
For example, DSP_x (y) can't use with xB_IF (x), etc.

So, I would like to update the method. New method doesn't use OR.
It try to find DAI format from (a), next it will use (b).

	static u64 xxx_auto_formats[] = {
(a)		/* First Priority */
		SND_SOC_POSSIBLE_DAIFMT_I2S	|
		SND_SOC_POSSIBLE_DAIFMT_LEFT_J	|
		SND_SOC_POSSIBLE_DAIFMT_NB_NF	|
		SND_SOC_POSSIBLE_DAIFMT_NB_IF	|
		SND_SOC_POSSIBLE_DAIFMT_IB_NF	|
		SND_SOC_POSSIBLE_DAIFMT_IB_IF,

		/* Second Priority */
(b)		SND_SOC_POSSIBLE_DAIFMT_DSP_A	|
		SND_SOC_POSSIBLE_DAIFMT_DSP_B	|
		SND_SOC_POSSIBLE_DAIFMT_NB_NF	|
		SND_SOC_POSSIBLE_DAIFMT_IB_NF,
	};

Switch old method to new method, Current auto select user need to update
.auto_selectable_formats. Fortunately, current few users doesn't have
above limitation. update (A)(B) to (a)(b) style is possible.

	a = A
	b = A | B

I would like to update method, and add .auto_selectable_formats
support on all drivers.

One note is that auto select might not find best format on some CPU/Codec
combination. So "dai-format" is necessary anyway.

And, there haven't been any big problems on .auto_selectable_formats,
because there were few users.
But if all drivers try to use this, it cannot be denied that they may
encounter unknown problems... In such case, "dai-format" can help, though.

Kuninori Morimoto (83):
  ASoC: remove SND_SOC_POSSIBLE_xBx_xFx
  ASoC: codecs: framer-codec: don't use array if single pattarn
  ASoC: codecs: idt821034: don't use array if single pattarn
  ASoC: codecs: peb2466: don't use array if single pattarn
  ASoC: codecs: ak4619: update auto select format
  ASoC: codecs: pcm3168a: update auto select format
  ASoC: renesas: rcar: update auto select format
  ASoC: update auto format selection method
  ASoC: audio-graph-card2: recommend to use auto select DAI format
  ASoC: amd: use .auto_selectable_formats
  ASoC: apple: use .auto_selectable_formats
  ASoC: atmel: use .auto_selectable_formats
  ASoC: au1x: use .auto_selectable_formats
  ASoC: bcm: use .auto_selectable_formats
  ASoC: cirrus: use .auto_selectable_formats
  ASoC: codecs: 88pm860x: use .auto_selectable_formats
  ASoC: codecs: ad1*: use .auto_selectable_formats
  ASoC: codecs: ab8500: use .auto_selectable_formats
  ASoC: codecs: adau*: use .auto_selectable_formats
  ASoC: codecs: adav80x: use .auto_selectable_formats
  ASoC: codecs: ak4*: use .auto_selectable_formats
  ASoC: codecs: ak5*: use .auto_selectable_formats
  ASoC: codecs: alc56*: use .auto_selectable_formats
  ASoC: codecs: arizona: use .auto_selectable_formats
  ASoC: codecs: cpcap: use .auto_selectable_formats
  ASoC: codecs: cros_ec_codec: use .auto_selectable_formats
  ASoC: codecs: cs35l*: use .auto_selectable_formats
  ASoC: codecs: cs42*: use .auto_selectable_formats
  ASoC: codecs: cs5*: use .auto_selectable_formats
  ASoC: codecs: cx2072x: use .auto_selectable_formats
  ASoC: codecs: da*: use .auto_selectable_formats
  ASoC: codecs: es*: use .auto_selectable_formats
  ASoC: codecs: inno_rk3036: use .auto_selectable_formats
  ASoC: codecs: isabelle: use .auto_selectable_formats
  ASoC: codecs: lm49453: use .auto_selectable_formats
  ASoC: codecs: lochnagar-sc: use .auto_selectable_formats
  ASoC: codecs: madera: use .auto_selectable_formats
  ASoC: codecs: max*: use .auto_selectable_formats
  ASoC: codecs: mc13783: use .auto_selectable_formats
  ASoC: codecs: ml26124: use .auto_selectable_formats
  ASoC: codecs: nau*: use .auto_selectable_formats
  ASoC: codecs: ntp8*: use .auto_selectable_formats
  ASoC: codecs: pcm*: use .auto_selectable_formats
  ASoC: codecs: rk33*: use .auto_selectable_formats
  ASoC: codecs: rtq912*: use .auto_selectable_formats
  ASoC: codecs: rt*: use .auto_selectable_formats
  ASoC: codecs: sgtl5000: use .auto_selectable_formats
  ASoC: codecs: si476x: use .auto_selectable_formats
  ASoC: codecs: sma130*: use .auto_selectable_formats
  ASoC: codecs: src4xxx: use .auto_selectable_formats
  ASoC: codecs: ssm*: use .auto_selectable_formats
  ASoC: codecs: sta*: use .auto_selectable_formats
  ASoC: codecs: tas*: use .auto_selectable_formats
  ASoC: codecs: tfa9879: use .auto_selectable_formats
  ASoC: codecs: tlv320*: use .auto_selectable_formats
  ASoC: codecs: tscs454: use .auto_selectable_formats
  ASoC: codecs: twl4030: use .auto_selectable_formats
  ASoC: codecs: uda13*: use .auto_selectable_formats
  ASoC: codecs: wm*: use .auto_selectable_formats
  ASoC: codecs: zl38060: use .auto_selectable_formats
  ASoC: dwc: use .auto_selectable_formats
  ASoC: fsl: use .auto_selectable_formats
  ASoC: hisilicon: use .auto_selectable_formats
  ASoC: img: use .auto_selectable_formats
  ASoC: jz4740: use .auto_selectable_formats
  ASoC: kirkwood: use .auto_selectable_formats
  ASoC: loongson: use .auto_selectable_formats
  ASoC: mediatek: use .auto_selectable_formats
  ASoC: meson: use .auto_selectable_formats
  ASoC: mxs: use .auto_selectable_formats
  ASoC: pxa: use .auto_selectable_formats
  ASoC: renesas: use .auto_selectable_formats
  ASoC: rockchip: use .auto_selectable_formats
  ASoC: samsung: use .auto_selectable_formats
  ASoC: spacemit: use .auto_selectable_formats
  ASoC: sti: use .auto_selectable_formats
  ASoC: stm: use .auto_selectable_formats
  ASoC: sunxi: use .auto_selectable_formats
  ASoC: tegra: use .auto_selectable_formats
  ASoC: ti: use .auto_selectable_formats
  ASoC: uniphier: use .auto_selectable_formats
  ASoC: ux500: use .auto_selectable_formats
  ASoC: xtensa: use .auto_selectable_formats

 include/sound/soc-dai.h                     |  15 +-
 sound/soc/amd/acp/acp-i2s.c                 |   6 +
 sound/soc/amd/raven/acp3x-i2s.c             |   6 +
 sound/soc/amd/vangogh/acp5x-i2s.c           |   6 +
 sound/soc/apple/mca.c                       |  10 +
 sound/soc/atmel/atmel-i2s.c                 |   4 +
 sound/soc/atmel/atmel_ssc_dai.c             |   7 +
 sound/soc/atmel/mchp-i2s-mcc.c              |   9 +
 sound/soc/atmel/mchp-pdmc.c                 |   4 +
 sound/soc/au1x/i2sc.c                       |  11 ++
 sound/soc/au1x/psc-i2s.c                    |  11 ++
 sound/soc/bcm/bcm2835-i2s.c                 |  13 ++
 sound/soc/bcm/cygnus-ssp.c                  |   7 +
 sound/soc/cirrus/ep93xx-i2s.c               |  11 ++
 sound/soc/codecs/88pm860x-codec.c           |   6 +
 sound/soc/codecs/ab8500-codec.c             |  13 ++
 sound/soc/codecs/ad1836.c                   |   6 +
 sound/soc/codecs/ad193x.c                   |  10 +
 sound/soc/codecs/adau1372.c                 |  12 ++
 sound/soc/codecs/adau1373.c                 |  12 ++
 sound/soc/codecs/adau1701.c                 |  11 ++
 sound/soc/codecs/adau17x1.c                 |  13 ++
 sound/soc/codecs/adau1977.c                 |  13 ++
 sound/soc/codecs/adau7118.c                 |  12 ++
 sound/soc/codecs/adav80x.c                  |   8 +
 sound/soc/codecs/ak4104.c                   |   7 +
 sound/soc/codecs/ak4118.c                   |   7 +
 sound/soc/codecs/ak4458.c                   |   9 +
 sound/soc/codecs/ak4535.c                   |   6 +
 sound/soc/codecs/ak4613.c                   |   5 -
 sound/soc/codecs/ak4619.c                   |   8 +-
 sound/soc/codecs/ak4642.c                   |   6 +
 sound/soc/codecs/ak4671.c                   |   7 +
 sound/soc/codecs/ak5386.c                   |   6 +
 sound/soc/codecs/ak5558.c                   |   7 +
 sound/soc/codecs/alc5623.c                  |  11 ++
 sound/soc/codecs/alc5632.c                  |  13 ++
 sound/soc/codecs/arizona.c                  |  12 ++
 sound/soc/codecs/cpcap.c                    |  18 ++
 sound/soc/codecs/cros_ec_codec.c            |   8 +
 sound/soc/codecs/cs35l33.c                  |   6 +
 sound/soc/codecs/cs35l35.c                  |   8 +
 sound/soc/codecs/cs35l36.c                  |  12 ++
 sound/soc/codecs/cs35l41.c                  |  10 +
 sound/soc/codecs/cs35l45.c                  |  10 +
 sound/soc/codecs/cs35l56.c                  |  10 +
 sound/soc/codecs/cs40l50-codec.c            |   9 +
 sound/soc/codecs/cs4234.c                   |   9 +
 sound/soc/codecs/cs4265.c                   |   7 +
 sound/soc/codecs/cs4270.c                   |   6 +
 sound/soc/codecs/cs4271.c                   |   6 +
 sound/soc/codecs/cs42l42.c                  |   9 +
 sound/soc/codecs/cs42l43.c                  |  12 ++
 sound/soc/codecs/cs42l51.c                  |   7 +
 sound/soc/codecs/cs42l52.c                  |  13 ++
 sound/soc/codecs/cs42l56.c                  |   8 +
 sound/soc/codecs/cs42l73.c                  |   7 +
 sound/soc/codecs/cs42l84.c                  |   6 +
 sound/soc/codecs/cs42xx8.c                  |   8 +
 sound/soc/codecs/cs43130.c                  |  14 ++
 sound/soc/codecs/cs4341.c                   |   8 +
 sound/soc/codecs/cs4349.c                   |   7 +
 sound/soc/codecs/cs48l32.c                  |  12 ++
 sound/soc/codecs/cs530x.c                   |   9 +
 sound/soc/codecs/cs53l30.c                  |   8 +
 sound/soc/codecs/cx2072x.c                  |  12 ++
 sound/soc/codecs/da7210.c                   |   7 +
 sound/soc/codecs/da7213.c                   |   5 -
 sound/soc/codecs/da7218.c                   |  12 ++
 sound/soc/codecs/da7219.c                   |  12 ++
 sound/soc/codecs/da732x.c                   |  18 ++
 sound/soc/codecs/da9055.c                   |   8 +
 sound/soc/codecs/es7134.c                   |   6 +
 sound/soc/codecs/es7241.c                   |   7 +
 sound/soc/codecs/es8311.c                   |  19 ++
 sound/soc/codecs/es8316.c                   |   9 +
 sound/soc/codecs/es8323.c                   |  13 ++
 sound/soc/codecs/es8326.c                   |   9 +
 sound/soc/codecs/es8328.c                   |   7 +
 sound/soc/codecs/es8375.c                   |  12 ++
 sound/soc/codecs/es8389.c                   |   9 +
 sound/soc/codecs/framer-codec.c             |   8 +-
 sound/soc/codecs/idt821034.c                |   9 +-
 sound/soc/codecs/inno_rk3036.c              |  12 ++
 sound/soc/codecs/isabelle.c                 |  13 ++
 sound/soc/codecs/lm49453.c                  |  15 ++
 sound/soc/codecs/lochnagar-sc.c             |   8 +
 sound/soc/codecs/madera.c                   |  12 ++
 sound/soc/codecs/max98088.c                 |  12 ++
 sound/soc/codecs/max98090.c                 |  12 ++
 sound/soc/codecs/max98095.c                 |  14 ++
 sound/soc/codecs/max98371.c                 |   7 +
 sound/soc/codecs/max98373-i2c.c             |  10 +
 sound/soc/codecs/max98388.c                 |  10 +
 sound/soc/codecs/max98390.c                 |  10 +
 sound/soc/codecs/max98396.c                 |  12 ++
 sound/soc/codecs/max9850.c                  |  11 ++
 sound/soc/codecs/max98520.c                 |  10 +
 sound/soc/codecs/max9860.c                  |  12 ++
 sound/soc/codecs/max9867.c                  |  10 +
 sound/soc/codecs/max98925.c                 |   8 +
 sound/soc/codecs/max98926.c                 |   8 +
 sound/soc/codecs/max98927.c                 |  10 +
 sound/soc/codecs/mc13783.c                  |  12 ++
 sound/soc/codecs/ml26124.c                  |   6 +
 sound/soc/codecs/nau8325.c                  |  11 ++
 sound/soc/codecs/nau8540.c                  |  11 ++
 sound/soc/codecs/nau8810.c                  |  12 ++
 sound/soc/codecs/nau8821.c                  |  11 ++
 sound/soc/codecs/nau8822.c                  |  12 ++
 sound/soc/codecs/nau8824.c                  |  11 ++
 sound/soc/codecs/nau8825.c                  |  11 ++
 sound/soc/codecs/ntp8835.c                  |   7 +
 sound/soc/codecs/ntp8918.c                  |   7 +
 sound/soc/codecs/pcm1681.c                  |   7 +
 sound/soc/codecs/pcm1754.c                  |   6 +
 sound/soc/codecs/pcm1789.c                  |   7 +
 sound/soc/codecs/pcm179x.c                  |   6 +
 sound/soc/codecs/pcm186x.c                  |   9 +
 sound/soc/codecs/pcm3060.c                  |   7 +
 sound/soc/codecs/pcm3168a.c                 |   8 +-
 sound/soc/codecs/pcm512x.c                  |   9 +
 sound/soc/codecs/peb2466.c                  |   9 +-
 sound/soc/codecs/rk3308_codec.c             |  11 ++
 sound/soc/codecs/rk3328_codec.c             |   9 +
 sound/soc/codecs/rt1011.c                   |  10 +
 sound/soc/codecs/rt1015.c                   |  10 +
 sound/soc/codecs/rt1016.c                   |  10 +
 sound/soc/codecs/rt1019.c                   |  10 +
 sound/soc/codecs/rt1305.c                   |  10 +
 sound/soc/codecs/rt1308.c                   |  10 +
 sound/soc/codecs/rt1318.c                   |  10 +
 sound/soc/codecs/rt274.c                    |   8 +
 sound/soc/codecs/rt286.c                    |   8 +
 sound/soc/codecs/rt298.c                    |   8 +
 sound/soc/codecs/rt5514.c                   |  12 ++
 sound/soc/codecs/rt5616.c                   |  10 +
 sound/soc/codecs/rt5631.c                   |  10 +
 sound/soc/codecs/rt5640.c                   |  10 +
 sound/soc/codecs/rt5645.c                   |  10 +
 sound/soc/codecs/rt5651.c                   |  10 +
 sound/soc/codecs/rt5659.c                   |  10 +
 sound/soc/codecs/rt5660.c                   |  10 +
 sound/soc/codecs/rt5663.c                   |  10 +
 sound/soc/codecs/rt5665.c                   |  10 +
 sound/soc/codecs/rt5668.c                   |  14 ++
 sound/soc/codecs/rt5670.c                   |  10 +
 sound/soc/codecs/rt5677.c                   |  10 +
 sound/soc/codecs/rt5682.c                   |  14 ++
 sound/soc/codecs/rt5682s.c                  |  14 ++
 sound/soc/codecs/rt9120.c                   |   9 +
 sound/soc/codecs/rt9123.c                   |   9 +
 sound/soc/codecs/rtq9124.c                  |   9 +
 sound/soc/codecs/rtq9128.c                  |   9 +
 sound/soc/codecs/sgtl5000.c                 |  11 ++
 sound/soc/codecs/si476x.c                   |  19 ++
 sound/soc/codecs/sma1303.c                  |  13 ++
 sound/soc/codecs/sma1307.c                  |  13 ++
 sound/soc/codecs/src4xxx.c                  |   8 +
 sound/soc/codecs/ssm2518.c                  |  13 ++
 sound/soc/codecs/ssm2602.c                  |  13 ++
 sound/soc/codecs/ssm3515.c                  |  10 +
 sound/soc/codecs/ssm4567.c                  |  13 ++
 sound/soc/codecs/sta32x.c                   |   9 +
 sound/soc/codecs/sta350.c                   |   9 +
 sound/soc/codecs/sta529.c                   |   7 +
 sound/soc/codecs/tas2552.c                  |  14 ++
 sound/soc/codecs/tas2562.c                  |  10 +
 sound/soc/codecs/tas2764.c                  |  12 ++
 sound/soc/codecs/tas2770.c                  |  12 ++
 sound/soc/codecs/tas2780.c                  |  10 +
 sound/soc/codecs/tas5086.c                  |   7 +
 sound/soc/codecs/tas571x.c                  |   7 +
 sound/soc/codecs/tas5720.c                  |   9 +
 sound/soc/codecs/tas6424.c                  |   9 +
 sound/soc/codecs/tfa9879.c                  |   9 +
 sound/soc/codecs/tlv320adc3xxx.c            |  15 ++
 sound/soc/codecs/tlv320adcx140.c            |  12 ++
 sound/soc/codecs/tlv320aic23.c              |   9 +
 sound/soc/codecs/tlv320aic26.c              |   8 +
 sound/soc/codecs/tlv320aic31xx.c            |  11 ++
 sound/soc/codecs/tlv320aic32x4.c            |   8 +
 sound/soc/codecs/tlv320aic3x.c              |  15 ++
 sound/soc/codecs/tlv320dac33.c              |   8 +
 sound/soc/codecs/tscs454.c                  |  15 ++
 sound/soc/codecs/twl4030.c                  |  12 ++
 sound/soc/codecs/uda1334.c                  |   6 +
 sound/soc/codecs/uda1342.c                  |   7 +
 sound/soc/codecs/uda1380.c                  |  11 ++
 sound/soc/codecs/wm2200.c                   |  10 +
 sound/soc/codecs/wm5100.c                   |  10 +
 sound/soc/codecs/wm8350.c                   |  13 ++
 sound/soc/codecs/wm8400.c                   |   9 +
 sound/soc/codecs/wm8510.c                   |  12 ++
 sound/soc/codecs/wm8523.c                   |  13 ++
 sound/soc/codecs/wm8524.c                   |   6 +
 sound/soc/codecs/wm8580.c                   |  15 ++
 sound/soc/codecs/wm8711.c                   |  13 ++
 sound/soc/codecs/wm8728.c                   |   9 +
 sound/soc/codecs/wm8731.c                   |  13 ++
 sound/soc/codecs/wm8737.c                   |  17 ++
 sound/soc/codecs/wm8741.c                   |  13 ++
 sound/soc/codecs/wm8750.c                   |  13 ++
 sound/soc/codecs/wm8753.c                   |  21 ++
 sound/soc/codecs/wm8770.c                   |  11 ++
 sound/soc/codecs/wm8776.c                   |  13 ++
 sound/soc/codecs/wm8804.c                   |  15 +-
 sound/soc/codecs/wm8900.c                   |  19 ++
 sound/soc/codecs/wm8903.c                   |  19 ++
 sound/soc/codecs/wm8904.c                   |  19 ++
 sound/soc/codecs/wm8940.c                   |  13 ++
 sound/soc/codecs/wm8955.c                   |  19 ++
 sound/soc/codecs/wm8960.c                   |  13 ++
 sound/soc/codecs/wm8961.c                   |  19 ++
 sound/soc/codecs/wm8962.c                   |  13 ++
 sound/soc/codecs/wm8971.c                   |  13 ++
 sound/soc/codecs/wm8974.c                   |  12 ++
 sound/soc/codecs/wm8978.c                   |  12 ++
 sound/soc/codecs/wm8983.c                   |  12 ++
 sound/soc/codecs/wm8985.c                   |  19 ++
 sound/soc/codecs/wm8988.c                   |  13 ++
 sound/soc/codecs/wm8990.c                   |   9 +
 sound/soc/codecs/wm8991.c                   |   9 +
 sound/soc/codecs/wm8993.c                   |  19 ++
 sound/soc/codecs/wm8994.c                   |  21 ++
 sound/soc/codecs/wm8995.c                   |  21 ++
 sound/soc/codecs/wm8996.c                   |  12 ++
 sound/soc/codecs/wm9081.c                   |  18 ++
 sound/soc/codecs/wm9713.c                   |  13 ++
 sound/soc/codecs/zl38060.c                  |   6 +
 sound/soc/dwc/dwc-i2s.c                     |   9 +
 sound/soc/fsl/fsl_audmix.c                  |   7 +
 sound/soc/fsl/fsl_esai.c                    |  13 ++
 sound/soc/fsl/fsl_mqs.c                     |   6 +
 sound/soc/fsl/fsl_sai.c                     |  18 ++
 sound/soc/fsl/fsl_ssi.c                     |  13 ++
 sound/soc/fsl/lpc3xxx-i2s.c                 |   4 +
 sound/soc/fsl/mpc5200_psc_i2s.c             |   4 +
 sound/soc/generic/audio-graph-card2.c       |  12 ++
 sound/soc/generic/test-component.c          |   7 -
 sound/soc/hisilicon/hi6210-i2s.c            |   7 +
 sound/soc/img/img-i2s-in.c                  |  12 +-
 sound/soc/img/img-i2s-out.c                 |  13 +-
 sound/soc/img/img-parallel-out.c            |   8 +-
 sound/soc/jz4740/jz4740-i2s.c               |   7 +
 sound/soc/kirkwood/kirkwood-i2s.c           |   7 +
 sound/soc/loongson/loongson_i2s.c           |   6 +
 sound/soc/mediatek/mt7986/mt7986-dai-etdm.c |  11 ++
 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c  |   6 +
 sound/soc/mediatek/mt8183/mt8183-dai-tdm.c  |  10 +
 sound/soc/mediatek/mt8186/mt8186-dai-pcm.c  |  12 ++
 sound/soc/mediatek/mt8186/mt8186-dai-tdm.c  |  13 ++
 sound/soc/mediatek/mt8188/mt8188-dai-etdm.c |  15 ++
 sound/soc/mediatek/mt8188/mt8188-dai-pcm.c  |  11 ++
 sound/soc/mediatek/mt8192/mt8192-dai-tdm.c  |  11 ++
 sound/soc/mediatek/mt8195/mt8195-dai-etdm.c |  17 ++
 sound/soc/mediatek/mt8195/mt8195-dai-pcm.c  |  11 ++
 sound/soc/mediatek/mt8365/mt8365-dai-i2s.c  |  10 +
 sound/soc/mediatek/mt8365/mt8365-dai-pcm.c  |  11 ++
 sound/soc/meson/t9015.c                     |   6 +
 sound/soc/mxs/mxs-saif.c                    |  10 +
 sound/soc/pxa/mmp-sspa.c                    |   6 +
 sound/soc/pxa/pxa-ssp.c                     |  11 ++
 sound/soc/pxa/pxa2xx-i2s.c                  |   6 +
 sound/soc/renesas/fsi.c                     |   5 -
 sound/soc/renesas/rcar/core.c               |  12 +-
 sound/soc/renesas/rcar/msiof.c              |   5 -
 sound/soc/renesas/rz-ssi.c                  |   9 +
 sound/soc/renesas/siu_dai.c                 |   6 +
 sound/soc/renesas/ssi.c                     |  13 ++
 sound/soc/rockchip/rockchip_i2s.c           |  25 ++-
 sound/soc/rockchip/rockchip_i2s_tdm.c       |  27 ++-
 sound/soc/rockchip/rockchip_pdm.c           |  14 +-
 sound/soc/rockchip/rockchip_sai.c           |  31 ++-
 sound/soc/samsung/i2s.c                     |  29 ++-
 sound/soc/samsung/pcm.c                     |   9 +
 sound/soc/soc-core.c                        | 160 +---------------
 sound/soc/soc-dai.c                         | 201 +++++++++++++++-----
 sound/soc/soc-utils.c                       |   7 -
 sound/soc/spacemit/k1_i2s.c                 |   7 +
 sound/soc/sti/uniperif_player.c             |  29 ++-
 sound/soc/sti/uniperif_reader.c             |  27 ++-
 sound/soc/stm/stm32_i2s.c                   |  12 ++
 sound/soc/stm/stm32_sai_sub.c               |  15 ++
 sound/soc/sunxi/sun4i-i2s.c                 |  13 ++
 sound/soc/sunxi/sun8i-codec.c               |  13 ++
 sound/soc/tegra/tegra20_i2s.c               |  10 +
 sound/soc/tegra/tegra210_i2s.c              |  13 ++
 sound/soc/tegra/tegra30_i2s.c               |  10 +
 sound/soc/ti/davinci-i2s.c                  |  14 +-
 sound/soc/ti/davinci-mcasp.c                |  14 ++
 sound/soc/ti/omap-mcbsp.c                   |  12 ++
 sound/soc/uniphier/aio-cpu.c                |   9 +
 sound/soc/ux500/ux500_msp_dai.c             |  33 ++--
 sound/soc/xtensa/xtfpga-i2s.c               |  12 +-
 295 files changed, 3191 insertions(+), 356 deletions(-)

-- 
2.43.0


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

* [PATCH 01/83] ASoC: remove SND_SOC_POSSIBLE_xBx_xFx
  2026-05-26  1:58 [PATCH 00/83] ASoC: use .auto_selectable_formats Kuninori Morimoto
@ 2026-05-26  1:58 ` Kuninori Morimoto
  2026-05-26  1:58 ` [PATCH 02/83] ASoC: codecs: framer-codec: don't use array if single pattarn Kuninori Morimoto
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 22+ messages in thread
From: Kuninori Morimoto @ 2026-05-26  1:58 UTC (permalink / raw)
  To: "Alvin Šipraga", J.M.B. Downing,
	"Martin Povišer", "Nuno Sá",
	"Uwe Kleine-König (The Capable Hub)",
	Alexandre Belloni, Alexandre Torgue, AngeloGioacchino Del Regno,
	Arnaud Pouliquen, Baojun Xu, Bartosz Golaszewski, Ben Bright,
	Benson Leung, Biju Das, Binbin Zhou, Bram Vlerick, Charles Keepax,
	Chen-Yu Tsai, Cheng-Yi Chiang, Claudiu Beznea, Cristian Ciocaltea,
	Daniel Mack, Dario Binacchi, David Rhodes, Fabio Estevam,
	Florian Fainelli, Frank Li, Fred Treven, Geert Uytterhoeven,
	Guenter Roeck, Guoqing Jiang, Haojian Zhuang, HariKrishna Sagala,
	Heiko Stuebner, Herve Codina, Hsieh Hung-En, James Ogletree,
	Jarkko Nikula, Jaroslav Kysela, Jernej Skrabec, Jerome Brunet,
	Jihed Chaibi, Jonathan Hunter, Kevin Cernekee, Kevin Hilman,
	Kevin Lu, Kirill Marinushkin, Kiseok Jo, Krzysztof Kozlowski,
	Kunihiko Hayashi, Lad Prabhakar, Lars-Peter Clausen,
	Liam Girdwood, Luca Ceresoli, M R Swami Reddy, Mark Brown,
	Martin Blumenstingl, Masami Hiramatsu, Matthias Brugger,
	Max Filippov, Maxime Coquelin, Neil Armstrong, Nicolas Ferre,
	Nicolas Frattaroli, Nicolin Chen, Oder Chiou, Olivier Moysan,
	Paul Cercueil, Peter Rosin, Piotr Wojtaszczyk, Qianfeng Rong,
	Ray Jui, Richard Fitzgerald, Robert Jarzmik, Samuel Holland,
	Sascha Hauer, Scott Branden, Sen Wang, Sharique Mohammad,
	Shenghao Ding, Shengjiu Wang, Steven Eckhoff, Support Opensource,
	Sylwester Nawrocki, Takashi Iwai, Thierry Reding, Tim Bird,
	Troy Mitchell, Tzung-Bi Shih, Venkata Prasad Potturu,
	Vijendar Mukunda, Vishwas A Deshpande, Vladimir Zapolskiy,
	Xiubo Li, Yixun Lan, Zhang Yi, chrome-platform, imx,
	linux-arm-kernel, linux-mips, linux-renesas-soc, linux-riscv,
	linux-sound, spacemit

Clock provider / consumer selection is based on board, we can't select
automatically from software. Let's remove SND_SOC_POSSIBLE_xBx_xFx.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 include/sound/soc-dai.h            |  8 --------
 sound/soc/codecs/ak4613.c          |  5 -----
 sound/soc/codecs/ak4619.c          |  6 ------
 sound/soc/codecs/da7213.c          |  5 -----
 sound/soc/codecs/pcm3168a.c        |  6 ------
 sound/soc/generic/test-component.c |  7 -------
 sound/soc/renesas/fsi.c            |  5 -----
 sound/soc/renesas/rcar/core.c      |  3 ---
 sound/soc/renesas/rcar/msiof.c     |  5 -----
 sound/soc/soc-core.c               | 15 ---------------
 sound/soc/soc-utils.c              |  7 -------
 11 files changed, 72 deletions(-)

diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h
index 6a42812bba8ca..06ed6774229bc 100644
--- a/include/sound/soc-dai.h
+++ b/include/sound/soc-dai.h
@@ -139,14 +139,6 @@ struct snd_compr_stream;
 #define SND_SOC_DAIFMT_BP_FC		SND_SOC_DAIFMT_CBP_CFC
 #define SND_SOC_DAIFMT_BC_FC		SND_SOC_DAIFMT_CBC_CFC
 
-/* Describes the possible PCM format */
-#define SND_SOC_POSSIBLE_DAIFMT_CLOCK_PROVIDER_SHIFT	48
-#define SND_SOC_POSSIBLE_DAIFMT_CLOCK_PROVIDER_MASK	(0xFFFFULL << SND_SOC_POSSIBLE_DAIFMT_CLOCK_PROVIDER_SHIFT)
-#define SND_SOC_POSSIBLE_DAIFMT_CBP_CFP			(0x1ULL    << SND_SOC_POSSIBLE_DAIFMT_CLOCK_PROVIDER_SHIFT)
-#define SND_SOC_POSSIBLE_DAIFMT_CBC_CFP			(0x2ULL    << SND_SOC_POSSIBLE_DAIFMT_CLOCK_PROVIDER_SHIFT)
-#define SND_SOC_POSSIBLE_DAIFMT_CBP_CFC			(0x4ULL    << SND_SOC_POSSIBLE_DAIFMT_CLOCK_PROVIDER_SHIFT)
-#define SND_SOC_POSSIBLE_DAIFMT_CBC_CFC			(0x8ULL    << SND_SOC_POSSIBLE_DAIFMT_CLOCK_PROVIDER_SHIFT)
-
 #define SND_SOC_DAIFMT_FORMAT_MASK		0x000f
 #define SND_SOC_DAIFMT_CLOCK_MASK		0x00f0
 #define SND_SOC_DAIFMT_INV_MASK			0x0f00
diff --git a/sound/soc/codecs/ak4613.c b/sound/soc/codecs/ak4613.c
index 3b198b9b46051..3e0696b5abf52 100644
--- a/sound/soc/codecs/ak4613.c
+++ b/sound/soc/codecs/ak4613.c
@@ -748,11 +748,6 @@ static int ak4613_dai_trigger(struct snd_pcm_substream *substream, int cmd,
 	return 0;
 }
 
-/*
- * Select below from Sound Card, not Auto
- *	SND_SOC_DAIFMT_CBC_CFC
- *	SND_SOC_DAIFMT_CBP_CFP
- */
 static const u64 ak4613_dai_formats =
 	SND_SOC_POSSIBLE_DAIFMT_I2S	|
 	SND_SOC_POSSIBLE_DAIFMT_LEFT_J;
diff --git a/sound/soc/codecs/ak4619.c b/sound/soc/codecs/ak4619.c
index 755c002f0f159..192b0c3413968 100644
--- a/sound/soc/codecs/ak4619.c
+++ b/sound/soc/codecs/ak4619.c
@@ -778,12 +778,6 @@ static int ak4619_dai_startup(struct snd_pcm_substream *substream,
 }
 
 static u64 ak4619_dai_formats[] = {
-	/*
-	 * Select below from Sound Card, not here
-	 *	SND_SOC_DAIFMT_CBC_CFC
-	 *	SND_SOC_DAIFMT_CBP_CFP
-	 */
-
 	/* First Priority */
 	SND_SOC_POSSIBLE_DAIFMT_I2S	|
 	SND_SOC_POSSIBLE_DAIFMT_LEFT_J,
diff --git a/sound/soc/codecs/da7213.c b/sound/soc/codecs/da7213.c
index 98b8858ded025..4bf91ab2553a2 100644
--- a/sound/soc/codecs/da7213.c
+++ b/sound/soc/codecs/da7213.c
@@ -1720,11 +1720,6 @@ static int da7213_set_component_pll(struct snd_soc_component *component,
 	return _da7213_set_component_pll(component, pll_id, source, fref, fout);
 }
 
-/*
- * Select below from Sound Card, not Auto
- *	SND_SOC_DAIFMT_CBC_CFC
- *	SND_SOC_DAIFMT_CBP_CFP
- */
 static const u64 da7213_dai_formats =
 	SND_SOC_POSSIBLE_DAIFMT_I2S	|
 	SND_SOC_POSSIBLE_DAIFMT_LEFT_J	|
diff --git a/sound/soc/codecs/pcm3168a.c b/sound/soc/codecs/pcm3168a.c
index c8617a488b11c..7c570efaa1ea3 100644
--- a/sound/soc/codecs/pcm3168a.c
+++ b/sound/soc/codecs/pcm3168a.c
@@ -563,12 +563,6 @@ static int pcm3168a_hw_params(struct snd_pcm_substream *substream,
 }
 
 static const u64 pcm3168a_dai_formats[] = {
-	/*
-	 * Select below from Sound Card, not here
-	 *	SND_SOC_DAIFMT_CBC_CFC
-	 *	SND_SOC_DAIFMT_CBP_CFP
-	 */
-
 	/*
 	 * First Priority
 	 */
diff --git a/sound/soc/generic/test-component.c b/sound/soc/generic/test-component.c
index fc40d024152e6..6f9f498c4c5c1 100644
--- a/sound/soc/generic/test-component.c
+++ b/sound/soc/generic/test-component.c
@@ -191,13 +191,6 @@ static int test_dai_trigger(struct snd_pcm_substream *substream, int cmd, struct
 }
 
 static const u64 test_dai_formats =
-	/*
-	 * Select below from Sound Card, not auto
-	 *	SND_SOC_POSSIBLE_DAIFMT_BP_FP
-	 *	SND_SOC_POSSIBLE_DAIFMT_BC_FP
-	 *	SND_SOC_POSSIBLE_DAIFMT_BP_FC
-	 *	SND_SOC_POSSIBLE_DAIFMT_BC_FC
-	 */
 	SND_SOC_POSSIBLE_DAIFMT_I2S	|
 	SND_SOC_POSSIBLE_DAIFMT_RIGHT_J	|
 	SND_SOC_POSSIBLE_DAIFMT_LEFT_J	|
diff --git a/sound/soc/renesas/fsi.c b/sound/soc/renesas/fsi.c
index 8cbd7acc26f49..1eb3e83c0616c 100644
--- a/sound/soc/renesas/fsi.c
+++ b/sound/soc/renesas/fsi.c
@@ -1694,11 +1694,6 @@ static int fsi_dai_hw_params(struct snd_pcm_substream *substream,
 	return 0;
 }
 
-/*
- * Select below from Sound Card, not auto
- *	SND_SOC_DAIFMT_CBC_CFC
- *	SND_SOC_DAIFMT_CBP_CFP
- */
 static const u64 fsi_dai_formats =
 	SND_SOC_POSSIBLE_DAIFMT_I2S	|
 	SND_SOC_POSSIBLE_DAIFMT_LEFT_J	|
diff --git a/sound/soc/renesas/rcar/core.c b/sound/soc/renesas/rcar/core.c
index 2dc078358612d..abf2059985162 100644
--- a/sound/soc/renesas/rcar/core.c
+++ b/sound/soc/renesas/rcar/core.c
@@ -1042,9 +1042,6 @@ static const u64 rsnd_soc_dai_formats[] = {
 	 * 1st Priority
 	 *
 	 * Well tested formats.
-	 * Select below from Sound Card, not auto
-	 *	SND_SOC_DAIFMT_CBC_CFC
-	 *	SND_SOC_DAIFMT_CBP_CFP
 	 */
 	SND_SOC_POSSIBLE_DAIFMT_I2S	|
 	SND_SOC_POSSIBLE_DAIFMT_RIGHT_J	|
diff --git a/sound/soc/renesas/rcar/msiof.c b/sound/soc/renesas/rcar/msiof.c
index 2671abc028cce..128543fc4fc97 100644
--- a/sound/soc/renesas/rcar/msiof.c
+++ b/sound/soc/renesas/rcar/msiof.c
@@ -363,11 +363,6 @@ static int msiof_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
 	return 0;
 }
 
-/*
- * Select below from Sound Card, not auto
- *	SND_SOC_DAIFMT_CBC_CFC
- *	SND_SOC_DAIFMT_CBP_CFP
- */
 static const u64 msiof_dai_formats = SND_SOC_POSSIBLE_DAIFMT_I2S	|
 				     SND_SOC_POSSIBLE_DAIFMT_LEFT_J	|
 				     SND_SOC_POSSIBLE_DAIFMT_NB_NF;
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 2c05299604b33..04a2d64d977b3 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1401,21 +1401,6 @@ static void snd_soc_runtime_get_dai_fmt(struct snd_soc_pcm_runtime *rtd)
 		case SND_SOC_POSSIBLE_DAIFMT_IB_IF:
 			dai_fmt = (dai_fmt & ~SND_SOC_DAIFMT_INV_MASK) | SND_SOC_DAIFMT_IB_IF;
 			break;
-		/*
-		 * for clock provider / consumer
-		 */
-		case SND_SOC_POSSIBLE_DAIFMT_CBP_CFP:
-			dai_fmt = (dai_fmt & ~SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) | SND_SOC_DAIFMT_CBP_CFP;
-			break;
-		case SND_SOC_POSSIBLE_DAIFMT_CBC_CFP:
-			dai_fmt = (dai_fmt & ~SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) | SND_SOC_DAIFMT_CBC_CFP;
-			break;
-		case SND_SOC_POSSIBLE_DAIFMT_CBP_CFC:
-			dai_fmt = (dai_fmt & ~SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) | SND_SOC_DAIFMT_CBP_CFC;
-			break;
-		case SND_SOC_POSSIBLE_DAIFMT_CBC_CFC:
-			dai_fmt = (dai_fmt & ~SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) | SND_SOC_DAIFMT_CBC_CFC;
-			break;
 		}
 	}
 
diff --git a/sound/soc/soc-utils.c b/sound/soc/soc-utils.c
index c8adfff826bd4..d1937fc217dc7 100644
--- a/sound/soc/soc-utils.c
+++ b/sound/soc/soc-utils.c
@@ -182,13 +182,6 @@ static const struct snd_soc_component_driver dummy_codec = {
 			SNDRV_PCM_FMTBIT_U32_LE | \
 			SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_LE)
 
-/*
- * Select these from Sound Card Manually
- *	SND_SOC_POSSIBLE_DAIFMT_CBP_CFP
- *	SND_SOC_POSSIBLE_DAIFMT_CBP_CFC
- *	SND_SOC_POSSIBLE_DAIFMT_CBC_CFP
- *	SND_SOC_POSSIBLE_DAIFMT_CBC_CFC
- */
 static const u64 dummy_dai_formats =
 	SND_SOC_POSSIBLE_DAIFMT_I2S	|
 	SND_SOC_POSSIBLE_DAIFMT_RIGHT_J	|
-- 
2.43.0


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

* [PATCH 02/83] ASoC: codecs: framer-codec: don't use array if single pattarn
  2026-05-26  1:58 [PATCH 00/83] ASoC: use .auto_selectable_formats Kuninori Morimoto
  2026-05-26  1:58 ` [PATCH 01/83] ASoC: remove SND_SOC_POSSIBLE_xBx_xFx Kuninori Morimoto
@ 2026-05-26  1:58 ` Kuninori Morimoto
  2026-06-03 12:09   ` Herve Codina
  2026-05-26  1:58 ` [PATCH 03/83] ASoC: codecs: idt821034: " Kuninori Morimoto
                   ` (13 subsequent siblings)
  15 siblings, 1 reply; 22+ messages in thread
From: Kuninori Morimoto @ 2026-05-26  1:58 UTC (permalink / raw)
  To: "Alvin Šipraga", J.M.B. Downing,
	"Martin Povišer", "Nuno Sá",
	"Uwe Kleine-König (The Capable Hub)",
	Alexandre Belloni, Alexandre Torgue, AngeloGioacchino Del Regno,
	Arnaud Pouliquen, Baojun Xu, Bartosz Golaszewski, Ben Bright,
	Benson Leung, Biju Das, Binbin Zhou, Bram Vlerick, Charles Keepax,
	Chen-Yu Tsai, Cheng-Yi Chiang, Claudiu Beznea, Cristian Ciocaltea,
	Daniel Mack, Dario Binacchi, David Rhodes, Fabio Estevam,
	Florian Fainelli, Frank Li, Fred Treven, Geert Uytterhoeven,
	Guenter Roeck, Guoqing Jiang, Haojian Zhuang, HariKrishna Sagala,
	Heiko Stuebner, Herve Codina, Hsieh Hung-En, James Ogletree,
	Jarkko Nikula, Jaroslav Kysela, Jernej Skrabec, Jerome Brunet,
	Jihed Chaibi, Jonathan Hunter, Kevin Cernekee, Kevin Hilman,
	Kevin Lu, Kirill Marinushkin, Kiseok Jo, Krzysztof Kozlowski,
	Kunihiko Hayashi, Lad Prabhakar, Lars-Peter Clausen,
	Liam Girdwood, Luca Ceresoli, M R Swami Reddy, Mark Brown,
	Martin Blumenstingl, Masami Hiramatsu, Matthias Brugger,
	Max Filippov, Maxime Coquelin, Neil Armstrong, Nicolas Ferre,
	Nicolas Frattaroli, Nicolin Chen, Oder Chiou, Olivier Moysan,
	Paul Cercueil, Peter Rosin, Piotr Wojtaszczyk, Qianfeng Rong,
	Ray Jui, Richard Fitzgerald, Robert Jarzmik, Samuel Holland,
	Sascha Hauer, Scott Branden, Sen Wang, Sharique Mohammad,
	Shenghao Ding, Shengjiu Wang, Steven Eckhoff, Support Opensource,
	Sylwester Nawrocki, Takashi Iwai, Thierry Reding, Tim Bird,
	Troy Mitchell, Tzung-Bi Shih, Venkata Prasad Potturu,
	Vijendar Mukunda, Vishwas A Deshpande, Vladimir Zapolskiy,
	Xiubo Li, Yixun Lan, Zhang Yi, chrome-platform, imx,
	linux-arm-kernel, linux-mips, linux-renesas-soc, linux-riscv,
	linux-sound, spacemit

Because it is confusable during debugging ASoC FW update, tidyup
auto format style not to use array if single pattern case.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/framer-codec.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/sound/soc/codecs/framer-codec.c b/sound/soc/codecs/framer-codec.c
index 6f57a3aeecc89..a87a78390172d 100644
--- a/sound/soc/codecs/framer-codec.c
+++ b/sound/soc/codecs/framer-codec.c
@@ -238,15 +238,13 @@ static int framer_dai_startup(struct snd_pcm_substream *substream,
 	return 0;
 }
 
-static const u64 framer_dai_formats[] = {
-	SND_SOC_POSSIBLE_DAIFMT_DSP_B,
-};
+static const u64 framer_dai_formats = SND_SOC_POSSIBLE_DAIFMT_DSP_B;
 
 static const struct snd_soc_dai_ops framer_dai_ops = {
 	.startup	= framer_dai_startup,
 	.set_tdm_slot	= framer_dai_set_tdm_slot,
-	.auto_selectable_formats     = framer_dai_formats,
-	.num_auto_selectable_formats = ARRAY_SIZE(framer_dai_formats),
+	.auto_selectable_formats     = &framer_dai_formats,
+	.num_auto_selectable_formats = 1,
 };
 
 static struct snd_soc_dai_driver framer_dai_driver = {
-- 
2.43.0


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

* [PATCH 03/83] ASoC: codecs: idt821034: don't use array if single pattarn
  2026-05-26  1:58 [PATCH 00/83] ASoC: use .auto_selectable_formats Kuninori Morimoto
  2026-05-26  1:58 ` [PATCH 01/83] ASoC: remove SND_SOC_POSSIBLE_xBx_xFx Kuninori Morimoto
  2026-05-26  1:58 ` [PATCH 02/83] ASoC: codecs: framer-codec: don't use array if single pattarn Kuninori Morimoto
@ 2026-05-26  1:58 ` Kuninori Morimoto
  2026-06-03 12:11   ` Herve Codina
  2026-05-26  1:59 ` [PATCH 04/83] ASoC: codecs: peb2466: " Kuninori Morimoto
                   ` (12 subsequent siblings)
  15 siblings, 1 reply; 22+ messages in thread
From: Kuninori Morimoto @ 2026-05-26  1:58 UTC (permalink / raw)
  To: "Alvin Šipraga", J.M.B. Downing,
	"Martin Povišer", "Nuno Sá",
	"Uwe Kleine-König (The Capable Hub)",
	Alexandre Belloni, Alexandre Torgue, AngeloGioacchino Del Regno,
	Arnaud Pouliquen, Baojun Xu, Bartosz Golaszewski, Ben Bright,
	Benson Leung, Biju Das, Binbin Zhou, Bram Vlerick, Charles Keepax,
	Chen-Yu Tsai, Cheng-Yi Chiang, Claudiu Beznea, Cristian Ciocaltea,
	Daniel Mack, Dario Binacchi, David Rhodes, Fabio Estevam,
	Florian Fainelli, Frank Li, Fred Treven, Geert Uytterhoeven,
	Guenter Roeck, Guoqing Jiang, Haojian Zhuang, HariKrishna Sagala,
	Heiko Stuebner, Herve Codina, Hsieh Hung-En, James Ogletree,
	Jarkko Nikula, Jaroslav Kysela, Jernej Skrabec, Jerome Brunet,
	Jihed Chaibi, Jonathan Hunter, Kevin Cernekee, Kevin Hilman,
	Kevin Lu, Kirill Marinushkin, Kiseok Jo, Krzysztof Kozlowski,
	Kunihiko Hayashi, Lad Prabhakar, Lars-Peter Clausen,
	Liam Girdwood, Luca Ceresoli, M R Swami Reddy, Mark Brown,
	Martin Blumenstingl, Masami Hiramatsu, Matthias Brugger,
	Max Filippov, Maxime Coquelin, Neil Armstrong, Nicolas Ferre,
	Nicolas Frattaroli, Nicolin Chen, Oder Chiou, Olivier Moysan,
	Paul Cercueil, Peter Rosin, Piotr Wojtaszczyk, Qianfeng Rong,
	Ray Jui, Richard Fitzgerald, Robert Jarzmik, Samuel Holland,
	Sascha Hauer, Scott Branden, Sen Wang, Sharique Mohammad,
	Shenghao Ding, Shengjiu Wang, Steven Eckhoff, Support Opensource,
	Sylwester Nawrocki, Takashi Iwai, Thierry Reding, Tim Bird,
	Troy Mitchell, Tzung-Bi Shih, Venkata Prasad Potturu,
	Vijendar Mukunda, Vishwas A Deshpande, Vladimir Zapolskiy,
	Xiubo Li, Yixun Lan, Zhang Yi, chrome-platform, imx,
	linux-arm-kernel, linux-mips, linux-renesas-soc, linux-riscv,
	linux-sound, spacemit

Because it is confusable during debugging ASoC FW update, tidyup
auto format style not to use array if single pattern case.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/idt821034.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/sound/soc/codecs/idt821034.c b/sound/soc/codecs/idt821034.c
index 39bafefa6a186..084090ccef77a 100644
--- a/sound/soc/codecs/idt821034.c
+++ b/sound/soc/codecs/idt821034.c
@@ -860,18 +860,17 @@ static int idt821034_dai_startup(struct snd_pcm_substream *substream,
 	return 0;
 }
 
-static const u64 idt821034_dai_formats[] = {
+static const u64 idt821034_dai_formats =
 	SND_SOC_POSSIBLE_DAIFMT_DSP_A	|
-	SND_SOC_POSSIBLE_DAIFMT_DSP_B,
-};
+	SND_SOC_POSSIBLE_DAIFMT_DSP_B;
 
 static const struct snd_soc_dai_ops idt821034_dai_ops = {
 	.startup      = idt821034_dai_startup,
 	.hw_params    = idt821034_dai_hw_params,
 	.set_tdm_slot = idt821034_dai_set_tdm_slot,
 	.set_fmt      = idt821034_dai_set_fmt,
-	.auto_selectable_formats     = idt821034_dai_formats,
-	.num_auto_selectable_formats = ARRAY_SIZE(idt821034_dai_formats),
+	.auto_selectable_formats     = &idt821034_dai_formats,
+	.num_auto_selectable_formats = 1,
 };
 
 static struct snd_soc_dai_driver idt821034_dai_driver = {
-- 
2.43.0


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

* [PATCH 04/83] ASoC: codecs: peb2466: don't use array if single pattarn
  2026-05-26  1:58 [PATCH 00/83] ASoC: use .auto_selectable_formats Kuninori Morimoto
                   ` (2 preceding siblings ...)
  2026-05-26  1:58 ` [PATCH 03/83] ASoC: codecs: idt821034: " Kuninori Morimoto
@ 2026-05-26  1:59 ` Kuninori Morimoto
  2026-06-03 12:17   ` Herve Codina
  2026-05-26  1:59 ` [PATCH 05/83] ASoC: codecs: ak4619: update auto select format Kuninori Morimoto
                   ` (11 subsequent siblings)
  15 siblings, 1 reply; 22+ messages in thread
From: Kuninori Morimoto @ 2026-05-26  1:59 UTC (permalink / raw)
  To: "Alvin Šipraga", J.M.B. Downing,
	"Martin Povišer", "Nuno Sá",
	"Uwe Kleine-König (The Capable Hub)",
	Alexandre Belloni, Alexandre Torgue, AngeloGioacchino Del Regno,
	Arnaud Pouliquen, Baojun Xu, Bartosz Golaszewski, Ben Bright,
	Benson Leung, Biju Das, Binbin Zhou, Bram Vlerick, Charles Keepax,
	Chen-Yu Tsai, Cheng-Yi Chiang, Claudiu Beznea, Cristian Ciocaltea,
	Daniel Mack, Dario Binacchi, David Rhodes, Fabio Estevam,
	Florian Fainelli, Frank Li, Fred Treven, Geert Uytterhoeven,
	Guenter Roeck, Guoqing Jiang, Haojian Zhuang, HariKrishna Sagala,
	Heiko Stuebner, Herve Codina, Hsieh Hung-En, James Ogletree,
	Jarkko Nikula, Jaroslav Kysela, Jernej Skrabec, Jerome Brunet,
	Jihed Chaibi, Jonathan Hunter, Kevin Cernekee, Kevin Hilman,
	Kevin Lu, Kirill Marinushkin, Kiseok Jo, Krzysztof Kozlowski,
	Kunihiko Hayashi, Lad Prabhakar, Lars-Peter Clausen,
	Liam Girdwood, Luca Ceresoli, M R Swami Reddy, Mark Brown,
	Martin Blumenstingl, Masami Hiramatsu, Matthias Brugger,
	Max Filippov, Maxime Coquelin, Neil Armstrong, Nicolas Ferre,
	Nicolas Frattaroli, Nicolin Chen, Oder Chiou, Olivier Moysan,
	Paul Cercueil, Peter Rosin, Piotr Wojtaszczyk, Qianfeng Rong,
	Ray Jui, Richard Fitzgerald, Robert Jarzmik, Samuel Holland,
	Sascha Hauer, Scott Branden, Sen Wang, Sharique Mohammad,
	Shenghao Ding, Shengjiu Wang, Steven Eckhoff, Support Opensource,
	Sylwester Nawrocki, Takashi Iwai, Thierry Reding, Tim Bird,
	Troy Mitchell, Tzung-Bi Shih, Venkata Prasad Potturu,
	Vijendar Mukunda, Vishwas A Deshpande, Vladimir Zapolskiy,
	Xiubo Li, Yixun Lan, Zhang Yi, chrome-platform, imx,
	linux-arm-kernel, linux-mips, linux-renesas-soc, linux-riscv,
	linux-sound, spacemit

Because it is confusable during debugging ASoC FW update, tidyup
auto format style not to use array if single pattern case.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/peb2466.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/sound/soc/codecs/peb2466.c b/sound/soc/codecs/peb2466.c
index 2d5163c15d0d1..2d71d204d8fa2 100644
--- a/sound/soc/codecs/peb2466.c
+++ b/sound/soc/codecs/peb2466.c
@@ -817,18 +817,17 @@ static int peb2466_dai_startup(struct snd_pcm_substream *substream,
 					  &peb2466_sample_bits_constr);
 }
 
-static const u64 peb2466_dai_formats[] = {
+static const u64 peb2466_dai_formats =
 	SND_SOC_POSSIBLE_DAIFMT_DSP_A	|
-	SND_SOC_POSSIBLE_DAIFMT_DSP_B,
-};
+	SND_SOC_POSSIBLE_DAIFMT_DSP_B;
 
 static const struct snd_soc_dai_ops peb2466_dai_ops = {
 	.startup = peb2466_dai_startup,
 	.hw_params = peb2466_dai_hw_params,
 	.set_tdm_slot = peb2466_dai_set_tdm_slot,
 	.set_fmt = peb2466_dai_set_fmt,
-	.auto_selectable_formats     = peb2466_dai_formats,
-	.num_auto_selectable_formats = ARRAY_SIZE(peb2466_dai_formats),
+	.auto_selectable_formats     = &peb2466_dai_formats,
+	.num_auto_selectable_formats = 1,
 };
 
 static struct snd_soc_dai_driver peb2466_dai_driver = {
-- 
2.43.0


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

* [PATCH 05/83] ASoC: codecs: ak4619: update auto select format
  2026-05-26  1:58 [PATCH 00/83] ASoC: use .auto_selectable_formats Kuninori Morimoto
                   ` (3 preceding siblings ...)
  2026-05-26  1:59 ` [PATCH 04/83] ASoC: codecs: peb2466: " Kuninori Morimoto
@ 2026-05-26  1:59 ` Kuninori Morimoto
  2026-05-26  1:59 ` [PATCH 06/83] ASoC: codecs: pcm3168a: " Kuninori Morimoto
                   ` (10 subsequent siblings)
  15 siblings, 0 replies; 22+ messages in thread
From: Kuninori Morimoto @ 2026-05-26  1:59 UTC (permalink / raw)
  To: "Alvin Šipraga", J.M.B. Downing,
	"Martin Povišer", "Nuno Sá",
	"Uwe Kleine-König (The Capable Hub)",
	Alexandre Belloni, Alexandre Torgue, AngeloGioacchino Del Regno,
	Arnaud Pouliquen, Baojun Xu, Bartosz Golaszewski, Ben Bright,
	Benson Leung, Biju Das, Binbin Zhou, Bram Vlerick, Charles Keepax,
	Chen-Yu Tsai, Cheng-Yi Chiang, Claudiu Beznea, Cristian Ciocaltea,
	Daniel Mack, Dario Binacchi, David Rhodes, Fabio Estevam,
	Florian Fainelli, Frank Li, Fred Treven, Geert Uytterhoeven,
	Guenter Roeck, Guoqing Jiang, Haojian Zhuang, HariKrishna Sagala,
	Heiko Stuebner, Herve Codina, Hsieh Hung-En, James Ogletree,
	Jarkko Nikula, Jaroslav Kysela, Jernej Skrabec, Jerome Brunet,
	Jihed Chaibi, Jonathan Hunter, Kevin Cernekee, Kevin Hilman,
	Kevin Lu, Kirill Marinushkin, Kiseok Jo, Krzysztof Kozlowski,
	Kunihiko Hayashi, Lad Prabhakar, Lars-Peter Clausen,
	Liam Girdwood, Luca Ceresoli, M R Swami Reddy, Mark Brown,
	Martin Blumenstingl, Masami Hiramatsu, Matthias Brugger,
	Max Filippov, Maxime Coquelin, Neil Armstrong, Nicolas Ferre,
	Nicolas Frattaroli, Nicolin Chen, Oder Chiou, Olivier Moysan,
	Paul Cercueil, Peter Rosin, Piotr Wojtaszczyk, Qianfeng Rong,
	Ray Jui, Richard Fitzgerald, Robert Jarzmik, Samuel Holland,
	Sascha Hauer, Scott Branden, Sen Wang, Sharique Mohammad,
	Shenghao Ding, Shengjiu Wang, Steven Eckhoff, Support Opensource,
	Sylwester Nawrocki, Takashi Iwai, Thierry Reding, Tim Bird,
	Troy Mitchell, Tzung-Bi Shih, Venkata Prasad Potturu,
	Vijendar Mukunda, Vishwas A Deshpande, Vladimir Zapolskiy,
	Xiubo Li, Yixun Lan, Zhang Yi, chrome-platform, imx,
	linux-arm-kernel, linux-mips, linux-renesas-soc, linux-riscv,
	linux-sound, spacemit

Current auto select format start with the highest priority format and
gradually add lower priority formats one by one, and search matched
format. Like A+X -> A+B+X -> A+B+C+X+Y... (a)

But in this method, we can't handle format if HW has some kind of
patterns, like A+X or B+Y etc (b).

Current drivers are using (a) style, this patch switch to use (b) style.
This is needed before update auto select format method.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/ak4619.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sound/soc/codecs/ak4619.c b/sound/soc/codecs/ak4619.c
index 192b0c3413968..d9c9f6b200284 100644
--- a/sound/soc/codecs/ak4619.c
+++ b/sound/soc/codecs/ak4619.c
@@ -783,6 +783,8 @@ static u64 ak4619_dai_formats[] = {
 	SND_SOC_POSSIBLE_DAIFMT_LEFT_J,
 
 	/* Second Priority */
+	SND_SOC_POSSIBLE_DAIFMT_I2S	|
+	SND_SOC_POSSIBLE_DAIFMT_LEFT_J	|
 	SND_SOC_POSSIBLE_DAIFMT_DSP_A	|
 	SND_SOC_POSSIBLE_DAIFMT_DSP_B,
 };
-- 
2.43.0


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

* [PATCH 06/83] ASoC: codecs: pcm3168a: update auto select format
  2026-05-26  1:58 [PATCH 00/83] ASoC: use .auto_selectable_formats Kuninori Morimoto
                   ` (4 preceding siblings ...)
  2026-05-26  1:59 ` [PATCH 05/83] ASoC: codecs: ak4619: update auto select format Kuninori Morimoto
@ 2026-05-26  1:59 ` Kuninori Morimoto
  2026-05-26  2:00 ` [PATCH 07/83] ASoC: renesas: rcar: " Kuninori Morimoto
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 22+ messages in thread
From: Kuninori Morimoto @ 2026-05-26  1:59 UTC (permalink / raw)
  To: "Alvin Šipraga", J.M.B. Downing,
	"Martin Povišer", "Nuno Sá",
	"Uwe Kleine-König (The Capable Hub)",
	Alexandre Belloni, Alexandre Torgue, AngeloGioacchino Del Regno,
	Arnaud Pouliquen, Baojun Xu, Bartosz Golaszewski, Ben Bright,
	Benson Leung, Biju Das, Binbin Zhou, Bram Vlerick, Charles Keepax,
	Chen-Yu Tsai, Cheng-Yi Chiang, Claudiu Beznea, Cristian Ciocaltea,
	Daniel Mack, Dario Binacchi, David Rhodes, Fabio Estevam,
	Florian Fainelli, Frank Li, Fred Treven, Geert Uytterhoeven,
	Guenter Roeck, Guoqing Jiang, Haojian Zhuang, HariKrishna Sagala,
	Heiko Stuebner, Herve Codina, Hsieh Hung-En, James Ogletree,
	Jarkko Nikula, Jaroslav Kysela, Jernej Skrabec, Jerome Brunet,
	Jihed Chaibi, Jonathan Hunter, Kevin Cernekee, Kevin Hilman,
	Kevin Lu, Kirill Marinushkin, Kiseok Jo, Krzysztof Kozlowski,
	Kunihiko Hayashi, Lad Prabhakar, Lars-Peter Clausen,
	Liam Girdwood, Luca Ceresoli, M R Swami Reddy, Mark Brown,
	Martin Blumenstingl, Masami Hiramatsu, Matthias Brugger,
	Max Filippov, Maxime Coquelin, Neil Armstrong, Nicolas Ferre,
	Nicolas Frattaroli, Nicolin Chen, Oder Chiou, Olivier Moysan,
	Paul Cercueil, Peter Rosin, Piotr Wojtaszczyk, Qianfeng Rong,
	Ray Jui, Richard Fitzgerald, Robert Jarzmik, Samuel Holland,
	Sascha Hauer, Scott Branden, Sen Wang, Sharique Mohammad,
	Shenghao Ding, Shengjiu Wang, Steven Eckhoff, Support Opensource,
	Sylwester Nawrocki, Takashi Iwai, Thierry Reding, Tim Bird,
	Troy Mitchell, Tzung-Bi Shih, Venkata Prasad Potturu,
	Vijendar Mukunda, Vishwas A Deshpande, Vladimir Zapolskiy,
	Xiubo Li, Yixun Lan, Zhang Yi, chrome-platform, imx,
	linux-arm-kernel, linux-mips, linux-renesas-soc, linux-riscv,
	linux-sound, spacemit

Current auto select format start with the highest priority format and
gradually add lower priority formats one by one, and search matched
format. Like A+X -> A+B+X -> A+B+C+X+Y... (a)

But in this method, we can't handle format if HW has some kind of
patterns, like A+X or B+Y etc (b).

Current drivers are using (a) style, this patch switch to use (b) style.
This is needed before update auto select format method.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/pcm3168a.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sound/soc/codecs/pcm3168a.c b/sound/soc/codecs/pcm3168a.c
index 7c570efaa1ea3..05c06068ee245 100644
--- a/sound/soc/codecs/pcm3168a.c
+++ b/sound/soc/codecs/pcm3168a.c
@@ -575,6 +575,8 @@ static const u64 pcm3168a_dai_formats[] = {
 	 * see
 	 *	pcm3168a_hw_params()
 	 */
+	SND_SOC_POSSIBLE_DAIFMT_I2S	|
+	SND_SOC_POSSIBLE_DAIFMT_LEFT_J	|
 	SND_SOC_POSSIBLE_DAIFMT_RIGHT_J	|
 	SND_SOC_POSSIBLE_DAIFMT_DSP_A	|
 	SND_SOC_POSSIBLE_DAIFMT_DSP_B,
-- 
2.43.0


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

* [PATCH 07/83] ASoC: renesas: rcar: update auto select format
  2026-05-26  1:58 [PATCH 00/83] ASoC: use .auto_selectable_formats Kuninori Morimoto
                   ` (5 preceding siblings ...)
  2026-05-26  1:59 ` [PATCH 06/83] ASoC: codecs: pcm3168a: " Kuninori Morimoto
@ 2026-05-26  2:00 ` Kuninori Morimoto
  2026-05-26  2:00 ` [PATCH 08/83] ASoC: update auto format selection method Kuninori Morimoto
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 22+ messages in thread
From: Kuninori Morimoto @ 2026-05-26  2:00 UTC (permalink / raw)
  To: "Alvin Šipraga", J.M.B. Downing,
	"Martin Povišer", "Nuno Sá",
	"Uwe Kleine-König (The Capable Hub)",
	Alexandre Belloni, Alexandre Torgue, AngeloGioacchino Del Regno,
	Arnaud Pouliquen, Baojun Xu, Bartosz Golaszewski, Ben Bright,
	Benson Leung, Biju Das, Binbin Zhou, Bram Vlerick, Charles Keepax,
	Chen-Yu Tsai, Cheng-Yi Chiang, Claudiu Beznea, Cristian Ciocaltea,
	Daniel Mack, Dario Binacchi, David Rhodes, Fabio Estevam,
	Florian Fainelli, Frank Li, Fred Treven, Geert Uytterhoeven,
	Guenter Roeck, Guoqing Jiang, Haojian Zhuang, HariKrishna Sagala,
	Heiko Stuebner, Herve Codina, Hsieh Hung-En, James Ogletree,
	Jarkko Nikula, Jaroslav Kysela, Jernej Skrabec, Jerome Brunet,
	Jihed Chaibi, Jonathan Hunter, Kevin Cernekee, Kevin Hilman,
	Kevin Lu, Kirill Marinushkin, Kiseok Jo, Krzysztof Kozlowski,
	Kunihiko Hayashi, Lad Prabhakar, Lars-Peter Clausen,
	Liam Girdwood, Luca Ceresoli, M R Swami Reddy, Mark Brown,
	Martin Blumenstingl, Masami Hiramatsu, Matthias Brugger,
	Max Filippov, Maxime Coquelin, Neil Armstrong, Nicolas Ferre,
	Nicolas Frattaroli, Nicolin Chen, Oder Chiou, Olivier Moysan,
	Paul Cercueil, Peter Rosin, Piotr Wojtaszczyk, Qianfeng Rong,
	Ray Jui, Richard Fitzgerald, Robert Jarzmik, Samuel Holland,
	Sascha Hauer, Scott Branden, Sen Wang, Sharique Mohammad,
	Shenghao Ding, Shengjiu Wang, Steven Eckhoff, Support Opensource,
	Sylwester Nawrocki, Takashi Iwai, Thierry Reding, Tim Bird,
	Troy Mitchell, Tzung-Bi Shih, Venkata Prasad Potturu,
	Vijendar Mukunda, Vishwas A Deshpande, Vladimir Zapolskiy,
	Xiubo Li, Yixun Lan, Zhang Yi, chrome-platform, imx,
	linux-arm-kernel, linux-mips, linux-renesas-soc, linux-riscv,
	linux-sound, spacemit

Current auto select format start with the highest priority format and
gradually add lower priority formats one by one, and search matched
format. Like A+X -> A+B+X -> A+B+C+X+Y... (a)

But in this method, we can't handle format if HW has some kind of
patterns, like A+X or B+Y etc (b).

Current drivers are using (a) style, this patch switch to use (b) style.
This is needed before update auto select format method.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/renesas/rcar/core.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/sound/soc/renesas/rcar/core.c b/sound/soc/renesas/rcar/core.c
index abf2059985162..7afa3892f50e5 100644
--- a/sound/soc/renesas/rcar/core.c
+++ b/sound/soc/renesas/rcar/core.c
@@ -1055,8 +1055,15 @@ static const u64 rsnd_soc_dai_formats[] = {
 	 *
 	 * Supported, but not well tested
 	 */
+	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_DSP_B	|
+	SND_SOC_POSSIBLE_DAIFMT_NB_NF	|
+	SND_SOC_POSSIBLE_DAIFMT_NB_IF	|
+	SND_SOC_POSSIBLE_DAIFMT_IB_NF	|
+	SND_SOC_POSSIBLE_DAIFMT_IB_IF,
 };
 
 static void rsnd_parse_tdm_split_mode(struct rsnd_priv *priv,
-- 
2.43.0


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

* [PATCH 08/83] ASoC: update auto format selection method
  2026-05-26  1:58 [PATCH 00/83] ASoC: use .auto_selectable_formats Kuninori Morimoto
                   ` (6 preceding siblings ...)
  2026-05-26  2:00 ` [PATCH 07/83] ASoC: renesas: rcar: " Kuninori Morimoto
@ 2026-05-26  2:00 ` Kuninori Morimoto
  2026-05-26  2:01 ` [PATCH 09/83] ASoC: audio-graph-card2: recommend to use auto select DAI format Kuninori Morimoto
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 22+ messages in thread
From: Kuninori Morimoto @ 2026-05-26  2:00 UTC (permalink / raw)
  To: "Alvin Šipraga", J.M.B. Downing,
	"Martin Povišer", "Nuno Sá",
	"Uwe Kleine-König (The Capable Hub)",
	Alexandre Belloni, Alexandre Torgue, AngeloGioacchino Del Regno,
	Arnaud Pouliquen, Baojun Xu, Bartosz Golaszewski, Ben Bright,
	Benson Leung, Biju Das, Binbin Zhou, Bram Vlerick, Charles Keepax,
	Chen-Yu Tsai, Cheng-Yi Chiang, Claudiu Beznea, Cristian Ciocaltea,
	Daniel Mack, Dario Binacchi, David Rhodes, Fabio Estevam,
	Florian Fainelli, Frank Li, Fred Treven, Geert Uytterhoeven,
	Guenter Roeck, Guoqing Jiang, Haojian Zhuang, HariKrishna Sagala,
	Heiko Stuebner, Herve Codina, Hsieh Hung-En, James Ogletree,
	Jarkko Nikula, Jaroslav Kysela, Jernej Skrabec, Jerome Brunet,
	Jihed Chaibi, Jonathan Hunter, Kevin Cernekee, Kevin Hilman,
	Kevin Lu, Kirill Marinushkin, Kiseok Jo, Krzysztof Kozlowski,
	Kunihiko Hayashi, Lad Prabhakar, Lars-Peter Clausen,
	Liam Girdwood, Luca Ceresoli, M R Swami Reddy, Mark Brown,
	Martin Blumenstingl, Masami Hiramatsu, Matthias Brugger,
	Max Filippov, Maxime Coquelin, Neil Armstrong, Nicolas Ferre,
	Nicolas Frattaroli, Nicolin Chen, Oder Chiou, Olivier Moysan,
	Paul Cercueil, Peter Rosin, Piotr Wojtaszczyk, Qianfeng Rong,
	Ray Jui, Richard Fitzgerald, Robert Jarzmik, Samuel Holland,
	Sascha Hauer, Scott Branden, Sen Wang, Sharique Mohammad,
	Shenghao Ding, Shengjiu Wang, Steven Eckhoff, Support Opensource,
	Sylwester Nawrocki, Takashi Iwai, Thierry Reding, Tim Bird,
	Troy Mitchell, Tzung-Bi Shih, Venkata Prasad Potturu,
	Vijendar Mukunda, Vishwas A Deshpande, Vladimir Zapolskiy,
	Xiubo Li, Yixun Lan, Zhang Yi, chrome-platform, imx,
	linux-arm-kernel, linux-mips, linux-renesas-soc, linux-riscv,
	linux-sound, spacemit

Current DAI supports auto format selection. It allow to have array like
below.

(X)	static u64 xxx_auto_formats[] = {
(A)		/* First Priority */
		SND_SOC_POSSIBLE_DAIFMT_I2S	|
		SND_SOC_POSSIBLE_DAIFMT_LEFT_J,

		/* Second Priority */
(B)		SND_SOC_POSSIBLE_DAIFMT_DSP_A	|
		SND_SOC_POSSIBLE_DAIFMT_DSP_B,
	};

It try to find available format from I2S/LEFT_J first (A).
Then, try to find from I2S/LEFT_J/DSP_A/DSP_B if couldn't find (A)+(B).
(OR:ed)

In this method, it can't handle if there is format combination.
For example, some driver has pattern.

Pattern1
	I2S/RIFHT_J/LEFT_J (FORMAT) and NB_NF/IB_IF/IB_NF/NB_IF (INV)_
Pattern2
	DSP_A/DSP_B        (FORMAT) and NB_NF/      IB_NF

Because it will try to OR Pattern1 and Pattern2, un-supported
pattern might be selected.

This patch update method not to use OR, and assumes full format array.
Above sample (X) need to be

	static u64 xxx_auto_formats[] = {
		/* First Priority */
		SND_SOC_POSSIBLE_DAIFMT_I2S	|
		SND_SOC_POSSIBLE_DAIFMT_LEFT_J,

		/* Second Priority */
		SND_SOC_POSSIBLE_DAIFMT_I2S	|
		SND_SOC_POSSIBLE_DAIFMT_LEFT_J	|
		SND_SOC_POSSIBLE_DAIFMT_DSP_A	|
		SND_SOC_POSSIBLE_DAIFMT_DSP_B,
	};

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 include/sound/soc-dai.h |   7 +-
 sound/soc/soc-core.c    | 145 +----------------------------
 sound/soc/soc-dai.c     | 201 +++++++++++++++++++++++++++++++---------
 3 files changed, 159 insertions(+), 194 deletions(-)

diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h
index 06ed6774229bc..d9947a4595d74 100644
--- a/include/sound/soc-dai.h
+++ b/include/sound/soc-dai.h
@@ -80,10 +80,10 @@ struct snd_compr_stream;
 /*
  * define GATED -> CONT. GATED will be selected if both are selected.
  * see
- *	snd_soc_runtime_get_dai_fmt()
+ *	soc_dai_convert_possiblefmt_to_daifmt()
  */
 #define SND_SOC_POSSIBLE_DAIFMT_CLOCK_SHIFT	16
-#define SND_SOC_POSSIBLE_DAIFMT_CLOCK_MASK	(0xFFFF	<< SND_SOC_POSSIBLE_DAIFMT_CLOCK_SHIFT)
+#define SND_SOC_POSSIBLE_DAIFMT_CLOCK_MASK	(0xFFFFULL << SND_SOC_POSSIBLE_DAIFMT_CLOCK_SHIFT)
 #define SND_SOC_POSSIBLE_DAIFMT_GATED		(0x1ULL	<< SND_SOC_POSSIBLE_DAIFMT_CLOCK_SHIFT)
 #define SND_SOC_POSSIBLE_DAIFMT_CONT		(0x2ULL	<< SND_SOC_POSSIBLE_DAIFMT_CLOCK_SHIFT)
 
@@ -181,8 +181,7 @@ int snd_soc_dai_set_pll(struct snd_soc_dai *dai,
 int snd_soc_dai_set_bclk_ratio(struct snd_soc_dai *dai, unsigned int ratio);
 
 /* Digital Audio interface formatting */
-int snd_soc_dai_get_fmt_max_priority(const struct snd_soc_pcm_runtime *rtd);
-u64 snd_soc_dai_get_fmt(const struct snd_soc_dai *dai, int priority);
+unsigned int snd_soc_dai_auto_select_format(const struct snd_soc_pcm_runtime *rtd);
 int snd_soc_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt);
 
 int snd_soc_dai_set_tdm_slot(struct snd_soc_dai *dai,
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 04a2d64d977b3..691fd7fc5030d 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1284,148 +1284,6 @@ int snd_soc_add_pcm_runtimes(struct snd_soc_card *card,
 }
 EXPORT_SYMBOL_GPL(snd_soc_add_pcm_runtimes);
 
-static void snd_soc_runtime_get_dai_fmt(struct snd_soc_pcm_runtime *rtd)
-{
-	struct snd_soc_dai_link *dai_link = rtd->dai_link;
-	struct snd_soc_dai *dai, *not_used;
-	u64 pos, possible_fmt;
-	unsigned int mask = 0, dai_fmt = 0;
-	int i, j, priority, pri, until;
-
-	/*
-	 * Get selectable format from each DAIs.
-	 *
-	 ****************************
-	 *            NOTE
-	 * Using .auto_selectable_formats is not mandatory,
-	 * we can select format manually from Sound Card.
-	 * When use it, driver should list well tested format only.
-	 ****************************
-	 *
-	 * ex)
-	 *	auto_selectable_formats (= SND_SOC_POSSIBLE_xxx)
-	 *		 (A)	 (B)	 (C)
-	 *	DAI0_: { 0x000F, 0x00F0, 0x0F00 };
-	 *	DAI1 : { 0xF000, 0x0F00 };
-	 *		 (X)	 (Y)
-	 *
-	 * "until" will be 3 in this case (MAX array size from DAI0 and DAI1)
-	 * Here is dev_dbg() message and comments
-	 *
-	 * priority = 1
-	 * DAI0: (pri, fmt) = (1, 000000000000000F) // 1st check (A) DAI1 is not selected
-	 * DAI1: (pri, fmt) = (0, 0000000000000000) //               Necessary Waste
-	 * DAI0: (pri, fmt) = (1, 000000000000000F) // 2nd check (A)
-	 * DAI1: (pri, fmt) = (1, 000000000000F000) //           (X)
-	 * priority = 2
-	 * DAI0: (pri, fmt) = (2, 00000000000000FF) // 3rd check (A) + (B)
-	 * DAI1: (pri, fmt) = (1, 000000000000F000) //           (X)
-	 * DAI0: (pri, fmt) = (2, 00000000000000FF) // 4th check (A) + (B)
-	 * DAI1: (pri, fmt) = (2, 000000000000FF00) //           (X) + (Y)
-	 * priority = 3
-	 * DAI0: (pri, fmt) = (3, 0000000000000FFF) // 5th check (A) + (B) + (C)
-	 * DAI1: (pri, fmt) = (2, 000000000000FF00) //           (X) + (Y)
-	 * found auto selected format: 0000000000000F00
-	 */
-	until = snd_soc_dai_get_fmt_max_priority(rtd);
-	for (priority = 1; priority <= until; priority++) {
-		for_each_rtd_dais(rtd, j, not_used) {
-
-			possible_fmt = ULLONG_MAX;
-			for_each_rtd_dais(rtd, i, dai) {
-				u64 fmt = 0;
-
-				pri = (j >= i) ? priority : priority - 1;
-				fmt = snd_soc_dai_get_fmt(dai, pri);
-				possible_fmt &= fmt;
-			}
-			if (possible_fmt)
-				goto found;
-		}
-	}
-	/* Not Found */
-	return;
-found:
-	/*
-	 * convert POSSIBLE_DAIFMT to DAIFMT
-	 *
-	 * Some basic/default settings on each is defined as 0.
-	 * see
-	 *	SND_SOC_DAIFMT_NB_NF
-	 *	SND_SOC_DAIFMT_GATED
-	 *
-	 * SND_SOC_DAIFMT_xxx_MASK can't notice it if Sound Card specify
-	 * these value, and will be overwrite to auto selected value.
-	 *
-	 * To avoid such issue, loop from 63 to 0 here.
-	 * Small number of SND_SOC_POSSIBLE_xxx will be Hi priority.
-	 * Basic/Default settings of each part and above are defined
-	 * as Hi priority (= small number) of SND_SOC_POSSIBLE_xxx.
-	 */
-	for (i = 63; i >= 0; i--) {
-		pos = 1ULL << i;
-		switch (possible_fmt & pos) {
-		/*
-		 * for format
-		 */
-		case SND_SOC_POSSIBLE_DAIFMT_I2S:
-		case SND_SOC_POSSIBLE_DAIFMT_RIGHT_J:
-		case SND_SOC_POSSIBLE_DAIFMT_LEFT_J:
-		case SND_SOC_POSSIBLE_DAIFMT_DSP_A:
-		case SND_SOC_POSSIBLE_DAIFMT_DSP_B:
-		case SND_SOC_POSSIBLE_DAIFMT_AC97:
-		case SND_SOC_POSSIBLE_DAIFMT_PDM:
-			dai_fmt = (dai_fmt & ~SND_SOC_DAIFMT_FORMAT_MASK) | i;
-			break;
-		/*
-		 * for clock
-		 */
-		case SND_SOC_POSSIBLE_DAIFMT_CONT:
-			dai_fmt = (dai_fmt & ~SND_SOC_DAIFMT_CLOCK_MASK) | SND_SOC_DAIFMT_CONT;
-			break;
-		case SND_SOC_POSSIBLE_DAIFMT_GATED:
-			dai_fmt = (dai_fmt & ~SND_SOC_DAIFMT_CLOCK_MASK) | SND_SOC_DAIFMT_GATED;
-			break;
-		/*
-		 * for clock invert
-		 */
-		case SND_SOC_POSSIBLE_DAIFMT_NB_NF:
-			dai_fmt = (dai_fmt & ~SND_SOC_DAIFMT_INV_MASK) | SND_SOC_DAIFMT_NB_NF;
-			break;
-		case SND_SOC_POSSIBLE_DAIFMT_NB_IF:
-			dai_fmt = (dai_fmt & ~SND_SOC_DAIFMT_INV_MASK) | SND_SOC_DAIFMT_NB_IF;
-			break;
-		case SND_SOC_POSSIBLE_DAIFMT_IB_NF:
-			dai_fmt = (dai_fmt & ~SND_SOC_DAIFMT_INV_MASK) | SND_SOC_DAIFMT_IB_NF;
-			break;
-		case SND_SOC_POSSIBLE_DAIFMT_IB_IF:
-			dai_fmt = (dai_fmt & ~SND_SOC_DAIFMT_INV_MASK) | SND_SOC_DAIFMT_IB_IF;
-			break;
-		}
-	}
-
-	/*
-	 * Some driver might have very complex limitation.
-	 * In such case, user want to auto-select non-limitation part,
-	 * and want to manually specify complex part.
-	 *
-	 * Or for example, if both CPU and Codec can be clock provider,
-	 * but because of its quality, user want to specify it manually.
-	 *
-	 * Use manually specified settings if sound card did.
-	 */
-	if (!(dai_link->dai_fmt & SND_SOC_DAIFMT_FORMAT_MASK))
-		mask |= SND_SOC_DAIFMT_FORMAT_MASK;
-	if (!(dai_link->dai_fmt & SND_SOC_DAIFMT_CLOCK_MASK))
-		mask |= SND_SOC_DAIFMT_CLOCK_MASK;
-	if (!(dai_link->dai_fmt & SND_SOC_DAIFMT_INV_MASK))
-		mask |= SND_SOC_DAIFMT_INV_MASK;
-	if (!(dai_link->dai_fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK))
-		mask |= SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK;
-
-	dai_link->dai_fmt |= (dai_fmt & mask);
-}
-
 /**
  * snd_soc_runtime_set_dai_fmt() - Change DAI link format for a ASoC runtime
  * @rtd: The runtime for which the DAI link format should be changed
@@ -1504,8 +1362,7 @@ static int soc_init_pcm_runtime(struct snd_soc_card *card,
 	if (ret < 0)
 		return ret;
 
-	snd_soc_runtime_get_dai_fmt(rtd);
-	ret = snd_soc_runtime_set_dai_fmt(rtd, dai_link->dai_fmt);
+	ret = snd_soc_runtime_set_dai_fmt(rtd, snd_soc_dai_auto_select_format(rtd));
 	if (ret)
 		goto err;
 
diff --git a/sound/soc/soc-dai.c b/sound/soc/soc-dai.c
index 2f370fda12665..21943d7b5ef35 100644
--- a/sound/soc/soc-dai.c
+++ b/sound/soc/soc-dai.c
@@ -120,68 +120,177 @@ int snd_soc_dai_set_bclk_ratio(struct snd_soc_dai *dai, unsigned int ratio)
 }
 EXPORT_SYMBOL_GPL(snd_soc_dai_set_bclk_ratio);
 
-int snd_soc_dai_get_fmt_max_priority(const struct snd_soc_pcm_runtime *rtd)
+static int soc_dai_fmt_match_cnt(u64 fmt)
 {
-	struct snd_soc_dai *dai;
-	int i, max = 0;
+	int cnt = 0;
 
-	/*
-	 * return max num if *ALL* DAIs have .auto_selectable_formats
-	 */
-	for_each_rtd_dais(rtd, i, dai) {
-		if (dai->driver->ops &&
-		    dai->driver->ops->num_auto_selectable_formats)
-			max = max(max, dai->driver->ops->num_auto_selectable_formats);
-		else
-			return 0;
-	}
+	if (fmt & SND_SOC_POSSIBLE_DAIFMT_FORMAT_MASK)
+		cnt++;
+	if (fmt & SND_SOC_POSSIBLE_DAIFMT_CLOCK_MASK)
+		cnt++;
+	if (fmt & SND_SOC_POSSIBLE_DAIFMT_INV_MASK)
+		cnt++;
 
-	return max;
+	return cnt;
 }
 
-/**
- * snd_soc_dai_get_fmt - get supported audio format.
- * @dai: DAI
- * @priority: priority level of supported audio format.
- *
- * This should return only formats implemented with high
- * quality by the DAI so that the core can configure a
- * format which will work well with other devices.
- * For example devices which don't support both edges of the
- * LRCLK signal in I2S style formats should only list DSP
- * modes.  This will mean that sometimes fewer formats
- * are reported here than are supported by set_fmt().
- */
-u64 snd_soc_dai_get_fmt(const struct snd_soc_dai *dai, int priority)
+static void soc_dai_auto_select_format(u64 fmt, const struct snd_soc_pcm_runtime *rtd,
+				      int idx, u64 *best_fmt)
 {
-	const struct snd_soc_dai_ops *ops = dai->driver->ops;
-	u64 fmt = 0;
-	int i, max = 0, until = priority;
+	struct snd_soc_dai *dai;
+	const struct snd_soc_dai_ops *ops;
+	int max_idx = rtd->dai_link->num_cpus + rtd->dai_link->num_codecs;
+	u64 available_fmt;
+
+	if (idx >= max_idx)
+		return;
+
+	dai = rtd->dais[idx];
+	ops = dai->driver->ops;
+
+	/* zero chance of auto select format */
+	if (!ops || !ops->num_auto_selectable_formats)
+		return;
 
 	/*
-	 * Collect auto_selectable_formats until priority
+	 ****************************
+	 *            NOTE
+	 ****************************
+	 * Using .auto_selectable_formats is not mandatory,
+	 * It try to find best formats as much as possible, but automatically selecting the
+	 * perfect format is impossible. So you can select full or missing format manually
+	 * from Sound Card.
 	 *
 	 * ex)
-	 *	auto_selectable_formats[] = { A, B, C };
-	 *	(A, B, C = SND_SOC_POSSIBLE_DAIFMT_xxx)
+	 * CPU					Codec
+	 * (A)[0] I2S/LEFT_J : IB_NF/IB_IF	(X)[0] I2S/DSP_A: NB_NF : GATED
+	 * (B)[1] DSP_A/DSP_B: NB_NF/IB_NF	(Y)[1] LEFT_J:    NB_NF : GATED
+	 * (C)[2] ...
 	 *
-	 * priority = 1 :	A
-	 * priority = 2 :	A | B
-	 * priority = 3 :	A | B | C
-	 * priority = 4 :	A | B | C
+	 * 1. (A) -> (X) : I2S		:update best format
+	 * 2. (A) -> (Y) : LEFT_J
+	 * 3. (B) -> (X) : DSP_A/NB_NF	:update best format
+	 * 4. (B) -> (Y) : NB_NF
+	 * 5. (C) -> (X) ...
+	 * 6. (C) -> (Y) ...
 	 * ...
+	 *
+	 * In above case GATED will not be selected
 	 */
-	if (ops)
-		max = ops->num_auto_selectable_formats;
 
-	if (max < until)
-		until = max;
+	/* find best formats */
+	for (int i = 0; i < ops->num_auto_selectable_formats; i++) {
+		available_fmt = fmt & ops->auto_selectable_formats[i];
 
-	if (ops && ops->auto_selectable_formats)
-		for (i = 0; i < until; i++)
-			fmt |= ops->auto_selectable_formats[i];
+		/* In case of last DAI */
+		if (idx + 1 >= max_idx) {
+			int cnt1 = soc_dai_fmt_match_cnt(*best_fmt);
+			int cnt2 = soc_dai_fmt_match_cnt(available_fmt);
 
-	return fmt;
+			if (cnt1 < cnt2)
+				*best_fmt = available_fmt;
+		}
+		/* parse with next DAI */
+		else {
+			soc_dai_auto_select_format(available_fmt, rtd, idx + 1, best_fmt);
+		}
+	}
+}
+
+static unsigned int soc_dai_convert_possiblefmt_to_daifmt(u64 possible_fmt, unsigned int configured_fmt)
+{
+	unsigned int fmt = 0;
+	unsigned int mask = 0;
+
+	/*
+	 * convert POSSIBLE_DAIFMT to DAIFMT
+	 *
+	 * Some basic/default settings on each is defined as 0.
+	 * see
+	 *	SND_SOC_DAIFMT_NB_NF
+	 *	SND_SOC_DAIFMT_GATED
+	 *
+	 * SND_SOC_DAIFMT_xxx_MASK can't notice it if Sound Card specify
+	 * these value, and will be overwrite to auto selected value.
+	 *
+	 * To avoid such issue, loop from 63 to 0 here.
+	 * Small number of SND_SOC_POSSIBLE_xxx will be Hi priority.
+	 * Basic/Default settings of each part and above are defined
+	 * as Hi priority (= small number) of SND_SOC_POSSIBLE_xxx.
+	 */
+	for (int i = 63; i >= 0; i--) {
+		u64 pos = 1ULL << i;
+
+		switch (possible_fmt & pos) {
+		/*
+		 * for format
+		 */
+		case SND_SOC_POSSIBLE_DAIFMT_I2S:
+		case SND_SOC_POSSIBLE_DAIFMT_RIGHT_J:
+		case SND_SOC_POSSIBLE_DAIFMT_LEFT_J:
+		case SND_SOC_POSSIBLE_DAIFMT_DSP_A:
+		case SND_SOC_POSSIBLE_DAIFMT_DSP_B:
+		case SND_SOC_POSSIBLE_DAIFMT_AC97:
+		case SND_SOC_POSSIBLE_DAIFMT_PDM:
+			fmt = (fmt & ~SND_SOC_DAIFMT_FORMAT_MASK) | i;
+			break;
+		/*
+		 * for clock
+		 */
+		case SND_SOC_POSSIBLE_DAIFMT_CONT:
+			fmt = (fmt & ~SND_SOC_DAIFMT_CLOCK_MASK) | SND_SOC_DAIFMT_CONT;
+			break;
+		case SND_SOC_POSSIBLE_DAIFMT_GATED:
+			fmt = (fmt & ~SND_SOC_DAIFMT_CLOCK_MASK) | SND_SOC_DAIFMT_GATED;
+			break;
+		/*
+		 * for clock invert
+		 */
+		case SND_SOC_POSSIBLE_DAIFMT_NB_NF:
+			fmt = (fmt & ~SND_SOC_DAIFMT_INV_MASK) | SND_SOC_DAIFMT_NB_NF;
+			break;
+		case SND_SOC_POSSIBLE_DAIFMT_NB_IF:
+			fmt = (fmt & ~SND_SOC_DAIFMT_INV_MASK) | SND_SOC_DAIFMT_NB_IF;
+			break;
+		case SND_SOC_POSSIBLE_DAIFMT_IB_NF:
+			fmt = (fmt & ~SND_SOC_DAIFMT_INV_MASK) | SND_SOC_DAIFMT_IB_NF;
+			break;
+		case SND_SOC_POSSIBLE_DAIFMT_IB_IF:
+			fmt = (fmt & ~SND_SOC_DAIFMT_INV_MASK) | SND_SOC_DAIFMT_IB_IF;
+			break;
+		}
+	}
+
+	/*
+	 * Some driver might have very complex limitation.
+	 * In such case, user want to auto-select non-limitation part,
+	 * and want to manually specify complex part.
+	 *
+	 * Or for example, if both CPU and Codec can be clock provider,
+	 * but because of its quality, user want to specify it manually.
+	 *
+	 * Ignore already configured format if exist
+	 */
+	if (!(configured_fmt & SND_SOC_DAIFMT_FORMAT_MASK))
+		mask |= SND_SOC_DAIFMT_FORMAT_MASK;
+	if (!(configured_fmt & SND_SOC_DAIFMT_CLOCK_MASK))
+		mask |= SND_SOC_DAIFMT_CLOCK_MASK;
+	if (!(configured_fmt & SND_SOC_DAIFMT_INV_MASK))
+		mask |= SND_SOC_DAIFMT_INV_MASK;
+	if (!(configured_fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK))
+		mask |= SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK;
+
+	return configured_fmt | (fmt & mask);
+}
+
+unsigned int snd_soc_dai_auto_select_format(const struct snd_soc_pcm_runtime *rtd)
+{
+	struct snd_soc_dai_link *dai_link = rtd->dai_link;
+	u64 possible_fmt = 0;
+
+	soc_dai_auto_select_format(~0, rtd, 0, &possible_fmt);
+
+	return soc_dai_convert_possiblefmt_to_daifmt(possible_fmt, dai_link->dai_fmt);
 }
 
 /**
-- 
2.43.0


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

* [PATCH 09/83] ASoC: audio-graph-card2: recommend to use auto select DAI format
  2026-05-26  1:58 [PATCH 00/83] ASoC: use .auto_selectable_formats Kuninori Morimoto
                   ` (7 preceding siblings ...)
  2026-05-26  2:00 ` [PATCH 08/83] ASoC: update auto format selection method Kuninori Morimoto
@ 2026-05-26  2:01 ` Kuninori Morimoto
  2026-05-26  2:02 ` [PATCH 10/83] ASoC: amd: use .auto_selectable_formats Kuninori Morimoto
                   ` (6 subsequent siblings)
  15 siblings, 0 replies; 22+ messages in thread
From: Kuninori Morimoto @ 2026-05-26  2:01 UTC (permalink / raw)
  To: "Alvin Šipraga", J.M.B. Downing,
	"Martin Povišer", "Nuno Sá",
	"Uwe Kleine-König (The Capable Hub)",
	Alexandre Belloni, Alexandre Torgue, AngeloGioacchino Del Regno,
	Arnaud Pouliquen, Baojun Xu, Bartosz Golaszewski, Ben Bright,
	Benson Leung, Biju Das, Binbin Zhou, Bram Vlerick, Charles Keepax,
	Chen-Yu Tsai, Cheng-Yi Chiang, Claudiu Beznea, Cristian Ciocaltea,
	Daniel Mack, Dario Binacchi, David Rhodes, Fabio Estevam,
	Florian Fainelli, Frank Li, Fred Treven, Geert Uytterhoeven,
	Guenter Roeck, Guoqing Jiang, Haojian Zhuang, HariKrishna Sagala,
	Heiko Stuebner, Herve Codina, Hsieh Hung-En, James Ogletree,
	Jarkko Nikula, Jaroslav Kysela, Jernej Skrabec, Jerome Brunet,
	Jihed Chaibi, Jonathan Hunter, Kevin Cernekee, Kevin Hilman,
	Kevin Lu, Kirill Marinushkin, Kiseok Jo, Krzysztof Kozlowski,
	Kunihiko Hayashi, Lad Prabhakar, Lars-Peter Clausen,
	Liam Girdwood, Luca Ceresoli, M R Swami Reddy, Mark Brown,
	Martin Blumenstingl, Masami Hiramatsu, Matthias Brugger,
	Max Filippov, Maxime Coquelin, Neil Armstrong, Nicolas Ferre,
	Nicolas Frattaroli, Nicolin Chen, Oder Chiou, Olivier Moysan,
	Paul Cercueil, Peter Rosin, Piotr Wojtaszczyk, Qianfeng Rong,
	Ray Jui, Richard Fitzgerald, Robert Jarzmik, Samuel Holland,
	Sascha Hauer, Scott Branden, Sen Wang, Sharique Mohammad,
	Shenghao Ding, Shengjiu Wang, Steven Eckhoff, Support Opensource,
	Sylwester Nawrocki, Takashi Iwai, Thierry Reding, Tim Bird,
	Troy Mitchell, Tzung-Bi Shih, Venkata Prasad Potturu,
	Vijendar Mukunda, Vishwas A Deshpande, Vladimir Zapolskiy,
	Xiubo Li, Yixun Lan, Zhang Yi, chrome-platform, imx,
	linux-arm-kernel, linux-mips, linux-renesas-soc, linux-riscv,
	linux-sound, spacemit

"Simple Audio Card", "Audio Graph Card", "Audio Graph Card2" are
possible to set DAI format via DT.

OTOH, ASoC is supporting .auto_selectable_formats to select DAI
format automatically. Let's recommend to use it on "Audio Graph Card2".
One note is that it keeps supporting DAI format setting via DT.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/generic/audio-graph-card2.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/sound/soc/generic/audio-graph-card2.c b/sound/soc/generic/audio-graph-card2.c
index 0202ed0ee78e8..6894bb936cfd2 100644
--- a/sound/soc/generic/audio-graph-card2.c
+++ b/sound/soc/generic/audio-graph-card2.c
@@ -778,6 +778,18 @@ static void graph_link_init(struct simple_util_priv *priv,
 	graph_parse_daifmt(ports_cpu,	&daifmt);
 	graph_parse_daifmt(ports_codec,	&daifmt);
 	graph_parse_daifmt(lnk,		&daifmt);
+	if (daifmt) {
+		struct device *dev = simple_priv_to_dev(priv);
+
+		/*
+		 * Recommend to use Auto Select by using .auto_selectable_formats.
+		 * linux/sound/soc/renesas/rcar/core.c can be good sample for it.
+		 *
+		 * One note is that Audio Graph Card2 still keeps compatible to set
+		 * DAI format via DT.
+		 */
+		dev_warn_once(dev, "use .auto_selectable_formats on each corresponding CPU/Codec driver");
+	}
 
 	graph_util_parse_link_direction(lnk,		&playback_only, &capture_only);
 	graph_util_parse_link_direction(ports_cpu,	&playback_only, &capture_only);
-- 
2.43.0


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

* [PATCH 10/83] ASoC: amd: use .auto_selectable_formats
  2026-05-26  1:58 [PATCH 00/83] ASoC: use .auto_selectable_formats Kuninori Morimoto
                   ` (8 preceding siblings ...)
  2026-05-26  2:01 ` [PATCH 09/83] ASoC: audio-graph-card2: recommend to use auto select DAI format Kuninori Morimoto
@ 2026-05-26  2:02 ` Kuninori Morimoto
  2026-06-03 11:47   ` Mukunda,Vijendar
  2026-05-26  2:03 ` [PATCH 11/83] ASoC: apple: " Kuninori Morimoto
                   ` (5 subsequent siblings)
  15 siblings, 1 reply; 22+ messages in thread
From: Kuninori Morimoto @ 2026-05-26  2:02 UTC (permalink / raw)
  To: "Alvin Šipraga", J.M.B. Downing,
	"Martin Povišer", "Nuno Sá",
	"Uwe Kleine-König (The Capable Hub)",
	Alexandre Belloni, Alexandre Torgue, AngeloGioacchino Del Regno,
	Arnaud Pouliquen, Baojun Xu, Bartosz Golaszewski, Ben Bright,
	Benson Leung, Biju Das, Binbin Zhou, Bram Vlerick, Charles Keepax,
	Chen-Yu Tsai, Cheng-Yi Chiang, Claudiu Beznea, Cristian Ciocaltea,
	Daniel Mack, Dario Binacchi, David Rhodes, Fabio Estevam,
	Florian Fainelli, Frank Li, Fred Treven, Geert Uytterhoeven,
	Guenter Roeck, Guoqing Jiang, Haojian Zhuang, HariKrishna Sagala,
	Heiko Stuebner, Herve Codina, Hsieh Hung-En, James Ogletree,
	Jarkko Nikula, Jaroslav Kysela, Jernej Skrabec, Jerome Brunet,
	Jihed Chaibi, Jonathan Hunter, Kevin Cernekee, Kevin Hilman,
	Kevin Lu, Kirill Marinushkin, Kiseok Jo, Krzysztof Kozlowski,
	Kunihiko Hayashi, Lad Prabhakar, Lars-Peter Clausen,
	Liam Girdwood, Luca Ceresoli, M R Swami Reddy, Mark Brown,
	Martin Blumenstingl, Masami Hiramatsu, Matthias Brugger,
	Max Filippov, Maxime Coquelin, Neil Armstrong, Nicolas Ferre,
	Nicolas Frattaroli, Nicolin Chen, Oder Chiou, Olivier Moysan,
	Paul Cercueil, Peter Rosin, Piotr Wojtaszczyk, Qianfeng Rong,
	Ray Jui, Richard Fitzgerald, Robert Jarzmik, Samuel Holland,
	Sascha Hauer, Scott Branden, Sen Wang, Sharique Mohammad,
	Shenghao Ding, Shengjiu Wang, Steven Eckhoff, Support Opensource,
	Sylwester Nawrocki, Takashi Iwai, Thierry Reding, Tim Bird,
	Troy Mitchell, Tzung-Bi Shih, Venkata Prasad Potturu,
	Vijendar Mukunda, Vishwas A Deshpande, Vladimir Zapolskiy,
	Xiubo Li, Yixun Lan, Zhang Yi, chrome-platform, imx,
	linux-arm-kernel, linux-mips, linux-renesas-soc, linux-riscv,
	linux-sound, spacemit

We can use .auto_selectable_formats. Let's adds it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/amd/acp/acp-i2s.c       | 6 ++++++
 sound/soc/amd/raven/acp3x-i2s.c   | 6 ++++++
 sound/soc/amd/vangogh/acp5x-i2s.c | 6 ++++++
 3 files changed, 18 insertions(+)

diff --git a/sound/soc/amd/acp/acp-i2s.c b/sound/soc/amd/acp/acp-i2s.c
index 283a674c7e2c3..bb58a9d34993b 100644
--- a/sound/soc/amd/acp/acp-i2s.c
+++ b/sound/soc/amd/acp/acp-i2s.c
@@ -686,6 +686,10 @@ static int acp_i2s_startup(struct snd_pcm_substream *substream, struct snd_soc_d
 	return 0;
 }
 
+static const u64 acp_i2s_selectable_formats =
+	SND_SOC_POSSIBLE_DAIFMT_I2S	|
+	SND_SOC_POSSIBLE_DAIFMT_DSP_A;
+
 const struct snd_soc_dai_ops asoc_acp_cpu_dai_ops = {
 	.startup	= acp_i2s_startup,
 	.hw_params	= acp_i2s_hwparams,
@@ -693,6 +697,8 @@ const struct snd_soc_dai_ops asoc_acp_cpu_dai_ops = {
 	.trigger	= acp_i2s_trigger,
 	.set_fmt	= acp_i2s_set_fmt,
 	.set_tdm_slot	= acp_i2s_set_tdm_slot,
+	.auto_selectable_formats	= &acp_i2s_selectable_formats,
+	.num_auto_selectable_formats	= 1,
 };
 EXPORT_SYMBOL_NS_GPL(asoc_acp_cpu_dai_ops, "SND_SOC_ACP_COMMON");
 
diff --git a/sound/soc/amd/raven/acp3x-i2s.c b/sound/soc/amd/raven/acp3x-i2s.c
index 352485dd98b14..b0147e88ba54c 100644
--- a/sound/soc/amd/raven/acp3x-i2s.c
+++ b/sound/soc/amd/raven/acp3x-i2s.c
@@ -250,11 +250,17 @@ static int acp3x_i2s_trigger(struct snd_pcm_substream *substream,
 	return ret;
 }
 
+static const u64 acp3x_i2s_selectable_formats =
+	SND_SOC_POSSIBLE_DAIFMT_I2S	|
+	SND_SOC_POSSIBLE_DAIFMT_DSP_A;
+
 static const struct snd_soc_dai_ops acp3x_i2s_dai_ops = {
 	.hw_params = acp3x_i2s_hwparams,
 	.trigger = acp3x_i2s_trigger,
 	.set_fmt = acp3x_i2s_set_fmt,
 	.set_tdm_slot = acp3x_i2s_set_tdm_slot,
+	.auto_selectable_formats = &acp3x_i2s_selectable_formats,
+	.num_auto_selectable_formats = 1,
 };
 
 static const struct snd_soc_component_driver acp3x_dai_component = {
diff --git a/sound/soc/amd/vangogh/acp5x-i2s.c b/sound/soc/amd/vangogh/acp5x-i2s.c
index bf719f6286174..dbfb87e2fe929 100644
--- a/sound/soc/amd/vangogh/acp5x-i2s.c
+++ b/sound/soc/amd/vangogh/acp5x-i2s.c
@@ -337,11 +337,17 @@ static int acp5x_i2s_trigger(struct snd_pcm_substream *substream,
 	return ret;
 }
 
+static const u64 acp5x_i2s_selectable_formats =
+	SND_SOC_POSSIBLE_DAIFMT_I2S	|
+	SND_SOC_POSSIBLE_DAIFMT_DSP_A;
+
 static const struct snd_soc_dai_ops acp5x_i2s_dai_ops = {
 	.hw_params = acp5x_i2s_hwparams,
 	.trigger = acp5x_i2s_trigger,
 	.set_fmt = acp5x_i2s_set_fmt,
 	.set_tdm_slot = acp5x_i2s_set_tdm_slot,
+	.auto_selectable_formats = &acp5x_i2s_selectable_formats,
+	.num_auto_selectable_formats = 1,
 };
 
 static const struct snd_soc_component_driver acp5x_dai_component = {
-- 
2.43.0


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

* [PATCH 11/83] ASoC: apple: use .auto_selectable_formats
  2026-05-26  1:58 [PATCH 00/83] ASoC: use .auto_selectable_formats Kuninori Morimoto
                   ` (9 preceding siblings ...)
  2026-05-26  2:02 ` [PATCH 10/83] ASoC: amd: use .auto_selectable_formats Kuninori Morimoto
@ 2026-05-26  2:03 ` Kuninori Morimoto
  2026-05-26  2:05 ` [PATCH 12/83] ASoC: atmel: " Kuninori Morimoto
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 22+ messages in thread
From: Kuninori Morimoto @ 2026-05-26  2:03 UTC (permalink / raw)
  To: "Alvin Šipraga", J.M.B. Downing,
	"Martin Povišer", "Nuno Sá",
	"Uwe Kleine-König (The Capable Hub)",
	Alexandre Belloni, Alexandre Torgue, AngeloGioacchino Del Regno,
	Arnaud Pouliquen, Baojun Xu, Bartosz Golaszewski, Ben Bright,
	Benson Leung, Biju Das, Binbin Zhou, Bram Vlerick, Charles Keepax,
	Chen-Yu Tsai, Cheng-Yi Chiang, Claudiu Beznea, Cristian Ciocaltea,
	Daniel Mack, Dario Binacchi, David Rhodes, Fabio Estevam,
	Florian Fainelli, Frank Li, Fred Treven, Geert Uytterhoeven,
	Guenter Roeck, Guoqing Jiang, Haojian Zhuang, HariKrishna Sagala,
	Heiko Stuebner, Herve Codina, Hsieh Hung-En, James Ogletree,
	Jarkko Nikula, Jaroslav Kysela, Jernej Skrabec, Jerome Brunet,
	Jihed Chaibi, Jonathan Hunter, Kevin Cernekee, Kevin Hilman,
	Kevin Lu, Kirill Marinushkin, Kiseok Jo, Krzysztof Kozlowski,
	Kunihiko Hayashi, Lad Prabhakar, Lars-Peter Clausen,
	Liam Girdwood, Luca Ceresoli, M R Swami Reddy, Mark Brown,
	Martin Blumenstingl, Masami Hiramatsu, Matthias Brugger,
	Max Filippov, Maxime Coquelin, Neil Armstrong, Nicolas Ferre,
	Nicolas Frattaroli, Nicolin Chen, Oder Chiou, Olivier Moysan,
	Paul Cercueil, Peter Rosin, Piotr Wojtaszczyk, Qianfeng Rong,
	Ray Jui, Richard Fitzgerald, Robert Jarzmik, Samuel Holland,
	Sascha Hauer, Scott Branden, Sen Wang, Sharique Mohammad,
	Shenghao Ding, Shengjiu Wang, Steven Eckhoff, Support Opensource,
	Sylwester Nawrocki, Takashi Iwai, Thierry Reding, Tim Bird,
	Troy Mitchell, Tzung-Bi Shih, Venkata Prasad Potturu,
	Vijendar Mukunda, Vishwas A Deshpande, Vladimir Zapolskiy,
	Xiubo Li, Yixun Lan, Zhang Yi, chrome-platform, imx,
	linux-arm-kernel, linux-mips, linux-renesas-soc, linux-riscv,
	linux-sound, spacemit

We can use .auto_selectable_formats. Let's adds it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/apple/mca.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/sound/soc/apple/mca.c b/sound/soc/apple/mca.c
index 492165c0e1ea9..1954192a789f1 100644
--- a/sound/soc/apple/mca.c
+++ b/sound/soc/apple/mca.c
@@ -699,6 +699,14 @@ static int mca_fe_hw_params(struct snd_pcm_substream *substream,
 	return 0;
 }
 
+static const u64 mca_fe_selectable_formats =
+	SND_SOC_POSSIBLE_DAIFMT_I2S	|
+	SND_SOC_POSSIBLE_DAIFMT_LEFT_J	|
+	SND_SOC_POSSIBLE_DAIFMT_NB_NF	|
+	SND_SOC_POSSIBLE_DAIFMT_NB_IF	|
+	SND_SOC_POSSIBLE_DAIFMT_IB_NF	|
+	SND_SOC_POSSIBLE_DAIFMT_IB_IF;
+
 static const struct snd_soc_dai_ops mca_fe_ops = {
 	.startup = mca_fe_startup,
 	.set_fmt = mca_fe_set_fmt,
@@ -706,6 +714,8 @@ static const struct snd_soc_dai_ops mca_fe_ops = {
 	.set_tdm_slot = mca_fe_set_tdm_slot,
 	.hw_params = mca_fe_hw_params,
 	.trigger = mca_fe_trigger,
+	.auto_selectable_formats = &mca_fe_selectable_formats,
+	.num_auto_selectable_formats = 1,
 };
 
 static bool mca_be_started(struct mca_cluster *cl)
-- 
2.43.0


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

* [PATCH 12/83] ASoC: atmel: use .auto_selectable_formats
  2026-05-26  1:58 [PATCH 00/83] ASoC: use .auto_selectable_formats Kuninori Morimoto
                   ` (10 preceding siblings ...)
  2026-05-26  2:03 ` [PATCH 11/83] ASoC: apple: " Kuninori Morimoto
@ 2026-05-26  2:05 ` Kuninori Morimoto
  2026-05-26  2:06 ` [PATCH 13/83] ASoC: au1x: " Kuninori Morimoto
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 22+ messages in thread
From: Kuninori Morimoto @ 2026-05-26  2:05 UTC (permalink / raw)
  To: "Alvin Šipraga", J.M.B. Downing,
	"Martin Povišer", "Nuno Sá",
	"Uwe Kleine-König (The Capable Hub)",
	Alexandre Belloni, Alexandre Torgue, AngeloGioacchino Del Regno,
	Arnaud Pouliquen, Baojun Xu, Bartosz Golaszewski, Ben Bright,
	Benson Leung, Biju Das, Binbin Zhou, Bram Vlerick, Charles Keepax,
	Chen-Yu Tsai, Cheng-Yi Chiang, Claudiu Beznea, Cristian Ciocaltea,
	Daniel Mack, Dario Binacchi, David Rhodes, Fabio Estevam,
	Florian Fainelli, Frank Li, Fred Treven, Geert Uytterhoeven,
	Guenter Roeck, Guoqing Jiang, Haojian Zhuang, HariKrishna Sagala,
	Heiko Stuebner, Herve Codina, Hsieh Hung-En, James Ogletree,
	Jarkko Nikula, Jaroslav Kysela, Jernej Skrabec, Jerome Brunet,
	Jihed Chaibi, Jonathan Hunter, Kevin Cernekee, Kevin Hilman,
	Kevin Lu, Kirill Marinushkin, Kiseok Jo, Krzysztof Kozlowski,
	Kunihiko Hayashi, Lad Prabhakar, Lars-Peter Clausen,
	Liam Girdwood, Luca Ceresoli, M R Swami Reddy, Mark Brown,
	Martin Blumenstingl, Masami Hiramatsu, Matthias Brugger,
	Max Filippov, Maxime Coquelin, Neil Armstrong, Nicolas Ferre,
	Nicolas Frattaroli, Nicolin Chen, Oder Chiou, Olivier Moysan,
	Paul Cercueil, Peter Rosin, Piotr Wojtaszczyk, Qianfeng Rong,
	Ray Jui, Richard Fitzgerald, Robert Jarzmik, Samuel Holland,
	Sascha Hauer, Scott Branden, Sen Wang, Sharique Mohammad,
	Shenghao Ding, Shengjiu Wang, Steven Eckhoff, Support Opensource,
	Sylwester Nawrocki, Takashi Iwai, Thierry Reding, Tim Bird,
	Troy Mitchell, Tzung-Bi Shih, Venkata Prasad Potturu,
	Vijendar Mukunda, Vishwas A Deshpande, Vladimir Zapolskiy,
	Xiubo Li, Yixun Lan, Zhang Yi, chrome-platform, imx,
	linux-arm-kernel, linux-mips, linux-renesas-soc, linux-riscv,
	linux-sound, spacemit

We can use .auto_selectable_formats. Let's adds it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/atmel/atmel-i2s.c     | 4 ++++
 sound/soc/atmel/atmel_ssc_dai.c | 7 +++++++
 sound/soc/atmel/mchp-i2s-mcc.c  | 9 +++++++++
 sound/soc/atmel/mchp-pdmc.c     | 4 ++++
 4 files changed, 24 insertions(+)

diff --git a/sound/soc/atmel/atmel-i2s.c b/sound/soc/atmel/atmel-i2s.c
index 762199faf872e..d9ad262ec44de 100644
--- a/sound/soc/atmel/atmel-i2s.c
+++ b/sound/soc/atmel/atmel-i2s.c
@@ -540,12 +540,16 @@ static int atmel_i2s_dai_probe(struct snd_soc_dai *dai)
 	return 0;
 }
 
+static const u64 atmel_i2s_selectable_formats = SND_SOC_POSSIBLE_DAIFMT_I2S;
+
 static const struct snd_soc_dai_ops atmel_i2s_dai_ops = {
 	.probe		= atmel_i2s_dai_probe,
 	.prepare	= atmel_i2s_prepare,
 	.trigger	= atmel_i2s_trigger,
 	.hw_params	= atmel_i2s_hw_params,
 	.set_fmt	= atmel_i2s_set_dai_fmt,
+	.auto_selectable_formats	= &atmel_i2s_selectable_formats,
+	.num_auto_selectable_formats	= 1,
 };
 
 static struct snd_soc_dai_driver atmel_i2s_dai = {
diff --git a/sound/soc/atmel/atmel_ssc_dai.c b/sound/soc/atmel/atmel_ssc_dai.c
index 89098f41679c0..f4f886bf678d2 100644
--- a/sound/soc/atmel/atmel_ssc_dai.c
+++ b/sound/soc/atmel/atmel_ssc_dai.c
@@ -825,6 +825,11 @@ static int atmel_ssc_resume(struct snd_soc_component *component)
 #define ATMEL_SSC_FORMATS (SNDRV_PCM_FMTBIT_S8     | SNDRV_PCM_FMTBIT_S16_LE |\
 			   SNDRV_PCM_FMTBIT_S32_LE)
 
+static const u64 atmel_ssc_selectable_formats =
+	SND_SOC_POSSIBLE_DAIFMT_I2S	|
+	SND_SOC_POSSIBLE_DAIFMT_LEFT_J	|
+	SND_SOC_POSSIBLE_DAIFMT_DSP_A;
+
 static const struct snd_soc_dai_ops atmel_ssc_dai_ops = {
 	.startup	= atmel_ssc_startup,
 	.shutdown	= atmel_ssc_shutdown,
@@ -833,6 +838,8 @@ static const struct snd_soc_dai_ops atmel_ssc_dai_ops = {
 	.hw_params	= atmel_ssc_hw_params,
 	.set_fmt	= atmel_ssc_set_dai_fmt,
 	.set_clkdiv	= atmel_ssc_set_dai_clkdiv,
+	.auto_selectable_formats	= &atmel_ssc_selectable_formats,
+	.num_auto_selectable_formats	= 1,
 };
 
 static struct snd_soc_dai_driver atmel_ssc_dai = {
diff --git a/sound/soc/atmel/mchp-i2s-mcc.c b/sound/soc/atmel/mchp-i2s-mcc.c
index 17d138bb90648..a832dee73ac78 100644
--- a/sound/soc/atmel/mchp-i2s-mcc.c
+++ b/sound/soc/atmel/mchp-i2s-mcc.c
@@ -912,6 +912,13 @@ static int mchp_i2s_mcc_dai_probe(struct snd_soc_dai *dai)
 	return 0;
 }
 
+static const u64 mchp_i2s_selectable_formats =
+	SND_SOC_POSSIBLE_DAIFMT_I2S	|
+	SND_SOC_POSSIBLE_DAIFMT_LEFT_J	|
+	SND_SOC_POSSIBLE_DAIFMT_DSP_A	|
+	SND_SOC_POSSIBLE_DAIFMT_GATED	|
+	SND_SOC_POSSIBLE_DAIFMT_NB_NF;
+
 static const struct snd_soc_dai_ops mchp_i2s_mcc_dai_ops = {
 	.probe		= mchp_i2s_mcc_dai_probe,
 	.set_sysclk	= mchp_i2s_mcc_set_sysclk,
@@ -922,6 +929,8 @@ static const struct snd_soc_dai_ops mchp_i2s_mcc_dai_ops = {
 	.hw_free	= mchp_i2s_mcc_hw_free,
 	.set_fmt	= mchp_i2s_mcc_set_dai_fmt,
 	.set_tdm_slot	= mchp_i2s_mcc_set_dai_tdm_slot,
+	.auto_selectable_formats	= &mchp_i2s_selectable_formats,
+	.num_auto_selectable_formats	= 1,
 };
 
 #define MCHP_I2SMCC_RATES              SNDRV_PCM_RATE_8000_192000
diff --git a/sound/soc/atmel/mchp-pdmc.c b/sound/soc/atmel/mchp-pdmc.c
index ec7233ce1f78b..a6a9b5e6cd95e 100644
--- a/sound/soc/atmel/mchp-pdmc.c
+++ b/sound/soc/atmel/mchp-pdmc.c
@@ -741,6 +741,8 @@ static int mchp_pdmc_pcm_new(struct snd_soc_pcm_runtime *rtd,
 	return ret;
 }
 
+static const u64 mchp_selectable_formats = SND_SOC_POSSIBLE_DAIFMT_PDM;
+
 static const struct snd_soc_dai_ops mchp_pdmc_dai_ops = {
 	.probe		= mchp_pdmc_dai_probe,
 	.set_fmt	= mchp_pdmc_set_fmt,
@@ -748,6 +750,8 @@ static const struct snd_soc_dai_ops mchp_pdmc_dai_ops = {
 	.hw_params	= mchp_pdmc_hw_params,
 	.trigger	= mchp_pdmc_trigger,
 	.pcm_new	= &mchp_pdmc_pcm_new,
+	.auto_selectable_formats	= &mchp_selectable_formats,
+	.num_auto_selectable_formats	= 1,
 };
 
 static struct snd_soc_dai_driver mchp_pdmc_dai = {
-- 
2.43.0


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

* [PATCH 13/83] ASoC: au1x: use .auto_selectable_formats
  2026-05-26  1:58 [PATCH 00/83] ASoC: use .auto_selectable_formats Kuninori Morimoto
                   ` (11 preceding siblings ...)
  2026-05-26  2:05 ` [PATCH 12/83] ASoC: atmel: " Kuninori Morimoto
@ 2026-05-26  2:06 ` Kuninori Morimoto
  2026-05-26  2:06 ` [PATCH 14/83] ASoC: bcm: " Kuninori Morimoto
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 22+ messages in thread
From: Kuninori Morimoto @ 2026-05-26  2:06 UTC (permalink / raw)
  To: "Alvin Šipraga", J.M.B. Downing,
	"Martin Povišer", "Nuno Sá",
	"Uwe Kleine-König (The Capable Hub)",
	Alexandre Belloni, Alexandre Torgue, AngeloGioacchino Del Regno,
	Arnaud Pouliquen, Baojun Xu, Bartosz Golaszewski, Ben Bright,
	Benson Leung, Biju Das, Binbin Zhou, Bram Vlerick, Charles Keepax,
	Chen-Yu Tsai, Cheng-Yi Chiang, Claudiu Beznea, Cristian Ciocaltea,
	Daniel Mack, Dario Binacchi, David Rhodes, Fabio Estevam,
	Florian Fainelli, Frank Li, Fred Treven, Geert Uytterhoeven,
	Guenter Roeck, Guoqing Jiang, Haojian Zhuang, HariKrishna Sagala,
	Heiko Stuebner, Herve Codina, Hsieh Hung-En, James Ogletree,
	Jarkko Nikula, Jaroslav Kysela, Jernej Skrabec, Jerome Brunet,
	Jihed Chaibi, Jonathan Hunter, Kevin Cernekee, Kevin Hilman,
	Kevin Lu, Kirill Marinushkin, Kiseok Jo, Krzysztof Kozlowski,
	Kunihiko Hayashi, Lad Prabhakar, Lars-Peter Clausen,
	Liam Girdwood, Luca Ceresoli, M R Swami Reddy, Mark Brown,
	Martin Blumenstingl, Masami Hiramatsu, Matthias Brugger,
	Max Filippov, Maxime Coquelin, Neil Armstrong, Nicolas Ferre,
	Nicolas Frattaroli, Nicolin Chen, Oder Chiou, Olivier Moysan,
	Paul Cercueil, Peter Rosin, Piotr Wojtaszczyk, Qianfeng Rong,
	Ray Jui, Richard Fitzgerald, Robert Jarzmik, Samuel Holland,
	Sascha Hauer, Scott Branden, Sen Wang, Sharique Mohammad,
	Shenghao Ding, Shengjiu Wang, Steven Eckhoff, Support Opensource,
	Sylwester Nawrocki, Takashi Iwai, Thierry Reding, Tim Bird,
	Troy Mitchell, Tzung-Bi Shih, Venkata Prasad Potturu,
	Vijendar Mukunda, Vishwas A Deshpande, Vladimir Zapolskiy,
	Xiubo Li, Yixun Lan, Zhang Yi, chrome-platform, imx,
	linux-arm-kernel, linux-mips, linux-renesas-soc, linux-riscv,
	linux-sound, spacemit

We can use .auto_selectable_formats. Let's adds it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/au1x/i2sc.c    | 11 +++++++++++
 sound/soc/au1x/psc-i2s.c | 11 +++++++++++
 2 files changed, 22 insertions(+)

diff --git a/sound/soc/au1x/i2sc.c b/sound/soc/au1x/i2sc.c
index 57735004f4166..0e9c7eef9ee84 100644
--- a/sound/soc/au1x/i2sc.c
+++ b/sound/soc/au1x/i2sc.c
@@ -202,11 +202,22 @@ static int au1xi2s_startup(struct snd_pcm_substream *substream,
 	return 0;
 }
 
+static const u64 au1xi2s_selectable_formats =
+	SND_SOC_POSSIBLE_DAIFMT_I2S	|
+	SND_SOC_POSSIBLE_DAIFMT_RIGHT_J	|
+	SND_SOC_POSSIBLE_DAIFMT_LEFT_J	|
+	SND_SOC_POSSIBLE_DAIFMT_NB_NF	|
+	SND_SOC_POSSIBLE_DAIFMT_NB_IF	|
+	SND_SOC_POSSIBLE_DAIFMT_IB_NF	|
+	SND_SOC_POSSIBLE_DAIFMT_IB_IF;
+
 static const struct snd_soc_dai_ops au1xi2s_dai_ops = {
 	.startup	= au1xi2s_startup,
 	.trigger	= au1xi2s_trigger,
 	.hw_params	= au1xi2s_hw_params,
 	.set_fmt	= au1xi2s_set_fmt,
+	.auto_selectable_formats	= &au1xi2s_selectable_formats,
+	.num_auto_selectable_formats	= 1,
 };
 
 static struct snd_soc_dai_driver au1xi2s_dai_driver = {
diff --git a/sound/soc/au1x/psc-i2s.c b/sound/soc/au1x/psc-i2s.c
index bf59105fcb7a6..72aa5177147f7 100644
--- a/sound/soc/au1x/psc-i2s.c
+++ b/sound/soc/au1x/psc-i2s.c
@@ -262,11 +262,22 @@ static int au1xpsc_i2s_startup(struct snd_pcm_substream *substream,
 	return 0;
 }
 
+static const u64 au1xpsc_selectable_formats =
+	SND_SOC_POSSIBLE_DAIFMT_I2S	|
+	SND_SOC_POSSIBLE_DAIFMT_RIGHT_J	|
+	SND_SOC_POSSIBLE_DAIFMT_LEFT_J	|
+	SND_SOC_POSSIBLE_DAIFMT_NB_NF	|
+	SND_SOC_POSSIBLE_DAIFMT_NB_IF	|
+	SND_SOC_POSSIBLE_DAIFMT_IB_NF	|
+	SND_SOC_POSSIBLE_DAIFMT_IB_IF;
+
 static const struct snd_soc_dai_ops au1xpsc_i2s_dai_ops = {
 	.startup	= au1xpsc_i2s_startup,
 	.trigger	= au1xpsc_i2s_trigger,
 	.hw_params	= au1xpsc_i2s_hw_params,
 	.set_fmt	= au1xpsc_i2s_set_fmt,
+	.auto_selectable_formats	= &au1xpsc_selectable_formats,
+	.num_auto_selectable_formats	= 1,
 };
 
 static const struct snd_soc_dai_driver au1xpsc_i2s_dai_template = {
-- 
2.43.0


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

* [PATCH 14/83] ASoC: bcm: use .auto_selectable_formats
  2026-05-26  1:58 [PATCH 00/83] ASoC: use .auto_selectable_formats Kuninori Morimoto
                   ` (12 preceding siblings ...)
  2026-05-26  2:06 ` [PATCH 13/83] ASoC: au1x: " Kuninori Morimoto
@ 2026-05-26  2:06 ` Kuninori Morimoto
  2026-05-26  2:06 ` [PATCH 15/83] ASoC: cirrus: " Kuninori Morimoto
  2026-05-26  2:07 ` [PATCH 16/83] ASoC: codecs: 88pm860x: " Kuninori Morimoto
  15 siblings, 0 replies; 22+ messages in thread
From: Kuninori Morimoto @ 2026-05-26  2:06 UTC (permalink / raw)
  To: "Alvin Šipraga", J.M.B. Downing,
	"Martin Povišer", "Nuno Sá",
	"Uwe Kleine-König (The Capable Hub)",
	Alexandre Belloni, Alexandre Torgue, AngeloGioacchino Del Regno,
	Arnaud Pouliquen, Baojun Xu, Bartosz Golaszewski, Ben Bright,
	Benson Leung, Biju Das, Binbin Zhou, Bram Vlerick, Charles Keepax,
	Chen-Yu Tsai, Cheng-Yi Chiang, Claudiu Beznea, Cristian Ciocaltea,
	Daniel Mack, Dario Binacchi, David Rhodes, Fabio Estevam,
	Florian Fainelli, Frank Li, Fred Treven, Geert Uytterhoeven,
	Guenter Roeck, Guoqing Jiang, Haojian Zhuang, HariKrishna Sagala,
	Heiko Stuebner, Herve Codina, Hsieh Hung-En, James Ogletree,
	Jarkko Nikula, Jaroslav Kysela, Jernej Skrabec, Jerome Brunet,
	Jihed Chaibi, Jonathan Hunter, Kevin Cernekee, Kevin Hilman,
	Kevin Lu, Kirill Marinushkin, Kiseok Jo, Krzysztof Kozlowski,
	Kunihiko Hayashi, Lad Prabhakar, Lars-Peter Clausen,
	Liam Girdwood, Luca Ceresoli, M R Swami Reddy, Mark Brown,
	Martin Blumenstingl, Masami Hiramatsu, Matthias Brugger,
	Max Filippov, Maxime Coquelin, Neil Armstrong, Nicolas Ferre,
	Nicolas Frattaroli, Nicolin Chen, Oder Chiou, Olivier Moysan,
	Paul Cercueil, Peter Rosin, Piotr Wojtaszczyk, Qianfeng Rong,
	Ray Jui, Richard Fitzgerald, Robert Jarzmik, Samuel Holland,
	Sascha Hauer, Scott Branden, Sen Wang, Sharique Mohammad,
	Shenghao Ding, Shengjiu Wang, Steven Eckhoff, Support Opensource,
	Sylwester Nawrocki, Takashi Iwai, Thierry Reding, Tim Bird,
	Troy Mitchell, Tzung-Bi Shih, Venkata Prasad Potturu,
	Vijendar Mukunda, Vishwas A Deshpande, Vladimir Zapolskiy,
	Xiubo Li, Yixun Lan, Zhang Yi, chrome-platform, imx,
	linux-arm-kernel, linux-mips, linux-renesas-soc, linux-riscv,
	linux-sound, spacemit

We can use .auto_selectable_formats. Let's adds it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/bcm/bcm2835-i2s.c | 13 +++++++++++++
 sound/soc/bcm/cygnus-ssp.c  |  7 +++++++
 2 files changed, 20 insertions(+)

diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c
index 87d2f06c2f53a..2089778282541 100644
--- a/sound/soc/bcm/bcm2835-i2s.c
+++ b/sound/soc/bcm/bcm2835-i2s.c
@@ -748,6 +748,17 @@ static int bcm2835_i2s_dai_probe(struct snd_soc_dai *dai)
 	return 0;
 }
 
+static const u64 bcm2835_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_NB_IF	|
+	SND_SOC_POSSIBLE_DAIFMT_IB_NF	|
+	SND_SOC_POSSIBLE_DAIFMT_IB_IF;
+
 static const struct snd_soc_dai_ops bcm2835_i2s_dai_ops = {
 	.probe		= bcm2835_i2s_dai_probe,
 	.startup	= bcm2835_i2s_startup,
@@ -758,6 +769,8 @@ static const struct snd_soc_dai_ops bcm2835_i2s_dai_ops = {
 	.set_fmt	= bcm2835_i2s_set_dai_fmt,
 	.set_bclk_ratio	= bcm2835_i2s_set_dai_bclk_ratio,
 	.set_tdm_slot	= bcm2835_i2s_set_dai_tdm_slot,
+	.auto_selectable_formats	= &bcm2835_selectable_formats,
+	.num_auto_selectable_formats	= 1,
 };
 
 static struct snd_soc_dai_driver bcm2835_i2s_dai = {
diff --git a/sound/soc/bcm/cygnus-ssp.c b/sound/soc/bcm/cygnus-ssp.c
index e0ce0232eb1ef..7eeda16c7f4b1 100644
--- a/sound/soc/bcm/cygnus-ssp.c
+++ b/sound/soc/bcm/cygnus-ssp.c
@@ -1133,6 +1133,11 @@ static int cygnus_ssp_resume(struct snd_soc_component *component)
 #define cygnus_ssp_resume  NULL
 #endif
 
+static const u64 cygnus_selectable_formats =
+	SND_SOC_POSSIBLE_DAIFMT_I2S	|
+	SND_SOC_POSSIBLE_DAIFMT_DSP_A	|
+	SND_SOC_POSSIBLE_DAIFMT_DSP_B;
+
 static const struct snd_soc_dai_ops cygnus_ssp_dai_ops = {
 	.startup	= cygnus_ssp_startup,
 	.shutdown	= cygnus_ssp_shutdown,
@@ -1141,6 +1146,8 @@ static const struct snd_soc_dai_ops cygnus_ssp_dai_ops = {
 	.set_fmt	= cygnus_ssp_set_fmt,
 	.set_sysclk	= cygnus_ssp_set_sysclk,
 	.set_tdm_slot	= cygnus_set_dai_tdm_slot,
+	.auto_selectable_formats	= &cygnus_selectable_formats,
+	.num_auto_selectable_formats	= 1,
 };
 
 static const struct snd_soc_dai_ops cygnus_spdif_dai_ops = {
-- 
2.43.0


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

* [PATCH 15/83] ASoC: cirrus: use .auto_selectable_formats
  2026-05-26  1:58 [PATCH 00/83] ASoC: use .auto_selectable_formats Kuninori Morimoto
                   ` (13 preceding siblings ...)
  2026-05-26  2:06 ` [PATCH 14/83] ASoC: bcm: " Kuninori Morimoto
@ 2026-05-26  2:06 ` Kuninori Morimoto
  2026-05-26  2:07 ` [PATCH 16/83] ASoC: codecs: 88pm860x: " Kuninori Morimoto
  15 siblings, 0 replies; 22+ messages in thread
From: Kuninori Morimoto @ 2026-05-26  2:06 UTC (permalink / raw)
  To: "Alvin Šipraga", J.M.B. Downing,
	"Martin Povišer", "Nuno Sá",
	"Uwe Kleine-König (The Capable Hub)",
	Alexandre Belloni, Alexandre Torgue, AngeloGioacchino Del Regno,
	Arnaud Pouliquen, Baojun Xu, Bartosz Golaszewski, Ben Bright,
	Benson Leung, Biju Das, Binbin Zhou, Bram Vlerick, Charles Keepax,
	Chen-Yu Tsai, Cheng-Yi Chiang, Claudiu Beznea, Cristian Ciocaltea,
	Daniel Mack, Dario Binacchi, David Rhodes, Fabio Estevam,
	Florian Fainelli, Frank Li, Fred Treven, Geert Uytterhoeven,
	Guenter Roeck, Guoqing Jiang, Haojian Zhuang, HariKrishna Sagala,
	Heiko Stuebner, Herve Codina, Hsieh Hung-En, James Ogletree,
	Jarkko Nikula, Jaroslav Kysela, Jernej Skrabec, Jerome Brunet,
	Jihed Chaibi, Jonathan Hunter, Kevin Cernekee, Kevin Hilman,
	Kevin Lu, Kirill Marinushkin, Kiseok Jo, Krzysztof Kozlowski,
	Kunihiko Hayashi, Lad Prabhakar, Lars-Peter Clausen,
	Liam Girdwood, Luca Ceresoli, M R Swami Reddy, Mark Brown,
	Martin Blumenstingl, Masami Hiramatsu, Matthias Brugger,
	Max Filippov, Maxime Coquelin, Neil Armstrong, Nicolas Ferre,
	Nicolas Frattaroli, Nicolin Chen, Oder Chiou, Olivier Moysan,
	Paul Cercueil, Peter Rosin, Piotr Wojtaszczyk, Qianfeng Rong,
	Ray Jui, Richard Fitzgerald, Robert Jarzmik, Samuel Holland,
	Sascha Hauer, Scott Branden, Sen Wang, Sharique Mohammad,
	Shenghao Ding, Shengjiu Wang, Steven Eckhoff, Support Opensource,
	Sylwester Nawrocki, Takashi Iwai, Thierry Reding, Tim Bird,
	Troy Mitchell, Tzung-Bi Shih, Venkata Prasad Potturu,
	Vijendar Mukunda, Vishwas A Deshpande, Vladimir Zapolskiy,
	Xiubo Li, Yixun Lan, Zhang Yi, chrome-platform, imx,
	linux-arm-kernel, linux-mips, linux-renesas-soc, linux-riscv,
	linux-sound, spacemit

We can use .auto_selectable_formats. Let's adds it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/cirrus/ep93xx-i2s.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/sound/soc/cirrus/ep93xx-i2s.c b/sound/soc/cirrus/ep93xx-i2s.c
index 5dba741594fab..8195ed7c6dd69 100644
--- a/sound/soc/cirrus/ep93xx-i2s.c
+++ b/sound/soc/cirrus/ep93xx-i2s.c
@@ -401,6 +401,15 @@ static int ep93xx_i2s_resume(struct snd_soc_component *component)
 #define ep93xx_i2s_resume	NULL
 #endif
 
+static const u64 ep93xx_selectable_formats =
+	SND_SOC_POSSIBLE_DAIFMT_I2S	|
+	SND_SOC_POSSIBLE_DAIFMT_RIGHT_J	|
+	SND_SOC_POSSIBLE_DAIFMT_LEFT_J	|
+	SND_SOC_POSSIBLE_DAIFMT_NB_NF	|
+	SND_SOC_POSSIBLE_DAIFMT_NB_IF	|
+	SND_SOC_POSSIBLE_DAIFMT_IB_NF	|
+	SND_SOC_POSSIBLE_DAIFMT_IB_IF;
+
 static const struct snd_soc_dai_ops ep93xx_i2s_dai_ops = {
 	.probe		= ep93xx_i2s_dai_probe,
 	.startup	= ep93xx_i2s_startup,
@@ -408,6 +417,8 @@ static const struct snd_soc_dai_ops ep93xx_i2s_dai_ops = {
 	.hw_params	= ep93xx_i2s_hw_params,
 	.set_sysclk	= ep93xx_i2s_set_sysclk,
 	.set_fmt	= ep93xx_i2s_set_dai_fmt,
+	.auto_selectable_formats	= &ep93xx_selectable_formats,
+	.num_auto_selectable_formats	= 1,
 };
 
 #define EP93XX_I2S_FORMATS (SNDRV_PCM_FMTBIT_S32_LE)
-- 
2.43.0


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

* [PATCH 16/83] ASoC: codecs: 88pm860x: use .auto_selectable_formats
  2026-05-26  1:58 [PATCH 00/83] ASoC: use .auto_selectable_formats Kuninori Morimoto
                   ` (14 preceding siblings ...)
  2026-05-26  2:06 ` [PATCH 15/83] ASoC: cirrus: " Kuninori Morimoto
@ 2026-05-26  2:07 ` Kuninori Morimoto
  15 siblings, 0 replies; 22+ messages in thread
From: Kuninori Morimoto @ 2026-05-26  2:07 UTC (permalink / raw)
  To: "Alvin Šipraga", J.M.B. Downing,
	"Martin Povišer", "Nuno Sá",
	"Uwe Kleine-König (The Capable Hub)",
	Alexandre Belloni, Alexandre Torgue, AngeloGioacchino Del Regno,
	Arnaud Pouliquen, Baojun Xu, Bartosz Golaszewski, Ben Bright,
	Benson Leung, Biju Das, Binbin Zhou, Bram Vlerick, Charles Keepax,
	Chen-Yu Tsai, Cheng-Yi Chiang, Claudiu Beznea, Cristian Ciocaltea,
	Daniel Mack, Dario Binacchi, David Rhodes, Fabio Estevam,
	Florian Fainelli, Frank Li, Fred Treven, Geert Uytterhoeven,
	Guenter Roeck, Guoqing Jiang, Haojian Zhuang, HariKrishna Sagala,
	Heiko Stuebner, Herve Codina, Hsieh Hung-En, James Ogletree,
	Jarkko Nikula, Jaroslav Kysela, Jernej Skrabec, Jerome Brunet,
	Jihed Chaibi, Jonathan Hunter, Kevin Cernekee, Kevin Hilman,
	Kevin Lu, Kirill Marinushkin, Kiseok Jo, Krzysztof Kozlowski,
	Kunihiko Hayashi, Lad Prabhakar, Lars-Peter Clausen,
	Liam Girdwood, Luca Ceresoli, M R Swami Reddy, Mark Brown,
	Martin Blumenstingl, Masami Hiramatsu, Matthias Brugger,
	Max Filippov, Maxime Coquelin, Neil Armstrong, Nicolas Ferre,
	Nicolas Frattaroli, Nicolin Chen, Oder Chiou, Olivier Moysan,
	Paul Cercueil, Peter Rosin, Piotr Wojtaszczyk, Qianfeng Rong,
	Ray Jui, Richard Fitzgerald, Robert Jarzmik, Samuel Holland,
	Sascha Hauer, Scott Branden, Sen Wang, Sharique Mohammad,
	Shenghao Ding, Shengjiu Wang, Steven Eckhoff, Support Opensource,
	Sylwester Nawrocki, Takashi Iwai, Thierry Reding, Tim Bird,
	Troy Mitchell, Tzung-Bi Shih, Venkata Prasad Potturu,
	Vijendar Mukunda, Vishwas A Deshpande, Vladimir Zapolskiy,
	Xiubo Li, Yixun Lan, Zhang Yi, chrome-platform, imx,
	linux-arm-kernel, linux-mips, linux-renesas-soc, linux-riscv,
	linux-sound, spacemit

We can use .auto_selectable_formats. Let's adds it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/88pm860x-codec.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/sound/soc/codecs/88pm860x-codec.c b/sound/soc/codecs/88pm860x-codec.c
index b4f5b24cde456..7596227fbccfc 100644
--- a/sound/soc/codecs/88pm860x-codec.c
+++ b/sound/soc/codecs/88pm860x-codec.c
@@ -1136,11 +1136,15 @@ static int pm860x_set_bias_level(struct snd_soc_component *component,
 	return 0;
 }
 
+static const u64 pm860x_selectable_formats = SND_SOC_POSSIBLE_DAIFMT_I2S;
+
 static const struct snd_soc_dai_ops pm860x_pcm_dai_ops = {
 	.mute_stream	= pm860x_mute_stream,
 	.hw_params	= pm860x_pcm_hw_params,
 	.set_fmt	= pm860x_pcm_set_dai_fmt,
 	.set_sysclk	= pm860x_set_dai_sysclk,
+	.auto_selectable_formats	= &pm860x_selectable_formats,
+	.num_auto_selectable_formats	= 1,
 	.no_capture_mute = 1,
 };
 
@@ -1149,6 +1153,8 @@ static const struct snd_soc_dai_ops pm860x_i2s_dai_ops = {
 	.hw_params	= pm860x_i2s_hw_params,
 	.set_fmt	= pm860x_i2s_set_dai_fmt,
 	.set_sysclk	= pm860x_set_dai_sysclk,
+	.auto_selectable_formats	= &pm860x_selectable_formats,
+	.num_auto_selectable_formats	= 1,
 	.no_capture_mute = 1,
 };
 
-- 
2.43.0


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

* Re: [PATCH 10/83] ASoC: amd: use .auto_selectable_formats
  2026-05-26  2:02 ` [PATCH 10/83] ASoC: amd: use .auto_selectable_formats Kuninori Morimoto
@ 2026-06-03 11:47   ` Mukunda,Vijendar
  0 siblings, 0 replies; 22+ messages in thread
From: Mukunda,Vijendar @ 2026-06-03 11:47 UTC (permalink / raw)
  To: Kuninori Morimoto, Alvin Šipraga, J.M.B. Downing,
	Martin Povišer, Nuno Sá,
	Uwe Kleine-König (The Capable Hub), Alexandre Belloni,
	Alexandre Torgue, AngeloGioacchino Del Regno, Arnaud Pouliquen,
	Baojun Xu, Bartosz Golaszewski, Ben Bright, Benson Leung,
	Biju Das, Binbin Zhou, Bram Vlerick, Charles Keepax, Chen-Yu Tsai,
	Cheng-Yi Chiang, Claudiu Beznea, Cristian Ciocaltea, Daniel Mack,
	Dario Binacchi, David Rhodes, Fabio Estevam, Florian Fainelli,
	Frank Li, Fred Treven, Geert Uytterhoeven, Guenter Roeck,
	Guoqing Jiang, Haojian Zhuang, HariKrishna Sagala, Heiko Stuebner,
	Herve Codina, Hsieh Hung-En, James Ogletree, Jarkko Nikula,
	Jaroslav Kysela, Jernej Skrabec, Jerome Brunet, Jihed Chaibi,
	Jonathan Hunter, Kevin Cernekee, Kevin Hilman, Kevin Lu,
	Kirill Marinushkin, Kiseok Jo, Krzysztof Kozlowski,
	Kunihiko Hayashi, Lad Prabhakar, Lars-Peter Clausen,
	Liam Girdwood, Luca Ceresoli, M R Swami Reddy, Mark Brown,
	Martin Blumenstingl, Masami Hiramatsu, Matthias Brugger,
	Max Filippov, Maxime Coquelin, Neil Armstrong, Nicolas Ferre,
	Nicolas Frattaroli, Nicolin Chen, Oder Chiou, Olivier Moysan,
	Paul Cercueil, Peter Rosin, Piotr Wojtaszczyk, Qianfeng Rong,
	Ray Jui, Richard Fitzgerald, Robert Jarzmik, Samuel Holland,
	Sascha Hauer, Scott Branden, Sen Wang, Sharique Mohammad,
	Shenghao Ding, Shengjiu Wang, Steven Eckhoff, Support Opensource,
	Sylwester Nawrocki, Takashi Iwai, Thierry Reding, Tim Bird,
	Troy Mitchell, Tzung-Bi Shih, Venkata Prasad Potturu,
	Vishwas A Deshpande, Vladimir Zapolskiy, Xiubo Li, Yixun Lan,
	Zhang Yi, chrome-platform, imx, linux-arm-kernel, linux-mips,
	linux-renesas-soc, linux-riscv, linux-sound, spacemit



On 5/26/26 07:32, Kuninori Morimoto wrote:
> We can use .auto_selectable_formats. Let's adds it.
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
> ---
>   sound/soc/amd/acp/acp-i2s.c       | 6 ++++++
>   sound/soc/amd/raven/acp3x-i2s.c   | 6 ++++++
>   sound/soc/amd/vangogh/acp5x-i2s.c | 6 ++++++
>   3 files changed, 18 insertions(+)
>
> diff --git a/sound/soc/amd/acp/acp-i2s.c b/sound/soc/amd/acp/acp-i2s.c
> index 283a674c7e2c3..bb58a9d34993b 100644
> --- a/sound/soc/amd/acp/acp-i2s.c
> +++ b/sound/soc/amd/acp/acp-i2s.c
> @@ -686,6 +686,10 @@ static int acp_i2s_startup(struct snd_pcm_substream *substream, struct snd_soc_d
>   	return 0;
>   }
>   
> +static const u64 acp_i2s_selectable_formats =
> +	SND_SOC_POSSIBLE_DAIFMT_I2S	|
> +	SND_SOC_POSSIBLE_DAIFMT_DSP_A;
> +
>   const struct snd_soc_dai_ops asoc_acp_cpu_dai_ops = {
>   	.startup	= acp_i2s_startup,
>   	.hw_params	= acp_i2s_hwparams,
> @@ -693,6 +697,8 @@ const struct snd_soc_dai_ops asoc_acp_cpu_dai_ops = {
>   	.trigger	= acp_i2s_trigger,
>   	.set_fmt	= acp_i2s_set_fmt,
>   	.set_tdm_slot	= acp_i2s_set_tdm_slot,
> +	.auto_selectable_formats	= &acp_i2s_selectable_formats,
> +	.num_auto_selectable_formats	= 1,
>   };
>   EXPORT_SYMBOL_NS_GPL(asoc_acp_cpu_dai_ops, "SND_SOC_ACP_COMMON");
>   
> diff --git a/sound/soc/amd/raven/acp3x-i2s.c b/sound/soc/amd/raven/acp3x-i2s.c
> index 352485dd98b14..b0147e88ba54c 100644
> --- a/sound/soc/amd/raven/acp3x-i2s.c
> +++ b/sound/soc/amd/raven/acp3x-i2s.c
> @@ -250,11 +250,17 @@ static int acp3x_i2s_trigger(struct snd_pcm_substream *substream,
>   	return ret;
>   }
>   
> +static const u64 acp3x_i2s_selectable_formats =
> +	SND_SOC_POSSIBLE_DAIFMT_I2S	|
> +	SND_SOC_POSSIBLE_DAIFMT_DSP_A;
> +
>   static const struct snd_soc_dai_ops acp3x_i2s_dai_ops = {
>   	.hw_params = acp3x_i2s_hwparams,
>   	.trigger = acp3x_i2s_trigger,
>   	.set_fmt = acp3x_i2s_set_fmt,
>   	.set_tdm_slot = acp3x_i2s_set_tdm_slot,
> +	.auto_selectable_formats = &acp3x_i2s_selectable_formats,
> +	.num_auto_selectable_formats = 1,
>   };
>   
>   static const struct snd_soc_component_driver acp3x_dai_component = {
> diff --git a/sound/soc/amd/vangogh/acp5x-i2s.c b/sound/soc/amd/vangogh/acp5x-i2s.c
> index bf719f6286174..dbfb87e2fe929 100644
> --- a/sound/soc/amd/vangogh/acp5x-i2s.c
> +++ b/sound/soc/amd/vangogh/acp5x-i2s.c
> @@ -337,11 +337,17 @@ static int acp5x_i2s_trigger(struct snd_pcm_substream *substream,
>   	return ret;
>   }
>   
> +static const u64 acp5x_i2s_selectable_formats =
> +	SND_SOC_POSSIBLE_DAIFMT_I2S	|
> +	SND_SOC_POSSIBLE_DAIFMT_DSP_A;
> +
>   static const struct snd_soc_dai_ops acp5x_i2s_dai_ops = {
>   	.hw_params = acp5x_i2s_hwparams,
>   	.trigger = acp5x_i2s_trigger,
>   	.set_fmt = acp5x_i2s_set_fmt,
>   	.set_tdm_slot = acp5x_i2s_set_tdm_slot,
> +	.auto_selectable_formats = &acp5x_i2s_selectable_formats,
> +	.num_auto_selectable_formats = 1,
>   };
>   
>   static const struct snd_soc_component_driver acp5x_dai_component = {


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

* Re: [PATCH 02/83] ASoC: codecs: framer-codec: don't use array if single pattarn
  2026-05-26  1:58 ` [PATCH 02/83] ASoC: codecs: framer-codec: don't use array if single pattarn Kuninori Morimoto
@ 2026-06-03 12:09   ` Herve Codina
  2026-06-03 22:30     ` Kuninori Morimoto
  0 siblings, 1 reply; 22+ messages in thread
From: Herve Codina @ 2026-06-03 12:09 UTC (permalink / raw)
  To: Kuninori Morimoto
  Cc: Alvin Šipraga, J.M.B. Downing, Martin Povišer,
	Nuno Sá, Uwe Kleine-König (The Capable Hub),
	Alexandre Belloni, Alexandre Torgue, AngeloGioacchino Del Regno,
	Arnaud Pouliquen, Baojun Xu, Bartosz Golaszewski, Ben Bright,
	Benson Leung, Biju Das, Binbin Zhou, Bram Vlerick, Charles Keepax,
	Chen-Yu Tsai, Cheng-Yi Chiang, Claudiu Beznea, Cristian Ciocaltea,
	Daniel Mack, Dario Binacchi, David Rhodes, Fabio Estevam,
	Florian Fainelli, Frank Li, Fred Treven, Geert Uytterhoeven,
	Guenter Roeck, Guoqing Jiang, Haojian Zhuang, HariKrishna Sagala,
	Heiko Stuebner, Hsieh Hung-En, James Ogletree, Jarkko Nikula,
	Jaroslav Kysela, Jernej Skrabec, Jerome Brunet, Jihed Chaibi,
	Jonathan Hunter, Kevin Cernekee, Kevin Hilman, Kevin Lu,
	Kirill Marinushkin, Kiseok Jo, Krzysztof Kozlowski,
	Kunihiko Hayashi, Lad Prabhakar, Lars-Peter Clausen,
	Liam Girdwood, Luca Ceresoli, M R Swami Reddy, Mark Brown,
	Martin Blumenstingl, Masami Hiramatsu, Matthias Brugger,
	Max Filippov, Maxime Coquelin, Neil Armstrong, Nicolas Ferre,
	Nicolas Frattaroli, Nicolin Chen, Oder Chiou, Olivier Moysan,
	Paul Cercueil, Peter Rosin, Piotr Wojtaszczyk, Qianfeng Rong,
	Ray Jui, Richard Fitzgerald, Robert Jarzmik, Samuel Holland,
	Sascha Hauer, Scott Branden, Sen Wang, Sharique Mohammad,
	Shenghao Ding, Shengjiu Wang, Steven Eckhoff, Support Opensource,
	Sylwester Nawrocki, Takashi Iwai, Thierry Reding, Tim Bird,
	Troy Mitchell, Tzung-Bi Shih, Venkata Prasad Potturu,
	Vijendar Mukunda, Vishwas A Deshpande, Vladimir Zapolskiy,
	Xiubo Li, Yixun Lan, Zhang Yi, chrome-platform, imx,
	linux-arm-kernel, linux-mips, linux-renesas-soc, linux-riscv,
	linux-sound, spacemit

Hi Kuninori,

On Tue, 26 May 2026 01:58:50 +0000
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> wrote:

> Because it is confusable during debugging ASoC FW update, tidyup
> auto format style not to use array if single pattern case.
> 
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
>  sound/soc/codecs/framer-codec.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 

Just a typo in the commit title:
s/pattarn/pattern/

Or even
s/pattarn/item/

With that fixed,

Reviewed-by: Herve Codina <herve.codina@bootlin.com>

Best regards,
Hervé

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

* Re: [PATCH 03/83] ASoC: codecs: idt821034: don't use array if single pattarn
  2026-05-26  1:58 ` [PATCH 03/83] ASoC: codecs: idt821034: " Kuninori Morimoto
@ 2026-06-03 12:11   ` Herve Codina
  0 siblings, 0 replies; 22+ messages in thread
From: Herve Codina @ 2026-06-03 12:11 UTC (permalink / raw)
  To: Kuninori Morimoto
  Cc: Alvin Šipraga, J.M.B. Downing, Martin Povišer,
	Nuno Sá, Uwe Kleine-König (The Capable Hub),
	Alexandre Belloni, Alexandre Torgue, AngeloGioacchino Del Regno,
	Arnaud Pouliquen, Baojun Xu, Bartosz Golaszewski, Ben Bright,
	Benson Leung, Biju Das, Binbin Zhou, Bram Vlerick, Charles Keepax,
	Chen-Yu Tsai, Cheng-Yi Chiang, Claudiu Beznea, Cristian Ciocaltea,
	Daniel Mack, Dario Binacchi, David Rhodes, Fabio Estevam,
	Florian Fainelli, Frank Li, Fred Treven, Geert Uytterhoeven,
	Guenter Roeck, Guoqing Jiang, Haojian Zhuang, HariKrishna Sagala,
	Heiko Stuebner, Hsieh Hung-En, James Ogletree, Jarkko Nikula,
	Jaroslav Kysela, Jernej Skrabec, Jerome Brunet, Jihed Chaibi,
	Jonathan Hunter, Kevin Cernekee, Kevin Hilman, Kevin Lu,
	Kirill Marinushkin, Kiseok Jo, Krzysztof Kozlowski,
	Kunihiko Hayashi, Lad Prabhakar, Lars-Peter Clausen,
	Liam Girdwood, Luca Ceresoli, M R Swami Reddy, Mark Brown,
	Martin Blumenstingl, Masami Hiramatsu, Matthias Brugger,
	Max Filippov, Maxime Coquelin, Neil Armstrong, Nicolas Ferre,
	Nicolas Frattaroli, Nicolin Chen, Oder Chiou, Olivier Moysan,
	Paul Cercueil, Peter Rosin, Piotr Wojtaszczyk, Qianfeng Rong,
	Ray Jui, Richard Fitzgerald, Robert Jarzmik, Samuel Holland,
	Sascha Hauer, Scott Branden, Sen Wang, Sharique Mohammad,
	Shenghao Ding, Shengjiu Wang, Steven Eckhoff, Support Opensource,
	Sylwester Nawrocki, Takashi Iwai, Thierry Reding, Tim Bird,
	Troy Mitchell, Tzung-Bi Shih, Venkata Prasad Potturu,
	Vijendar Mukunda, Vishwas A Deshpande, Vladimir Zapolskiy,
	Xiubo Li, Yixun Lan, Zhang Yi, chrome-platform, imx,
	linux-arm-kernel, linux-mips, linux-renesas-soc, linux-riscv,
	linux-sound, spacemit

Hi Kuninori,

On Tue, 26 May 2026 01:58:59 +0000
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> wrote:

> Because it is confusable during debugging ASoC FW update, tidyup
> auto format style not to use array if single pattern case.
> 
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
>  sound/soc/codecs/idt821034.c | 9 ++++-----
>  1 file changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/sound/soc/codecs/idt821034.c b/sound/soc/codecs/idt821034.c
> index 39bafefa6a186..084090ccef77a 100644
> --- a/sound/soc/codecs/idt821034.c
> +++ b/sound/soc/codecs/idt821034.c
> @@ -860,18 +860,17 @@ static int idt821034_dai_startup(struct snd_pcm_substream *substream,
>  	return 0;
>  }
>  
> -static const u64 idt821034_dai_formats[] = {
> +static const u64 idt821034_dai_formats =
>  	SND_SOC_POSSIBLE_DAIFMT_DSP_A	|
> -	SND_SOC_POSSIBLE_DAIFMT_DSP_B,
> -};
> +	SND_SOC_POSSIBLE_DAIFMT_DSP_B;
>  
>  static const struct snd_soc_dai_ops idt821034_dai_ops = {
>  	.startup      = idt821034_dai_startup,
>  	.hw_params    = idt821034_dai_hw_params,
>  	.set_tdm_slot = idt821034_dai_set_tdm_slot,
>  	.set_fmt      = idt821034_dai_set_fmt,
> -	.auto_selectable_formats     = idt821034_dai_formats,
> -	.num_auto_selectable_formats = ARRAY_SIZE(idt821034_dai_formats),
> +	.auto_selectable_formats     = &idt821034_dai_formats,
> +	.num_auto_selectable_formats = 1,
>  };
>  
>  static struct snd_soc_dai_driver idt821034_dai_driver = {

Same typo in the commit title as in patch 2:
s/pattarn/pattern/

Or even
s/pattarn/item/

With that fixed,

Reviewed-by: Herve Codina <herve.codina@bootlin.com>

Best regards,
Hervé

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

* Re: [PATCH 04/83] ASoC: codecs: peb2466: don't use array if single pattarn
  2026-05-26  1:59 ` [PATCH 04/83] ASoC: codecs: peb2466: " Kuninori Morimoto
@ 2026-06-03 12:17   ` Herve Codina
  0 siblings, 0 replies; 22+ messages in thread
From: Herve Codina @ 2026-06-03 12:17 UTC (permalink / raw)
  To: Kuninori Morimoto
  Cc: Alvin Šipraga, J.M.B. Downing, Martin Povišer,
	Nuno Sá, Uwe Kleine-König (The Capable Hub),
	Alexandre Belloni, Alexandre Torgue, AngeloGioacchino Del Regno,
	Arnaud Pouliquen, Baojun Xu, Bartosz Golaszewski, Ben Bright,
	Benson Leung, Biju Das, Binbin Zhou, Bram Vlerick, Charles Keepax,
	Chen-Yu Tsai, Cheng-Yi Chiang, Claudiu Beznea, Cristian Ciocaltea,
	Daniel Mack, Dario Binacchi, David Rhodes, Fabio Estevam,
	Florian Fainelli, Frank Li, Fred Treven, Geert Uytterhoeven,
	Guenter Roeck, Guoqing Jiang, Haojian Zhuang, HariKrishna Sagala,
	Heiko Stuebner, Hsieh Hung-En, James Ogletree, Jarkko Nikula,
	Jaroslav Kysela, Jernej Skrabec, Jerome Brunet, Jihed Chaibi,
	Jonathan Hunter, Kevin Cernekee, Kevin Hilman, Kevin Lu,
	Kirill Marinushkin, Kiseok Jo, Krzysztof Kozlowski,
	Kunihiko Hayashi, Lad Prabhakar, Lars-Peter Clausen,
	Liam Girdwood, Luca Ceresoli, M R Swami Reddy, Mark Brown,
	Martin Blumenstingl, Masami Hiramatsu, Matthias Brugger,
	Max Filippov, Maxime Coquelin, Neil Armstrong, Nicolas Ferre,
	Nicolas Frattaroli, Nicolin Chen, Oder Chiou, Olivier Moysan,
	Paul Cercueil, Peter Rosin, Piotr Wojtaszczyk, Qianfeng Rong,
	Ray Jui, Richard Fitzgerald, Robert Jarzmik, Samuel Holland,
	Sascha Hauer, Scott Branden, Sen Wang, Sharique Mohammad,
	Shenghao Ding, Shengjiu Wang, Steven Eckhoff, Support Opensource,
	Sylwester Nawrocki, Takashi Iwai, Thierry Reding, Tim Bird,
	Troy Mitchell, Tzung-Bi Shih, Venkata Prasad Potturu,
	Vijendar Mukunda, Vishwas A Deshpande, Vladimir Zapolskiy,
	Xiubo Li, Yixun Lan, Zhang Yi, chrome-platform, imx,
	linux-arm-kernel, linux-mips, linux-renesas-soc, linux-riscv,
	linux-sound, spacemit

Hi Kuninori,

On Tue, 26 May 2026 01:59:08 +0000
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> wrote:

> Because it is confusable during debugging ASoC FW update, tidyup
> auto format style not to use array if single pattern case.
> 
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
>  sound/soc/codecs/peb2466.c | 9 ++++-----
>  1 file changed, 4 insertions(+), 5 deletions(-)
> 

Same typo in the commit title as in patch 2:
s/pattarn/pattern/

Or even
s/pattarn/item/

With that fixed,

Reviewed-by: Herve Codina <herve.codina@bootlin.com>

Best regards,
Hervé

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

* Re: [PATCH 02/83] ASoC: codecs: framer-codec: don't use array if single pattarn
  2026-06-03 12:09   ` Herve Codina
@ 2026-06-03 22:30     ` Kuninori Morimoto
  0 siblings, 0 replies; 22+ messages in thread
From: Kuninori Morimoto @ 2026-06-03 22:30 UTC (permalink / raw)
  To: Herve Codina
  Cc: Alvin Šipraga, J.M.B. Downing, Martin Povišer,
	Nuno Sá, Uwe Kleine-König (The Capable Hub),
	Alexandre Belloni, Alexandre Torgue, AngeloGioacchino Del Regno,
	Arnaud Pouliquen, Baojun Xu, Bartosz Golaszewski, Ben Bright,
	Benson Leung, Biju Das, Binbin Zhou, Bram Vlerick, Charles Keepax,
	Chen-Yu Tsai, Cheng-Yi Chiang, Claudiu Beznea, Cristian Ciocaltea,
	Daniel Mack, Dario Binacchi, David Rhodes, Fabio Estevam,
	Florian Fainelli, Frank Li, Fred Treven, Geert Uytterhoeven,
	Guenter Roeck, Guoqing Jiang, Haojian Zhuang, HariKrishna Sagala,
	Heiko Stuebner, Hsieh Hung-En, James Ogletree, Jarkko Nikula,
	Jaroslav Kysela, Jernej Skrabec, Jerome Brunet, Jihed Chaibi,
	Jonathan Hunter, Kevin Cernekee, Kevin Hilman, Kevin Lu,
	Kirill Marinushkin, Kiseok Jo, Krzysztof Kozlowski,
	Kunihiko Hayashi, Lad Prabhakar, Lars-Peter Clausen,
	Liam Girdwood, Luca Ceresoli, M R Swami Reddy, Mark Brown,
	Martin Blumenstingl, Masami Hiramatsu, Matthias Brugger,
	Max Filippov, Maxime Coquelin, Neil Armstrong, Nicolas Ferre,
	Nicolas Frattaroli, Nicolin Chen, Oder Chiou, Olivier Moysan,
	Paul Cercueil, Peter Rosin, Piotr Wojtaszczyk, Qianfeng Rong,
	Ray Jui, Richard Fitzgerald, Robert Jarzmik, Samuel Holland,
	Sascha Hauer, Scott Branden, Sen Wang, Sharique Mohammad,
	Shenghao Ding, Shengjiu Wang, Steven Eckhoff, Support Opensource,
	Sylwester Nawrocki, Takashi Iwai, Thierry Reding, Tim Bird,
	Troy Mitchell, Tzung-Bi Shih, Venkata Prasad Potturu,
	Vijendar Mukunda, Vishwas A Deshpande, Vladimir Zapolskiy,
	Xiubo Li, Yixun Lan, Zhang Yi, chrome-platform, imx,
	linux-arm-kernel, linux-mips, linux-renesas-soc, linux-riscv,
	linux-sound, spacemit


Hi Herve

> > Because it is confusable during debugging ASoC FW update, tidyup
> > auto format style not to use array if single pattern case.
> > 
> > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> > ---
(snip)
> Just a typo in the commit title:
> s/pattarn/pattern/

Oops, thank you for pointing it.
Will fix in v2

Thank you for your help !!

Best regards
---
Kuninori Morimoto

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

end of thread, other threads:[~2026-06-03 22:30 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-26  1:58 [PATCH 00/83] ASoC: use .auto_selectable_formats Kuninori Morimoto
2026-05-26  1:58 ` [PATCH 01/83] ASoC: remove SND_SOC_POSSIBLE_xBx_xFx Kuninori Morimoto
2026-05-26  1:58 ` [PATCH 02/83] ASoC: codecs: framer-codec: don't use array if single pattarn Kuninori Morimoto
2026-06-03 12:09   ` Herve Codina
2026-06-03 22:30     ` Kuninori Morimoto
2026-05-26  1:58 ` [PATCH 03/83] ASoC: codecs: idt821034: " Kuninori Morimoto
2026-06-03 12:11   ` Herve Codina
2026-05-26  1:59 ` [PATCH 04/83] ASoC: codecs: peb2466: " Kuninori Morimoto
2026-06-03 12:17   ` Herve Codina
2026-05-26  1:59 ` [PATCH 05/83] ASoC: codecs: ak4619: update auto select format Kuninori Morimoto
2026-05-26  1:59 ` [PATCH 06/83] ASoC: codecs: pcm3168a: " Kuninori Morimoto
2026-05-26  2:00 ` [PATCH 07/83] ASoC: renesas: rcar: " Kuninori Morimoto
2026-05-26  2:00 ` [PATCH 08/83] ASoC: update auto format selection method Kuninori Morimoto
2026-05-26  2:01 ` [PATCH 09/83] ASoC: audio-graph-card2: recommend to use auto select DAI format Kuninori Morimoto
2026-05-26  2:02 ` [PATCH 10/83] ASoC: amd: use .auto_selectable_formats Kuninori Morimoto
2026-06-03 11:47   ` Mukunda,Vijendar
2026-05-26  2:03 ` [PATCH 11/83] ASoC: apple: " Kuninori Morimoto
2026-05-26  2:05 ` [PATCH 12/83] ASoC: atmel: " Kuninori Morimoto
2026-05-26  2:06 ` [PATCH 13/83] ASoC: au1x: " Kuninori Morimoto
2026-05-26  2:06 ` [PATCH 14/83] ASoC: bcm: " Kuninori Morimoto
2026-05-26  2:06 ` [PATCH 15/83] ASoC: cirrus: " Kuninori Morimoto
2026-05-26  2:07 ` [PATCH 16/83] ASoC: codecs: 88pm860x: " Kuninori Morimoto

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