Re: [patch] azalia: Intel 300 Series HD Audio

2020-06-08 Thread Jonathan Gray
On Mon, Jun 08, 2020 at 09:14:36PM -0600, bobby wrote:
> On Sun, May 31, 2020 at 12:38:55PM +0200, Bruno Flueckiger wrote:
> > On 31.05., Benjamin Baier wrote:
> > > On Fri, 29 May 2020 11:25:44 +0200
> > > Bruno Flueckiger  wrote:
> > >
> > > > Hi,
> > > >
> > > > My brand new laptop HP EliteBook 850 G6 comes with an Intel 300 Series
> > > > HD Audio device rev 0x11. The device shows up as not configured in the
> > > > dmesg. The PCI config space of the device identifies its subclass as
> > > > PCI_SUBCLASS_MULTIMEDIA_AUDIO instead of PCI_SUBCLASS_MULTIMEDIA_HDAUDIO
> > > >
> > > > The patch below makes the device work just fine on my laptop.
> > > >
> > > > Cheers,
> > > > Bruno
> > > >
> > > > Index: sys/dev/pci/azalia.c
> > > > ===
> > > > RCS file: /cvs/src/sys/dev/pci/azalia.c,v
> > > > retrieving revision 1.255
> > > > diff -u -p -r1.255 azalia.c
> > > > --- sys/dev/pci/azalia.c18 Apr 2020 21:55:56 -  1.255
> > > > +++ sys/dev/pci/azalia.c28 May 2020 13:48:10 -
> > > > @@ -481,7 +481,8 @@ azalia_pci_match(struct device *parent,
> > > >
> > > > pa = aux;
> > > > if (PCI_CLASS(pa->pa_class) == PCI_CLASS_MULTIMEDIA
> > > > -   && PCI_SUBCLASS(pa->pa_class) == 
> > > > PCI_SUBCLASS_MULTIMEDIA_HDAUDIO)
> > > > +   && (PCI_SUBCLASS(pa->pa_class) == 
> > > > PCI_SUBCLASS_MULTIMEDIA_HDAUDIO
> > > > +   || PCI_SUBCLASS(pa->pa_class) == 
> > > > PCI_SUBCLASS_MULTIMEDIA_AUDIO))
> > > > return 1;
> > > > return 0;
> > > >  }
> > > >
> > >
> > > Hi.
> > >
> > > Does your Laptop run with the latest BIOS? There was one released on May 
> > > 11th.
> > > https://support.hp.com/de-de/drivers/selfservice/swdetails/hp-elitebook-850-g6-notebook-pc/26609805/swItemId/ob-251060-1
> > > The release notes state: Fixes an issue where the audio on the system 
> > > stops functioning after the Intel Active Management Technology (AMT) 
> > > option is disabled.
> > >
> > > The azalia patch is in but I would prefer HP to fix their BIOS instead.
> > >
> > > Greetings Ben
> > >
> > 
> > Hi Ben,
> > 
> > I've upgraded the firmware to the latest available release, but the
> > audio device still reports with the wrong subclass in its PCI config
> > space.
> > 
> > I agree that HP should rather fix their firmware. I still try to find
> > out how to report this problem to HP in a way that doesn't get ignored.
> > 
> > Cheers,
> > Bruno
> > 
> 
> My laptop, Lenovo C930, needs the same matching to attach azalia, I have the 
> newest bios fyi.  Patch and pcidump below.

thanks, committed with order sorted

> 
> 
> Index: sys/dev/pci/azalia.c
> ===
> RCS file: /cvs/src/sys/dev/pci/azalia.c,v
> retrieving revision 1.256
> diff -u -p -u -p -r1.256 azalia.c
> --- sys/dev/pci/azalia.c  31 May 2020 04:58:38 -  1.256
> +++ sys/dev/pci/azalia.c  9 Jun 2020 02:59:36 -
> @@ -475,7 +475,8 @@ azalia_configure_pci(azalia_t *az)
>  }
>  
>  const struct pci_matchid azalia_pci_devices[] = {
> - { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_300SERIES_U_HDA }
> + { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_300SERIES_U_HDA },
> + { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_200SERIES_U_HDA }
>  };
>  
>  int
> 
> 
> 
> Domain /dev/pci0:
>  0:0:0: Intel Core 8G Host
>   0x: Vendor ID: 8086, Product ID: 5914
>   0x0004: Command: 0006, Status: 2090
>   0x0008: Class: 06 Bridge, Subclass: 00 Host,
>   Interface: 00, Revision: 08
>   0x000c: BIST: 00, Header Type: 00, Latency Timer: 00,
>   Cache Line Size: 00
>   0x0010: BAR empty ()
>   0x0014: BAR empty ()
>   0x0018: BAR empty ()
>   0x001c: BAR empty ()
>   0x0020: BAR empty ()
>   0x0024: BAR empty ()
>   0x0028: Cardbus CIS: 
>   0x002c: Subsystem Vendor ID: 17aa Product ID: 3821
>   0x0030: Expansion ROM Base Address: 
>   0x0038: 
>   0x003c: Interrupt Pin: 00 Line: 00 Min Gnt: 00 Max Lat: 00
>   0x00e0: Capability 0x09: Vendor Specific
>  0:2:0: Intel UHD Graphics 620
>   0x: Vendor ID: 8086, Product ID: 5917
>   0x0004: Command: 0007, Status: 0010
>   0x0008: Class: 03 Display, Subclass: 00 VGA,
>   Interface: 00, Revision: 07
>   0x000c: BIST: 00, Header Type: 00, Latency Timer: 00,
>   Cache Line Size: 10
>   0x0010: BAR mem 64bit addr: 0x002ffa00/0x0100
>   0x0018: BAR mem prefetchable 64bit addr: 0x002fa000/0x1000
>   0x0020: BAR io addr: 0x3000/0x0040
>   0x0024: BAR empty ()
>   0x0028: Cardbus CIS: 
>   0x002c: Subsystem Vendor ID: 17aa Product ID: 3803
>   0x0030: Expansion ROM Base Address: 
>   0x0038: 
>   0x003c: Interrupt Pin: 01 Line: ff Min Gnt: 00 Max Lat: 00

Re: [patch] azalia: Intel 300 Series HD Audio

2020-06-08 Thread bobby
On Sun, May 31, 2020 at 12:38:55PM +0200, Bruno Flueckiger wrote:
> On 31.05., Benjamin Baier wrote:
> > On Fri, 29 May 2020 11:25:44 +0200
> > Bruno Flueckiger  wrote:
> >
> > > Hi,
> > >
> > > My brand new laptop HP EliteBook 850 G6 comes with an Intel 300 Series
> > > HD Audio device rev 0x11. The device shows up as not configured in the
> > > dmesg. The PCI config space of the device identifies its subclass as
> > > PCI_SUBCLASS_MULTIMEDIA_AUDIO instead of PCI_SUBCLASS_MULTIMEDIA_HDAUDIO
> > >
> > > The patch below makes the device work just fine on my laptop.
> > >
> > > Cheers,
> > > Bruno
> > >
> > > Index: sys/dev/pci/azalia.c
> > > ===
> > > RCS file: /cvs/src/sys/dev/pci/azalia.c,v
> > > retrieving revision 1.255
> > > diff -u -p -r1.255 azalia.c
> > > --- sys/dev/pci/azalia.c  18 Apr 2020 21:55:56 -  1.255
> > > +++ sys/dev/pci/azalia.c  28 May 2020 13:48:10 -
> > > @@ -481,7 +481,8 @@ azalia_pci_match(struct device *parent,
> > >
> > >   pa = aux;
> > >   if (PCI_CLASS(pa->pa_class) == PCI_CLASS_MULTIMEDIA
> > > - && PCI_SUBCLASS(pa->pa_class) == PCI_SUBCLASS_MULTIMEDIA_HDAUDIO)
> > > + && (PCI_SUBCLASS(pa->pa_class) == PCI_SUBCLASS_MULTIMEDIA_HDAUDIO
> > > + || PCI_SUBCLASS(pa->pa_class) == PCI_SUBCLASS_MULTIMEDIA_AUDIO))
> > >   return 1;
> > >   return 0;
> > >  }
> > >
> >
> > Hi.
> >
> > Does your Laptop run with the latest BIOS? There was one released on May 
> > 11th.
> > https://support.hp.com/de-de/drivers/selfservice/swdetails/hp-elitebook-850-g6-notebook-pc/26609805/swItemId/ob-251060-1
> > The release notes state: Fixes an issue where the audio on the system stops 
> > functioning after the Intel Active Management Technology (AMT) option is 
> > disabled.
> >
> > The azalia patch is in but I would prefer HP to fix their BIOS instead.
> >
> > Greetings Ben
> >
> 
> Hi Ben,
> 
> I've upgraded the firmware to the latest available release, but the
> audio device still reports with the wrong subclass in its PCI config
> space.
> 
> I agree that HP should rather fix their firmware. I still try to find
> out how to report this problem to HP in a way that doesn't get ignored.
> 
> Cheers,
> Bruno
> 

