ASoC: snd_soc_component_driver has non_legacy_dai_naming
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Wed, 11 Oct 2017 01:38:51 +0000 (01:38 +0000)
committerMark Brown <broonie@kernel.org>
Mon, 23 Oct 2017 09:39:03 +0000 (11:39 +0200)
Codec will be replaced into Component, then Codec side
doesn't use legacy_dai_naming on snd_soc_register_dais().

This patch adds new non_legacy_dai_naming flag on Component driver
and use converted its value for snd_soc_register_dais().

When Codec is replaced into Component, Codec driver needs
to have non_legacy_dai_naming = 1 flags.
Existing CPU side of course doesn't have this flag, thus CPU calls
it as true.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
include/sound/soc.h
sound/soc/soc-core.c

index 747d080a08539ea7cfe942bc137a6f2e7ed0ca7d..6c808527a4f6a211a8a6b30085b6bb5d9c7f3b36 100644 (file)
@@ -838,6 +838,7 @@ struct snd_soc_component_driver {
        unsigned int suspend_bias_off:1;
        unsigned int pmdown_time:1; /* care pmdown_time at stop */
        unsigned int endianness:1;
+       unsigned int non_legacy_dai_naming:1;
 };
 
 struct snd_soc_component {
index 61c3d36499145a61aa516286e5174333ce41a899..533c822ca6e6feb08afc194f05b52bd3c8084f41 100644 (file)
@@ -3462,7 +3462,8 @@ int snd_soc_add_component(struct device *dev,
                }
        }
 
-       ret = snd_soc_register_dais(component, dai_drv, num_dai, true);
+       ret = snd_soc_register_dais(component, dai_drv, num_dai,
+                                   !component_driver->non_legacy_dai_naming);
        if (ret < 0) {
                dev_err(dev, "ASoC: Failed to register DAIs: %d\n", ret);
                goto err_cleanup;