summaryrefslogtreecommitdiffstats
path: root/sys/dev/sound
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2013-03-27 07:30:08 +0000
committermav <mav@FreeBSD.org>2013-03-27 07:30:08 +0000
commite3a102cae666fa972c9774344b65874ff9ae9205 (patch)
tree8d97170c34c3269453c2f2e9ea41003ba9d0f3d8 /sys/dev/sound
parent48949db9d67f51ba3c592f887bca13abb30bbaaa (diff)
downloadFreeBSD-src-e3a102cae666fa972c9774344b65874ff9ae9205.zip
FreeBSD-src-e3a102cae666fa972c9774344b65874ff9ae9205.tar.gz
Add Subsystem ID field to the quirk table. Use it to identify Mac Pro 1,1,
which requires OVREF to be set to get proper playback volume, but which has all zeroes in HDA controller subdevice IDs on PCI. MFC after: 1 month Sponsored by:
Diffstat (limited to 'sys/dev/sound')
-rw-r--r--sys/dev/sound/pci/hda/hdaa_patches.c59
1 files changed, 33 insertions, 26 deletions
diff --git a/sys/dev/sound/pci/hda/hdaa_patches.c b/sys/dev/sound/pci/hda/hdaa_patches.c
index cd1a4f6..ffa1f75 100644
--- a/sys/dev/sound/pci/hda/hdaa_patches.c
+++ b/sys/dev/sound/pci/hda/hdaa_patches.c
@@ -47,6 +47,7 @@ SND_DECLARE_FILE("$FreeBSD$");
static const struct {
uint32_t model;
uint32_t id;
+ uint32_t subsystemid;
uint32_t set, unset;
uint32_t gpio;
} hdac_quirks[] = {
@@ -55,77 +56,81 @@ static const struct {
* on few codecs (especially ALC880) seems broken or
* perhaps unsupported.
*/
- { HDA_MATCH_ALL, HDA_MATCH_ALL,
+ { HDA_MATCH_ALL, HDA_MATCH_ALL, HDA_MATCH_ALL,
HDAA_QUIRK_FORCESTEREO | HDAA_QUIRK_IVREF, 0,
0 },
- { ACER_ALL_SUBVENDOR, HDA_MATCH_ALL,
+ { ACER_ALL_SUBVENDOR, HDA_MATCH_ALL, HDA_MATCH_ALL,
0, 0,
HDAA_GPIO_SET(0) },
- { ASUS_G2K_SUBVENDOR, HDA_CODEC_ALC660,
+ { ASUS_G2K_SUBVENDOR, HDA_CODEC_ALC660, HDA_MATCH_ALL,
0, 0,
HDAA_GPIO_SET(0) },
- { ASUS_M5200_SUBVENDOR, HDA_CODEC_ALC880,
+ { ASUS_M5200_SUBVENDOR, HDA_CODEC_ALC880, HDA_MATCH_ALL,
0, 0,
HDAA_GPIO_SET(0) },
- { ASUS_A7M_SUBVENDOR, HDA_CODEC_ALC880,
+ { ASUS_A7M_SUBVENDOR, HDA_CODEC_ALC880, HDA_MATCH_ALL,
0, 0,
HDAA_GPIO_SET(0) },
- { ASUS_A7T_SUBVENDOR, HDA_CODEC_ALC882,
+ { ASUS_A7T_SUBVENDOR, HDA_CODEC_ALC882, HDA_MATCH_ALL,
0, 0,
HDAA_GPIO_SET(0) },
- { ASUS_W2J_SUBVENDOR, HDA_CODEC_ALC882,
+ { ASUS_W2J_SUBVENDOR, HDA_CODEC_ALC882, HDA_MATCH_ALL,
0, 0,
HDAA_GPIO_SET(0) },
- { ASUS_U5F_SUBVENDOR, HDA_CODEC_AD1986A,
+ { ASUS_U5F_SUBVENDOR, HDA_CODEC_AD1986A, HDA_MATCH_ALL,
HDAA_QUIRK_EAPDINV, 0,
0 },
- { ASUS_A8X_SUBVENDOR, HDA_CODEC_AD1986A,
+ { ASUS_A8X_SUBVENDOR, HDA_CODEC_AD1986A, HDA_MATCH_ALL,
HDAA_QUIRK_EAPDINV, 0,
0 },
- { ASUS_F3JC_SUBVENDOR, HDA_CODEC_ALC861,
+ { ASUS_F3JC_SUBVENDOR, HDA_CODEC_ALC861, HDA_MATCH_ALL,
HDAA_QUIRK_OVREF, 0,
0 },
- { UNIWILL_9075_SUBVENDOR, HDA_CODEC_ALC861,
+ { UNIWILL_9075_SUBVENDOR, HDA_CODEC_ALC861, HDA_MATCH_ALL,
HDAA_QUIRK_OVREF, 0,
0 },
- /*{ ASUS_M2N_SUBVENDOR, HDA_CODEC_AD1988,
+ /*{ ASUS_M2N_SUBVENDOR, HDA_CODEC_AD1988, HDA_MATCH_ALL,
HDAA_QUIRK_IVREF80, HDAA_QUIRK_IVREF50 | HDAA_QUIRK_IVREF100,
0 },*/
- { MEDION_MD95257_SUBVENDOR, HDA_CODEC_ALC880,
+ { MEDION_MD95257_SUBVENDOR, HDA_CODEC_ALC880, HDA_MATCH_ALL,
0, 0,
HDAA_GPIO_SET(1) },
- { LENOVO_3KN100_SUBVENDOR, HDA_CODEC_AD1986A,
+ { LENOVO_3KN100_SUBVENDOR, HDA_CODEC_AD1986A, HDA_MATCH_ALL,
HDAA_QUIRK_EAPDINV | HDAA_QUIRK_SENSEINV, 0,
0 },
- { SAMSUNG_Q1_SUBVENDOR, HDA_CODEC_AD1986A,
+ { SAMSUNG_Q1_SUBVENDOR, HDA_CODEC_AD1986A, HDA_MATCH_ALL,
HDAA_QUIRK_EAPDINV, 0,
0 },
- { APPLE_MB3_SUBVENDOR, HDA_CODEC_ALC885,
+ { APPLE_MB3_SUBVENDOR, HDA_CODEC_ALC885, HDA_MATCH_ALL,
HDAA_QUIRK_OVREF50, 0,
HDAA_GPIO_SET(0) },
- { APPLE_INTEL_MAC, HDA_CODEC_STAC9221,
+ { APPLE_INTEL_MAC, HDA_CODEC_STAC9221, HDA_MATCH_ALL,
0, 0,
HDAA_GPIO_SET(0) | HDAA_GPIO_SET(1) },
- { APPLE_MACBOOKPRO55, HDA_CODEC_CS4206,
+ { APPLE_MACBOOKPRO55, HDA_CODEC_CS4206, HDA_MATCH_ALL,
0, 0,
HDAA_GPIO_SET(1) | HDAA_GPIO_SET(3) },
- { DELL_D630_SUBVENDOR, HDA_CODEC_STAC9205X,
+ { DELL_D630_SUBVENDOR, HDA_CODEC_STAC9205X, HDA_MATCH_ALL,
0, 0,
HDAA_GPIO_SET(0) },
- { DELL_V1400_SUBVENDOR, HDA_CODEC_STAC9228X,
+ { DELL_V1400_SUBVENDOR, HDA_CODEC_STAC9228X, HDA_MATCH_ALL,
0, 0,
HDAA_GPIO_SET(2) },
- { DELL_V1500_SUBVENDOR, HDA_CODEC_STAC9205X,
+ { DELL_V1500_SUBVENDOR, HDA_CODEC_STAC9205X, HDA_MATCH_ALL,
0, 0,
HDAA_GPIO_SET(0) },
- { HDA_MATCH_ALL, HDA_CODEC_AD1988,
+ { HDA_MATCH_ALL, HDA_CODEC_AD1988, HDA_MATCH_ALL,
HDAA_QUIRK_IVREF80, HDAA_QUIRK_IVREF50 | HDAA_QUIRK_IVREF100,
0 },
- { HDA_MATCH_ALL, HDA_CODEC_AD1988B,
+ { HDA_MATCH_ALL, HDA_CODEC_AD1988B, HDA_MATCH_ALL,
HDAA_QUIRK_IVREF80, HDAA_QUIRK_IVREF50 | HDAA_QUIRK_IVREF100,
0 },
- { HDA_MATCH_ALL, HDA_CODEC_CX20549,
+ { HDA_MATCH_ALL, HDA_CODEC_CX20549, HDA_MATCH_ALL,
0, HDAA_QUIRK_FORCESTEREO,
+ 0 },
+ /* Mac Pro 1,1 requires ovref for proper volume level. */
+ { 0x00000000, HDA_CODEC_ALC885, 0x106b0c00,
+ 0, HDAA_QUIRK_OVREF,
0 }
};
#define HDAC_QUIRKS_LEN (sizeof(hdac_quirks) / sizeof(hdac_quirks[0]))
@@ -425,18 +430,20 @@ void
hdaa_patch(struct hdaa_devinfo *devinfo)
{
struct hdaa_widget *w;
- uint32_t id, subid;
+ uint32_t id, subid, subsystemid;
int i;
id = hdaa_codec_id(devinfo);
subid = hdaa_card_id(devinfo);
+ subsystemid = hda_get_subsystem_id(devinfo->dev);
/*
* Quirks
*/
for (i = 0; i < HDAC_QUIRKS_LEN; i++) {
if (!(HDA_DEV_MATCH(hdac_quirks[i].model, subid) &&
- HDA_DEV_MATCH(hdac_quirks[i].id, id)))
+ HDA_DEV_MATCH(hdac_quirks[i].id, id) &&
+ HDA_DEV_MATCH(hdac_quirks[i].subsystemid, subsystemid)))
continue;
devinfo->quirks |= hdac_quirks[i].set;
devinfo->quirks &= ~(hdac_quirks[i].unset);
OpenPOWER on IntegriCloud