Commit e9c9b5b9 authored by Ben Skeggs's avatar Ben Skeggs Committed by Lyude Paul
Browse files

drm/nouveau/disp: add hdmi audio hal function



This just adds a hook for RM to use, HW paths remain untouched, but
should probably be cleaned up to use this too at some point.

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
Reviewed-by: default avatarLyude Paul <lyude@redhat.com>
Acked-by: default avatarDanilo Krummrich <me@dakr.org>
Signed-off-by: default avatarLyude Paul <lyude@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230919220442.202488-26-lyude@redhat.com
parent 5b9c0307
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -74,6 +74,7 @@ struct nvkm_ior_func {
			     bool scrambling_low_rates);
		void (*infoframe_avi)(struct nvkm_ior *, int head, void *data, u32 size);
		void (*infoframe_vsi)(struct nvkm_ior *, int head, void *data, u32 size);
		void (*audio)(struct nvkm_ior *, int head, bool enable);
	} *hdmi;

	const struct nvkm_ior_func_dp {
+9 −1
Original line number Diff line number Diff line
@@ -99,12 +99,20 @@ nvkm_uoutp_mthd_hda_eld(struct nvkm_outp *outp, void *argv, u32 argc)
	if (argc && args->v0.data[0]) {
		if (outp->info.type == DCB_OUTPUT_DP)
			ior->func->dp->audio(ior, args->v0.head, true);
		else
		if (ior->func->hdmi->audio)
			ior->func->hdmi->audio(ior, args->v0.head, true);

		ior->func->hda->hpd(ior, args->v0.head, true);
		ior->func->hda->eld(ior, args->v0.head, args->v0.data, argc);
	} else {
		ior->func->hda->hpd(ior, args->v0.head, false);

		if (outp->info.type == DCB_OUTPUT_DP)
			ior->func->dp->audio(ior, args->v0.head, false);
		ior->func->hda->hpd(ior, args->v0.head, false);
		else
		if (ior->func->hdmi->audio)
			ior->func->hdmi->audio(ior, args->v0.head, false);
	}

	return 0;