|
Lines 1831-1836
Link Here
|
| 1831 |
return type; |
1831 |
return type; |
| 1832 |
} |
1832 |
} |
| 1833 |
|
1833 |
|
|
|
1834 |
|
| 1835 |
const char* pci_snd_match(device_t dev) |
| 1836 |
{ |
| 1837 |
u_int id = pci_get_devid(dev); |
| 1838 |
const char *vendor, *chip, *type; |
| 1839 |
|
| 1840 |
vendor = chip = type = 0; |
| 1841 |
switch (id & 0xffff) { |
| 1842 |
case 0x12eb: |
| 1843 |
vendor = "Aureal"; |
| 1844 |
switch (id >> 16) { |
| 1845 |
case 0x0001: |
| 1846 |
chip = "Au8820"; |
| 1847 |
type = "Vortex1"; break; |
| 1848 |
case 0x0002: |
| 1849 |
chip = "Au8830"; |
| 1850 |
type = "Vortex2 SuperQuad or SQ2500"; break; |
| 1851 |
case 0x0003: |
| 1852 |
chip = "Au8810"; |
| 1853 |
type = "Vortex Advantage or SQ1500"; break; |
| 1854 |
default: |
| 1855 |
chip = "Au88xx"; break; |
| 1856 |
} |
| 1857 |
break; |
| 1858 |
} |
| 1859 |
|
| 1860 |
if (vendor && chip) { |
| 1861 |
char *buf; |
| 1862 |
int len; |
| 1863 |
|
| 1864 |
if (type == 0) |
| 1865 |
type = "Sound Card Device"; |
| 1866 |
|
| 1867 |
len = strlen(vendor) + strlen(chip) + strlen(type) + 4; |
| 1868 |
MALLOC(buf, char *, len, M_TEMP, M_NOWAIT); |
| 1869 |
if (buf) |
| 1870 |
sprintf(buf, "%s %s %s", vendor, chip, type); |
| 1871 |
return buf; |
| 1872 |
} |
| 1873 |
|
| 1874 |
if (vendor) { |
| 1875 |
char *buf; |
| 1876 |
int len; |
| 1877 |
|
| 1878 |
len = strlen(vendor) + strlen(type) + 2 + 6 + 4 + 1; |
| 1879 |
MALLOC(buf, char *, len, M_TEMP, M_NOWAIT); |
| 1880 |
if (buf) |
| 1881 |
sprintf(buf, "%s model %04x %s", vendor, id >> 16, type); |
| 1882 |
return buf; |
| 1883 |
} |
| 1884 |
return 0; |
| 1885 |
} |
| 1886 |
|
| 1887 |
|
| 1888 |
|
| 1834 |
/*--------------------------------------------------------- |
1889 |
/*--------------------------------------------------------- |
| 1835 |
** |
1890 |
** |
| 1836 |
** Devices to ignore |
1891 |
** Devices to ignore |