diff options
author | Jeeja KP <jeeja.kp@intel.com> | 2017-02-07 19:09:47 +0530 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-02-16 18:55:36 +0000 |
commit | 1b46ebd136b3ad334762d6e66b0b96b432680e50 (patch) | |
tree | f5a167d34ebb9629585324b04572c65022323795 | |
parent | a9ce96bcd9c4d0c1ffd3d37c000bcee470b2535b (diff) | |
download | linux-stable-1b46ebd136b3ad334762d6e66b0b96b432680e50.tar.gz linux-stable-1b46ebd136b3ad334762d6e66b0b96b432680e50.tar.bz2 linux-stable-1b46ebd136b3ad334762d6e66b0b96b432680e50.zip |
ASoc: hdac_hdmi: Configure pin verbs for MST
To enable stream on a specific port of a MST capable pin, the port
needs to be selected before we configure the pin widget verb.
When port is selected, all the pin widget verb controlling the sink
device operation will be directed to selected port. So add port
selection before configuring the pin widget verb.
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/codecs/hdac_hdmi.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sound/soc/codecs/hdac_hdmi.c b/sound/soc/codecs/hdac_hdmi.c index c5527e81a490..6cf86a0a118c 100644 --- a/sound/soc/codecs/hdac_hdmi.c +++ b/sound/soc/codecs/hdac_hdmi.c @@ -448,6 +448,9 @@ static int hdac_hdmi_query_port_connlist(struct hdac_ext_device *hdac, return -EINVAL; } + if (hdac_hdmi_port_select_set(hdac, port) < 0) + return -EIO; + port->num_mux_nids = snd_hdac_get_connections(&hdac->hdac, pin->nid, port->mux_nids, HDA_MAX_CONNECTIONS); if (port->num_mux_nids == 0) @@ -687,6 +690,10 @@ static int hdac_hdmi_pin_output_widget_event(struct snd_soc_dapm_widget *w, if (!pcm) return -EIO; + /* set the device if pin is mst_capable */ + if (hdac_hdmi_port_select_set(edev, port) < 0) + return -EIO; + switch (event) { case SND_SOC_DAPM_PRE_PMU: hdac_hdmi_set_power_state(edev, port->pin->nid, AC_PWRST_D0); @@ -775,6 +782,11 @@ static int hdac_hdmi_pin_mux_widget_event(struct snd_soc_dapm_widget *w, kc = w->kcontrols[0]; mux_idx = dapm_kcontrol_get_value(kc); + + /* set the device if pin is mst_capable */ + if (hdac_hdmi_port_select_set(edev, port) < 0) + return -EIO; + if (mux_idx > 0) { snd_hdac_codec_write(&edev->hdac, port->pin->nid, 0, AC_VERB_SET_CONNECT_SEL, (mux_idx - 1)); |