Lines Matching +full:- +full:dig +full:- +full:div

108 	(0x5e00 - 0x5e00),
109 (0x5e18 - 0x5e00),
110 (0x5e30 - 0x5e00),
111 (0x5e48 - 0x5e00),
112 (0x5e60 - 0x5e00),
113 (0x5e78 - 0x5e00),
114 (0x5e90 - 0x5e00),
250 struct radeon_encoder_atom_dig *dig; in radeon_audio_enable() local
256 if (rdev->mode_info.mode_config_initialized) { in radeon_audio_enable()
257 list_for_each_entry(encoder, &rdev->ddev->mode_config.encoder_list, head) { in radeon_audio_enable()
260 dig = radeon_encoder->enc_priv; in radeon_audio_enable()
261 if (dig->pin == pin) in radeon_audio_enable()
270 if (rdev->audio.funcs->enable) in radeon_audio_enable()
271 rdev->audio.funcs->enable(rdev, pin, enable_mask); in radeon_audio_enable()
277 rdev->audio.funcs = &dce6_funcs; in radeon_audio_interface_init()
278 rdev->audio.hdmi_funcs = &dce6_hdmi_funcs; in radeon_audio_interface_init()
279 rdev->audio.dp_funcs = &dce6_dp_funcs; in radeon_audio_interface_init()
281 rdev->audio.funcs = &dce4_funcs; in radeon_audio_interface_init()
282 rdev->audio.hdmi_funcs = &dce4_hdmi_funcs; in radeon_audio_interface_init()
283 rdev->audio.dp_funcs = &dce4_dp_funcs; in radeon_audio_interface_init()
285 rdev->audio.funcs = &dce32_funcs; in radeon_audio_interface_init()
286 rdev->audio.hdmi_funcs = &dce32_hdmi_funcs; in radeon_audio_interface_init()
287 rdev->audio.dp_funcs = &dce32_dp_funcs; in radeon_audio_interface_init()
289 rdev->audio.funcs = &r600_funcs; in radeon_audio_interface_init()
290 rdev->audio.hdmi_funcs = &r600_hdmi_funcs; in radeon_audio_interface_init()
291 rdev->audio.dp_funcs = NULL; in radeon_audio_interface_init()
307 rdev->audio.enabled = true; in radeon_audio_init()
310 rdev->audio.num_pins = 3; in radeon_audio_init()
312 rdev->audio.num_pins = 7; in radeon_audio_init()
314 rdev->audio.num_pins = 7; in radeon_audio_init()
316 rdev->audio.num_pins = 2; in radeon_audio_init()
318 rdev->audio.num_pins = 6; in radeon_audio_init()
320 rdev->audio.num_pins = 6; in radeon_audio_init()
322 rdev->audio.num_pins = 1; in radeon_audio_init()
324 for (i = 0; i < rdev->audio.num_pins; i++) { in radeon_audio_init()
325 rdev->audio.pin[i].channels = -1; in radeon_audio_init()
326 rdev->audio.pin[i].rate = -1; in radeon_audio_init()
327 rdev->audio.pin[i].bits_per_sample = -1; in radeon_audio_init()
328 rdev->audio.pin[i].status_bits = 0; in radeon_audio_init()
329 rdev->audio.pin[i].category_code = 0; in radeon_audio_init()
330 rdev->audio.pin[i].connected = false; in radeon_audio_init()
331 rdev->audio.pin[i].offset = pin_offsets[i]; in radeon_audio_init()
332 rdev->audio.pin[i].id = i; in radeon_audio_init()
338 for (i = 0; i < rdev->audio.num_pins; i++) in radeon_audio_init()
339 radeon_audio_enable(rdev, &rdev->audio.pin[i], 0); in radeon_audio_init()
346 if (rdev->audio.funcs->endpoint_rreg) in radeon_audio_endpoint_rreg()
347 return rdev->audio.funcs->endpoint_rreg(rdev, offset, reg); in radeon_audio_endpoint_rreg()
355 if (rdev->audio.funcs->endpoint_wreg) in radeon_audio_endpoint_wreg()
356 rdev->audio.funcs->endpoint_wreg(rdev, offset, reg, v); in radeon_audio_endpoint_wreg()
376 if (radeon_encoder->audio && radeon_encoder->audio->write_sad_regs) in radeon_audio_write_sad_regs()
377 radeon_encoder->audio->write_sad_regs(encoder, sads, sad_count); in radeon_audio_write_sad_regs()
400 if (radeon_encoder->audio && radeon_encoder->audio->write_speaker_allocation) in radeon_audio_write_speaker_allocation()
401 radeon_encoder->audio->write_speaker_allocation(encoder, sadb, sad_count); in radeon_audio_write_speaker_allocation()
415 if (radeon_encoder->audio && radeon_encoder->audio->write_latency_fields) in radeon_audio_write_latency_fields()
416 radeon_encoder->audio->write_latency_fields(encoder, connector, mode); in radeon_audio_write_latency_fields()
421 struct radeon_device *rdev = encoder->dev->dev_private; in radeon_audio_get_pin()
424 if (radeon_encoder->audio && radeon_encoder->audio->get_pin) in radeon_audio_get_pin()
425 return radeon_encoder->audio->get_pin(rdev); in radeon_audio_get_pin()
434 if (radeon_encoder->audio && radeon_encoder->audio->select_pin) in radeon_audio_select_pin()
435 radeon_encoder->audio->select_pin(encoder); in radeon_audio_select_pin()
442 struct drm_device *dev = connector->dev; in radeon_audio_detect()
443 struct radeon_device *rdev = dev->dev_private; in radeon_audio_detect()
445 struct radeon_encoder_atom_dig *dig; in radeon_audio_detect() local
453 dig = radeon_encoder->enc_priv; in radeon_audio_detect()
456 if (connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort) { in radeon_audio_detect()
461 radeon_encoder->audio = rdev->audio.dp_funcs; in radeon_audio_detect()
463 radeon_encoder->audio = rdev->audio.hdmi_funcs; in radeon_audio_detect()
465 radeon_encoder->audio = rdev->audio.hdmi_funcs; in radeon_audio_detect()
469 if (!dig->pin) in radeon_audio_detect()
470 dig->pin = radeon_audio_get_pin(encoder); in radeon_audio_detect()
471 radeon_audio_enable(rdev, dig->pin, 0xf); in radeon_audio_detect()
473 radeon_audio_enable(rdev, dig->pin, 0); in radeon_audio_detect()
474 dig->pin = NULL; in radeon_audio_detect()
477 radeon_audio_enable(rdev, dig->pin, 0); in radeon_audio_detect()
478 dig->pin = NULL; in radeon_audio_detect()
486 if (!rdev->audio.enabled) in radeon_audio_fini()
489 for (i = 0; i < rdev->audio.num_pins; i++) in radeon_audio_fini()
490 radeon_audio_enable(rdev, &rdev->audio.pin[i], 0); in radeon_audio_fini()
492 rdev->audio.enabled = false; in radeon_audio_fini()
497 struct radeon_device *rdev = encoder->dev->dev_private; in radeon_audio_set_dto()
499 struct radeon_crtc *crtc = to_radeon_crtc(encoder->crtc); in radeon_audio_set_dto()
501 if (radeon_encoder->audio && radeon_encoder->audio->set_dto) in radeon_audio_set_dto()
502 radeon_encoder->audio->set_dto(rdev, crtc, clock); in radeon_audio_set_dto()
508 struct radeon_device *rdev = encoder->dev->dev_private; in radeon_audio_set_avi_packet()
510 struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; in radeon_audio_set_avi_packet() local
517 return -EINVAL; in radeon_audio_set_avi_packet()
525 if (radeon_encoder->output_csc != RADEON_OUTPUT_CSC_BYPASS) { in radeon_audio_set_avi_packet()
527 radeon_encoder->output_csc == RADEON_OUTPUT_CSC_TVRGB ? in radeon_audio_set_avi_packet()
538 if (dig && dig->afmt && radeon_encoder->audio && in radeon_audio_set_avi_packet()
539 radeon_encoder->audio->set_avi_packet) in radeon_audio_set_avi_packet()
540 radeon_encoder->audio->set_avi_packet(rdev, dig->afmt->offset, in radeon_audio_set_avi_packet()
552 unsigned long div, mul; in radeon_audio_calc_cts() local
559 div = gcd(n, cts); in radeon_audio_calc_cts()
561 n /= div; in radeon_audio_calc_cts()
562 cts /= div; in radeon_audio_calc_cts()
568 mul = ((128*freq/1000) + (n-1))/n; in radeon_audio_calc_cts()
626 struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; in radeon_audio_update_acr() local
628 if (!dig || !dig->afmt) in radeon_audio_update_acr()
631 if (radeon_encoder->audio && radeon_encoder->audio->update_acr) in radeon_audio_update_acr()
632 radeon_encoder->audio->update_acr(encoder, dig->afmt->offset, acr); in radeon_audio_update_acr()
638 struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; in radeon_audio_set_vbi_packet() local
640 if (!dig || !dig->afmt) in radeon_audio_set_vbi_packet()
643 if (radeon_encoder->audio && radeon_encoder->audio->set_vbi_packet) in radeon_audio_set_vbi_packet()
644 radeon_encoder->audio->set_vbi_packet(encoder, dig->afmt->offset); in radeon_audio_set_vbi_packet()
651 struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; in radeon_hdmi_set_color_depth() local
653 if (!dig || !dig->afmt) in radeon_hdmi_set_color_depth()
656 if (encoder->crtc) { in radeon_hdmi_set_color_depth()
657 struct radeon_crtc *radeon_crtc = to_radeon_crtc(encoder->crtc); in radeon_hdmi_set_color_depth()
658 bpc = radeon_crtc->bpc; in radeon_hdmi_set_color_depth()
661 if (radeon_encoder->audio && radeon_encoder->audio->set_color_depth) in radeon_hdmi_set_color_depth()
662 radeon_encoder->audio->set_color_depth(encoder, dig->afmt->offset, bpc); in radeon_hdmi_set_color_depth()
668 struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; in radeon_audio_set_audio_packet() local
670 if (!dig || !dig->afmt) in radeon_audio_set_audio_packet()
673 if (radeon_encoder->audio && radeon_encoder->audio->set_audio_packet) in radeon_audio_set_audio_packet()
674 radeon_encoder->audio->set_audio_packet(encoder, dig->afmt->offset); in radeon_audio_set_audio_packet()
680 struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; in radeon_audio_set_mute() local
682 if (!dig || !dig->afmt) in radeon_audio_set_mute()
685 if (radeon_encoder->audio && radeon_encoder->audio->set_mute) in radeon_audio_set_mute()
686 radeon_encoder->audio->set_mute(encoder, dig->afmt->offset, mute); in radeon_audio_set_mute()
696 struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; in radeon_audio_hdmi_mode_set() local
699 if (!dig || !dig->afmt) in radeon_audio_hdmi_mode_set()
711 radeon_audio_set_dto(encoder, mode->clock); in radeon_audio_hdmi_mode_set()
714 radeon_audio_update_acr(encoder, mode->clock); in radeon_audio_hdmi_mode_set()
733 struct drm_device *dev = encoder->dev; in radeon_audio_dp_mode_set()
734 struct radeon_device *rdev = dev->dev_private; in radeon_audio_dp_mode_set()
736 struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; in radeon_audio_dp_mode_set() local
739 if (!dig || !dig->afmt) in radeon_audio_dp_mode_set()
749 radeon_audio_set_dto(encoder, rdev->clock.vco_freq * 10); in radeon_audio_dp_mode_set()
763 if (radeon_encoder->audio && radeon_encoder->audio->mode_set) in radeon_audio_mode_set()
764 radeon_encoder->audio->mode_set(encoder, mode); in radeon_audio_mode_set()
771 if (radeon_encoder->audio && radeon_encoder->audio->dpms) in radeon_audio_dpms()
772 radeon_encoder->audio->dpms(encoder, mode == DRM_MODE_DPMS_ON); in radeon_audio_dpms()
775 unsigned int radeon_audio_decode_dfs_div(unsigned int div) in radeon_audio_decode_dfs_div() argument
777 if (div >= 8 && div < 64) in radeon_audio_decode_dfs_div()
778 return (div - 8) * 25 + 200; in radeon_audio_decode_dfs_div()
779 else if (div >= 64 && div < 96) in radeon_audio_decode_dfs_div()
780 return (div - 64) * 50 + 1600; in radeon_audio_decode_dfs_div()
781 else if (div >= 96 && div < 128) in radeon_audio_decode_dfs_div()
782 return (div - 96) * 100 + 3200; in radeon_audio_decode_dfs_div()