Lines Matching +full:- +full:dig +full:- +full:div
46 (0x5e00 - 0x5e00),
47 (0x5e18 - 0x5e00),
48 (0x5e30 - 0x5e00),
49 (0x5e48 - 0x5e00),
50 (0x5e60 - 0x5e00),
51 (0x5e78 - 0x5e00),
52 (0x5e90 - 0x5e00),
188 struct radeon_encoder_atom_dig *dig; in radeon_audio_enable() local
194 if (rdev->mode_info.mode_config_initialized) { in radeon_audio_enable()
195 list_for_each_entry(encoder, &rdev->ddev->mode_config.encoder_list, head) { in radeon_audio_enable()
198 dig = radeon_encoder->enc_priv; in radeon_audio_enable()
199 if (dig->pin == pin) in radeon_audio_enable()
208 if (rdev->audio.funcs->enable) in radeon_audio_enable()
209 rdev->audio.funcs->enable(rdev, pin, enable_mask); in radeon_audio_enable()
215 rdev->audio.funcs = &dce6_funcs; in radeon_audio_interface_init()
216 rdev->audio.hdmi_funcs = &dce6_hdmi_funcs; in radeon_audio_interface_init()
217 rdev->audio.dp_funcs = &dce6_dp_funcs; in radeon_audio_interface_init()
219 rdev->audio.funcs = &dce4_funcs; in radeon_audio_interface_init()
220 rdev->audio.hdmi_funcs = &dce4_hdmi_funcs; in radeon_audio_interface_init()
221 rdev->audio.dp_funcs = &dce4_dp_funcs; in radeon_audio_interface_init()
223 rdev->audio.funcs = &dce32_funcs; in radeon_audio_interface_init()
224 rdev->audio.hdmi_funcs = &dce32_hdmi_funcs; in radeon_audio_interface_init()
225 rdev->audio.dp_funcs = &dce32_dp_funcs; in radeon_audio_interface_init()
227 rdev->audio.funcs = &r600_funcs; in radeon_audio_interface_init()
228 rdev->audio.hdmi_funcs = &r600_hdmi_funcs; in radeon_audio_interface_init()
229 rdev->audio.dp_funcs = NULL; in radeon_audio_interface_init()
245 rdev->audio.enabled = true; in radeon_audio_init()
248 rdev->audio.num_pins = 3; in radeon_audio_init()
250 rdev->audio.num_pins = 7; in radeon_audio_init()
252 rdev->audio.num_pins = 7; in radeon_audio_init()
254 rdev->audio.num_pins = 2; in radeon_audio_init()
256 rdev->audio.num_pins = 6; in radeon_audio_init()
258 rdev->audio.num_pins = 6; in radeon_audio_init()
260 rdev->audio.num_pins = 1; in radeon_audio_init()
262 for (i = 0; i < rdev->audio.num_pins; i++) { in radeon_audio_init()
263 rdev->audio.pin[i].channels = -1; in radeon_audio_init()
264 rdev->audio.pin[i].rate = -1; in radeon_audio_init()
265 rdev->audio.pin[i].bits_per_sample = -1; in radeon_audio_init()
266 rdev->audio.pin[i].status_bits = 0; in radeon_audio_init()
267 rdev->audio.pin[i].category_code = 0; in radeon_audio_init()
268 rdev->audio.pin[i].connected = false; in radeon_audio_init()
269 rdev->audio.pin[i].offset = pin_offsets[i]; in radeon_audio_init()
270 rdev->audio.pin[i].id = i; in radeon_audio_init()
276 for (i = 0; i < rdev->audio.num_pins; i++) in radeon_audio_init()
277 radeon_audio_enable(rdev, &rdev->audio.pin[i], 0); in radeon_audio_init()
284 if (rdev->audio.funcs->endpoint_rreg) in radeon_audio_endpoint_rreg()
285 return rdev->audio.funcs->endpoint_rreg(rdev, offset, reg); in radeon_audio_endpoint_rreg()
293 if (rdev->audio.funcs->endpoint_wreg) in radeon_audio_endpoint_wreg()
294 rdev->audio.funcs->endpoint_wreg(rdev, offset, reg, v); in radeon_audio_endpoint_wreg()
314 if (radeon_encoder->audio && radeon_encoder->audio->write_sad_regs) in radeon_audio_write_sad_regs()
315 radeon_encoder->audio->write_sad_regs(encoder, sads, sad_count); in radeon_audio_write_sad_regs()
338 if (radeon_encoder->audio && radeon_encoder->audio->write_speaker_allocation) in radeon_audio_write_speaker_allocation()
339 radeon_encoder->audio->write_speaker_allocation(encoder, sadb, sad_count); in radeon_audio_write_speaker_allocation()
353 if (radeon_encoder->audio && radeon_encoder->audio->write_latency_fields) in radeon_audio_write_latency_fields()
354 radeon_encoder->audio->write_latency_fields(encoder, connector, mode); in radeon_audio_write_latency_fields()
359 struct radeon_device *rdev = encoder->dev->dev_private; in radeon_audio_get_pin()
362 if (radeon_encoder->audio && radeon_encoder->audio->get_pin) in radeon_audio_get_pin()
363 return radeon_encoder->audio->get_pin(rdev); in radeon_audio_get_pin()
372 if (radeon_encoder->audio && radeon_encoder->audio->select_pin) in radeon_audio_select_pin()
373 radeon_encoder->audio->select_pin(encoder); in radeon_audio_select_pin()
380 struct drm_device *dev = connector->dev; in radeon_audio_detect()
381 struct radeon_device *rdev = dev->dev_private; in radeon_audio_detect()
383 struct radeon_encoder_atom_dig *dig; in radeon_audio_detect() local
391 dig = radeon_encoder->enc_priv; in radeon_audio_detect()
394 if (connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort) { in radeon_audio_detect()
399 radeon_encoder->audio = rdev->audio.dp_funcs; in radeon_audio_detect()
401 radeon_encoder->audio = rdev->audio.hdmi_funcs; in radeon_audio_detect()
403 radeon_encoder->audio = rdev->audio.hdmi_funcs; in radeon_audio_detect()
407 if (!dig->pin) in radeon_audio_detect()
408 dig->pin = radeon_audio_get_pin(encoder); in radeon_audio_detect()
409 radeon_audio_enable(rdev, dig->pin, 0xf); in radeon_audio_detect()
411 radeon_audio_enable(rdev, dig->pin, 0); in radeon_audio_detect()
412 dig->pin = NULL; in radeon_audio_detect()
415 radeon_audio_enable(rdev, dig->pin, 0); in radeon_audio_detect()
416 dig->pin = NULL; in radeon_audio_detect()
424 if (!rdev->audio.enabled) in radeon_audio_fini()
427 for (i = 0; i < rdev->audio.num_pins; i++) in radeon_audio_fini()
428 radeon_audio_enable(rdev, &rdev->audio.pin[i], 0); in radeon_audio_fini()
430 rdev->audio.enabled = false; in radeon_audio_fini()
435 struct radeon_device *rdev = encoder->dev->dev_private; in radeon_audio_set_dto()
437 struct radeon_crtc *crtc = to_radeon_crtc(encoder->crtc); in radeon_audio_set_dto()
439 if (radeon_encoder->audio && radeon_encoder->audio->set_dto) in radeon_audio_set_dto()
440 radeon_encoder->audio->set_dto(rdev, crtc, clock); in radeon_audio_set_dto()
446 struct radeon_device *rdev = encoder->dev->dev_private; in radeon_audio_set_avi_packet()
448 struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; in radeon_audio_set_avi_packet() local
455 return -EINVAL; in radeon_audio_set_avi_packet()
463 if (radeon_encoder->output_csc != RADEON_OUTPUT_CSC_BYPASS) { in radeon_audio_set_avi_packet()
465 radeon_encoder->output_csc == RADEON_OUTPUT_CSC_TVRGB ? in radeon_audio_set_avi_packet()
476 if (dig && dig->afmt && radeon_encoder->audio && in radeon_audio_set_avi_packet()
477 radeon_encoder->audio->set_avi_packet) in radeon_audio_set_avi_packet()
478 radeon_encoder->audio->set_avi_packet(rdev, dig->afmt->offset, in radeon_audio_set_avi_packet()
490 unsigned long div, mul; in radeon_audio_calc_cts() local
497 div = gcd(n, cts); in radeon_audio_calc_cts()
499 n /= div; in radeon_audio_calc_cts()
500 cts /= div; in radeon_audio_calc_cts()
506 mul = ((128*freq/1000) + (n-1))/n; in radeon_audio_calc_cts()
564 struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; in radeon_audio_update_acr() local
566 if (!dig || !dig->afmt) in radeon_audio_update_acr()
569 if (radeon_encoder->audio && radeon_encoder->audio->update_acr) in radeon_audio_update_acr()
570 radeon_encoder->audio->update_acr(encoder, dig->afmt->offset, acr); in radeon_audio_update_acr()
576 struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; in radeon_audio_set_vbi_packet() local
578 if (!dig || !dig->afmt) in radeon_audio_set_vbi_packet()
581 if (radeon_encoder->audio && radeon_encoder->audio->set_vbi_packet) in radeon_audio_set_vbi_packet()
582 radeon_encoder->audio->set_vbi_packet(encoder, dig->afmt->offset); in radeon_audio_set_vbi_packet()
589 struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; in radeon_hdmi_set_color_depth() local
591 if (!dig || !dig->afmt) in radeon_hdmi_set_color_depth()
594 if (encoder->crtc) { in radeon_hdmi_set_color_depth()
595 struct radeon_crtc *radeon_crtc = to_radeon_crtc(encoder->crtc); in radeon_hdmi_set_color_depth()
596 bpc = radeon_crtc->bpc; in radeon_hdmi_set_color_depth()
599 if (radeon_encoder->audio && radeon_encoder->audio->set_color_depth) in radeon_hdmi_set_color_depth()
600 radeon_encoder->audio->set_color_depth(encoder, dig->afmt->offset, bpc); in radeon_hdmi_set_color_depth()
606 struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; in radeon_audio_set_audio_packet() local
608 if (!dig || !dig->afmt) in radeon_audio_set_audio_packet()
611 if (radeon_encoder->audio && radeon_encoder->audio->set_audio_packet) in radeon_audio_set_audio_packet()
612 radeon_encoder->audio->set_audio_packet(encoder, dig->afmt->offset); in radeon_audio_set_audio_packet()
618 struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; in radeon_audio_set_mute() local
620 if (!dig || !dig->afmt) in radeon_audio_set_mute()
623 if (radeon_encoder->audio && radeon_encoder->audio->set_mute) in radeon_audio_set_mute()
624 radeon_encoder->audio->set_mute(encoder, dig->afmt->offset, mute); in radeon_audio_set_mute()
634 struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; in radeon_audio_hdmi_mode_set() local
637 if (!dig || !dig->afmt) in radeon_audio_hdmi_mode_set()
649 radeon_audio_set_dto(encoder, mode->clock); in radeon_audio_hdmi_mode_set()
652 radeon_audio_update_acr(encoder, mode->clock); in radeon_audio_hdmi_mode_set()
671 struct drm_device *dev = encoder->dev; in radeon_audio_dp_mode_set()
672 struct radeon_device *rdev = dev->dev_private; in radeon_audio_dp_mode_set()
674 struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; in radeon_audio_dp_mode_set() local
677 if (!dig || !dig->afmt) in radeon_audio_dp_mode_set()
687 radeon_audio_set_dto(encoder, rdev->clock.vco_freq * 10); in radeon_audio_dp_mode_set()
701 if (radeon_encoder->audio && radeon_encoder->audio->mode_set) in radeon_audio_mode_set()
702 radeon_encoder->audio->mode_set(encoder, mode); in radeon_audio_mode_set()
709 if (radeon_encoder->audio && radeon_encoder->audio->dpms) in radeon_audio_dpms()
710 radeon_encoder->audio->dpms(encoder, mode == DRM_MODE_DPMS_ON); in radeon_audio_dpms()
713 unsigned int radeon_audio_decode_dfs_div(unsigned int div) in radeon_audio_decode_dfs_div() argument
715 if (div >= 8 && div < 64) in radeon_audio_decode_dfs_div()
716 return (div - 8) * 25 + 200; in radeon_audio_decode_dfs_div()
717 else if (div >= 64 && div < 96) in radeon_audio_decode_dfs_div()
718 return (div - 64) * 50 + 1600; in radeon_audio_decode_dfs_div()
719 else if (div >= 96 && div < 128) in radeon_audio_decode_dfs_div()
720 return (div - 96) * 100 + 3200; in radeon_audio_decode_dfs_div()