All of lore.kernel.org
 help / color / mirror / Atom feed
* nouveau optimus HDMI audio support
@ 2013-10-06 21:04 Jethro Beekman
  2013-10-06 22:00 ` Dave Airlie
  0 siblings, 1 reply; 6+ messages in thread
From: Jethro Beekman @ 2013-10-06 21:04 UTC (permalink / raw)
  To: dri-devel

Even with Dave Airlie's recent patch set (
http://lists.freedesktop.org/archives/dri-devel/2013-August/042854.html ), I'm
still having trouble getting HDMI audio to work on my optimus laptop. I'm
running Linux 3.12.0-rc3 on a Lenovo ThinkPad T420s. When I set my BIOS graphics
option to 'Discrete', I get the following two devices in lspci:

01:00.0 VGA compatible controller: NVIDIA Corporation GF119 [Quadro NVS 4200M]
(rev a1)
01:00.1 Audio device: NVIDIA Corporation HDMI Audio stub (rev a1)

When I set the option to 'Optimus', the 01:00.1 device disappears completely.
This is dmesg when loading nouveau in the Optimus configuration:

pci 0000:01:00.0: optimus capabilities: enabled, status dynamic power, hda bios
codec supported
VGA switcheroo: detected Optimus DSM method \_SB_.PCI0.PEG_.VID_ handle
[drm] hdmi device  not found 1 0 1

I modified snd-hda-intel to report which devices it's probing, this is the only
one that shows up:

hda-intel: azx_probe: 0000:00:1b.0

Any ideas what's going on?

Jethro Beekman

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: nouveau optimus HDMI audio support
  2013-10-06 21:04 nouveau optimus HDMI audio support Jethro Beekman
@ 2013-10-06 22:00 ` Dave Airlie
  2013-10-06 22:45   ` Jethro Beekman
  0 siblings, 1 reply; 6+ messages in thread
From: Dave Airlie @ 2013-10-06 22:00 UTC (permalink / raw)
  To: Jethro Beekman; +Cc: dri-devel

On Mon, Oct 7, 2013 at 7:04 AM, Jethro Beekman <dri-devel@jbeekman.nl> wrote:
> Even with Dave Airlie's recent patch set (
> http://lists.freedesktop.org/archives/dri-devel/2013-August/042854.html ), I'm
> still having trouble getting HDMI audio to work on my optimus laptop. I'm
> running Linux 3.12.0-rc3 on a Lenovo ThinkPad T420s. When I set my BIOS graphics
> option to 'Discrete', I get the following two devices in lspci:
>
> 01:00.0 VGA compatible controller: NVIDIA Corporation GF119 [Quadro NVS 4200M]
> (rev a1)
> 01:00.1 Audio device: NVIDIA Corporation HDMI Audio stub (rev a1)
>
> When I set the option to 'Optimus', the 01:00.1 device disappears completely.
> This is dmesg when loading nouveau in the Optimus configuration:
>
> pci 0000:01:00.0: optimus capabilities: enabled, status dynamic power, hda bios
> codec supported
> VGA switcheroo: detected Optimus DSM method \_SB_.PCI0.PEG_.VID_ handle
> [drm] hdmi device  not found 1 0 1
>
> I modified snd-hda-intel to report which devices it's probing, this is the only
> one that shows up:
>
> hda-intel: azx_probe: 0000:00:1b.0
>
> Any ideas what's going on?

Wierd, I wonder does it route the codecs via the other device, though
I can't remember how to see what codecs are available.

The other thing would be to try and hack on the hdmi stub using the
code in my patches that does it after s/r but do it at startup.

Dave.

>
> Jethro Beekman
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: nouveau optimus HDMI audio support
  2013-10-06 22:00 ` Dave Airlie
@ 2013-10-06 22:45   ` Jethro Beekman
  2013-10-06 23:48     ` Dave Airlie
  0 siblings, 1 reply; 6+ messages in thread
From: Jethro Beekman @ 2013-10-06 22:45 UTC (permalink / raw)
  To: dri-devel

