mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Mark Brown <broonie@kernel.org>, Mark Brown <broonie@kernel.org>,
	Archit Taneja <architt@codeaurora.org>,
	Jose Abreu <joabreu@synopsys.com>,
	Linux-ALSA <alsa-devel@alsa-project.org>,
	Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
	David Airlie <airlied@linux.ie>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	linux-renesas-soc@vger.kernel.org,
	Russell King <rmk+kernel@armlinux.org.uk>,
	Simon <horms@verge.net.au>,
	alsa-devel@alsa-project.org
Subject: Applied "ASoC: hdmi-codec: add .get_dai_id support" to the asoc tree
Date: Wed, 24 May 2017 18:45:45 +0100	[thread overview]
Message-ID: <E1dDaLx-0003Rd-Fq@debutante> (raw)
In-Reply-To: <878tlvosk9.wl%kuninori.morimoto.gx@renesas.com>

The patch

   ASoC: hdmi-codec: add .get_dai_id support

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 96203fb4237bf70f0fd0fa307ca2975077db3ceb Mon Sep 17 00:00:00 2001
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date: Thu, 18 May 2017 01:40:20 +0000
Subject: [PATCH] ASoC: hdmi-codec: add .get_dai_id support

ALSA SoC needs to know connected DAI ID for probing.
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 .get_dai_id callback
on hdmi_codec_ops

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 include/sound/hdmi-codec.h    |  9 +++++++++
 sound/soc/codecs/hdmi-codec.c | 13 +++++++++++++
 2 files changed, 22 insertions(+)

diff --git a/include/sound/hdmi-codec.h b/include/sound/hdmi-codec.h
index 915c4357945c..9483c55f871b 100644
--- a/include/sound/hdmi-codec.h
+++ b/include/sound/hdmi-codec.h
@@ -18,9 +18,11 @@
 #ifndef __HDMI_CODEC_H__
 #define __HDMI_CODEC_H__
 
+#include <linux/of_graph.h>
 #include <linux/hdmi.h>
 #include <drm/drm_edid.h>
 #include <sound/asoundef.h>
+#include <sound/soc.h>
 #include <uapi/sound/asound.h>
 
 /*
@@ -87,6 +89,13 @@ struct hdmi_codec_ops {
 	 */
 	int (*get_eld)(struct device *dev, void *data,
 		       uint8_t *buf, size_t len);
+
+	/*
+	 * Getting DAI ID
+	 * Optional
+	 */
+	int (*get_dai_id)(struct snd_soc_component *comment,
+			  struct device_node *endpoint);
 };
 
 /* HDMI codec initalization data */
diff --git a/sound/soc/codecs/hdmi-codec.c b/sound/soc/codecs/hdmi-codec.c
index 8659b76b066a..6d05161b625d 100644
--- a/sound/soc/codecs/hdmi-codec.c
+++ b/sound/soc/codecs/hdmi-codec.c
@@ -719,6 +719,18 @@ static const struct snd_soc_dai_driver hdmi_spdif_dai = {
 	.pcm_new = hdmi_codec_pcm_new,
 };
 
+static int hdmi_of_xlate_dai_id(struct snd_soc_component *component,
+				 struct device_node *endpoint)
+{
+	struct hdmi_codec_priv *hcp = snd_soc_component_get_drvdata(component);
+	int ret = -ENOTSUPP; /* see snd_soc_get_dai_id() */
+
+	if (hcp->hcd.ops->get_dai_id)
+		ret = hcp->hcd.ops->get_dai_id(component, endpoint);
+
+	return ret;
+}
+
 static struct snd_soc_codec_driver hdmi_codec = {
 	.component_driver = {
 		.controls		= hdmi_controls,
@@ -727,6 +739,7 @@ static struct snd_soc_codec_driver hdmi_codec = {
 		.num_dapm_widgets	= ARRAY_SIZE(hdmi_widgets),
 		.dapm_routes		= hdmi_routes,
 		.num_dapm_routes	= ARRAY_SIZE(hdmi_routes),
+		.of_xlate_dai_id	= hdmi_of_xlate_dai_id,
 	},
 };
 
-- 
2.11.0

  reply	other threads:[~2017-05-24 17:45 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-18  1:38 [PATCH 0/5] ASoC: add HDMI sound support for Codec Kuninori Morimoto
2017-05-18  1:39 ` [PATCH 1/5] ASoC: add snd_soc_get_dai_id() function Kuninori Morimoto
2017-05-24 17:41   ` Applied "ASoC: add snd_soc_get_dai_id() function" to the asoc tree Mark Brown
2017-05-18  1:39 ` [PATCH 2/5] ASoC: simple-card-utils: support snd_soc_get_dai_id() Kuninori Morimoto
2017-05-24 17:44   ` Applied "ASoC: simple-card-utils: support snd_soc_get_dai_id()" to the asoc tree Mark Brown
2017-05-18  1:40 ` [PATCH 3/5] ASoC: hdmi-codec: remove multi detection support Kuninori Morimoto
2017-05-24 17:45   ` Applied "ASoC: hdmi-codec: remove multi detection support" to the asoc tree Mark Brown
2017-05-18  1:40 ` [PATCH 4/5] ASoC: hdmi-codec: add .get_dai_id support Kuninori Morimoto
2017-05-24 17:45   ` Mark Brown [this message]
2017-05-18  1:40 ` [PATCH 5/5] drm: dw-hdmi-i2s: add .get_dai_id callback for ALSA SoC Kuninori Morimoto
2017-05-24 17:38   ` Mark Brown
2017-05-24 23:34     ` Kuninori Morimoto
2017-05-26  4:16       ` Archit Taneja
2017-05-26  4:24         ` Archit Taneja
2017-05-26 17:26       ` Mark Brown
2017-06-28 19:48   ` Applied "drm: dw-hdmi-i2s: add .get_dai_id callback for ALSA SoC" to the asoc tree Mark Brown
2017-06-19  0:39 ` [PATCH][RESEND] drm: dw-hdmi-i2s: add .get_dai_id callback for ALSA SoC Kuninori Morimoto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1dDaLx-0003Rd-Fq@debutante \
    --to=broonie@kernel.org \
    --cc=airlied@linux.ie \
    --cc=alsa-devel@alsa-project.org \
    --cc=architt@codeaurora.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=horms@verge.net.au \
    --cc=joabreu@synopsys.com \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=laurent.pinchart+renesas@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=rmk+kernel@armlinux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome