]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/radeon/kms: do not preset audio stuff and start timer when not using audio
authorRafał Miłecki <zajec5@gmail.com>
Fri, 26 Feb 2010 08:46:33 +0000 (08:46 +0000)
committerDave Airlie <airlied@redhat.com>
Mon, 1 Mar 2010 06:09:40 +0000 (16:09 +1000)
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/radeon/r600_audio.c

index 387abaa275a41e39d7e347ddd14e4f906d1b3046..668ff4b11c60acda659b29540c67dc8c1c774f6f 100644 (file)
@@ -160,10 +160,10 @@ static void r600_audio_engine_enable(struct radeon_device *rdev, bool enable)
  */
 int r600_audio_init(struct radeon_device *rdev)
 {
-       if (!r600_audio_chipset_supported(rdev))
+       if (!radeon_audio || !r600_audio_chipset_supported(rdev))
                return 0;
 
-       r600_audio_engine_enable(rdev, radeon_audio);
+       r600_audio_engine_enable(rdev, true);
 
        rdev->audio_channels = -1;
        rdev->audio_rate = -1;
@@ -266,7 +266,7 @@ void r600_audio_set_clock(struct drm_encoder *encoder, int clock)
  */
 void r600_audio_fini(struct radeon_device *rdev)
 {
-       if (!r600_audio_chipset_supported(rdev))
+       if (!radeon_audio || !r600_audio_chipset_supported(rdev))
                return;
 
        del_timer(&rdev->audio_timer);