aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeeja KP <jeeja.kp@intel.com>2017-02-07 08:39:51 -0500
committerMark Brown <broonie@kernel.org>2017-02-16 13:55:51 -0500
commitc541b2dd45042c1e031778e0229d032dff90f045 (patch)
tree575baccda4b746d00616089011d4391b03f28f26
parentf3af359242f58b9c5f6f78ff4d13e8f108514bc0 (diff)
ASoC: Intel: Skylake: Create ASoC jack for hdmi in skl_nau88l25_max98357a machine
Creates ASoC jack for HDMI PCM and calls hdmi codec API to initialize jack in skl_nau88l25_max98357a machine Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/intel/boards/skl_nau88l25_max98357a.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/sound/soc/intel/boards/skl_nau88l25_max98357a.c b/sound/soc/intel/boards/skl_nau88l25_max98357a.c
index bb4196867752..48f7c96b3f3d 100644
--- a/sound/soc/intel/boards/skl_nau88l25_max98357a.c
+++ b/sound/soc/intel/boards/skl_nau88l25_max98357a.c
@@ -32,6 +32,7 @@
32static struct snd_soc_jack skylake_headset; 32static struct snd_soc_jack skylake_headset;
33static struct snd_soc_card skylake_audio_card; 33static struct snd_soc_card skylake_audio_card;
34static const struct snd_pcm_hw_constraint_list *dmic_constraints; 34static const struct snd_pcm_hw_constraint_list *dmic_constraints;
35static struct snd_soc_jack skylake_hdmi[3];
35 36
36struct skl_hdmi_pcm { 37struct skl_hdmi_pcm {
37 struct list_head head; 38 struct list_head head;
@@ -603,16 +604,31 @@ static struct snd_soc_dai_link skylake_dais[] = {
603 }, 604 },
604}; 605};
605 606
607#define NAME_SIZE 32
606static int skylake_card_late_probe(struct snd_soc_card *card) 608static int skylake_card_late_probe(struct snd_soc_card *card)
607{ 609{
608 struct skl_nau8825_private *ctx = snd_soc_card_get_drvdata(card); 610 struct skl_nau8825_private *ctx = snd_soc_card_get_drvdata(card);
609 struct skl_hdmi_pcm *pcm; 611 struct skl_hdmi_pcm *pcm;
610 int err; 612 int err, i = 0;
613 char jack_name[NAME_SIZE];
611 614
612 list_for_each_entry(pcm, &ctx->hdmi_pcm_list, head) { 615 list_for_each_entry(pcm, &ctx->hdmi_pcm_list, head) {
613 err = hdac_hdmi_jack_init(pcm->codec_dai, pcm->device); 616 snprintf(jack_name, sizeof(jack_name),
617 "HDMI/DP, pcm=%d Jack", pcm->device);
618 err = snd_soc_card_jack_new(card, jack_name,
619 SND_JACK_AVOUT,
620 &skylake_hdmi[i],
621 NULL, 0);
622
623 if (err)
624 return err;
625
626 err = hdac_hdmi_jack_init(pcm->codec_dai, pcm->device,
627 &skylake_hdmi[i]);
614 if (err < 0) 628 if (err < 0)
615 return err; 629 return err;
630
631 i++;
616 } 632 }
617 633
618 return 0; 634 return 0;