drm/radeon: fix speaker allocation setup
authorAlex Deucher <alexander.deucher@amd.com>
Mon, 13 Oct 2014 15:51:50 +0000 (11:51 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 16 Oct 2014 22:34:07 +0000 (18:34 -0400)
If the sad_count is 0, set the hw to stereo and change
the error message to a warn.  A lot of monitors don't
set the speaker allocation block.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
drivers/gpu/drm/radeon/dce3_1_afmt.c
drivers/gpu/drm/radeon/dce6_afmt.c
drivers/gpu/drm/radeon/evergreen_hdmi.c

index 6b1dbecdd36db99bb3433090d11d80fde8707555..2fe8cfc966d9304b6845f6f6d29c9e236d80b0cb 100644 (file)
@@ -49,8 +49,8 @@ static void dce3_2_afmt_write_speaker_allocation(struct drm_encoder *encoder)
 
        sad_count = drm_edid_to_speaker_allocation(radeon_connector->edid, &sadb);
        if (sad_count < 0) {
-               DRM_ERROR("Couldn't read Speaker Allocation Data Block: %d\n", sad_count);
-               return;
+               DRM_DEBUG("Couldn't read Speaker Allocation Data Block: %d\n", sad_count);
+               sad_count = 0;
        }
 
        /* program the speaker allocation */
index 960a5f0f042f05bde65c2e0405f86e756ba826be..f312edf4d50eaedeac6fca1af4de8a8457b10e17 100644 (file)
@@ -176,9 +176,9 @@ void dce6_afmt_write_speaker_allocation(struct drm_encoder *encoder)
        }
 
        sad_count = drm_edid_to_speaker_allocation(radeon_connector_edid(connector), &sadb);
-       if (sad_count <= 0) {
-               DRM_ERROR("Couldn't read Speaker Allocation Data Block: %d\n", sad_count);
-               return;
+       if (sad_count < 0) {
+               DRM_DEBUG("Couldn't read Speaker Allocation Data Block: %d\n", sad_count);
+               sad_count = 0;
        }
 
        /* program the speaker allocation */
index f6a5c3026f859e128d80f4368490679d00200e33..53abd9b17a50b0490dd24b468461ccaab7b54e87 100644 (file)
@@ -149,9 +149,9 @@ static void dce4_afmt_write_speaker_allocation(struct drm_encoder *encoder)
        }
 
        sad_count = drm_edid_to_speaker_allocation(radeon_connector_edid(connector), &sadb);
-       if (sad_count <= 0) {
-               DRM_ERROR("Couldn't read Speaker Allocation Data Block: %d\n", sad_count);
-               return;
+       if (sad_count < 0) {
+               DRM_DEBUG("Couldn't read Speaker Allocation Data Block: %d\n", sad_count);
+               sad_count = 0;
        }
 
        /* program the speaker allocation */