From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ@public.gmane.org Subject: [Bug 75985] [NVC1] HDMI audio device only visible after rescan Date: Wed, 03 Jan 2018 20:20:31 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0473124221==" Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: nouveau-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org Sender: "Nouveau" To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org List-Id: nouveau.vger.kernel.org --===============0473124221== Content-Type: multipart/alternative; boundary="15150108312.AdAa.18610"; charset="UTF-8" --15150108312.AdAa.18610 Date: Wed, 3 Jan 2018 20:20:31 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated https://bugs.freedesktop.org/show_bug.cgi?id=3D75985 --- Comment #29 from Karol Herbst --- (In reply to Daniel Drake from comment #22) > Created attachment 136369 [details] [review] > GP104: enable HDMI audio device function >=20 > On Asus GL502VS I investigated why the gfx device must be removed before > rescan in the above workarounds. >=20 > The reason is that when Linux first probes the device (before you attempt > the workaround), pci_setup_device() notes that the device is not > multifunction capable. This causes pci_scan_slot() to not bother scanning > the non-zero functions (per the behaviour inside next_fn()). >=20 > I checked and I found that when the 0x488 magic bit is not set, the gfx > device advertises as non-multifunction. After the bit is set, the device > advertises as multi-function. So, after setting the magic bit, removing t= he > device will cause Linux to re-probe it during the next rescan, taking note > at that point that it is a multi-function device, and proceeding to scan = the > functions, finding the audio device at function 1. >=20 > Based on that I have a first attempt at a fix. It's not working though, > audio output is silent (but I did have it working with the previous > workarounds). I'll look closer next week. I think this check against 0x134 can be something like < 0x82 instead. This thing is there since like G82 GPUs and I am sure the HDMI audio device is controlled like this on all those GPUs. --=20 You are receiving this mail because: You are the assignee for the bug.= --15150108312.AdAa.18610 Date: Wed, 3 Jan 2018 20:20:31 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated

Commen= t # 29 on bug 75985<= /a> from Karol Herbst
(In reply to Daniel Drake from comment #22)
> Created attachment 136369 [deta=
ils] [review] [review]
> GP104: enable HDMI audio device function
>=20
> On Asus GL502VS I investigated why the gfx device must be removed befo=
re
> rescan in the above workarounds.
>=20
> The reason is that when Linux first probes the device (before you atte=
mpt
> the workaround), pci_setup_device() notes that the device is not
> multifunction capable. This causes pci_scan_slot() to not bother scann=
ing
> the non-zero functions (per the behaviour inside next_fn()).
>=20
> I checked and I found that when the 0x488 magic bit is not set, the gfx
> device advertises as non-multifunction. After the bit is set, the devi=
ce
> advertises as multi-function. So, after setting the magic bit, removin=
g the
> device will cause Linux to re-probe it during the next rescan, taking =
note
> at that point that it is a multi-function device, and proceeding to sc=
an the
> functions, finding the audio device at function 1.
>=20
> Based on that I have a first attempt at a fix. It's not working though,
> audio output is silent (but I did have it working with the previous
> workarounds). I'll look closer next week.

I think this check against 0x134 can be something like < 0x82 instead. T=
his
thing is there since like G82 GPUs and I am sure the HDMI audio device is
controlled like this on all those GPUs.


You are receiving this mail because:
  • You are the assignee for the bug.
= --15150108312.AdAa.18610-- --===============0473124221== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KTm91dmVhdSBt YWlsaW5nIGxpc3QKTm91dmVhdUBsaXN0cy5mcmVlZGVza3RvcC5vcmcKaHR0cHM6Ly9saXN0cy5m cmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9ub3V2ZWF1Cg== --===============0473124221==--