Lines Matching full:encoder

40 static void radeon_audio_hdmi_mode_set(struct drm_encoder *encoder,
42 static void radeon_audio_dp_mode_set(struct drm_encoder *encoder,
189 struct drm_encoder *encoder; in radeon_audio_enable() local
198 list_for_each_entry(encoder, &rdev_to_drm(rdev)->mode_config.encoder_list, head) { in radeon_audio_enable()
199 if (radeon_encoder_is_digital(encoder)) { in radeon_audio_enable()
200 radeon_encoder = to_radeon_encoder(encoder); in radeon_audio_enable()
302 static void radeon_audio_write_sad_regs(struct drm_encoder *encoder) in radeon_audio_write_sad_regs() argument
304 struct drm_connector *connector = radeon_get_connector_for_encoder(encoder); in radeon_audio_write_sad_regs()
305 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_audio_write_sad_regs()
320 radeon_encoder->audio->write_sad_regs(encoder, sads, sad_count); in radeon_audio_write_sad_regs()
325 static void radeon_audio_write_speaker_allocation(struct drm_encoder *encoder) in radeon_audio_write_speaker_allocation() argument
327 struct drm_connector *connector = radeon_get_connector_for_encoder(encoder); in radeon_audio_write_speaker_allocation()
328 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_audio_write_speaker_allocation()
344 radeon_encoder->audio->write_speaker_allocation(encoder, sadb, sad_count); in radeon_audio_write_speaker_allocation()
349 static void radeon_audio_write_latency_fields(struct drm_encoder *encoder, in radeon_audio_write_latency_fields() argument
352 struct drm_connector *connector = radeon_get_connector_for_encoder(encoder); in radeon_audio_write_latency_fields()
353 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_audio_write_latency_fields()
359 radeon_encoder->audio->write_latency_fields(encoder, connector, mode); in radeon_audio_write_latency_fields()
362 struct r600_audio_pin* radeon_audio_get_pin(struct drm_encoder *encoder) in radeon_audio_get_pin() argument
364 struct radeon_device *rdev = encoder->dev->dev_private; in radeon_audio_get_pin()
365 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_audio_get_pin()
373 static void radeon_audio_select_pin(struct drm_encoder *encoder) in radeon_audio_select_pin() argument
375 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_audio_select_pin()
378 radeon_encoder->audio->select_pin(encoder); in radeon_audio_select_pin()
382 struct drm_encoder *encoder, in radeon_audio_detect() argument
387 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_audio_detect()
393 if (!radeon_encoder_is_digital(encoder)) in radeon_audio_detect()
413 dig->pin = radeon_audio_get_pin(encoder); in radeon_audio_detect()
438 static void radeon_audio_set_dto(struct drm_encoder *encoder, unsigned int clock) in radeon_audio_set_dto() argument
440 struct radeon_device *rdev = encoder->dev->dev_private; in radeon_audio_set_dto()
441 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_audio_set_dto()
442 struct radeon_crtc *crtc = to_radeon_crtc(encoder->crtc); in radeon_audio_set_dto()
448 static int radeon_audio_set_avi_packet(struct drm_encoder *encoder, in radeon_audio_set_avi_packet() argument
451 struct radeon_device *rdev = encoder->dev->dev_private; in radeon_audio_set_avi_packet()
452 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_audio_set_avi_packet()
454 struct drm_connector *connector = radeon_get_connector_for_encoder(encoder); in radeon_audio_set_avi_packet()
565 static void radeon_audio_update_acr(struct drm_encoder *encoder, unsigned int clock) in radeon_audio_update_acr() argument
568 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_audio_update_acr()
575 radeon_encoder->audio->update_acr(encoder, dig->afmt->offset, acr); in radeon_audio_update_acr()
578 static void radeon_audio_set_vbi_packet(struct drm_encoder *encoder) in radeon_audio_set_vbi_packet() argument
580 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_audio_set_vbi_packet()
587 radeon_encoder->audio->set_vbi_packet(encoder, dig->afmt->offset); in radeon_audio_set_vbi_packet()
590 static void radeon_hdmi_set_color_depth(struct drm_encoder *encoder) in radeon_hdmi_set_color_depth() argument
593 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_hdmi_set_color_depth()
599 if (encoder->crtc) { in radeon_hdmi_set_color_depth()
600 struct radeon_crtc *radeon_crtc = to_radeon_crtc(encoder->crtc); in radeon_hdmi_set_color_depth()
605 radeon_encoder->audio->set_color_depth(encoder, dig->afmt->offset, bpc); in radeon_hdmi_set_color_depth()
608 static void radeon_audio_set_audio_packet(struct drm_encoder *encoder) in radeon_audio_set_audio_packet() argument
610 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_audio_set_audio_packet()
617 radeon_encoder->audio->set_audio_packet(encoder, dig->afmt->offset); in radeon_audio_set_audio_packet()
620 static void radeon_audio_set_mute(struct drm_encoder *encoder, bool mute) in radeon_audio_set_mute() argument
622 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_audio_set_mute()
629 radeon_encoder->audio->set_mute(encoder, dig->afmt->offset, mute); in radeon_audio_set_mute()
635 static void radeon_audio_hdmi_mode_set(struct drm_encoder *encoder, in radeon_audio_hdmi_mode_set() argument
638 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_audio_hdmi_mode_set()
640 struct drm_connector *connector = radeon_get_connector_for_encoder(encoder); in radeon_audio_hdmi_mode_set()
649 radeon_audio_set_mute(encoder, true); in radeon_audio_hdmi_mode_set()
651 radeon_audio_write_speaker_allocation(encoder); in radeon_audio_hdmi_mode_set()
652 radeon_audio_write_sad_regs(encoder); in radeon_audio_hdmi_mode_set()
653 radeon_audio_write_latency_fields(encoder, mode); in radeon_audio_hdmi_mode_set()
654 radeon_audio_set_dto(encoder, mode->clock); in radeon_audio_hdmi_mode_set()
655 radeon_audio_set_vbi_packet(encoder); in radeon_audio_hdmi_mode_set()
656 radeon_hdmi_set_color_depth(encoder); in radeon_audio_hdmi_mode_set()
657 radeon_audio_update_acr(encoder, mode->clock); in radeon_audio_hdmi_mode_set()
658 radeon_audio_set_audio_packet(encoder); in radeon_audio_hdmi_mode_set()
659 radeon_audio_select_pin(encoder); in radeon_audio_hdmi_mode_set()
661 if (radeon_audio_set_avi_packet(encoder, mode) < 0) in radeon_audio_hdmi_mode_set()
664 radeon_audio_set_mute(encoder, false); in radeon_audio_hdmi_mode_set()
666 radeon_hdmi_set_color_depth(encoder); in radeon_audio_hdmi_mode_set()
668 if (radeon_audio_set_avi_packet(encoder, mode) < 0) in radeon_audio_hdmi_mode_set()
673 static void radeon_audio_dp_mode_set(struct drm_encoder *encoder, in radeon_audio_dp_mode_set() argument
676 struct drm_device *dev = encoder->dev; in radeon_audio_dp_mode_set()
678 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_audio_dp_mode_set()
680 struct drm_connector *connector = radeon_get_connector_for_encoder(encoder); in radeon_audio_dp_mode_set()
689 radeon_audio_write_speaker_allocation(encoder); in radeon_audio_dp_mode_set()
690 radeon_audio_write_sad_regs(encoder); in radeon_audio_dp_mode_set()
691 radeon_audio_write_latency_fields(encoder, mode); in radeon_audio_dp_mode_set()
692 radeon_audio_set_dto(encoder, rdev->clock.vco_freq * 10); in radeon_audio_dp_mode_set()
693 radeon_audio_set_audio_packet(encoder); in radeon_audio_dp_mode_set()
694 radeon_audio_select_pin(encoder); in radeon_audio_dp_mode_set()
696 if (radeon_audio_set_avi_packet(encoder, mode) < 0) in radeon_audio_dp_mode_set()
701 void radeon_audio_mode_set(struct drm_encoder *encoder, in radeon_audio_mode_set() argument
704 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_audio_mode_set()
707 radeon_encoder->audio->mode_set(encoder, mode); in radeon_audio_mode_set()
710 void radeon_audio_dpms(struct drm_encoder *encoder, int mode) in radeon_audio_dpms() argument
712 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_audio_dpms()
715 radeon_encoder->audio->dpms(encoder, mode == DRM_MODE_DPMS_ON); in radeon_audio_dpms()
751 struct drm_encoder *encoder; in radeon_audio_component_get_eld() local
764 encoder = connector_funcs->best_encoder(connector); in radeon_audio_component_get_eld()
766 if (!encoder) in radeon_audio_component_get_eld()
769 if (!radeon_encoder_is_digital(encoder)) in radeon_audio_component_get_eld()
771 radeon_encoder = to_radeon_encoder(encoder); in radeon_audio_component_get_eld()