Lines Matching full:encoder
42 static void radeon_audio_hdmi_mode_set(struct drm_encoder *encoder,
44 static void radeon_audio_dp_mode_set(struct drm_encoder *encoder,
190 struct drm_encoder *encoder; in radeon_audio_enable() local
199 list_for_each_entry(encoder, &rdev_to_drm(rdev)->mode_config.encoder_list, head) { in radeon_audio_enable()
200 if (radeon_encoder_is_digital(encoder)) { in radeon_audio_enable()
201 radeon_encoder = to_radeon_encoder(encoder); in radeon_audio_enable()
303 static void radeon_audio_write_sad_regs(struct drm_encoder *encoder) in radeon_audio_write_sad_regs() argument
305 struct drm_connector *connector = radeon_get_connector_for_encoder(encoder); in radeon_audio_write_sad_regs()
307 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_audio_write_sad_regs()
322 radeon_encoder->audio->write_sad_regs(encoder, sads, sad_count); in radeon_audio_write_sad_regs()
327 static void radeon_audio_write_speaker_allocation(struct drm_encoder *encoder) in radeon_audio_write_speaker_allocation() argument
329 struct drm_connector *connector = radeon_get_connector_for_encoder(encoder); in radeon_audio_write_speaker_allocation()
331 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_audio_write_speaker_allocation()
346 radeon_encoder->audio->write_speaker_allocation(encoder, sadb, sad_count); in radeon_audio_write_speaker_allocation()
351 static void radeon_audio_write_latency_fields(struct drm_encoder *encoder, in radeon_audio_write_latency_fields() argument
354 struct drm_connector *connector = radeon_get_connector_for_encoder(encoder); in radeon_audio_write_latency_fields()
355 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_audio_write_latency_fields()
361 radeon_encoder->audio->write_latency_fields(encoder, connector, mode); in radeon_audio_write_latency_fields()
364 struct r600_audio_pin *radeon_audio_get_pin(struct drm_encoder *encoder) in radeon_audio_get_pin() argument
366 struct radeon_device *rdev = encoder->dev->dev_private; in radeon_audio_get_pin()
367 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_audio_get_pin()
375 static void radeon_audio_select_pin(struct drm_encoder *encoder) in radeon_audio_select_pin() argument
377 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_audio_select_pin()
380 radeon_encoder->audio->select_pin(encoder); in radeon_audio_select_pin()
384 struct drm_encoder *encoder, in radeon_audio_detect() argument
389 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_audio_detect()
395 if (!radeon_encoder_is_digital(encoder)) in radeon_audio_detect()
415 dig->pin = radeon_audio_get_pin(encoder); in radeon_audio_detect()
440 static void radeon_audio_set_dto(struct drm_encoder *encoder, unsigned int clock) in radeon_audio_set_dto() argument
442 struct radeon_device *rdev = encoder->dev->dev_private; in radeon_audio_set_dto()
443 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_audio_set_dto()
444 struct radeon_crtc *crtc = to_radeon_crtc(encoder->crtc); in radeon_audio_set_dto()
450 static int radeon_audio_set_avi_packet(struct drm_encoder *encoder, in radeon_audio_set_avi_packet() argument
453 struct radeon_device *rdev = encoder->dev->dev_private; in radeon_audio_set_avi_packet()
454 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_audio_set_avi_packet()
456 struct drm_connector *connector = radeon_get_connector_for_encoder(encoder); in radeon_audio_set_avi_packet()
567 static void radeon_audio_update_acr(struct drm_encoder *encoder, unsigned int clock) in radeon_audio_update_acr() argument
570 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_audio_update_acr()
577 radeon_encoder->audio->update_acr(encoder, dig->afmt->offset, acr); in radeon_audio_update_acr()
580 static void radeon_audio_set_vbi_packet(struct drm_encoder *encoder) in radeon_audio_set_vbi_packet() argument
582 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_audio_set_vbi_packet()
589 radeon_encoder->audio->set_vbi_packet(encoder, dig->afmt->offset); in radeon_audio_set_vbi_packet()
592 static void radeon_hdmi_set_color_depth(struct drm_encoder *encoder) in radeon_hdmi_set_color_depth() argument
595 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_hdmi_set_color_depth()
601 if (encoder->crtc) { in radeon_hdmi_set_color_depth()
602 struct radeon_crtc *radeon_crtc = to_radeon_crtc(encoder->crtc); in radeon_hdmi_set_color_depth()
607 radeon_encoder->audio->set_color_depth(encoder, dig->afmt->offset, bpc); in radeon_hdmi_set_color_depth()
610 static void radeon_audio_set_audio_packet(struct drm_encoder *encoder) in radeon_audio_set_audio_packet() argument
612 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_audio_set_audio_packet()
619 radeon_encoder->audio->set_audio_packet(encoder, dig->afmt->offset); in radeon_audio_set_audio_packet()
622 static void radeon_audio_set_mute(struct drm_encoder *encoder, bool mute) in radeon_audio_set_mute() argument
624 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_audio_set_mute()
631 radeon_encoder->audio->set_mute(encoder, dig->afmt->offset, mute); in radeon_audio_set_mute()
637 static void radeon_audio_hdmi_mode_set(struct drm_encoder *encoder, in radeon_audio_hdmi_mode_set() argument
640 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_audio_hdmi_mode_set()
642 struct drm_connector *connector = radeon_get_connector_for_encoder(encoder); in radeon_audio_hdmi_mode_set()
651 radeon_audio_set_mute(encoder, true); in radeon_audio_hdmi_mode_set()
653 radeon_audio_write_speaker_allocation(encoder); in radeon_audio_hdmi_mode_set()
654 radeon_audio_write_sad_regs(encoder); in radeon_audio_hdmi_mode_set()
655 radeon_audio_write_latency_fields(encoder, mode); in radeon_audio_hdmi_mode_set()
656 radeon_audio_set_dto(encoder, mode->clock); in radeon_audio_hdmi_mode_set()
657 radeon_audio_set_vbi_packet(encoder); in radeon_audio_hdmi_mode_set()
658 radeon_hdmi_set_color_depth(encoder); in radeon_audio_hdmi_mode_set()
659 radeon_audio_update_acr(encoder, mode->clock); in radeon_audio_hdmi_mode_set()
660 radeon_audio_set_audio_packet(encoder); in radeon_audio_hdmi_mode_set()
661 radeon_audio_select_pin(encoder); in radeon_audio_hdmi_mode_set()
663 if (radeon_audio_set_avi_packet(encoder, mode) < 0) in radeon_audio_hdmi_mode_set()
666 radeon_audio_set_mute(encoder, false); in radeon_audio_hdmi_mode_set()
668 radeon_hdmi_set_color_depth(encoder); in radeon_audio_hdmi_mode_set()
670 if (radeon_audio_set_avi_packet(encoder, mode) < 0) in radeon_audio_hdmi_mode_set()
675 static void radeon_audio_dp_mode_set(struct drm_encoder *encoder, in radeon_audio_dp_mode_set() argument
678 struct drm_device *dev = encoder->dev; in radeon_audio_dp_mode_set()
680 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_audio_dp_mode_set()
682 struct drm_connector *connector = radeon_get_connector_for_encoder(encoder); in radeon_audio_dp_mode_set()
691 radeon_audio_write_speaker_allocation(encoder); in radeon_audio_dp_mode_set()
692 radeon_audio_write_sad_regs(encoder); in radeon_audio_dp_mode_set()
693 radeon_audio_write_latency_fields(encoder, mode); in radeon_audio_dp_mode_set()
694 radeon_audio_set_dto(encoder, rdev->clock.vco_freq * 10); in radeon_audio_dp_mode_set()
695 radeon_audio_set_audio_packet(encoder); in radeon_audio_dp_mode_set()
696 radeon_audio_select_pin(encoder); in radeon_audio_dp_mode_set()
698 if (radeon_audio_set_avi_packet(encoder, mode) < 0) in radeon_audio_dp_mode_set()
703 void radeon_audio_mode_set(struct drm_encoder *encoder, in radeon_audio_mode_set() argument
706 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_audio_mode_set()
709 radeon_encoder->audio->mode_set(encoder, mode); in radeon_audio_mode_set()
712 void radeon_audio_dpms(struct drm_encoder *encoder, int mode) in radeon_audio_dpms() argument
714 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_audio_dpms()
717 radeon_encoder->audio->dpms(encoder, mode == DRM_MODE_DPMS_ON); in radeon_audio_dpms()
753 struct drm_encoder *encoder; in radeon_audio_component_get_eld() local
763 list_for_each_entry(encoder, &rdev_to_drm(rdev)->mode_config.encoder_list, head) { in radeon_audio_component_get_eld()
764 if (!radeon_encoder_is_digital(encoder)) in radeon_audio_component_get_eld()
766 radeon_encoder = to_radeon_encoder(encoder); in radeon_audio_component_get_eld()
770 connector = radeon_get_connector_for_encoder(encoder); in radeon_audio_component_get_eld()