My laptop, Lenovo C930, needs the same matching to attach azalia, I have the 
newest bios fyi.  Patch and pcidump below.


Index: sys/dev/pci/azalia.c
===
RCS file: /cvs/src/sys/dev/pci/azalia.c,v
retrieving revision 1.256
diff -u -p -u -p -r1.256 azalia.c
--- sys/dev/pci/azalia.c31 May 2020 04:58:38 -  1.256
+++ sys/dev/pci/azalia.c9 Jun 2020 02:59:36 -
@@ -475,7 +475,8 @@ azalia_configure_pci(azalia_t *az)
 }
 
 const struct pci_matchid azalia_pci_devices[] = {
-   { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_300SERIES_U_HDA }
+   { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_300SERIES_U_HDA },
+   { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_200SERIES_U_HDA }
 };
 
 int



Domain /dev/pci0:
 0:0:0: Intel Core 8G Host
0x: Vendor ID: 8086, Product ID: 5914
0x0004: Command: 0006, Status: 2090
0x0008: Class: 06 Bridge, Subclass: 00 Host,
Interface: 00, Revision: 08
0x000c: BIST: 00, Header Type: 00, Latency Timer: 00,
Cache Line Size: 00
0x0010: BAR empty ()
0x0014: BAR empty ()
0x0018: BAR empty ()
0x001c: BAR empty ()
0x0020: BAR empty ()
0x0024: BAR empty ()
0x0028: Cardbus CIS: 
0x002c: Subsystem Vendor ID: 17aa Product ID: 3821
0x0030: Expansion ROM Base Address: 
0x0038: 
0x003c: Interrupt Pin: 00 Line: 00 Min Gnt: 00 Max Lat: 00
0x00e0: Capability 0x09: Vendor Specific
 0:2:0: Intel UHD Graphics 620
0x: Vendor ID: 8086, Product ID: 5917
0x0004: Command: 0007, Status: 0010
0x0008: Class: 03 Display, Subclass: 00 VGA,
Interface: 00, Revision: 07
0x000c: BIST: 00, Header Type: 00, Latency Timer: 00,
Cache Line Size: 10
0x0010: BAR mem 64bit addr: 0x002ffa00/0x0100
0x0018: BAR mem prefetchable 64bit addr: 0x002fa000/0x1000
0x0020: BAR io addr: 0x3000/0x0040
0x0024: BAR empty ()
0x0028: Cardbus CIS: 
0x002c: Subsystem Vendor ID: 17aa Product ID: 3803
0x0030: Expansion ROM Base Address: 
0x0038: 
0x003c: Interrupt Pin: 01 Line: ff Min Gnt: 00 Max Lat: 00
0x0040: Capability 0x09: Vendor Specific
0x0070: Capability 0x10: PCI Express
0x0100: Enhanced Capability 0x1b: Process Address Space ID
0x0200: Enhanced Capability 0x0f: Address Translation Services
0x0300: Enhanced Capability 0x13: Page Request Interface
0x00ac: Capability 0x05: Message 

Re: [patch] azalia: Intel 300 Series HD Audio

2020-05-31 Thread Bruno Flueckiger
On 31.05., Benjamin Baier wrote:
> On Fri, 29 May 2020 11:25:44 +0200
> Bruno Flueckiger  wrote:
>
> > Hi,
> >
> > My brand new laptop HP EliteBook 850 G6 comes with an Intel 300 Series
> > HD Audio device rev 0x11. The device shows up as not configured in the
> > dmesg. The PCI config space of the device identifies its subclass as
> > PCI_SUBCLASS_MULTIMEDIA_AUDIO instead of PCI_SUBCLASS_MULTIMEDIA_HDAUDIO
> >
> > The patch below makes the device work just fine on my laptop.
> >
> > Cheers,
> > Bruno
> >
> > Index: sys/dev/pci/azalia.c
> > ===
> > RCS file: /cvs/src/sys/dev/pci/azalia.c,v
> > retrieving revision 1.255
> > diff -u -p -r1.255 azalia.c
> > --- sys/dev/pci/azalia.c18 Apr 2020 21:55:56 -  1.255
> > +++ sys/dev/pci/azalia.c28 May 2020 13:48:10 -
> > @@ -481,7 +481,8 @@ azalia_pci_match(struct device *parent,
> >
> > pa = aux;
> > if (PCI_CLASS(pa->pa_class) == PCI_CLASS_MULTIMEDIA
> > -   && PCI_SUBCLASS(pa->pa_class) == PCI_SUBCLASS_MULTIMEDIA_HDAUDIO)
> > +   && (PCI_SUBCLASS(pa->pa_class) == PCI_SUBCLASS_MULTIMEDIA_HDAUDIO
> > +   || PCI_SUBCLASS(pa->pa_class) == PCI_SUBCLASS_MULTIMEDIA_AUDIO))
> > return 1;
> > return 0;
> >  }
> >
>
> Hi.
>
> Does your Laptop run with the latest BIOS? There was one released on May 11th.
> https://support.hp.com/de-de/drivers/selfservice/swdetails/hp-elitebook-850-g6-notebook-pc/26609805/swItemId/ob-251060-1
> The release notes state: Fixes an issue where the audio on the system stops 
> functioning after the Intel Active Management Technology (AMT) option is 
> disabled.
>
> The azalia patch is in but I would prefer HP to fix their BIOS instead.
>
> Greetings Ben
>

Hi Ben,

I've upgraded the firmware to the latest available release, but the
audio device still reports with the wrong subclass in its PCI config
space.

I agree that HP should rather fix their firmware. I still try to find
out how to report this problem to HP in a way that doesn't get ignored.

Cheers,
Bruno



Re: [patch] azalia: Intel 300 Series HD Audio

2020-05-31 Thread Benjamin Baier
On Fri, 29 May 2020 11:25:44 +0200
Bruno Flueckiger  wrote:

> Hi,
> 
> My brand new laptop HP EliteBook 850 G6 comes with an Intel 300 Series
> HD Audio device rev 0x11. The device shows up as not configured in the
> dmesg. The PCI config space of the device identifies its subclass as
> PCI_SUBCLASS_MULTIMEDIA_AUDIO instead of PCI_SUBCLASS_MULTIMEDIA_HDAUDIO
> 
> The patch below makes the device work just fine on my laptop.
> 
> Cheers,
> Bruno
> 
> Index: sys/dev/pci/azalia.c
> ===
> RCS file: /cvs/src/sys/dev/pci/azalia.c,v
> retrieving revision 1.255
> diff -u -p -r1.255 azalia.c
> --- sys/dev/pci/azalia.c  18 Apr 2020 21:55:56 -  1.255
> +++ sys/dev/pci/azalia.c  28 May 2020 13:48:10 -
> @@ -481,7 +481,8 @@ azalia_pci_match(struct device *parent,
> 
>   pa = aux;
>   if (PCI_CLASS(pa->pa_class) == PCI_CLASS_MULTIMEDIA
> - && PCI_SUBCLASS(pa->pa_class) == PCI_SUBCLASS_MULTIMEDIA_HDAUDIO)
> + && (PCI_SUBCLASS(pa->pa_class) == PCI_SUBCLASS_MULTIMEDIA_HDAUDIO
> + || PCI_SUBCLASS(pa->pa_class) == PCI_SUBCLASS_MULTIMEDIA_AUDIO))
>   return 1;
>   return 0;
>  }
> 

Hi.

Does your Laptop run with the latest BIOS? There was one released on May 11th.
https://support.hp.com/de-de/drivers/selfservice/swdetails/hp-elitebook-850-g6-notebook-pc/26609805/swItemId/ob-251060-1
The release notes state: Fixes an issue where the audio on the system stops 
functioning after the Intel Active Management Technology (AMT) option is 
disabled.

The azalia patch is in but I would prefer HP to fix their BIOS instead.

Greetings Ben



Re: [patch] azalia: Intel 300 Series HD Audio

2020-05-30 Thread Bruno Flueckiger
On 29.05., Jonathan Gray wrote:
> On Fri, May 29, 2020 at 11:25:44AM +0200, Bruno Flueckiger wrote:
> > Hi,
> >
> > My brand new laptop HP EliteBook 850 G6 comes with an Intel 300 Series
> > HD Audio device rev 0x11. The device shows up as not configured in the
> > dmesg. The PCI config space of the device identifies its subclass as
> > PCI_SUBCLASS_MULTIMEDIA_AUDIO instead of PCI_SUBCLASS_MULTIMEDIA_HDAUDIO
> >
> > The patch below makes the device work just fine on my laptop.
> >
> > Cheers,
> > Bruno
>
> I think it would be better to match on the id in that case as non-azalia
> devices use the audio class.
>
> Index: azalia.c
> ===
> RCS file: /cvs/src/sys/dev/pci/azalia.c,v
> retrieving revision 1.255
> diff -u -p -r1.255 azalia.c
> --- azalia.c  18 Apr 2020 21:55:56 -  1.255
> +++ azalia.c  29 May 2020 09:51:06 -
> @@ -474,6 +474,10 @@ azalia_configure_pci(azalia_t *az)
>   }
>  }
>
> +const struct pci_matchid azalia_pci_devices[] = {
> + { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_300SERIES_U_HDA }
> +};
> +
>  int
>  azalia_pci_match(struct device *parent, void *match, void *aux)
>  {
> @@ -483,7 +487,8 @@ azalia_pci_match(struct device *parent,
>   if (PCI_CLASS(pa->pa_class) == PCI_CLASS_MULTIMEDIA
>   && PCI_SUBCLASS(pa->pa_class) == PCI_SUBCLASS_MULTIMEDIA_HDAUDIO)
>   return 1;
> - return 0;
> + return pci_matchbyid((struct pci_attach_args *)aux, azalia_pci_devices,
> + nitems(azalia_pci_devices));
>  }
>
>  void
>

Your patch works just fine on my laptop.

Cheers,
Bruno



Re: [patch] azalia: Intel 300 Series HD Audio

2020-05-29 Thread Mark Kettenis
> Date: Fri, 29 May 2020 19:55:25 +1000
> From: Jonathan Gray 
> Content-Type: text/plain; charset=us-ascii
> Content-Disposition: inline
> 
> On Fri, May 29, 2020 at 11:25:44AM +0200, Bruno Flueckiger wrote:
> > Hi,
> > 
> > My brand new laptop HP EliteBook 850 G6 comes with an Intel 300 Series
> > HD Audio device rev 0x11. The device shows up as not configured in the
> > dmesg. The PCI config space of the device identifies its subclass as
> > PCI_SUBCLASS_MULTIMEDIA_AUDIO instead of PCI_SUBCLASS_MULTIMEDIA_HDAUDIO
> > 
> > The patch below makes the device work just fine on my laptop.
> > 
> > Cheers,
> > Bruno
> 
> I think it would be better to match on the id in that case as non-azalia
> devices use the audio class.

Agreed.  ok kettenis@

> Index: azalia.c
> ===
> RCS file: /cvs/src/sys/dev/pci/azalia.c,v
> retrieving revision 1.255
> diff -u -p -r1.255 azalia.c
> --- azalia.c  18 Apr 2020 21:55:56 -  1.255
> +++ azalia.c  29 May 2020 09:51:06 -
> @@ -474,6 +474,10 @@ azalia_configure_pci(azalia_t *az)
>   }
>  }
>  
> +const struct pci_matchid azalia_pci_devices[] = {
> + { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_300SERIES_U_HDA }
> +};
> +
>  int
>  azalia_pci_match(struct device *parent, void *match, void *aux)
>  {
> @@ -483,7 +487,8 @@ azalia_pci_match(struct device *parent, 
>   if (PCI_CLASS(pa->pa_class) == PCI_CLASS_MULTIMEDIA
>   && PCI_SUBCLASS(pa->pa_class) == PCI_SUBCLASS_MULTIMEDIA_HDAUDIO)
>   return 1;
> - return 0;
> + return pci_matchbyid((struct pci_attach_args *)aux, azalia_pci_devices,
> + nitems(azalia_pci_devices));
>  }
>  
>  void
> 
> 



Re: [patch] azalia: Intel 300 Series HD Audio

2020-05-29 Thread Jonathan Gray
On Fri, May 29, 2020 at 11:25:44AM +0200, Bruno Flueckiger wrote:
> Hi,
> 
> My brand new laptop HP EliteBook 850 G6 comes with an Intel 300 Series
> HD Audio device rev 0x11. The device shows up as not configured in the
> dmesg. The PCI config space of the device identifies its subclass as
> PCI_SUBCLASS_MULTIMEDIA_AUDIO instead of PCI_SUBCLASS_MULTIMEDIA_HDAUDIO
> 
> The patch below makes the device work just fine on my laptop.
> 
> Cheers,
> Bruno

I think it would be better to match on the id in that case as non-azalia
devices use the audio class.

Index: azalia.c
===
RCS file: /cvs/src/sys/dev/pci/azalia.c,v
retrieving revision 1.255
diff -u -p -r1.255 azalia.c
--- azalia.c18 Apr 2020 21:55:56 -  1.255
+++ azalia.c29 May 2020 09:51:06 -
@@ -474,6 +474,10 @@ azalia_configure_pci(azalia_t *az)
}
 }
 
+const struct pci_matchid azalia_pci_devices[] = {
+   { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_300SERIES_U_HDA }
+};
+
 int
 azalia_pci_match(struct device *parent, void *match, void *aux)
 {
@@ -483,7 +487,8 @@ azalia_pci_match(struct device *parent, 
if (PCI_CLASS(pa->pa_class) == PCI_CLASS_MULTIMEDIA
&& PCI_SUBCLASS(pa->pa_class) == PCI_SUBCLASS_MULTIMEDIA_HDAUDIO)
return 1;
-   return 0;
+   return pci_matchbyid((struct pci_attach_args *)aux, azalia_pci_devices,
+   nitems(azalia_pci_devices));
 }
 
 void



[patch] azalia: Intel 300 Series HD Audio

2020-05-29 Thread Bruno Flueckiger
Hi,

My brand new laptop HP EliteBook 850 G6 comes with an Intel 300 Series
HD Audio device rev 0x11. The device shows up as not configured in the
dmesg. The PCI config space of the device identifies its subclass as
PCI_SUBCLASS_MULTIMEDIA_AUDIO instead of PCI_SUBCLASS_MULTIMEDIA_HDAUDIO

The patch below makes the device work just fine on my laptop.

Cheers,
Bruno

Index: sys/dev/pci/azalia.c
===
RCS file: /cvs/src/sys/dev/pci/azalia.c,v
retrieving revision 1.255
diff -u -p -r1.255 azalia.c
--- sys/dev/pci/azalia.c18 Apr 2020 21:55:56 -  1.255
+++ sys/dev/pci/azalia.c28 May 2020 13:48:10 -
@@ -481,7 +481,8 @@ azalia_pci_match(struct device *parent,

pa = aux;
if (PCI_CLASS(pa->pa_class) == PCI_CLASS_MULTIMEDIA
-   && PCI_SUBCLASS(pa->pa_class) == PCI_SUBCLASS_MULTIMEDIA_HDAUDIO)
+   && (PCI_SUBCLASS(pa->pa_class) == PCI_SUBCLASS_MULTIMEDIA_HDAUDIO
+   || PCI_SUBCLASS(pa->pa_class) == PCI_SUBCLASS_MULTIMEDIA_AUDIO))
return 1;
return 0;
 }