On 06-10-13 15:00, Dave Airlie wrote:
> On Mon, Oct 7, 2013 at 7:04 AM, Jethro Beekman <dri-devel@jbeekman.nl> wrote:
>> Even with Dave Airlie's recent patch set (
>> http://lists.freedesktop.org/archives/dri-devel/2013-August/042854.html ), I'm
>> still having trouble getting HDMI audio to work on my optimus laptop. I'm
>> running Linux 3.12.0-rc3 on a Lenovo ThinkPad T420s. When I set my BIOS graphics
>> option to 'Discrete', I get the following two devices in lspci:
>>
>> 01:00.0 VGA compatible controller: NVIDIA Corporation GF119 [Quadro NVS 4200M]
>> (rev a1)
>> 01:00.1 Audio device: NVIDIA Corporation HDMI Audio stub (rev a1)
>>
>> When I set the option to 'Optimus', the 01:00.1 device disappears completely.
>> This is dmesg when loading nouveau in the Optimus configuration:
>>
>> pci 0000:01:00.0: optimus capabilities: enabled, status dynamic power, hda bios
>> codec supported
>> VGA switcheroo: detected Optimus DSM method \_SB_.PCI0.PEG_.VID_ handle
>> [drm] hdmi device  not found 1 0 1
>>
>> I modified snd-hda-intel to report which devices it's probing, this is the only
>> one that shows up:
>>
>> hda-intel: azx_probe: 0000:00:1b.0
>>
>> Any ideas what's going on?
> 
> Wierd, I wonder does it route the codecs via the other device, though
> I can't remember how to see what codecs are available.

/proc/asound/card0/ lists only a single codec which is for analog i/o.

> The other thing would be to try and hack on the hdmi stub using the
> code in my patches that does it after s/r but do it at startup.

Could you be a little more specific? I tried moving nouveau_get_hdmi_dev() later
so we have drm->device setup and then adding the 'do magic' nv_mask() call
before that. That's either not working or something more needs to happen to make
it work.

Jethro

> 
> Dave.
> 
>>
>> Jethro Beekman
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/dri-devel
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: nouveau optimus HDMI audio support
  2013-10-06 22:45   ` Jethro Beekman
@ 2013-10-06 23:48     ` Dave Airlie
  2013-10-07  0:30       ` Jethro Beekman
  0 siblings, 1 reply; 6+ messages in thread
From: Dave Airlie @ 2013-10-06 23:48 UTC (permalink / raw)
  To: Jethro Beekman; +Cc: dri-devel

On Mon, Oct 7, 2013 at 8:45 AM, Jethro Beekman <dri-devel@jbeekman.nl> wrote:
> On 06-10-13 15:00, Dave Airlie wrote:
>> On Mon, Oct 7, 2013 at 7:04 AM, Jethro Beekman <dri-devel@jbeekman.nl> wrote:
>>> Even with Dave Airlie's recent patch set (
>>> http://lists.freedesktop.org/archives/dri-devel/2013-August/042854.html ), I'm
>>> still having trouble getting HDMI audio to work on my optimus laptop. I'm
>>> running Linux 3.12.0-rc3 on a Lenovo ThinkPad T420s. When I set my BIOS graphics
>>> option to 'Discrete', I get the following two devices in lspci:
>>>
>>> 01:00.0 VGA compatible controller: NVIDIA Corporation GF119 [Quadro NVS 4200M]
>>> (rev a1)
>>> 01:00.1 Audio device: NVIDIA Corporation HDMI Audio stub (rev a1)
>>>
>>> When I set the option to 'Optimus', the 01:00.1 device disappears completely.
>>> This is dmesg when loading nouveau in the Optimus configuration:
>>>
>>> pci 0000:01:00.0: optimus capabilities: enabled, status dynamic power, hda bios
>>> codec supported
>>> VGA switcheroo: detected Optimus DSM method \_SB_.PCI0.PEG_.VID_ handle
>>> [drm] hdmi device  not found 1 0 1
>>>
>>> I modified snd-hda-intel to report which devices it's probing, this is the only
>>> one that shows up:
>>>
>>> hda-intel: azx_probe: 0000:00:1b.0
>>>
>>> Any ideas what's going on?
>>
>> Wierd, I wonder does it route the codecs via the other device, though
>> I can't remember how to see what codecs are available.
>
> /proc/asound/card0/ lists only a single codec which is for analog i/o.
>
>> The other thing would be to try and hack on the hdmi stub using the
>> code in my patches that does it after s/r but do it at startup.
>
> Could you be a little more specific? I tried moving nouveau_get_hdmi_dev() later
> so we have drm->device setup and then adding the 'do magic' nv_mask() call
> before that. That's either not working or something more needs to happen to make
> it work.

yeah doing the do magic might not work though since Linux would have to rescan
the PCI bus for the hdmi driver to detect it, I wonder can you poke
registers from grub,
or maybe geneate some sort of pci hotplug even so the other layers notice.

Dave.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: nouveau optimus HDMI audio support
  2013-10-06 23:48     ` Dave Airlie
@ 2013-10-07  0:30       ` Jethro Beekman
  2013-10-07  2:20         ` Dave Airlie
  0 siblings, 1 reply; 6+ messages in thread
From: Jethro Beekman @ 2013-10-07  0:30 UTC (permalink / raw)
  To: Dave Airlie; +Cc: dri-devel



On 06-10-13 16:48, Dave Airlie wrote:
> On Mon, Oct 7, 2013 at 8:45 AM, Jethro Beekman <dri-devel@jbeekman.nl> wrote:
>> On 06-10-13 15:00, Dave Airlie wrote:
>>> On Mon, Oct 7, 2013 at 7:04 AM, Jethro Beekman <dri-devel@jbeekman.nl> wrote:
>>>> Even with Dave Airlie's recent patch set (
>>>> http://lists.freedesktop.org/archives/dri-devel/2013-August/042854.html ), I'm
>>>> still having trouble getting HDMI audio to work on my optimus laptop. I'm
>>>> running Linux 3.12.0-rc3 on a Lenovo ThinkPad T420s. When I set my BIOS graphics
>>>> option to 'Discrete', I get the following two devices in lspci:
>>>>
>>>> 01:00.0 VGA compatible controller: NVIDIA Corporation GF119 [Quadro NVS 4200M]
>>>> (rev a1)
>>>> 01:00.1 Audio device: NVIDIA Corporation HDMI Audio stub (rev a1)
>>>>
>>>> When I set the option to 'Optimus', the 01:00.1 device disappears completely.
>>>> This is dmesg when loading nouveau in the Optimus configuration:
>>>>
>>>> pci 0000:01:00.0: optimus capabilities: enabled, status dynamic power, hda bios
>>>> codec supported
>>>> VGA switcheroo: detected Optimus DSM method \_SB_.PCI0.PEG_.VID_ handle
>>>> [drm] hdmi device  not found 1 0 1
>>>>
>>>> I modified snd-hda-intel to report which devices it's probing, this is the only
>>>> one that shows up:
>>>>
>>>> hda-intel: azx_probe: 0000:00:1b.0
>>>>
>>>> Any ideas what's going on?
>>>
>>> Wierd, I wonder does it route the codecs via the other device, though
>>> I can't remember how to see what codecs are available.
>>
>> /proc/asound/card0/ lists only a single codec which is for analog i/o.
>>
>>> The other thing would be to try and hack on the hdmi stub using the
>>> code in my patches that does it after s/r but do it at startup.
>>
>> Could you be a little more specific? I tried moving nouveau_get_hdmi_dev() later
>> so we have drm->device setup and then adding the 'do magic' nv_mask() call
>> before that. That's either not working or something more needs to happen to make
>> it work.
> 
> yeah doing the do magic might not work though since Linux would have to rescan
> the PCI bus for the hdmi driver to detect it, I wonder can you poke
> registers from grub,
> or maybe geneate some sort of pci hotplug even so the other layers notice.

I added this, copied from the handler for /sys/bus/pci/rescan:

struct pci_bus *b = NULL;

while ((b = pci_find_next_bus(b)) != NULL)
	pci_rescan_bus(b);

No luck... Also tried adding a specific pci_scan_slot().

How did you find out about the magic register? Are we sure that it's supposed to
work on my device?

> 
> Dave.
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: nouveau optimus HDMI audio support
  2013-10-07  0:30       ` Jethro Beekman
@ 2013-10-07  2:20         ` Dave Airlie
  0 siblings, 0 replies; 6+ messages in thread
From: Dave Airlie @ 2013-10-07  2:20 UTC (permalink / raw)
  To: Jethro Beekman; +Cc: dri-devel

On Mon, Oct 7, 2013 at 10:30 AM, Jethro Beekman <dri-devel@jbeekman.nl> wrote:
>
>
> On 06-10-13 16:48, Dave Airlie wrote:
>> On Mon, Oct 7, 2013 at 8:45 AM, Jethro Beekman <dri-devel@jbeekman.nl> wrote:
>>> On 06-10-13 15:00, Dave Airlie wrote:
>>>> On Mon, Oct 7, 2013 at 7:04 AM, Jethro Beekman <dri-devel@jbeekman.nl> wrote:
>>>>> Even with Dave Airlie's recent patch set (
>>>>> http://lists.freedesktop.org/archives/dri-devel/2013-August/042854.html ), I'm
>>>>> still having trouble getting HDMI audio to work on my optimus laptop. I'm
>>>>> running Linux 3.12.0-rc3 on a Lenovo ThinkPad T420s. When I set my BIOS graphics
>>>>> option to 'Discrete', I get the following two devices in lspci:
>>>>>
>>>>> 01:00.0 VGA compatible controller: NVIDIA Corporation GF119 [Quadro NVS 4200M]
>>>>> (rev a1)
>>>>> 01:00.1 Audio device: NVIDIA Corporation HDMI Audio stub (rev a1)
>>>>>
>>>>> When I set the option to 'Optimus', the 01:00.1 device disappears completely.
>>>>> This is dmesg when loading nouveau in the Optimus configuration:
>>>>>
>>>>> pci 0000:01:00.0: optimus capabilities: enabled, status dynamic power, hda bios
>>>>> codec supported
>>>>> VGA switcheroo: detected Optimus DSM method \_SB_.PCI0.PEG_.VID_ handle
>>>>> [drm] hdmi device  not found 1 0 1
>>>>>
>>>>> I modified snd-hda-intel to report which devices it's probing, this is the only
>>>>> one that shows up:
>>>>>
>>>>> hda-intel: azx_probe: 0000:00:1b.0
>>>>>
>>>>> Any ideas what's going on?
>>>>
>>>> Wierd, I wonder does it route the codecs via the other device, though
>>>> I can't remember how to see what codecs are available.
>>>
>>> /proc/asound/card0/ lists only a single codec which is for analog i/o.
>>>
>>>> The other thing would be to try and hack on the hdmi stub using the
>>>> code in my patches that does it after s/r but do it at startup.
>>>
>>> Could you be a little more specific? I tried moving nouveau_get_hdmi_dev() later
>>> so we have drm->device setup and then adding the 'do magic' nv_mask() call
>>> before that. That's either not working or something more needs to happen to make
>>> it work.
>>
>> yeah doing the do magic might not work though since Linux would have to rescan
>> the PCI bus for the hdmi driver to detect it, I wonder can you poke
>> registers from grub,
>> or maybe geneate some sort of pci hotplug even so the other layers notice.
>
> I added this, copied from the handler for /sys/bus/pci/rescan:
>
> struct pci_bus *b = NULL;
>
> while ((b = pci_find_next_bus(b)) != NULL)
>         pci_rescan_bus(b);
>
> No luck... Also tried adding a specific pci_scan_slot().
>
> How did you find out about the magic register? Are we sure that it's supposed to
> work on my device?

No idea, magic is magic for a reason. You can read it back when you
are booted discrete and see if poking it makes hdmi device disappear.

Dave.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-10-07  2:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-06 21:04 nouveau optimus HDMI audio support Jethro Beekman
2013-10-06 22:00 ` Dave Airlie
2013-10-06 22:45   ` Jethro Beekman
2013-10-06 23:48     ` Dave Airlie
2013-10-07  0:30       ` Jethro Beekman
2013-10-07  2:20         ` Dave Airlie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.