blob: 2a2bf5b5b805e6d520d6a91c895cf8ac1bf70bb8 [file] [log] [blame]
Slava Grigorevbfc1f972014-12-22 17:26:51 -05001/*
2 * Copyright 2014 Advanced Micro Devices, Inc.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20 * OTHER DEALINGS IN THE SOFTWARE.
21 *
22 * Authors: Slava Grigorev <slava.grigorev@amd.com>
23 */
24
25#include <drm/drmP.h>
Slava Grigorev1a626b62014-12-01 13:49:39 -050026#include <drm/drm_crtc.h>
Slava Grigorevbfc1f972014-12-22 17:26:51 -050027#include "radeon.h"
Slava Grigorev1a626b62014-12-01 13:49:39 -050028#include "atom.h"
29#include "radeon_audio.h"
Slava Grigorevbfc1f972014-12-22 17:26:51 -050030
31void r600_audio_enable(struct radeon_device *rdev, struct r600_audio_pin *pin,
32 u8 enable_mask);
Slava Grigorev8bf59822014-12-03 15:29:53 -050033void dce4_audio_enable(struct radeon_device *rdev, struct r600_audio_pin *pin,
34 u8 enable_mask);
Slava Grigorevbfc1f972014-12-22 17:26:51 -050035void dce6_audio_enable(struct radeon_device *rdev, struct r600_audio_pin *pin,
36 u8 enable_mask);
Slava Grigorev1a626b62014-12-01 13:49:39 -050037u32 dce6_endpoint_rreg(struct radeon_device *rdev, u32 offset, u32 reg);
38void dce6_endpoint_wreg(struct radeon_device *rdev,
39 u32 offset, u32 reg, u32 v);
Alex Deucher070a2e62015-01-22 10:41:55 -050040void dce3_2_afmt_write_sad_regs(struct drm_encoder *encoder,
41 struct cea_sad *sads, int sad_count);
42void evergreen_hdmi_write_sad_regs(struct drm_encoder *encoder,
43 struct cea_sad *sads, int sad_count);
44void dce6_afmt_write_sad_regs(struct drm_encoder *encoder,
45 struct cea_sad *sads, int sad_count);
Slava Grigorev00a9d4b2014-12-01 18:02:57 -050046void dce3_2_afmt_hdmi_write_speaker_allocation(struct drm_encoder *encoder,
47 u8 *sadb, int sad_count);
48void dce3_2_afmt_dp_write_speaker_allocation(struct drm_encoder *encoder,
49 u8 *sadb, int sad_count);
50void dce4_afmt_hdmi_write_speaker_allocation(struct drm_encoder *encoder,
51 u8 *sadb, int sad_count);
52void dce4_afmt_dp_write_speaker_allocation(struct drm_encoder *encoder,
53 u8 *sadb, int sad_count);
54void dce6_afmt_hdmi_write_speaker_allocation(struct drm_encoder *encoder,
55 u8 *sadb, int sad_count);
56void dce6_afmt_dp_write_speaker_allocation(struct drm_encoder *encoder,
57 u8 *sadb, int sad_count);
Slava Grigorev87654f82014-12-02 11:20:48 -050058void dce4_afmt_write_latency_fields(struct drm_encoder *encoder,
59 struct drm_connector *connector, struct drm_display_mode *mode);
60void dce6_afmt_write_latency_fields(struct drm_encoder *encoder,
61 struct drm_connector *connector, struct drm_display_mode *mode);
Slava Grigorev3cdde022014-12-02 15:22:43 -050062struct r600_audio_pin* r600_audio_get_pin(struct radeon_device *rdev);
63struct r600_audio_pin* dce6_audio_get_pin(struct radeon_device *rdev);
Slava Grigorev88252d72014-12-02 17:27:29 -050064void dce6_afmt_select_pin(struct drm_encoder *encoder);
Slava Grigoreva85d6822014-12-05 13:38:31 -050065void r600_hdmi_audio_set_dto(struct radeon_device *rdev,
66 struct radeon_crtc *crtc, unsigned int clock);
67void dce3_2_audio_set_dto(struct radeon_device *rdev,
68 struct radeon_crtc *crtc, unsigned int clock);
69void dce4_hdmi_audio_set_dto(struct radeon_device *rdev,
70 struct radeon_crtc *crtc, unsigned int clock);
71void dce4_dp_audio_set_dto(struct radeon_device *rdev,
72 struct radeon_crtc *crtc, unsigned int clock);
73void dce6_hdmi_audio_set_dto(struct radeon_device *rdev,
74 struct radeon_crtc *crtc, unsigned int clock);
75void dce6_dp_audio_set_dto(struct radeon_device *rdev,
76 struct radeon_crtc *crtc, unsigned int clock);
Slava Grigorevbfc1f972014-12-22 17:26:51 -050077
78static const u32 pin_offsets[7] =
79{
80 (0x5e00 - 0x5e00),
81 (0x5e18 - 0x5e00),
82 (0x5e30 - 0x5e00),
83 (0x5e48 - 0x5e00),
84 (0x5e60 - 0x5e00),
85 (0x5e78 - 0x5e00),
86 (0x5e90 - 0x5e00),
87};
88
Slava Grigorev1a626b62014-12-01 13:49:39 -050089static u32 radeon_audio_rreg(struct radeon_device *rdev, u32 offset, u32 reg)
90{
91 return RREG32(reg);
92}
93
94static void radeon_audio_wreg(struct radeon_device *rdev, u32 offset,
95 u32 reg, u32 v)
96{
97 WREG32(reg, v);
98}
99
Slava Grigoreva85d6822014-12-05 13:38:31 -0500100static struct radeon_audio_basic_funcs r600_funcs = {
101 .endpoint_rreg = radeon_audio_rreg,
102 .endpoint_wreg = radeon_audio_wreg,
103 .enable = r600_audio_enable,
104};
105
Slava Grigorev1a626b62014-12-01 13:49:39 -0500106static struct radeon_audio_basic_funcs dce32_funcs = {
107 .endpoint_rreg = radeon_audio_rreg,
108 .endpoint_wreg = radeon_audio_wreg,
Slava Grigorev8bf59822014-12-03 15:29:53 -0500109 .enable = r600_audio_enable,
Slava Grigorev1a626b62014-12-01 13:49:39 -0500110};
111
112static struct radeon_audio_basic_funcs dce4_funcs = {
113 .endpoint_rreg = radeon_audio_rreg,
114 .endpoint_wreg = radeon_audio_wreg,
Slava Grigorev8bf59822014-12-03 15:29:53 -0500115 .enable = dce4_audio_enable,
Slava Grigorev1a626b62014-12-01 13:49:39 -0500116};
117
118static struct radeon_audio_basic_funcs dce6_funcs = {
119 .endpoint_rreg = dce6_endpoint_rreg,
120 .endpoint_wreg = dce6_endpoint_wreg,
Slava Grigorev8bf59822014-12-03 15:29:53 -0500121 .enable = dce6_audio_enable,
Slava Grigorev1a626b62014-12-01 13:49:39 -0500122};
123
Slava Grigoreva85d6822014-12-05 13:38:31 -0500124static struct radeon_audio_funcs r600_hdmi_funcs = {
125 .get_pin = r600_audio_get_pin,
126 .set_dto = r600_hdmi_audio_set_dto,
127};
128
Alex Deucher070a2e62015-01-22 10:41:55 -0500129static struct radeon_audio_funcs dce32_hdmi_funcs = {
Slava Grigorev3cdde022014-12-02 15:22:43 -0500130 .get_pin = r600_audio_get_pin,
Alex Deucher070a2e62015-01-22 10:41:55 -0500131 .write_sad_regs = dce3_2_afmt_write_sad_regs,
Slava Grigorev00a9d4b2014-12-01 18:02:57 -0500132 .write_speaker_allocation = dce3_2_afmt_hdmi_write_speaker_allocation,
Slava Grigoreva85d6822014-12-05 13:38:31 -0500133 .set_dto = dce3_2_audio_set_dto,
Alex Deucher070a2e62015-01-22 10:41:55 -0500134};
135
136static struct radeon_audio_funcs dce32_dp_funcs = {
Slava Grigorev3cdde022014-12-02 15:22:43 -0500137 .get_pin = r600_audio_get_pin,
Alex Deucher070a2e62015-01-22 10:41:55 -0500138 .write_sad_regs = dce3_2_afmt_write_sad_regs,
Slava Grigorev00a9d4b2014-12-01 18:02:57 -0500139 .write_speaker_allocation = dce3_2_afmt_dp_write_speaker_allocation,
Slava Grigoreva85d6822014-12-05 13:38:31 -0500140 .set_dto = dce3_2_audio_set_dto,
Alex Deucher070a2e62015-01-22 10:41:55 -0500141};
142
143static struct radeon_audio_funcs dce4_hdmi_funcs = {
Slava Grigorev3cdde022014-12-02 15:22:43 -0500144 .get_pin = r600_audio_get_pin,
Alex Deucher070a2e62015-01-22 10:41:55 -0500145 .write_sad_regs = evergreen_hdmi_write_sad_regs,
Slava Grigorev00a9d4b2014-12-01 18:02:57 -0500146 .write_speaker_allocation = dce4_afmt_hdmi_write_speaker_allocation,
Slava Grigorev87654f82014-12-02 11:20:48 -0500147 .write_latency_fields = dce4_afmt_write_latency_fields,
Slava Grigoreva85d6822014-12-05 13:38:31 -0500148 .set_dto = dce4_hdmi_audio_set_dto,
Alex Deucher070a2e62015-01-22 10:41:55 -0500149};
150
151static struct radeon_audio_funcs dce4_dp_funcs = {
Slava Grigorev3cdde022014-12-02 15:22:43 -0500152 .get_pin = r600_audio_get_pin,
Alex Deucher070a2e62015-01-22 10:41:55 -0500153 .write_sad_regs = evergreen_hdmi_write_sad_regs,
Slava Grigorev00a9d4b2014-12-01 18:02:57 -0500154 .write_speaker_allocation = dce4_afmt_dp_write_speaker_allocation,
Slava Grigorev87654f82014-12-02 11:20:48 -0500155 .write_latency_fields = dce4_afmt_write_latency_fields,
Slava Grigoreva85d6822014-12-05 13:38:31 -0500156 .set_dto = dce4_dp_audio_set_dto,
Alex Deucher070a2e62015-01-22 10:41:55 -0500157};
158
159static struct radeon_audio_funcs dce6_hdmi_funcs = {
Slava Grigorev88252d72014-12-02 17:27:29 -0500160 .select_pin = dce6_afmt_select_pin,
Slava Grigorev3cdde022014-12-02 15:22:43 -0500161 .get_pin = dce6_audio_get_pin,
Alex Deucher070a2e62015-01-22 10:41:55 -0500162 .write_sad_regs = dce6_afmt_write_sad_regs,
Slava Grigorev00a9d4b2014-12-01 18:02:57 -0500163 .write_speaker_allocation = dce6_afmt_hdmi_write_speaker_allocation,
Slava Grigorev87654f82014-12-02 11:20:48 -0500164 .write_latency_fields = dce6_afmt_write_latency_fields,
Slava Grigoreva85d6822014-12-05 13:38:31 -0500165 .set_dto = dce6_hdmi_audio_set_dto,
Alex Deucher070a2e62015-01-22 10:41:55 -0500166};
167
168static struct radeon_audio_funcs dce6_dp_funcs = {
Slava Grigorev88252d72014-12-02 17:27:29 -0500169 .select_pin = dce6_afmt_select_pin,
Slava Grigorev3cdde022014-12-02 15:22:43 -0500170 .get_pin = dce6_audio_get_pin,
Alex Deucher070a2e62015-01-22 10:41:55 -0500171 .write_sad_regs = dce6_afmt_write_sad_regs,
Slava Grigorev00a9d4b2014-12-01 18:02:57 -0500172 .write_speaker_allocation = dce6_afmt_dp_write_speaker_allocation,
Slava Grigorev87654f82014-12-02 11:20:48 -0500173 .write_latency_fields = dce6_afmt_write_latency_fields,
Slava Grigoreva85d6822014-12-05 13:38:31 -0500174 .set_dto = dce6_dp_audio_set_dto,
Alex Deucher070a2e62015-01-22 10:41:55 -0500175};
176
Slava Grigorev1a626b62014-12-01 13:49:39 -0500177static void radeon_audio_interface_init(struct radeon_device *rdev)
178{
179 if (ASIC_IS_DCE6(rdev)) {
180 rdev->audio.funcs = &dce6_funcs;
Alex Deucher070a2e62015-01-22 10:41:55 -0500181 rdev->audio.hdmi_funcs = &dce6_hdmi_funcs;
182 rdev->audio.dp_funcs = &dce6_dp_funcs;
Slava Grigorev1a626b62014-12-01 13:49:39 -0500183 } else if (ASIC_IS_DCE4(rdev)) {
184 rdev->audio.funcs = &dce4_funcs;
Alex Deucher070a2e62015-01-22 10:41:55 -0500185 rdev->audio.hdmi_funcs = &dce4_hdmi_funcs;
186 rdev->audio.dp_funcs = &dce4_dp_funcs;
Slava Grigoreva85d6822014-12-05 13:38:31 -0500187 } else if (ASIC_IS_DCE32(rdev)) {
Slava Grigorev1a626b62014-12-01 13:49:39 -0500188 rdev->audio.funcs = &dce32_funcs;
Alex Deucher070a2e62015-01-22 10:41:55 -0500189 rdev->audio.hdmi_funcs = &dce32_hdmi_funcs;
190 rdev->audio.dp_funcs = &dce32_dp_funcs;
Slava Grigoreva85d6822014-12-05 13:38:31 -0500191 } else {
192 rdev->audio.funcs = &r600_funcs;
193 rdev->audio.hdmi_funcs = &r600_hdmi_funcs;
194 rdev->audio.dp_funcs = 0;
Slava Grigorev1a626b62014-12-01 13:49:39 -0500195 }
196}
197
Slava Grigorevbfc1f972014-12-22 17:26:51 -0500198static int radeon_audio_chipset_supported(struct radeon_device *rdev)
199{
200 return ASIC_IS_DCE2(rdev) && !ASIC_IS_NODCE(rdev);
201}
202
203int radeon_audio_init(struct radeon_device *rdev)
204{
205 int i;
206
207 if (!radeon_audio || !radeon_audio_chipset_supported(rdev))
208 return 0;
209
210 rdev->audio.enabled = true;
211
212 if (ASIC_IS_DCE83(rdev)) /* KB: 2 streams, 3 endpoints */
213 rdev->audio.num_pins = 3;
214 else if (ASIC_IS_DCE81(rdev)) /* KV: 4 streams, 7 endpoints */
215 rdev->audio.num_pins = 7;
216 else if (ASIC_IS_DCE8(rdev)) /* BN/HW: 6 streams, 7 endpoints */
217 rdev->audio.num_pins = 7;
218 else if (ASIC_IS_DCE64(rdev)) /* OL: 2 streams, 2 endpoints */
219 rdev->audio.num_pins = 2;
220 else if (ASIC_IS_DCE61(rdev)) /* TN: 4 streams, 6 endpoints */
221 rdev->audio.num_pins = 6;
222 else if (ASIC_IS_DCE6(rdev)) /* SI: 6 streams, 6 endpoints */
223 rdev->audio.num_pins = 6;
224 else
225 rdev->audio.num_pins = 1;
226
227 for (i = 0; i < rdev->audio.num_pins; i++) {
228 rdev->audio.pin[i].channels = -1;
229 rdev->audio.pin[i].rate = -1;
230 rdev->audio.pin[i].bits_per_sample = -1;
231 rdev->audio.pin[i].status_bits = 0;
232 rdev->audio.pin[i].category_code = 0;
233 rdev->audio.pin[i].connected = false;
234 rdev->audio.pin[i].offset = pin_offsets[i];
235 rdev->audio.pin[i].id = i;
Slava Grigorev1a626b62014-12-01 13:49:39 -0500236 }
237
238 radeon_audio_interface_init(rdev);
239
240 /* disable audio. it will be set up later */
241 for (i = 0; i < rdev->audio.num_pins; i++)
Slava Grigorev8bf59822014-12-03 15:29:53 -0500242 radeon_audio_enable(rdev, &rdev->audio.pin[i], false);
Slava Grigorevbfc1f972014-12-22 17:26:51 -0500243
244 return 0;
245}
Slava Grigorev1a626b62014-12-01 13:49:39 -0500246
247void radeon_audio_detect(struct drm_connector *connector,
248 enum drm_connector_status status)
249{
250 if (!connector || !connector->encoder)
251 return;
252
253 if (status == connector_status_connected) {
254 int sink_type;
255 struct radeon_device *rdev = connector->encoder->dev->dev_private;
256 struct radeon_connector *radeon_connector;
257 struct radeon_encoder *radeon_encoder =
258 to_radeon_encoder(connector->encoder);
259
260 if (!drm_detect_monitor_audio(radeon_connector_edid(connector))) {
261 radeon_encoder->audio = 0;
262 return;
263 }
264
265 radeon_connector = to_radeon_connector(connector);
266 sink_type = radeon_dp_getsinktype(radeon_connector);
267
268 if (connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort &&
269 sink_type == CONNECTOR_OBJECT_ID_DISPLAYPORT)
270 radeon_encoder->audio = rdev->audio.dp_funcs;
271 else
272 radeon_encoder->audio = rdev->audio.hdmi_funcs;
273 /* TODO: set up the sads, etc. and set the audio enable_mask */
274 } else {
275 /* TODO: reset the audio enable_mask */
276 }
277}
278
279u32 radeon_audio_endpoint_rreg(struct radeon_device *rdev, u32 offset, u32 reg)
280{
281 if (rdev->audio.funcs->endpoint_rreg)
282 return rdev->audio.funcs->endpoint_rreg(rdev, offset, reg);
283
284 return 0;
285}
286
287void radeon_audio_endpoint_wreg(struct radeon_device *rdev, u32 offset,
288 u32 reg, u32 v)
289{
290 if (rdev->audio.funcs->endpoint_wreg)
291 rdev->audio.funcs->endpoint_wreg(rdev, offset, reg, v);
292}
Alex Deucher070a2e62015-01-22 10:41:55 -0500293
294void radeon_audio_write_sad_regs(struct drm_encoder *encoder)
295{
296 struct radeon_encoder *radeon_encoder;
297 struct drm_connector *connector;
298 struct radeon_connector *radeon_connector = NULL;
299 struct cea_sad *sads;
300 int sad_count;
301
302 list_for_each_entry(connector,
303 &encoder->dev->mode_config.connector_list, head) {
304 if (connector->encoder == encoder) {
305 radeon_connector = to_radeon_connector(connector);
306 break;
307 }
308 }
309
310 if (!radeon_connector) {
311 DRM_ERROR("Couldn't find encoder's connector\n");
312 return;
313 }
314
315 sad_count = drm_edid_to_sad(radeon_connector_edid(connector), &sads);
316 if (sad_count <= 0) {
317 DRM_ERROR("Couldn't read SADs: %d\n", sad_count);
318 return;
319 }
320 BUG_ON(!sads);
321
322 radeon_encoder = to_radeon_encoder(encoder);
323
324 if (radeon_encoder->audio && radeon_encoder->audio->write_sad_regs)
325 radeon_encoder->audio->write_sad_regs(encoder, sads, sad_count);
326
327 kfree(sads);
328}
Slava Grigorev00a9d4b2014-12-01 18:02:57 -0500329
330void radeon_audio_write_speaker_allocation(struct drm_encoder *encoder)
331{
332 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder);
333 struct drm_connector *connector;
334 struct radeon_connector *radeon_connector = NULL;
335 u8 *sadb = NULL;
336 int sad_count;
337
338 list_for_each_entry(connector,
339 &encoder->dev->mode_config.connector_list, head) {
340 if (connector->encoder == encoder) {
341 radeon_connector = to_radeon_connector(connector);
342 break;
343 }
344 }
345
346 if (!radeon_connector) {
347 DRM_ERROR("Couldn't find encoder's connector\n");
348 return;
349 }
350
351 sad_count = drm_edid_to_speaker_allocation(
352 radeon_connector_edid(connector), &sadb);
353 if (sad_count < 0) {
354 DRM_DEBUG("Couldn't read Speaker Allocation Data Block: %d\n",
355 sad_count);
356 sad_count = 0;
357 }
358
359 if (radeon_encoder->audio && radeon_encoder->audio->write_speaker_allocation)
360 radeon_encoder->audio->write_speaker_allocation(encoder, sadb, sad_count);
361
362 kfree(sadb);
363}
Slava Grigorev87654f82014-12-02 11:20:48 -0500364
365void radeon_audio_write_latency_fields(struct drm_encoder *encoder,
366 struct drm_display_mode *mode)
367{
368 struct radeon_encoder *radeon_encoder;
369 struct drm_connector *connector;
370 struct radeon_connector *radeon_connector = 0;
371
372 list_for_each_entry(connector,
373 &encoder->dev->mode_config.connector_list, head) {
374 if (connector->encoder == encoder) {
375 radeon_connector = to_radeon_connector(connector);
376 break;
377 }
378 }
379
380 if (!radeon_connector) {
381 DRM_ERROR("Couldn't find encoder's connector\n");
382 return;
383 }
384
385 radeon_encoder = to_radeon_encoder(encoder);
386
387 if (radeon_encoder->audio && radeon_encoder->audio->write_latency_fields)
388 radeon_encoder->audio->write_latency_fields(encoder, connector, mode);
389}
Slava Grigorev3cdde022014-12-02 15:22:43 -0500390
391struct r600_audio_pin* radeon_audio_get_pin(struct drm_encoder *encoder)
392{
393 struct radeon_device *rdev = encoder->dev->dev_private;
394 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder);
395
396 if (radeon_encoder->audio && radeon_encoder->audio->get_pin)
397 return radeon_encoder->audio->get_pin(rdev);
398
399 return NULL;
400}
Slava Grigorev88252d72014-12-02 17:27:29 -0500401
402void radeon_audio_select_pin(struct drm_encoder *encoder)
403{
404 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder);
405
406 if (radeon_encoder->audio && radeon_encoder->audio->select_pin)
407 radeon_encoder->audio->select_pin(encoder);
408}
Slava Grigorev8bf59822014-12-03 15:29:53 -0500409
410void radeon_audio_enable(struct radeon_device *rdev,
411 struct r600_audio_pin *pin, u8 enable_mask)
412{
413 if (rdev->audio.funcs->enable)
414 rdev->audio.funcs->enable(rdev, pin, enable_mask);
415}
Slava Grigorev7991d662014-12-03 17:07:01 -0500416
417void radeon_audio_fini(struct radeon_device *rdev)
418{
419 int i;
420
421 if (!rdev->audio.enabled)
422 return;
423
424 for (i = 0; i < rdev->audio.num_pins; i++)
425 radeon_audio_enable(rdev, &rdev->audio.pin[i], false);
426
427 rdev->audio.enabled = false;
428}
Slava Grigoreva85d6822014-12-05 13:38:31 -0500429
430void radeon_audio_set_dto(struct drm_encoder *encoder, unsigned int clock)
431{
432 struct radeon_device *rdev = encoder->dev->dev_private;
433 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder);
434 struct radeon_crtc *crtc = to_radeon_crtc(encoder->crtc);
435
436 if (radeon_encoder->audio && radeon_encoder->audio->set_dto)
437 radeon_encoder->audio->set_dto(rdev, crtc, clock);
438}