[Nouveau] Only stereo sound with gtx570 over hdmi (regression)

Farid BENAMROUCHE fariouche at yahoo.fr
Sun Feb 15 11:03:26 PST 2015


Hello all,

I'm using gentoo, with kernel 3.17.0-p1-pf and at some point, a patch was included in this branch of the gentoo kernel that broke hdmi audio.

I've checked with the latest 3.19 vanilla kernel, and I still have the same problem. I cannot output multichannel sound over hdmi.

After some investigations, I've narrowed down the issue to the following lines in the file nv50_display.c:

(the structure slightly changed and declared "packed". Reverting this change made the multichannel audio back)
I still do not known exactly when this modification was introoduced. If you need more details, please let me know.

--- working_kernel/drivers/gpu/drm/nouveau/nv50_display.c
+++ not_working_kernel/drivers/gpu/drm/nouveau/nv50_display.c
@@ -1653,15 +1653,17 @@
        struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
        struct nouveau_connector *nv_connector;
        struct nv50_disp *disp = nv50_disp(encoder->dev);
-       struct {
-               struct nv50_disp_mthd_v1 base;
-               struct nv50_disp_sor_hda_eld_v0 eld;
+       struct __packed {
+               struct {
+                       struct nv50_disp_mthd_v1 mthd;
+                       struct nv50_disp_sor_hda_eld_v0 eld;
+               } base;
                u8 data[sizeof(nv_connector->base.eld)];
        } args = {
-               .base.version = 1,
-               .base.method  = NV50_DISP_MTHD_V1_SOR_HDA_ELD,
-               .base.hasht   = nv_encoder->dcb->hasht,
-               .base.hashm   = nv_encoder->dcb->hashm,
+               .base.mthd.version = 1,
+               .base.mthd.method  = NV50_DISP_MTHD_V1_SOR_HDA_ELD,
+               .base.mthd.hasht   = nv_encoder->dcb->hasht,
+               .base.mthd.hashm   = nv_encoder->dcb->hashm,
        };

        nv_connector = nouveau_encoder_connector_get(nv_encoder);
@@ -1671,7 +1673,7 @@
        drm_edid_to_eld(&nv_connector->base, nv_connector->edid);
        memcpy(args.data, nv_connector->base.eld, sizeof(args.data));

-       nvif_mthd(disp->disp, 0, &args, sizeof(args));
+       nvif_mthd(disp->disp, 0, &args, sizeof(args.base) + args.data[2] * 4);
 }

 static void




More information about the Nouveau mailing list