Commit 3a13347f authored by Naveen M's avatar Naveen M Committed by Mark Brown

ASoC: Intel: kbl: Add jack port initialize in kbl machine drivers

After the pcm jack is created, create and initialize the pin switch
widget for each port. For hdmi audio, invoke hdac_hdmi_jack_port_init
func() in rt5663_max98927 & rt5663_rt5514_max98927 to enable the pin,
when monitor is connected.
Signed-off-by: default avatarNaveen M <naveen.m@intel.com>
Acked-By: default avatarVinod Koul <vinod.koul@intel.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent c20252cf
......@@ -767,10 +767,12 @@ static int kabylake_card_late_probe(struct snd_soc_card *card)
{
struct kbl_rt5663_private *ctx = snd_soc_card_get_drvdata(card);
struct kbl_hdmi_pcm *pcm;
struct snd_soc_codec *codec = NULL;
int err, i = 0;
char jack_name[NAME_SIZE];
list_for_each_entry(pcm, &ctx->hdmi_pcm_list, head) {
codec = pcm->codec_dai->codec;
snprintf(jack_name, sizeof(jack_name),
"HDMI/DP, pcm=%d Jack", pcm->device);
err = snd_soc_card_jack_new(card, jack_name,
......@@ -788,7 +790,10 @@ static int kabylake_card_late_probe(struct snd_soc_card *card)
i++;
}
return 0;
if (!codec)
return -EINVAL;
return hdac_hdmi_jack_port_init(codec, &card->dapm);
}
/* kabylake audio machine driver for SPT + RT5663 */
......
......@@ -600,10 +600,12 @@ static int kabylake_card_late_probe(struct snd_soc_card *card)
{
struct kbl_codec_private *ctx = snd_soc_card_get_drvdata(card);
struct kbl_hdmi_pcm *pcm;
struct snd_soc_codec *codec = NULL;
int err, i = 0;
char jack_name[NAME_SIZE];
list_for_each_entry(pcm, &ctx->hdmi_pcm_list, head) {
codec = pcm->codec_dai->codec;
err = snd_soc_card_jack_new(card, jack_name,
SND_JACK_AVOUT, &ctx->kabylake_hdmi[i],
NULL, 0);
......@@ -617,7 +619,10 @@ static int kabylake_card_late_probe(struct snd_soc_card *card)
i++;
}
return 0;
if (!codec)
return -EINVAL;
return hdac_hdmi_jack_port_init(codec, &card->dapm);
}
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment