diff options
author | Jeeja KP <jeeja.kp@intel.com> | 2017-02-07 08:39:53 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-02-16 13:55:59 -0500 |
commit | 7932b8ace390c4474d1dc62d7843e843bc3ae9b5 (patch) | |
tree | 00dced0d3717c6faff2f085000b597b359d2863b | |
parent | 9e4278cd9b8e6e6464a4eb5e65c2b232076aa6c6 (diff) |
ASoC: Intel: bxt: Create ASoC jack for hdmi in bxt_rt298 machine
Creates ASoC jack for HDMI PCM and calls hdmi codec API to initialize
jack in bxt_rt298.c 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/bxt_rt298.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/sound/soc/intel/boards/bxt_rt298.c b/sound/soc/intel/boards/bxt_rt298.c index 09be868833d1..d5f53a6de041 100644 --- a/sound/soc/intel/boards/bxt_rt298.c +++ b/sound/soc/intel/boards/bxt_rt298.c | |||
@@ -28,6 +28,7 @@ | |||
28 | 28 | ||
29 | /* Headset jack detection DAPM pins */ | 29 | /* Headset jack detection DAPM pins */ |
30 | static struct snd_soc_jack broxton_headset; | 30 | static struct snd_soc_jack broxton_headset; |
31 | static struct snd_soc_jack broxton_hdmi[3]; | ||
31 | 32 | ||
32 | struct bxt_hdmi_pcm { | 33 | struct bxt_hdmi_pcm { |
33 | struct list_head head; | 34 | struct list_head head; |
@@ -453,16 +454,30 @@ static struct snd_soc_dai_link broxton_rt298_dais[] = { | |||
453 | }, | 454 | }, |
454 | }; | 455 | }; |
455 | 456 | ||
457 | #define NAME_SIZE 32 | ||
456 | static int bxt_card_late_probe(struct snd_soc_card *card) | 458 | static int bxt_card_late_probe(struct snd_soc_card *card) |
457 | { | 459 | { |
458 | struct bxt_rt286_private *ctx = snd_soc_card_get_drvdata(card); | 460 | struct bxt_rt286_private *ctx = snd_soc_card_get_drvdata(card); |
459 | struct bxt_hdmi_pcm *pcm; | 461 | struct bxt_hdmi_pcm *pcm; |
460 | int err; | 462 | int err, i = 0; |
463 | char jack_name[NAME_SIZE]; | ||
461 | 464 | ||
462 | list_for_each_entry(pcm, &ctx->hdmi_pcm_list, head) { | 465 | list_for_each_entry(pcm, &ctx->hdmi_pcm_list, head) { |
463 | err = hdac_hdmi_jack_init(pcm->codec_dai, pcm->device); | 466 | snprintf(jack_name, sizeof(jack_name), |
467 | "HDMI/DP, pcm=%d Jack", pcm->device); | ||
468 | err = snd_soc_card_jack_new(card, jack_name, | ||
469 | SND_JACK_AVOUT, &broxton_hdmi[i], | ||
470 | NULL, 0); | ||
471 | |||
472 | if (err) | ||
473 | return err; | ||
474 | |||
475 | err = hdac_hdmi_jack_init(pcm->codec_dai, pcm->device, | ||
476 | &broxton_hdmi[i]); | ||
464 | if (err < 0) | 477 | if (err < 0) |
465 | return err; | 478 | return err; |
479 | |||
480 | i++; | ||
466 | } | 481 | } |
467 | 482 | ||
468 | return 0; | 483 | return 0; |