ASoC: Refactor non_legacy_dai_naming flag
authorMark Brown <broonie@kernel.org>
Wed, 29 Jun 2022 15:58:08 +0000 (16:58 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 29 Jun 2022 15:58:08 +0000 (16:58 +0100)
Merge series from Charles Keepax <ckeepax@opensource.cirrus.com>:

Historically, the legacy DAI naming scheme was applied to platform
drivers and the newer scheme to CODEC drivers. During componentisation
the core lost the knowledge of if a driver was a CODEC or platform, they
were all now components. To continue to support the legacy naming on
older platform drivers a flag was added to the snd_soc_component_driver
structure, non_legacy_dai_naming, to indicate to use the new scheme and
this was applied to all CODECs as part of the migration.

However, a slight issue appears to be developing with respect to this
flag being opt in for the non-legacy scheme, which presumably we want to
be the primary scheme used. Many codec drivers appear to forget to
include this flag:

  grep -l -r "snd_soc_component_driver" sound/soc/codecs/*.c |
  xargs grep -L "non_legacy_dai_naming" | wc
     48      48    556

Whilst in many cases the configuration of the DAIs themselves will cause
the core to apply the new scheme anyway, it would seem more sensible to
change the flag to legacy_dai_naming making the new scheme opt out. This
patch series migrates across to such a scheme.

12 files changed:
1  2 
sound/soc/codecs/cs47l15.c
sound/soc/codecs/max98396.c
sound/soc/codecs/sgtl5000.c
sound/soc/codecs/tas2552.c
sound/soc/fsl/fsl_sai.c
sound/soc/img/img-i2s-out.c
sound/soc/qcom/lpass-cpu.c
sound/soc/rockchip/rockchip_i2s.c
sound/soc/rockchip/rockchip_i2s_tdm.c
sound/soc/rockchip/rockchip_pdm.c
sound/soc/samsung/s3c24xx-i2s.c
sound/soc/ti/davinci-mcasp.c

Simple merge
Simple merge
Simple merge
Simple merge
index f5508b70a912f722ffd587d46fb7fb545314405f,68b5b488deebd735706a80d482cb4dba6c5ef6fc..a0ddaf7e9f6082d514dcdf9784473831cf30eaec
@@@ -864,8 -767,8 +864,9 @@@ static struct snd_soc_dai_driver fsl_sa
  };
  
  static const struct snd_soc_component_driver fsl_component = {
-       .name           = "fsl-sai",
-       .resume         = fsl_sai_dai_resume,
+       .name                   = "fsl-sai",
++      .resume                 = fsl_sai_dai_resume,
+       .legacy_dai_naming      = 1,
  };
  
  static struct reg_default fsl_sai_reg_defaults_ofs0[] = {
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge