| 1 |
|
| 2 |
|
| 3 |
#include <acpi/acpigen.h> |
| 4 |
#include <device/device.h> |
| 5 |
#include <device/pci.h> |
| 6 |
#include <device/pci_ids.h> |
| 7 |
#include <device/pci_ops.h> |
| 8 |
#include <device/azalia_device.h> |
| 9 |
|
| 10 |
static const unsigned short pci_device_ids[] = { |
| 11 |
PCI_DID_AMD_SB900_HDA, |
| 12 |
PCI_DID_AMD_CZ_HDA, |
| 13 |
PCI_DID_AMD_FAM17H_HDA1, |
| 14 |
0 |
| 15 |
}; |
| 16 |
|
| 17 |
static const char *hda_acpi_name(const struct device *dev) |
| 18 |
{ |
| 19 |
return "AZHD"; |
| 20 |
} |
| 21 |
|
| 22 |
static struct device_operations hda_audio_ops = { |
| 23 |
.read_resources = pci_dev_read_resources, |
| 24 |
.set_resources = pci_dev_set_resources, |
| 25 |
.enable_resources = pci_dev_enable_resources, |
| 26 |
.ops_pci = &pci_dev_ops_pci, |
| 27 |
.acpi_name = hda_acpi_name, |
| 28 |
.acpi_fill_ssdt = acpi_device_write_pci_dev, |
| 29 |
}; |
| 30 |
|
| 31 |
static const struct pci_driver hdaaudio_driver __pci_driver = { |
| 32 |
.ops = CONFIG(AZALIA_HDA_CODEC_SUPPORT) ? |
| 33 |
&default_azalia_audio_ops : &hda_audio_ops, |
| 34 |
.vendor = PCI_VID_AMD, |
| 35 |
.devices = pci_device_ids, |
| 36 |
}; |