From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754191AbdEXRpG (ORCPT ); Wed, 24 May 2017 13:45:06 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:52608 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754174AbdEXRpF (ORCPT ); Wed, 24 May 2017 13:45:05 -0400 From: Mark Brown To: Kuninori Morimoto Cc: Mark Brown , Mark Brown , Archit Taneja , Jose Abreu , Linux-ALSA , Laurent Pinchart , David Airlie , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org, Russell King , Simon , alsa-devel@alsa-project.org In-Reply-To: <87bmqrosla.wl%kuninori.morimoto.gx@renesas.com> Message-Id: Date: Wed, 24 May 2017 18:44:51 +0100 X-SA-Exim-Connect-IP: 2001:470:1f1d:6b5::3 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Applied "ASoC: simple-card-utils: support snd_soc_get_dai_id()" to the asoc tree X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: No (on mezzanine.sirena.org.uk); Unknown failure Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The patch ASoC: simple-card-utils: support snd_soc_get_dai_id() has been applied to the asoc tree at git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark >>From 73b17f1a65c881fcf97109d77056006da2d40152 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Thu, 18 May 2017 01:39:44 +0000 Subject: [PATCH] ASoC: simple-card-utils: support snd_soc_get_dai_id() ALSA SoC needs to know connected DAI ID for detecting. It is not a big problem if device/driver was only for sound, but getting DAI ID will be difficult if device includes both Video/Sound, like HDMI. To solve this issue, this patch adds new snd_soc_get_dai_id() and its related .of_xlate_dai_id callback on component driver. In below case, we can handle Sound port (= port@2) as ID = 0 if .of_xlate_dai_id has its support. hdmi { port@0 { /* VIDEO */ }; port@1 { /* VIDEO */ }; port@2 { /* SOUND */ }; }; Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/generic/simple-card-utils.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sound/soc/generic/simple-card-utils.c b/sound/soc/generic/simple-card-utils.c index 5a3d51e45938..fe726e83d0bd 100644 --- a/sound/soc/generic/simple-card-utils.c +++ b/sound/soc/generic/simple-card-utils.c @@ -177,9 +177,18 @@ static int asoc_simple_card_get_dai_id(struct device_node *ep) struct device_node *node; struct device_node *endpoint; int i, id; + int ret; + + ret = snd_soc_get_dai_id(ep); + if (ret != -ENOTSUPP) + return ret; node = of_graph_get_port_parent(ep); + /* + * Non HDMI sound case, counting port/endpoint on its DT + * is enough. Let's count it. + */ i = 0; id = -1; for_each_endpoint_of_node(node, endpoint) { -- 2.11.0 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Brown Subject: Applied "ASoC: simple-card-utils: support snd_soc_get_dai_id()" to the asoc tree Date: Wed, 24 May 2017 18:44:51 +0100 Message-ID: References: <87bmqrosla.wl%kuninori.morimoto.gx@renesas.com> Return-path: In-Reply-To: <87bmqrosla.wl%kuninori.morimoto.gx@renesas.com> Sender: linux-renesas-soc-owner@vger.kernel.org To: Kuninori Morimoto Cc: Mark Brown Mark Brown , Archit Taneja , Jose Abreu , Linux-ALSA , Laurent Pinchart , David Airlie , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org, Russell King , Simon alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org The patch ASoC: simple-card-utils: support snd_soc_get_dai_id() has been applied to the asoc tree at git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark >>From 73b17f1a65c881fcf97109d77056006da2d40152 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Thu, 18 May 2017 01:39:44 +0000 Subject: [PATCH] ASoC: simple-card-utils: support snd_soc_get_dai_id() ALSA SoC needs to know connected DAI ID for detecting. It is not a big problem if device/driver was only for sound, but getting DAI ID will be difficult if device includes both Video/Sound, like HDMI. To solve this issue, this patch adds new snd_soc_get_dai_id() and its related .of_xlate_dai_id callback on component driver. In below case, we can handle Sound port (= port@2) as ID = 0 if .of_xlate_dai_id has its support. hdmi { port@0 { /* VIDEO */ }; port@1 { /* VIDEO */ }; port@2 { /* SOUND */ }; }; Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/generic/simple-card-utils.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sound/soc/generic/simple-card-utils.c b/sound/soc/generic/simple-card-utils.c index 5a3d51e45938..fe726e83d0bd 100644 --- a/sound/soc/generic/simple-card-utils.c +++ b/sound/soc/generic/simple-card-utils.c @@ -177,9 +177,18 @@ static int asoc_simple_card_get_dai_id(struct device_node *ep) struct device_node *node; struct device_node *endpoint; int i, id; + int ret; + + ret = snd_soc_get_dai_id(ep); + if (ret != -ENOTSUPP) + return ret; node = of_graph_get_port_parent(ep); + /* + * Non HDMI sound case, counting port/endpoint on its DT + * is enough. Let's count it. + */ i = 0; id = -1; for_each_endpoint_of_node(node, endpoint) { -- 2.11.0