Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Tested-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Christian König <deathsimple@vodafone.de>
Signed-off-by: Dave Airlie <airlied@redhat.com>
struct drm_encoder *encoder;
int changes = 0;
struct drm_encoder *encoder;
int changes = 0;
- changes |= channels != rdev->audio_channels;
- changes |= rate != rdev->audio_rate;
- changes |= bps != rdev->audio_bits_per_sample;
- changes |= status_bits != rdev->audio_status_bits;
- changes |= category_code != rdev->audio_category_code;
+ changes |= channels != rdev->audio.channels;
+ changes |= rate != rdev->audio.rate;
+ changes |= bps != rdev->audio.bits_per_sample;
+ changes |= status_bits != rdev->audio.status_bits;
+ changes |= category_code != rdev->audio.category_code;
- rdev->audio_channels = channels;
- rdev->audio_rate = rate;
- rdev->audio_bits_per_sample = bps;
- rdev->audio_status_bits = status_bits;
- rdev->audio_category_code = category_code;
+ rdev->audio.channels = channels;
+ rdev->audio.rate = rate;
+ rdev->audio.bits_per_sample = bps;
+ rdev->audio.status_bits = status_bits;
+ rdev->audio.category_code = category_code;
}
list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) {
}
list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) {
WREG32_P(R600_AUDIO_ENABLE,
enable ? 0x81000000 : 0x0, ~0x81000000);
}
WREG32_P(R600_AUDIO_ENABLE,
enable ? 0x81000000 : 0x0, ~0x81000000);
}
- rdev->audio_enabled = enable;
+ rdev->audio.enabled = enable;
r600_audio_engine_enable(rdev, true);
r600_audio_engine_enable(rdev, true);
- rdev->audio_channels = -1;
- rdev->audio_rate = -1;
- rdev->audio_bits_per_sample = -1;
- rdev->audio_status_bits = 0;
- rdev->audio_category_code = 0;
+ rdev->audio.channels = -1;
+ rdev->audio.rate = -1;
+ rdev->audio.bits_per_sample = -1;
+ rdev->audio.status_bits = 0;
+ rdev->audio.category_code = 0;
*/
void r600_audio_fini(struct radeon_device *rdev)
{
*/
void r600_audio_fini(struct radeon_device *rdev)
{
- if (!rdev->audio_enabled)
+ if (!rdev->audio.enabled)
return;
r600_audio_engine_enable(rdev, false);
return;
r600_audio_engine_enable(rdev, false);
enum radeon_pm_state_type ps_type,
int instance);
enum radeon_pm_state_type ps_type,
int instance);
+struct r600_audio {
+ bool enabled;
+ int channels;
+ int rate;
+ int bits_per_sample;
+ u8 status_bits;
+ u8 category_code;
+};
+
int num_crtc; /* number of crtcs */
struct mutex dc_hw_i2c_mutex; /* display controller hw i2c mutex */
struct mutex vram_mutex;
int num_crtc; /* number of crtcs */
struct mutex dc_hw_i2c_mutex; /* display controller hw i2c mutex */
struct mutex vram_mutex;
-
- /* audio stuff */
- bool audio_enabled;
- int audio_channels;
- int audio_rate;
- int audio_bits_per_sample;
- uint8_t audio_status_bits;
- uint8_t audio_category_code;
-
+ struct r600_audio audio; /* audio stuff */
struct notifier_block acpi_nb;
/* only one userspace can use Hyperz features or CMASK at a time */
struct drm_file *hyperz_filp;
struct notifier_block acpi_nb;
/* only one userspace can use Hyperz features or CMASK at a time */
struct drm_file *hyperz_filp;