mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
drm/msm/dp: do not notify audio subsystem if sink doesn't support audio
[ Upstream commit e8c765811b1064c200829eacf237ac8c25e79cd0 ]
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: d13e36d7d2
("drm/msm/dp: add audio support for Display Port on MSM")
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@chromium.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
be5795e209
commit
56b491d7de
@ -563,7 +563,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,
|
||||
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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user