diff mbox

[3/3] drm/radeon/kms: do not preset audio stuff and start timer when not using audio

Message ID 1267173993-3590-5-git-send-email-zajec5@gmail.com (mailing list archive)
State Accepted
Headers show

Commit Message

Rafał Miłecki Feb. 26, 2010, 8:46 a.m. UTC
None
diff mbox

Patch

diff --git a/drivers/gpu/drm/radeon/r600_audio.c b/drivers/gpu/drm/radeon/r600_audio.c
index 2dd8891..db92801 100644
--- a/drivers/gpu/drm/radeon/r600_audio.c
+++ b/drivers/gpu/drm/radeon/r600_audio.c
@@ -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);