[PATCH 3/3] drm/radeon: add audio support for DCE6/8 GPUs (v9)
Rafał Miłecki
zajec5 at gmail.com
Wed Aug 14 09:27:42 PDT 2013
2013/8/14 Alex Deucher <alexdeucher at gmail.com>:
> +static u32 dce6_endpoint_rreg(struct radeon_device *rdev,
> + u32 block_offset, u32 reg)
> +{
> + u32 r;
> +
> + WREG32(AZ_F0_CODEC_ENDPOINT_INDEX + block_offset, reg);
> + r = RREG32(AZ_F0_CODEC_ENDPOINT_DATA + block_offset);
> + return r;
> +}
> +
> +static void dce6_endpoint_wreg(struct radeon_device *rdev,
> + u32 block_offset, u32 reg, u32 v)
> +{
> + if (ASIC_IS_DCE8(rdev))
> + WREG32(AZ_F0_CODEC_ENDPOINT_INDEX + block_offset, reg);
> + else
> + WREG32(AZ_F0_CODEC_ENDPOINT_INDEX + block_offset,
> + AZ_ENDPOINT_REG_WRITE_EN | AZ_ENDPOINT_REG_INDEX(reg));
> + WREG32(AZ_F0_CODEC_ENDPOINT_DATA + block_offset, v);
> +}
Thanks!
> +struct r600_audio_pin *dce6_audio_get_pin(struct radeon_device *rdev)
> +{
> + int i;
> +
> + dce6_afmt_get_connected_pins(rdev);
> +
> + for (i = 0; i < rdev->audio.num_pins; i++) {
> + if (rdev->audio.pin[i].connected)
> + return &rdev->audio.pin[i];
> + }
> + DRM_ERROR("No connected audio pins found!");
> + return NULL;
> +}
You missed the line break. Sorry I didn't spot it earlier :/
More information about the dri-devel
mailing list