提交 c4da29ca 编写于 作者: Y Yang, Libin 提交者: Takashi Iwai

ALSA: hda - support detecting HD Audio devices with PCI class code

The patch uses HD Audio PCI class code to detect AMD HD Audio cards.
Signed-off-by: NLibin Yang <libin.yang@amd.com>
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 3a95cb97
...@@ -292,6 +292,8 @@ enum { ...@@ -292,6 +292,8 @@ enum {
/* Define VIA HD Audio Device ID*/ /* Define VIA HD Audio Device ID*/
#define VIA_HDAC_DEVICE_ID 0x3288 #define VIA_HDAC_DEVICE_ID 0x3288
/* HD Audio class code */
#define PCI_CLASS_MULTIMEDIA_HD_AUDIO 0x0403
/* /*
*/ */
...@@ -415,6 +417,7 @@ enum { ...@@ -415,6 +417,7 @@ enum {
AZX_DRIVER_ULI, AZX_DRIVER_ULI,
AZX_DRIVER_NVIDIA, AZX_DRIVER_NVIDIA,
AZX_DRIVER_TERA, AZX_DRIVER_TERA,
AZX_DRIVER_GENERIC,
AZX_NUM_DRIVERS, /* keep this as last entry */ AZX_NUM_DRIVERS, /* keep this as last entry */
}; };
...@@ -428,6 +431,7 @@ static char *driver_short_names[] __devinitdata = { ...@@ -428,6 +431,7 @@ static char *driver_short_names[] __devinitdata = {
[AZX_DRIVER_ULI] = "HDA ULI M5461", [AZX_DRIVER_ULI] = "HDA ULI M5461",
[AZX_DRIVER_NVIDIA] = "HDA NVidia", [AZX_DRIVER_NVIDIA] = "HDA NVidia",
[AZX_DRIVER_TERA] = "HDA Teradici", [AZX_DRIVER_TERA] = "HDA Teradici",
[AZX_DRIVER_GENERIC] = "HD-Audio Generic",
}; };
/* /*
...@@ -2203,6 +2207,7 @@ static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci, ...@@ -2203,6 +2207,7 @@ static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci,
chip->playback_streams = ATIHDMI_NUM_PLAYBACK; chip->playback_streams = ATIHDMI_NUM_PLAYBACK;
chip->capture_streams = ATIHDMI_NUM_CAPTURE; chip->capture_streams = ATIHDMI_NUM_CAPTURE;
break; break;
case AZX_DRIVER_GENERIC:
default: default:
chip->playback_streams = ICH6_NUM_PLAYBACK; chip->playback_streams = ICH6_NUM_PLAYBACK;
chip->capture_streams = ICH6_NUM_CAPTURE; chip->capture_streams = ICH6_NUM_CAPTURE;
...@@ -2427,6 +2432,11 @@ static struct pci_device_id azx_ids[] = { ...@@ -2427,6 +2432,11 @@ static struct pci_device_id azx_ids[] = {
{ PCI_DEVICE(0x10de, 0x0bd7), .driver_data = AZX_DRIVER_NVIDIA }, { PCI_DEVICE(0x10de, 0x0bd7), .driver_data = AZX_DRIVER_NVIDIA },
/* Teradici */ /* Teradici */
{ PCI_DEVICE(0x6549, 0x1200), .driver_data = AZX_DRIVER_TERA }, { PCI_DEVICE(0x6549, 0x1200), .driver_data = AZX_DRIVER_TERA },
/* AMD Generic, PCI class code and Vendor ID for HD Audio */
{ PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_ANY_ID),
.class = PCI_CLASS_MULTIMEDIA_HD_AUDIO << 8,
.class_mask = 0xffffff,
.driver_data = AZX_DRIVER_GENERIC },
{ 0, } { 0, }
}; };
MODULE_DEVICE_TABLE(pci, azx_ids); MODULE_DEVICE_TABLE(pci, azx_ids);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册