[Nouveau] Only stereo sound with gtx570 over hdmi (regression)
Farid BENAMROUCHE
fariouche at yahoo.fr
Tue Feb 17 05:41:19 PST 2015
Hello Ben,
The working kernel code I based my investigation was a 1.3.17 + gentoo patch (so yes, pretty old)
The new one below, not working is the vanilla 3.19 (from the gentoo repo, should be identical to the latest 3.19 stable)
I've narrowed down the issue to the size of the eld.
The new patch (that indeed uses drm_eld_size) (with this patch, I have a working 3.19 kernel):
I will need to restart my computer with the non working kernel to check the eld output (by the way, what is the ELD?, is it the EDID?)
Thanks
--- drivers/gpu/drm/nouveau/nv50_display.c.orig 2015-02-15 20:04:10.583860698 +0100
+++ drivers/gpu/drm/nouveau/nv50_display.c 2015-02-15 20:46:43.518148777 +0100
@@ -1700,7 +1700,7 @@
memcpy(args.data, nv_connector->base.eld, sizeof(args.data));
nvif_mthd(disp->disp, 0, &args,
- sizeof(args.base) + drm_eld_size(args.data));
+ sizeof(args.base));
}
static void
--------------------------------------------
En date de : Mar 17.2.15, Ben Skeggs <skeggsb at gmail.com> a écrit :
Objet: Re: [Nouveau] Only stereo sound with gtx570 over hdmi (regression)
À: "Farid BENAMROUCHE" <fariouche at yahoo.fr>
Cc: "nouveau at lists.freedesktop.org" <nouveau at lists.freedesktop.org>
Date: Mardi 17 février 2015, 0h47
On Mon, Feb 16, 2015 at
5:03 AM, Farid BENAMROUCHE <fariouche at yahoo.fr>
wrote:
> 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.
There were bugs in the
implementation for a while that could've caused
this problem. However, those should be fixed
already by 3.19. What
kernel version is
your revert against? It's not the latest code,
because that uses drm_eld_size().
Testing on my TV at home
(3.19.0-rc5), I see this in /proc/asound/card1/eld#0.0:
monitor_present 1
eld_valid 1
monitor_name
SAMSUNG
connection_type HDMI
eld_version [0x2] CEA-861D or below
edid_version [0x3] CEA-861-B, C or D
manufacture_id 0x2d4c
product_id 0x69b
port_id 0x0
support_hdcp 0
support_ai 1
audio_sync_delay 0
speakers
[0xf] FL/FR LFE FC RL/RR
sad_count 4
sad0_coding_type [0x1] LPCM
sad0_channels 2
sad0_rates
[0x6e0] 32000 44100 48000 88200 96000
sad0_bits [0xe0000] 16 20 24
sad1_coding_type [0x1] LPCM
sad1_channels 6
sad1_rates
[0x6e0] 32000 44100 48000 88200 96000
sad1_bits [0xe0000] 16 20 24
sad2_coding_type [0x2] AC-3
sad2_channels 6
sad2_rates
[0xe0] 32000 44100 48000
sad2_max_bitrate
640000
sad3_coding_type [0x7] DTS
sad3_channels 6
sad3_rates
[0xe0] 32000 44100 48000
sad3_max_bitrate
1536000
Which looks
correct, and like the code you mention is doing the right
thing.
Thanks,
Ben.
>
> ---
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
>
>
>
_______________________________________________
> Nouveau mailing list
>
Nouveau at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/nouveau
More information about the Nouveau
mailing list