diff mbox

[1/2] ALSA: HDA: use PCI_BASE_CLASS_DISPLAY to cover more display adapters

Message ID 1531469162-6472-1-git-send-email-Jim.Qu@amd.com (mailing list archive)
State New, archived
Headers show

Commit Message

Qu, Jim July 13, 2018, 8:06 a.m. UTC
Signed-off-by: Jim Qu <Jim.Qu@amd.com>
---
 sound/pci/hda/hda_intel.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Lukas Wunner July 13, 2018, 8:31 a.m. UTC | #1
On Fri, Jul 13, 2018 at 04:06:01PM +0800, Jim Qu wrote:
> Signed-off-by: Jim Qu <Jim.Qu@amd.com>

Empty commit message.  Please add an explanation why the change is
necessary so folks browsing the git history understand it's motivation.
I think here the motivation is that the PCI class is sometimes
PCI_CLASS_DISPLAY_3D or PCI_CLASS_DISPLAY_OTHER.


> --- a/sound/pci/hda/hda_intel.c
> +++ b/sound/pci/hda/hda_intel.c
> @@ -31,7 +31,7 @@
>   *  CHANGES:
>   *
>   *  2004.12.01	Major rewrite by tiwai, merged the work of pshou
> - * 
> + *

Spurious unrelated change, please get rid of it, this clutters up
the git history unnecessarily.


> @@ -390,8 +390,8 @@ static char *driver_short_names[] = {
>  	[AZX_DRIVER_SIS] = "HDA SIS966",
>  	[AZX_DRIVER_ULI] = "HDA ULI M5461",
>  	[AZX_DRIVER_NVIDIA] = "HDA NVidia",
> -	[AZX_DRIVER_TERA] = "HDA Teradici", 
> -	[AZX_DRIVER_CTX] = "HDA Creative", 
> +	[AZX_DRIVER_TERA] = "HDA Teradici",
> +	[AZX_DRIVER_CTX] = "HDA Creative",

Ditto.

Thanks,

Lukas
Takashi Iwai July 13, 2018, 8:33 a.m. UTC | #2
On Fri, 13 Jul 2018 10:06:01 +0200,
Jim Qu wrote:
> 
> Signed-off-by: Jim Qu <Jim.Qu@amd.com>

More explanations please.  e.g. why is this needed?

The code change itself looks good, but ...

> @@ -31,7 +31,7 @@
>   *  CHANGES:
>   *
>   *  2004.12.01	Major rewrite by tiwai, merged the work of pshou
> - * 
> + *
>   */
>  
>  #include <linux/delay.h>
> @@ -390,8 +390,8 @@ static char *driver_short_names[] = {
>  	[AZX_DRIVER_SIS] = "HDA SIS966",
>  	[AZX_DRIVER_ULI] = "HDA ULI M5461",
>  	[AZX_DRIVER_NVIDIA] = "HDA NVidia",
> -	[AZX_DRIVER_TERA] = "HDA Teradici", 
> -	[AZX_DRIVER_CTX] = "HDA Creative", 
> +	[AZX_DRIVER_TERA] = "HDA Teradici",
> +	[AZX_DRIVER_CTX] = "HDA Creative",
>  	[AZX_DRIVER_CTHDA] = "HDA Creative",
>  	[AZX_DRIVER_CMEDIA] = "HDA C-Media",
>  	[AZX_DRIVER_GENERIC] = "HD-Audio Generic",

These two hunks are utterly irrelevant with the fix.  Please drop
them.


thanks,

Takashi
Qu, Jim July 13, 2018, 9:28 a.m. UTC | #3
See comments in line

thanks
JimQu

获取 Outlook for Android<https://aka.ms/ghei36>



发件人: Takashi Iwai
发送时间: 7月13日星期五 16:33
主题: Re: [alsa-devel] [PATCH 1/2] ALSA: HDA: use PCI_BASE_CLASS_DISPLAY tocover more display adapters
收件人: Qu, Jim
抄送: alsa-devel@alsa-project.org, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org


On Fri, 13 Jul 2018 10:06:01 +0200, Jim Qu wrote: > > Signed-off-by: Jim Qu More explanations please. e.g. why is this needed? The code change itself looks good, but ... > @@ -31,7 +31,7 @@ > * CHANGES: > * > * 2004.12.01 Major rewrite by tiwai, merged the work of pshou > - * > + * > */ > > #include > @@ -390,8 +390,8 @@ static char *driver_short_names[] = { > [AZX_DRIVER_SIS] = "HDA SIS966", > [AZX_DRIVER_ULI] = "HDA ULI M5461", > [AZX_DRIVER_NVIDIA] = "HDA NVidia", > - [AZX_DRIVER_TERA] = "HDA Teradici", > - [AZX_DRIVER_CTX] = "HDA Creative", > + [AZX_DRIVER_TERA] = "HDA Teradici", > + [AZX_DRIVER_CTX] = "HDA Creative", > [AZX_DRIVER_CTHDA] = "HDA Creative", > [AZX_DRIVER_CMEDIA] = "HDA C-Media", > [AZX_DRIVER_GENERIC] = "HD-Audio Generic", These two hunks are utterly irrelevant with the fix. Please drop them.

Jim: Yeah, I forget to generate a new one. I will delete them when push the patch.

thanks, Takashi
diff mbox

Patch

diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 1ae1850..e0064567 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -31,7 +31,7 @@ 
  *  CHANGES:
  *
  *  2004.12.01	Major rewrite by tiwai, merged the work of pshou
- * 
+ *
  */
 
 #include <linux/delay.h>
@@ -390,8 +390,8 @@  static char *driver_short_names[] = {
 	[AZX_DRIVER_SIS] = "HDA SIS966",
 	[AZX_DRIVER_ULI] = "HDA ULI M5461",
 	[AZX_DRIVER_NVIDIA] = "HDA NVidia",
-	[AZX_DRIVER_TERA] = "HDA Teradici", 
-	[AZX_DRIVER_CTX] = "HDA Creative", 
+	[AZX_DRIVER_TERA] = "HDA Teradici",
+	[AZX_DRIVER_CTX] = "HDA Creative",
 	[AZX_DRIVER_CTHDA] = "HDA Creative",
 	[AZX_DRIVER_CMEDIA] = "HDA C-Media",
 	[AZX_DRIVER_GENERIC] = "HD-Audio Generic",
@@ -1429,7 +1429,7 @@  static struct pci_dev *get_bound_vga(struct pci_dev *pci)
 			p = pci_get_domain_bus_and_slot(pci_domain_nr(pci->bus),
 							pci->bus->number, 0);
 			if (p) {
-				if ((p->class >> 8) == PCI_CLASS_DISPLAY_VGA)
+				if ((p->class >> 16) == PCI_BASE_CLASS_DISPLAY)
 					return p;
 				pci_dev_put(p);
 			}