From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kuninori Morimoto Subject: [PATCH 09/13] ASoC: snd_soc_component_driver has non_legacy_dai_naming Date: Fri, 1 Sep 2017 05:34:27 +0000 Message-ID: <87o9qvm1j8.wl%kuninori.morimoto.gx@renesas.com> References: <873787ngjb.wl%kuninori.morimoto.gx@renesas.com> <871snrngcu.wl%kuninori.morimoto.gx@renesas.com> Mime-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from relmlie3.idc.renesas.com (relmlor4.renesas.com [210.160.252.174]) by alsa0.perex.cz (Postfix) with ESMTP id 50FED26753C for ; Fri, 1 Sep 2017 07:34:30 +0200 (CEST) In-Reply-To: <871snrngcu.wl%kuninori.morimoto.gx@renesas.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Mark Brown Cc: Linux-ALSA , Lars-Peter List-Id: alsa-devel@alsa-project.org From: Kuninori Morimoto 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 Signed-off-by: Kuninori Morimoto --- include/sound/soc.h | 1 + sound/soc/soc-core.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/sound/soc.h b/include/sound/soc.h index 747d080..6c80852 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -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 { diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index ef184e9..1fd9453 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -3460,7 +3460,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; -- 1.9.1