[VIA686A/686B only]
ac97_clock - AC'97 codec clock base (default 48000Hz)
dxs_support - support DXS channels,
- 0 = auto, 1 = enable, 2 = disable,
- 3 = 48k only (default)
+ 0 = auto (defalut), 1 = enable, 2 = disable,
+ 3 = 48k only
[VIA8233/C,8235 only]
Module supports autoprobe and multiple bus-master chips (max 8).
assigned under 15. You might also upgrade your BIOS.
Note: VIA8233/5 (not VIA8233A) can support DXS (direct sound)
- channels as the first PCM. With this device, up to 4
- streams can be played at the same time. On some motherboards,
- these channels don't work properly except for 48k due to the
- bug of BIOS. For supporting other sample rates, try to
- specify dxs_support=0.
+ channels as the first PCM. On these channels, up to 4
+ streams can be played at the same time.
+ As default (dxs_support = 0), 48k fixed rate is chosen since
+ the output is often noisy except for 48k on some mother
+ boards due to the bug of BIOS.
+ Please try once dxs_support=1 and if it works on other
+ sample rates, please let us know the PCI subsystem
+ vendor/device id's (output of "lspci -nv").
+ If it doesn't work, use dxs_support=3 or dxs_support=2.
Note: for the MPU401 on VIA823x, use snd-mpu401 driver
additonally. The mpu_port option is for VIA686 chips only.
static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; /* Enable this card */
static long mpu_port[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = -1};
static int ac97_clock[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 48000};
-static int dxs_support[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 3};
+static int dxs_support[SNDRV_CARDS];
MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
MODULE_PARM_DESC(index, "Index value for VIA 82xx bridge.");
#define VIA8233_SPDIF_SLOT_78 0x02
#define VIA8233_SPDIF_SLOT_69 0x03
+/*
+ */
+
+#define VIA_DXS_AUTO 0
+#define VIA_DXS_ENABLE 1
+#define VIA_DXS_DISABLE 2
+#define VIA_DXS_48K 3
+
+
/*
*/
{ VIA_REV_8235, "VIA 8235", TYPE_VIA8233 },
};
+/*
+ * auto detection of DXS channel supports.
+ */
+struct dxs_whitelist {
+ unsigned short vendor;
+ unsigned short device;
+ int action; /* new dxs_support value */
+};
+
+static int __devinit check_dxs_list(struct pci_dev *pci)
+{
+ static struct dxs_whitelist whitelist[] = {
+ // { .vendor = xxxx, .device = yyyy, .action = x },
+ { } /* terminator */
+ };
+ struct dxs_whitelist *w;
+ unsigned short subsystem_vendor;
+ unsigned short subsystem_device;
+
+ pci_read_config_word(pci, PCI_SUBSYSTEM_VENDOR_ID, &subsystem_vendor);
+ pci_read_config_word(pci, PCI_SUBSYSTEM_ID, &subsystem_device);
+
+ for (w = whitelist; w->vendor; w++)
+ if (w->vendor == subsystem_vendor &&
+ w->device == subsystem_device)
+ return w->action;
+
+ /*
+ * not detected, try 48k rate only to be sure.
+ */
+ printk(KERN_INFO "via82xx: Assuming DXS channels with 48k fixed sample rate.\n");
+ printk(KERN_INFO " Please try dxs_support=1 option and report if it works on your machine.\n");
+ return VIA_DXS_48K;
+};
+
static int __devinit snd_via82xx_probe(struct pci_dev *pci,
const struct pci_device_id *pci_id)
{
break;
}
}
+ if (dxs_support[dev] == VIA_DXS_AUTO)
+ dxs_support[dev] = check_dxs_list(pci);
/* force to use VIA8233 or 8233A model according to
* dxs_support module option
*/
- if (dxs_support[dev] == 1)
- chip_type = TYPE_VIA8233;
- else if (dxs_support[dev] == 2)
+ if (dxs_support[dev] == VIA_DXS_DISABLE)
chip_type = TYPE_VIA8233A;
+ else
+ chip_type = TYPE_VIA8233;
+
if (chip_type == TYPE_VIA8233A)
strcpy(card->driver, "VIA8233A");
else