All of lore.kernel.org
 help / color / mirror / Atom feed
From: jeeja.kp@intel.com
To: alsa-devel@alsa-project.org
Cc: tiwai@suse.de, patches.audio@intel.com, broonie@kernel.org,
	liam.r.girdwood@intel.com, Jeeja KP <jeeja.kp@intel.com>
Subject: [PATCH 10/16] ASoC: Intel: bxt: Create ASoC jack for hdmi in bxt_da7219_max98357 machine
Date: Tue,  7 Feb 2017 19:09:54 +0530	[thread overview]
Message-ID: <1486474800-11426-11-git-send-email-jeeja.kp@intel.com> (raw)
In-Reply-To: <1486474800-11426-1-git-send-email-jeeja.kp@intel.com>

From: Jeeja KP <jeeja.kp@intel.com>

Creates ASoC jack for HDMI PCM and calls hdmi codec API to initialize
jack in bxt_da7219_max98357 machine

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
---
 sound/soc/intel/boards/bxt_da7219_max98357a.c | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/sound/soc/intel/boards/bxt_da7219_max98357a.c b/sound/soc/intel/boards/bxt_da7219_max98357a.c
index a9647a2..18f3d0e 100644
--- a/sound/soc/intel/boards/bxt_da7219_max98357a.c
+++ b/sound/soc/intel/boards/bxt_da7219_max98357a.c
@@ -33,6 +33,7 @@
 #define QUAD_CHANNEL		4
 
 static struct snd_soc_jack broxton_headset;
+static struct snd_soc_jack broxton_hdmi[3];
 
 struct bxt_hdmi_pcm {
 	struct list_head head;
@@ -517,16 +518,30 @@ static struct snd_soc_dai_link broxton_dais[] = {
 	},
 };
 
+#define NAME_SIZE	32
 static int bxt_card_late_probe(struct snd_soc_card *card)
 {
 	struct bxt_card_private *ctx = snd_soc_card_get_drvdata(card);
 	struct bxt_hdmi_pcm *pcm;
-	int err;
+	int err, i = 0;
+	char jack_name[NAME_SIZE];
 
 	list_for_each_entry(pcm, &ctx->hdmi_pcm_list, head) {
-		err = hdac_hdmi_jack_init(pcm->codec_dai, pcm->device);
+		snprintf(jack_name, sizeof(jack_name),
+			"HDMI/DP, pcm=%d Jack", pcm->device);
+		err = snd_soc_card_jack_new(card, jack_name,
+					SND_JACK_AVOUT, &broxton_hdmi[i],
+					NULL, 0);
+
+		if (err)
+			return err;
+
+		err = hdac_hdmi_jack_init(pcm->codec_dai, pcm->device,
+						&broxton_hdmi[i]);
 		if (err < 0)
 			return err;
+
+		i++;
 	}
 
 	return 0;
-- 
2.5.0

  parent reply	other threads:[~2017-02-07 13:29 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-07 13:39 [PATCH 00/16] ASoC: hdac_hdmi: Enable MST audio jeeja.kp
2017-02-07 13:39 ` [PATCH 01/16] ASoC: hdac_hdmi: Add MST verb support jeeja.kp
2017-02-07 13:39 ` [PATCH 02/16] ASoC: hdac_hdmi: Handle MST pin jack detection at boot/resume jeeja.kp
2017-02-07 13:39 ` [PATCH 03/16] ASoc: hdac_hdmi: Configure pin verbs for MST jeeja.kp
2017-02-07 13:39 ` [PATCH 04/16] ASoC: hdac_hdmi: Add support for multiple ports to a PCM jeeja.kp
2017-02-07 13:39 ` [PATCH 05/16] ASoC: hdac_hdmi: Use ASoC jack instead of snd_jack jeeja.kp
2017-02-07 13:39 ` [PATCH 06/16] ASoC: Intel: Skylake: Create ASoC jack for hdmi in rt286 machine jeeja.kp
2017-02-07 13:39 ` [PATCH 07/16] ASoC: Intel: Skylake: Create ASoC jack for hdmi in skl_nau88l25_max98357a machine jeeja.kp
2017-02-07 13:39 ` [PATCH 08/16] ASoC: Intel: Skylake: Create ASoC jack for hdmi in nau88l25_ssm4567 machine jeeja.kp
2017-02-07 13:39 ` [PATCH 09/16] ASoC: Intel: bxt: Create ASoC jack for hdmi in bxt_rt298 machine jeeja.kp
2017-02-07 13:39 ` jeeja.kp [this message]
2017-02-07 13:39 ` [PATCH 11/16] ASoC: hdac_hdmi: Add machine pin widget for each port jeeja.kp
2017-02-07 13:39 ` [PATCH 12/16] ASoC: Intel: Skylake: Add jack port initialize in rt286 machine jeeja.kp
2017-02-07 13:39 ` [PATCH 13/16] ASoC: Intel: Skylake: Add jack port initialize in nau88l25_max98357a machine jeeja.kp
2017-02-07 13:39 ` [PATCH 14/16] ASoC: Intel: Skylake: Add jack port initialize in nau88l25_ssm4567 machine jeeja.kp
2017-02-07 13:39 ` [PATCH 15/16] ASoC: Intel: bxt: Add jack port initialize in bxt_rt298 machine jeeja.kp
2017-02-16 18:56   ` Mark Brown
2017-02-17  2:10     ` Vinod Koul
2017-02-17  8:51     ` Jeeja KP
2017-02-07 13:40 ` [PATCH 16/16] ASoC: Intel: bxt: Add jack port initialize in da7219_max98357a machine jeeja.kp
2017-02-13  9:07 ` [PATCH 00/16] ASoC: hdac_hdmi: Enable MST audio Vinod Koul

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=1486474800-11426-11-git-send-email-jeeja.kp@intel.com \
    --to=jeeja.kp@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=liam.r.girdwood@intel.com \
    --cc=patches.audio@intel.com \
    --cc=tiwai@suse.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.