diff options
author | Jacob Meuser <jakemsr@cvs.openbsd.org> | 2009-06-09 05:05:49 +0000 |
---|---|---|
committer | Jacob Meuser <jakemsr@cvs.openbsd.org> | 2009-06-09 05:05:49 +0000 |
commit | 2139236498fe4a12f40d119c93b23c62ed7e6c56 (patch) | |
tree | 5d0086c737244befa4a1498fa083c8302535e8c1 | |
parent | 1d0ef45f7b4f5d5c65496c9545d3b98828d4a1eb (diff) |
quirks for MacBookPro3,1 inspired by FreeBSD's snd_hda. problem
reported and patch tested by Bryan Chapman. according to FreeBSD,
this might be needed for other MacBookPro models but no one else has
told me their MacBookPro doesn't work.
-rw-r--r-- | sys/dev/pci/azalia.c | 5 | ||||
-rw-r--r-- | sys/dev/pci/azalia.h | 3 | ||||
-rw-r--r-- | sys/dev/pci/azalia_codec.c | 7 |
3 files changed, 12 insertions, 3 deletions
diff --git a/sys/dev/pci/azalia.c b/sys/dev/pci/azalia.c index d0d3f7fa805..5eb11808bcf 100644 --- a/sys/dev/pci/azalia.c +++ b/sys/dev/pci/azalia.c @@ -1,4 +1,4 @@ -/* $OpenBSD: azalia.c,v 1.137 2009/05/31 03:22:05 jakemsr Exp $ */ +/* $OpenBSD: azalia.c,v 1.138 2009/06/09 05:05:48 jakemsr Exp $ */ /* $NetBSD: azalia.c,v 1.20 2006/05/07 08:31:44 kent Exp $ */ /*- @@ -2868,6 +2868,9 @@ azalia_widget_init_pin(widget_t *this, const codec_t *codec) dir |= CORB_PWC_VREF_50; } + if ((codec->qrks & AZ_QRK_WID_OVREF50) && (dir == CORB_PWC_OUTPUT)) + dir |= CORB_PWC_VREF_50; + azalia_comresp(codec, this->nid, CORB_SET_PIN_WIDGET_CONTROL, dir, NULL); diff --git a/sys/dev/pci/azalia.h b/sys/dev/pci/azalia.h index 525d616a695..087292df225 100644 --- a/sys/dev/pci/azalia.h +++ b/sys/dev/pci/azalia.h @@ -1,4 +1,4 @@ -/* $OpenBSD: azalia.h,v 1.50 2009/05/31 03:22:05 jakemsr Exp $ */ +/* $OpenBSD: azalia.h,v 1.51 2009/06/09 05:05:48 jakemsr Exp $ */ /* $NetBSD: azalia.h,v 1.6 2006/01/16 14:15:26 kent Exp $ */ /*- @@ -505,6 +505,7 @@ #define AZ_QRK_WID_MASK 0x000ff000 #define AZ_QRK_WID_CDIN_1C 0x00001000 #define AZ_QRK_WID_BEEP_1D 0x00002000 +#define AZ_QRK_WID_OVREF50 0x00004000 /* memory-mapped types */ typedef struct { diff --git a/sys/dev/pci/azalia_codec.c b/sys/dev/pci/azalia_codec.c index eaedd95da01..c42378c9d66 100644 --- a/sys/dev/pci/azalia_codec.c +++ b/sys/dev/pci/azalia_codec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: azalia_codec.c,v 1.130 2009/05/31 03:22:05 jakemsr Exp $ */ +/* $OpenBSD: azalia_codec.c,v 1.131 2009/06/09 05:05:48 jakemsr Exp $ */ /* $NetBSD: azalia_codec.c,v 1.8 2006/05/10 11:17:27 kent Exp $ */ /*- @@ -129,9 +129,12 @@ azalia_codec_init_vtbl(codec_t *this) this->name = "Realtek ALC885"; this->qrks |= AZ_QRK_WID_CDIN_1C | AZ_QRK_WID_BEEP_1D; if (this->subid == 0x00a1106b || /* APPLE_MB3 */ + this->subid == 0x00a0106b || /* APPLE_MB3_1 */ this->subid == 0x00a3106b) { /* APPLE_MB4 */ this->qrks |= AZ_QRK_GPIO_UNMUTE_0; } + if (this->subid == 0x00a0106b) + this->qrks |= AZ_QRK_WID_OVREF50; break; case 0x10ec0888: this->name = "Realtek ALC888"; @@ -1843,6 +1846,8 @@ azalia_mixer_set(codec_t *this, nid_t nid, int target, } else if (mc->un.ord == 1) { value &= ~CORB_PWC_INPUT; value |= CORB_PWC_OUTPUT; + if (this->qrks & AZ_QRK_WID_OVREF50) + value |= CORB_PWC_VREF_50; } else { value &= ~CORB_PWC_OUTPUT; value |= CORB_PWC_INPUT; |