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

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
...@@ -74,6 +74,7 @@ struct nvkm_ior_func { ...@@ -74,6 +74,7 @@ struct nvkm_ior_func {
bool scrambling_low_rates); bool scrambling_low_rates);
void (*infoframe_avi)(struct nvkm_ior *, int head, void *data, u32 size); 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 (*infoframe_vsi)(struct nvkm_ior *, int head, void *data, u32 size);
void (*audio)(struct nvkm_ior *, int head, bool enable);
} *hdmi; } *hdmi;
const struct nvkm_ior_func_dp { const struct nvkm_ior_func_dp {
......
...@@ -99,12 +99,20 @@ nvkm_uoutp_mthd_hda_eld(struct nvkm_outp *outp, void *argv, u32 argc) ...@@ -99,12 +99,20 @@ nvkm_uoutp_mthd_hda_eld(struct nvkm_outp *outp, void *argv, u32 argc)
if (argc && args->v0.data[0]) { if (argc && args->v0.data[0]) {
if (outp->info.type == DCB_OUTPUT_DP) if (outp->info.type == DCB_OUTPUT_DP)
ior->func->dp->audio(ior, args->v0.head, true); 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->hpd(ior, args->v0.head, true);
ior->func->hda->eld(ior, args->v0.head, args->v0.data, argc); ior->func->hda->eld(ior, args->v0.head, args->v0.data, argc);
} else { } else {
ior->func->hda->hpd(ior, args->v0.head, false);
if (outp->info.type == DCB_OUTPUT_DP) if (outp->info.type == DCB_OUTPUT_DP)
ior->func->dp->audio(ior, args->v0.head, false); 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; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment