diff options
author | Takashi Iwai <tiwai@suse.de> | 2007-02-01 09:46:50 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2007-02-09 03:03:32 -0500 |
commit | 3372a153c230bd0b28d470118d5a4c5840f8f966 (patch) | |
tree | f705d4b3bfd3527876d8895877d84e1ddb37b6fb /sound | |
parent | 0981a260a1fe4a3f22cc70ef01ce38a73f548745 (diff) |
[ALSA] hda-intel - Add black/whitelist for position_fix option
Some devices are known to require position_fix=1 or 2 to make the
driver working correctly. Otherwise the sound gets weird effects,
such as stutters.
Now a black/whitelist is introduced to indicate the position_fix
value explicitly for such misbehaving hardwares. As a first example,
Dell D820 is listed there. More will come later likely...
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/hda_intel.c | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 83d1ba7f33a0..b9a8e238b0a8 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -1503,6 +1503,31 @@ static int azx_dev_free(struct snd_device *device) | |||
1503 | } | 1503 | } |
1504 | 1504 | ||
1505 | /* | 1505 | /* |
1506 | * white/black-listing for position_fix | ||
1507 | */ | ||
1508 | static const struct snd_pci_quirk position_fix_list[] __devinitdata = { | ||
1509 | SND_PCI_QUIRK(0x1028, 0x01cc, "Dell D820", POS_FIX_NONE), | ||
1510 | {} | ||
1511 | }; | ||
1512 | |||
1513 | static int __devinit check_position_fix(struct azx *chip, int fix) | ||
1514 | { | ||
1515 | const struct snd_pci_quirk *q; | ||
1516 | |||
1517 | if (fix == POS_FIX_AUTO) { | ||
1518 | q = snd_pci_quirk_lookup(chip->pci, position_fix_list); | ||
1519 | if (q) { | ||
1520 | snd_printdd(KERN_INFO | ||
1521 | "hda_intel: position_fix set to %d " | ||
1522 | "for device %04x:%04x\n", | ||
1523 | q->value, q->subvendor, q->subdevice); | ||
1524 | return q->value; | ||
1525 | } | ||
1526 | } | ||
1527 | return fix; | ||
1528 | } | ||
1529 | |||
1530 | /* | ||
1506 | * constructor | 1531 | * constructor |
1507 | */ | 1532 | */ |
1508 | static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci, | 1533 | static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci, |
@@ -1536,7 +1561,8 @@ static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci, | |||
1536 | chip->driver_type = driver_type; | 1561 | chip->driver_type = driver_type; |
1537 | chip->msi = enable_msi; | 1562 | chip->msi = enable_msi; |
1538 | 1563 | ||
1539 | chip->position_fix = position_fix; | 1564 | chip->position_fix = check_position_fix(chip, position_fix); |
1565 | |||
1540 | chip->single_cmd = single_cmd; | 1566 | chip->single_cmd = single_cmd; |
1541 | 1567 | ||
1542 | #if BITS_PER_LONG != 64 | 1568 | #if BITS_PER_LONG != 64 |