OSDN Git Service

drm/amd/display: Only enable audio if speaker allocation exists
authorAlvin Lee <alvin.lee2@amd.com>
Thu, 4 Jul 2019 19:17:42 +0000 (15:17 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 18 Jul 2019 19:27:26 +0000 (14:27 -0500)
commitce08aad3896f342d6c99e8e2dc1f71a0926efafc
tree8b0e6f21be4ff85f90f3ac4d334fd92b0d8dce77
parent8897810adfa768b0c127c1e204bedc4449e3f945
drm/amd/display: Only enable audio if speaker allocation exists

[Why]

In dm_helpers_parse_edid_caps, there is a corner case where no speakers
can be allocated even though the audio mode count is greater than 0.
Enabling audio when no speaker allocations exists can cause issues in
the video stream.

[How]

Add a check to not enable audio unless one or more speaker allocations
exist (since doing this can cause issues in the video stream).

Signed-off-by: Alvin Lee <alvin.lee2@amd.com>
Reviewed-by: Jun Lei <Jun.Lei@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc_resource.c