提交 e8c76581 编写于 作者: A Abhinav Kumar 提交者: Rob Clark

drm/msm/dp: do not notify audio subsystem if sink doesn't support audio

For sinks that do not support audio, there is no need to notify
audio subsystem of the connection event.

This will make sure that audio routes only to the primary display
when connected to such sinks.

changes in v2:
  - Added fixes tag
  - Removed nested if condition and removed usage of global pointer

Fixes: d13e36d7 ("drm/msm/dp: add audio support for Display Port on MSM")
Signed-off-by: NAbhinav Kumar <abhinavk@codeaurora.org>
Signed-off-by: NRob Clark <robdclark@chromium.org>
上级 26b8d66a
...@@ -585,7 +585,14 @@ static int dp_connect_pending_timeout(struct dp_display_private *dp, u32 data) ...@@ -585,7 +585,14 @@ static int dp_connect_pending_timeout(struct dp_display_private *dp, u32 data)
static void dp_display_handle_plugged_change(struct msm_dp *dp_display, static void dp_display_handle_plugged_change(struct msm_dp *dp_display,
bool plugged) bool plugged)
{ {
if (dp_display->plugged_cb && dp_display->codec_dev) struct dp_display_private *dp;
dp = container_of(dp_display,
struct dp_display_private, dp_display);
/* notify audio subsystem only if sink supports audio */
if (dp_display->plugged_cb && dp_display->codec_dev &&
dp->audio_supported)
dp_display->plugged_cb(dp_display->codec_dev, plugged); dp_display->plugged_cb(dp_display->codec_dev, plugged);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册