Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 185583
b: refs/heads/master
c: 5230aea
h: refs/heads/master
i:
  185581: 04a4a98
  185579: 3e49ad9
  185575: 6d6814c
  185567: e659809
v: v3
  • Loading branch information
Rafał Miłecki authored and Dave Airlie committed Feb 18, 2010
1 parent 611a55d commit 8aaba36
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 71b10d8762b2a548c4ac2e4461b46d9b205a5c77
refs/heads/master: 5230aea62c0d8f53edcc3e014c3404132afcfeb4
16 changes: 12 additions & 4 deletions trunk/drivers/gpu/drm/radeon/r600_audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,15 @@ static void r600_audio_update_hdmi(unsigned long param)
jiffies + msecs_to_jiffies(AUDIO_TIMER_INTERVALL));
}

/*
* turn on/off audio engine
*/
static void r600_audio_engine_enable(struct radeon_device *rdev, bool enable)
{
DRM_INFO("%s audio support", enable ? "Enabling" : "Disabling");
WREG32_P(R600_AUDIO_ENABLE, enable ? 0x81000000 : 0x0, ~0x81000000);
}

/*
* initialize the audio vars and register the update timer
*/
Expand All @@ -154,8 +163,7 @@ int r600_audio_init(struct radeon_device *rdev)
if (!r600_audio_chipset_supported(rdev))
return 0;

DRM_INFO("%s audio support", radeon_audio ? "Enabling" : "Disabling");
WREG32_P(R600_AUDIO_ENABLE, radeon_audio ? 0x81000000 : 0x0, ~0x81000000);
r600_audio_engine_enable(rdev, radeon_audio);

rdev->audio_channels = -1;
rdev->audio_rate = -1;
Expand Down Expand Up @@ -261,7 +269,7 @@ void r600_audio_fini(struct radeon_device *rdev)
if (!r600_audio_chipset_supported(rdev))
return;

WREG32_P(R600_AUDIO_ENABLE, 0x0, ~0x81000000);

del_timer(&rdev->audio_timer);

r600_audio_engine_enable(rdev, false);
}

0 comments on commit 8aaba36

Please sign in to comment.