X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=sound%2Fpci%2Fvia82xx.c;h=2527bbd958c551f30fc83655ee83d06161bee6d0;hb=b71b5b652852db1b499d22aaabed8f5043acafad;hp=0f171dd1377b00bc3034b712f4f1d8f6f804b516;hpb=2e9f0e18678ffb2a932390e12de88b2b31c465b6;p=powerpc.git diff --git a/sound/pci/via82xx.c b/sound/pci/via82xx.c index 0f171dd137..2527bbd958 100644 --- a/sound/pci/via82xx.c +++ b/sound/pci/via82xx.c @@ -123,6 +123,7 @@ module_param(enable, bool, 0444); #define VIA_REV_8233A 0x40 /* 1 rec, 1 multi-pb, spdf */ #define VIA_REV_8235 0x50 /* 2 rec, 4 pb, 1 multi-pb, spdif */ #define VIA_REV_8237 0x60 +#define VIA_REV_8251 0x70 /* * Direct registers @@ -395,7 +396,7 @@ struct via82xx { #endif }; -static struct pci_device_id snd_via82xx_ids[] = { +static struct pci_device_id snd_via82xx_ids[] __devinitdata = { /* 0x1106, 0x3058 */ { PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_5, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TYPE_CARD_VIA686, }, /* 686A */ /* 0x1106, 0x3059 */ @@ -862,6 +863,11 @@ static snd_pcm_uframes_t snd_via8233_pcm_pointer(struct snd_pcm_substream *subst if (!status) status = inb(VIADEV_REG(viadev, OFFSET_STATUS)); + /* An apparent bug in the 8251 is worked around by sending a + * REG_CTRL_START. */ + if (chip->revision == VIA_REV_8251 && (status & VIA_REG_STAT_EOL)) + snd_via82xx_pcm_trigger(substream, SNDRV_PCM_TRIGGER_START); + if (!(status & VIA_REG_STAT_ACTIVE)) { res = 0; goto unlock; @@ -1769,6 +1775,12 @@ static struct ac97_quirk ac97_quirks[] = { .name = "Targa Traveller 811", .type = AC97_TUNE_HP_ONLY, }, + { + .subvendor = 0x161f, + .subdevice = 0x2032, + .name = "m680x", + .type = AC97_TUNE_HP_ONLY, /* http://launchpad.net/bugs/38546 */ + }, { } /* terminator */ }; @@ -1967,7 +1979,7 @@ static int __devinit snd_via686_init_misc(struct via82xx *chip) pci_write_config_byte(chip->pci, VIA_PNP_CONTROL, legacy_cfg); if (chip->mpu_res) { if (snd_mpu401_uart_new(chip->card, 0, MPU401_HW_VIA686A, - mpu_port, 1, + mpu_port, MPU401_INFO_INTEGRATED, chip->irq, 0, &chip->rmidi) < 0) { printk(KERN_WARNING "unable to initialize MPU-401" " at 0x%lx, skipping\n", mpu_port); @@ -2009,7 +2021,7 @@ static void __devinit snd_via82xx_proc_init(struct via82xx *chip) struct snd_info_entry *entry; if (! snd_card_proc_new(chip->card, "via82xx", &entry)) - snd_info_set_text_ops(entry, chip, 1024, snd_via82xx_proc_read); + snd_info_set_text_ops(entry, chip, snd_via82xx_proc_read); } /* @@ -2313,6 +2325,7 @@ static struct via823x_info via823x_cards[] __devinitdata = { { VIA_REV_8233A, "VIA 8233A", TYPE_VIA8233A }, { VIA_REV_8235, "VIA 8235", TYPE_VIA8233 }, { VIA_REV_8237, "VIA 8237", TYPE_VIA8233 }, + { VIA_REV_8251, "VIA 8251", TYPE_VIA8233 }, }; /* @@ -2325,7 +2338,7 @@ struct dxs_whitelist { short action; /* new dxs_support value */ }; -static int __devinit check_dxs_list(struct pci_dev *pci) +static int __devinit check_dxs_list(struct pci_dev *pci, int revision) { static struct dxs_whitelist whitelist[] = { { .subvendor = 0x1005, .subdevice = 0x4710, .action = VIA_DXS_ENABLE }, /* Avance Logic Mobo */ @@ -2342,6 +2355,7 @@ static int __devinit check_dxs_list(struct pci_dev *pci) { .subvendor = 0x1043, .subdevice = 0x810d, .action = VIA_DXS_SRC }, /* ASUS */ { .subvendor = 0x1043, .subdevice = 0x812a, .action = VIA_DXS_SRC }, /* ASUS A8V Deluxe */ { .subvendor = 0x1043, .subdevice = 0x8174, .action = VIA_DXS_SRC }, /* ASUS */ + { .subvendor = 0x1043, .subdevice = 0x81b9, .action = VIA_DXS_SRC }, /* ASUS A8V-MX */ { .subvendor = 0x1071, .subdevice = 0x8375, .action = VIA_DXS_NO_VRA }, /* Vobis/Yakumo/Mitac notebook */ { .subvendor = 0x1071, .subdevice = 0x8399, .action = VIA_DXS_NO_VRA }, /* Umax AB 595T (VIA K8N800A - VT8237) */ { .subvendor = 0x10cf, .subdevice = 0x118e, .action = VIA_DXS_ENABLE }, /* FSC laptop */ @@ -2357,7 +2371,7 @@ static int __devinit check_dxs_list(struct pci_dev *pci) { .subvendor = 0x1462, .subdevice = 0x0470, .action = VIA_DXS_SRC }, /* MSI KT880 Delta-FSR */ { .subvendor = 0x1462, .subdevice = 0x3800, .action = VIA_DXS_ENABLE }, /* MSI KT266 */ { .subvendor = 0x1462, .subdevice = 0x5901, .action = VIA_DXS_NO_VRA }, /* MSI KT6 Delta-SR */ - { .subvendor = 0x1462, .subdevice = 0x7023, .action = VIA_DXS_NO_VRA }, /* MSI K8T Neo2-FI */ + { .subvendor = 0x1462, .subdevice = 0x7023, .action = VIA_DXS_SRC }, /* MSI K8T Neo2-FI */ { .subvendor = 0x1462, .subdevice = 0x7120, .action = VIA_DXS_ENABLE }, /* MSI KT4V */ { .subvendor = 0x1462, .subdevice = 0x7142, .action = VIA_DXS_ENABLE }, /* MSI K8MM-V */ { .subvendor = 0x1462, .subdevice = 0xb012, .action = VIA_DXS_SRC }, /* P4M800/VIA8237R */ @@ -2405,6 +2419,10 @@ static int __devinit check_dxs_list(struct pci_dev *pci) } } + /* for newer revision, default to DXS_SRC */ + if (revision >= VIA_REV_8235) + return VIA_DXS_SRC; + /* * not detected, try 48k rate only to be sure. */ @@ -2449,7 +2467,7 @@ static int __devinit snd_via82xx_probe(struct pci_dev *pci, } if (chip_type != TYPE_VIA8233A) { if (dxs_support == VIA_DXS_AUTO) - dxs_support = check_dxs_list(pci); + dxs_support = check_dxs_list(pci, revision); /* force to use VIA8233 or 8233A model according to * dxs_support module option */