~ubuntu-branches/ubuntu/vivid/oss4/vivid-proposed

« back to all changes in this revision

Viewing changes to kernel/drv/oss_hdaudio/oss_hdaudio.c

  • Committer: Package Import Robot
  • Author(s): Sebastien NOEL
  • Date: 2012-11-19 11:47:24 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20121119114724-svu8mq7x3pk64nez
Tags: 4.2-build2007-1
* New upstream release.
* Acknowledge NMU, thanks Michael Gilbert.
* Add debian/patches/110_ld-as-needed.patch: Rearrange order of linker
  arguments to fix building with "ld --as-needed" (closes: #630737).
* Add missing dependency on dpkg-dev to oss4-dkms and oss4-source
  (closes: #687086).
* Fix typo in the changelog (closes: #628876, #675933)
* Add debian/patches/002_fix-linux-oss_native_word.patch (closes: #693657).
  Thanks to Ben Hutchings.
* Add debian/patches/003_linux-error-logging-fixes.patch (closes: #693657).
  Thanks to Ben Hutchings.
* check for /lib/modules/${kernelver}/build in addition of
  /lib/modules/${kernelver}/source (closes: #587191).
* oss4-dkms.dkms.in: fix 'CLEAN' rules (closes: #653374).

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
#define INTEL_DEVICE_ICH7       0x27d8
28
28
#define INTEL_DEVICE_ESB2       0x269a
29
29
#define INTEL_DEVICE_ICH8       0x284b
30
 
#define INTEL_DEVICE_ICH9       0x293f
31
 
#define INTEL_DEVICE_ICH10              0x3a3e
32
 
#define INTEL_DEVICE_ICH10_B    0x3a6e
33
 
#define INTEL_DEVICE_CPT        0x1c20
34
 
#define INTEL_DEVICE_PCH                0x3b56
35
 
#define INTEL_DEVICE_PCH2               0x3b57
36
 
#define INTEL_DEVICE_SCH                0x811b
37
 
#define INTEL_DEVICE_P35        0x293e
 
30
#define INTEL_DEVICE_ICH9       0x293e
 
31
#define INTEL_DEVICE_ICH9_B     0x293f
 
32
#define INTEL_DEVICE_ICH10      0x3a3e
 
33
#define INTEL_DEVICE_ICH10_B    0x3a6e
 
34
#define INTEL_DEVICE_PCH        0x3b56
 
35
#define INTEL_DEVICE_PCH_B      0x3b57
 
36
#define INTEL_DEVICE_CPT        0x1c20
 
37
#define INTEL_DEVICE_PBG        0x1d20
 
38
#define INTEL_DEVICE_PPT        0x1e20
 
39
#define INTEL_DEVICE_SCH        0x811b
38
40
 
39
41
#define NVIDIA_VENDOR_ID        0x10de
40
42
#define NVIDIA_DEVICE_MCP51     0x026c
51
53
#define ATI_DEVICE_SB450        0x437b
52
54
#define ATI_DEVICE_SB600        0x4383
53
55
 
 
56
#define AMD_VENDOR_ID           0x1022
 
57
#define AMD_DEVICE_HUDSON       0x780d
 
58
 
54
59
#define VIA_VENDOR_ID           0x1106
55
60
#define VIA_DEVICE_HDA          0x3288
56
61
 
1769
1774
  pci_read_config_word (osdev, PCI_VENDOR_ID, &vendor);
1770
1775
  pci_read_config_word (osdev, PCI_DEVICE_ID, &device);
1771
1776
 
1772
 
#if 0
1773
 
  // This check is not necessary because the kernel has already checked
1774
 
  // the vendor&device ID
1775
 
 
1776
 
  if ((vendor != INTEL_VENDOR_ID && vendor != NVIDIA_VENDOR_ID &&
1777
 
       vendor != ATI_VENDOR_ID && vendor != SIS_VENDOR_ID &&
1778
 
       vendor != VIA_VENDOR_ID && vendor != ULI_VENDOR_ID) ||
1779
 
      (device != INTEL_DEVICE_ICH6 && device != INTEL_DEVICE_ICH7 &&
1780
 
       device != INTEL_DEVICE_ESB2 && device != INTEL_DEVICE_ICH8 &&
1781
 
       device != INTEL_DEVICE_ICH9 && device != INTEL_DEVICE_P35 &&
1782
 
       device != INTEL_DEVICE_ICH10 && device != INTEL_DEVICE_ICH10_B &&
1783
 
       device != INTEL_DEVICE_PCH &&
1784
 
       device != NVIDIA_DEVICE_MCP51 && device != NVIDIA_DEVICE_MCP55 &&
1785
 
       device != NVIDIA_DEVICE_MCP61 && device != NVIDIA_DEVICE_MCP61A &&
1786
 
       device != NVIDIA_DEVICE_MCP65 && device != NVIDIA_DEVICE_MCP67 &&
1787
 
       device != NVIDIA_DEVICE_MCP73 && device != NVIDIA_DEVICE_MCP78S &&
1788
 
       device != NVIDIA_DEVICE_MCP79 &&
1789
 
       device != VIA_DEVICE_HDA &&
1790
 
       device != SIS_DEVICE_HDA &&
1791
 
       device != ULI_DEVICE_HDA &&
1792
 
       device != ATI_DEVICE_SB450 && device != ATI_DEVICE_SB600))
1793
 
 
1794
 
    {
1795
 
      return 0;
1796
 
    }
1797
 
#endif
1798
 
 
1799
1777
  pci_read_config_byte (osdev, PCI_REVISION_ID, &pci_revision);
1800
1778
  pci_read_config_word (osdev, PCI_COMMAND, &pci_command);
1801
1779
  pci_read_config_irq (osdev, PCI_INTERRUPT_LINE, &pci_irq_line);
1822
1800
 
1823
1801
  switch (device)
1824
1802
    {
 
1803
    case INTEL_DEVICE_CPT:
 
1804
    case INTEL_DEVICE_PBG:
 
1805
    case INTEL_DEVICE_PPT:
1825
1806
    case INTEL_DEVICE_SCH:
1826
1807
          pci_read_config_word (osdev, 0x78, &devctl);
1827
1808
          DDB (cmn_err (CE_CONT, " DEVC register content  0x%04x\n", devctl);)
1834
1815
    case INTEL_DEVICE_ESB2:
1835
1816
    case INTEL_DEVICE_ICH8:
1836
1817
    case INTEL_DEVICE_ICH9:
1837
 
    case INTEL_DEVICE_P35:
 
1818
    case INTEL_DEVICE_ICH9_B:
1838
1819
    case INTEL_DEVICE_ICH10:
1839
1820
    case INTEL_DEVICE_ICH10_B:
1840
1821
    case INTEL_DEVICE_PCH:
1841
 
    case INTEL_DEVICE_PCH2:
1842
 
    case INTEL_DEVICE_CPT:
 
1822
    case INTEL_DEVICE_PCH_B:
1843
1823
      devc->chip_name = "Intel HD Audio";
1844
1824
      break;
1845
1825
 
1868
1848
      pci_write_config_byte (osdev, 0x42, (btmp & 0xf8) | 0x2);
1869
1849
      break;
1870
1850
 
 
1851
    case AMD_DEVICE_HUDSON:
 
1852
        devc->chip_name = "AMD HD Audio";
 
1853
        break;
 
1854
 
1871
1855
    case VIA_DEVICE_HDA:
1872
1856
      devc->chip_name = "VIA HD Audio";
1873
1857
      break;
1888
1872
      break;
1889
1873
 
1890
1874
    default:
1891
 
      devc->chip_name = "High definition audio device";
 
1875
      devc->chip_name = "Azalia High Definition audio device";
1892
1876
    }
1893
1877
 
1894
1878
  pci_read_config_dword (osdev, PCI_MEM_BASE_ADDRESS_0, &devc->membar_addr);