static int ac97_clock[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 48000};
static int ac97_quirk[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = AC97_TUNE_DEFAULT};
static int dxs_support[SNDRV_CARDS];
+static int boot_devs;
-module_param_array(index, int, NULL, 0444);
+module_param_array(index, int, boot_devs, 0444);
MODULE_PARM_DESC(index, "Index value for VIA 82xx bridge.");
-module_param_array(id, charp, NULL, 0444);
+module_param_array(id, charp, boot_devs, 0444);
MODULE_PARM_DESC(id, "ID string for VIA 82xx bridge.");
-module_param_array(enable, bool, NULL, 0444);
+module_param_array(enable, bool, boot_devs, 0444);
MODULE_PARM_DESC(enable, "Enable audio part of VIA 82xx bridge.");
-module_param_array(mpu_port, long, NULL, 0444);
+module_param_array(mpu_port, long, boot_devs, 0444);
MODULE_PARM_DESC(mpu_port, "MPU-401 port. (VT82C686x only)");
#ifdef SUPPORT_JOYSTICK
-module_param_array(joystick, bool, NULL, 0444);
+module_param_array(joystick, bool, boot_devs, 0444);
MODULE_PARM_DESC(joystick, "Enable joystick. (VT82C686x only)");
#endif
-module_param_array(ac97_clock, int, NULL, 0444);
+module_param_array(ac97_clock, int, boot_devs, 0444);
MODULE_PARM_DESC(ac97_clock, "AC'97 codec clock (default 48000Hz).");
-module_param_array(ac97_quirk, int, NULL, 0444);
+module_param_array(ac97_quirk, int, boot_devs, 0444);
MODULE_PARM_DESC(ac97_quirk, "AC'97 workaround for strange hardware.");
-module_param_array(dxs_support, int, NULL, 0444);
+module_param_array(dxs_support, int, boot_devs, 0444);
MODULE_PARM_DESC(dxs_support, "Support for DXS channels (0 = auto, 1 = enable, 2 = disable, 3 = 48k only, 4 = no VRA)");
#define VIA_REV_8233 0x30 /* 2 rec, 4 pb, 1 multi-pb, spdif */
#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
/*
* Direct registers
unsigned int status;
unsigned int i;
+#if 0
+ /* FIXME: does it work on via823x? */
+ if (chip->chip_type != TYPE_VIA686)
+ goto _skip_sgd;
+#endif
status = inl(VIAREG(chip, SGD_SHADOW));
if (! (status & chip->intr_mask)) {
if (chip->rmidi)
return snd_mpu401_uart_interrupt(irq, chip->rmidi->private_data, regs);
return IRQ_NONE;
}
+// _skip_sgd:
/* check status for each stream */
spin_lock(&chip->reg_lock);
}
static struct ac97_quirk ac97_quirks[] = {
- {
- .vendor = 0x1106,
- .device = 0x4161,
- .codec_id = 0x56494161, /* VT1612A */
- .name = "Soltek SL-75DRV5",
- .type = AC97_TUNE_NONE
- },
{ /* FIXME: which codec? */
.vendor = 0x1106,
.device = 0x4161,
return err;
chip->ac97_bus->private_free = snd_via82xx_mixer_free_ac97_bus;
chip->ac97_bus->clock = chip->ac97_clock;
- chip->ac97_bus->shared_type = AC97_SHARED_TYPE_VIA;
memset(&ac97, 0, sizeof(ac97));
ac97.private_data = chip;
int i, err, caps;
unsigned char val;
+ pci_write_config_byte(chip->pci, VIA_FUNC_ENABLE,
+ chip->old_legacy & ~(VIA_FUNC_ENABLE_SB|VIA_FUNC_ENABLE_FM));
caps = chip->chip_type == TYPE_VIA8233A ? 1 : 2;
for (i = 0; i < caps; i++) {
snd_via8233_capture_source.index = i;
legacy_cfg = chip->old_legacy_cfg;
legacy |= VIA_FUNC_MIDI_IRQMASK; /* FIXME: correct? (disable MIDI) */
legacy &= ~VIA_FUNC_ENABLE_GAME; /* disable joystick */
+ legacy &= ~(VIA_FUNC_ENABLE_SB|VIA_FUNC_ENABLE_FM); /* diable SB & FM */
if (chip->revision >= VIA_REV_686_H) {
rev_h = 1;
if (mpu_port[dev] >= 0x200) { /* force MIDI */
pci_write_config_byte(chip->pci, VIA_FUNC_ENABLE, chip->old_legacy);
pci_write_config_byte(chip->pci, VIA_PNP_CONTROL, chip->old_legacy_cfg);
}
- pci_disable_device(chip->pci);
kfree(chip);
return 0;
}
if ((err = pci_enable_device(pci)) < 0)
return err;
- if ((chip = kcalloc(1, sizeof(*chip), GFP_KERNEL)) == NULL) {
- pci_disable_device(pci);
+ if ((chip = kcalloc(1, sizeof(*chip), GFP_KERNEL)) == NULL)
return -ENOMEM;
- }
chip->chip_type = chip_type;
chip->revision = revision;
pci_read_config_byte(pci, VIA_FUNC_ENABLE, &chip->old_legacy);
pci_read_config_byte(pci, VIA_PNP_CONTROL, &chip->old_legacy_cfg);
- pci_write_config_byte(chip->pci, VIA_FUNC_ENABLE,
- chip->old_legacy & ~(VIA_FUNC_ENABLE_SB|VIA_FUNC_ENABLE_FM));
if ((err = pci_request_regions(pci, card->driver)) < 0) {
kfree(chip);
- pci_disable_device(pci);
return err;
}
chip->port = pci_resource_start(pci, 0);
{ VIA_REV_8233, "VIA 8233", TYPE_VIA8233 },
{ VIA_REV_8233A, "VIA 8233A", TYPE_VIA8233A },
{ VIA_REV_8235, "VIA 8235", TYPE_VIA8233 },
- { VIA_REV_8237, "VIA 8237", TYPE_VIA8233 },
};
/*
{ .vendor = 0x1071, .device = 0x8375, .action = VIA_DXS_NO_VRA }, /* Vobis/Yakumo/Mitac notebook */
{ .vendor = 0x10cf, .device = 0x118e, .action = VIA_DXS_ENABLE }, /* FSC laptop */
{ .vendor = 0x1106, .device = 0x4161, .action = VIA_DXS_NO_VRA }, /* ASRock K7VT2 */
- { .vendor = 0x1106, .device = 0x4552, .action = VIA_DXS_NO_VRA }, /* QDI Kudoz 7X/600-6AL */
{ .vendor = 0x1106, .device = 0xaa01, .action = VIA_DXS_NO_VRA }, /* EPIA MII */
{ .vendor = 0x1297, .device = 0xa232, .action = VIA_DXS_ENABLE }, /* Shuttle ?? */
{ .vendor = 0x1297, .device = 0xc160, .action = VIA_DXS_ENABLE }, /* Shuttle SK41G */
- { .vendor = 0x1458, .device = 0xa002, .action = VIA_DXS_ENABLE }, /* Gigabyte GA-7VAXP */
+ { .vendor = 0x1458, .device = 0xa002, .action = VIA_DXS_NO_VRA }, /* Gigabyte GA-7VAXP (FIXME: or DXS_ENABLE?) */
{ .vendor = 0x147b, .device = 0x1401, .action = VIA_DXS_ENABLE }, /* ABIT KD7(-RAID) */
{ .vendor = 0x14ff, .device = 0x0403, .action = VIA_DXS_ENABLE }, /* Twinhead mobo */
{ .vendor = 0x1462, .device = 0x3800, .action = VIA_DXS_ENABLE }, /* MSI KT266 */
{ .vendor = 0x1631, .device = 0xe004, .action = VIA_DXS_ENABLE }, /* Easy Note 3174, Packard Bell */
{ .vendor = 0x1695, .device = 0x3005, .action = VIA_DXS_ENABLE }, /* EPoX EP-8K9A */
{ .vendor = 0x1849, .device = 0x3059, .action = VIA_DXS_NO_VRA }, /* ASRock K7VM2 */
- { .vendor = 0x147b, .device = 0x1415, .action = VIA_DXS_NO_VRA }, /* Abit AV8 */
{ } /* terminator */
};
struct dxs_whitelist *w;
}
if (chip_type == TYPE_VIA8233A)
strcpy(card->driver, "VIA8233A");
- else if (revision >= VIA_REV_8237)
- strcpy(card->driver, "VIA8237"); /* no slog assignment */
else
strcpy(card->driver, "VIA8233");
break;
for (i = 0; i < chip->num_devs; i++)
snd_via82xx_channel_reset(chip, &chip->devs[i]);
- snprintf(card->longname, sizeof(card->longname),
- "%s with %s at %#lx, irq %d", card->shortname,
- snd_ac97_get_short_name(chip->ac97), chip->port, chip->irq);
+ sprintf(card->longname, "%s at 0x%lx, irq %d",
+ card->shortname, chip->port, chip->irq);
snd_via82xx_proc_init(chip);