From be346f80ffe8d97811f92ce9d531c76a70f073ed Mon Sep 17 00:00:00 2001 From: markd Date: Tue, 27 Jan 2009 08:23:00 +0000 Subject: [PATCH] Add Analog Devices AD1984A and treat like AD1984. --- sys/dev/pci/azalia_codec.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/sys/dev/pci/azalia_codec.c b/sys/dev/pci/azalia_codec.c index f0cb9b251e5c..c125e41482bb 100644 --- a/sys/dev/pci/azalia_codec.c +++ b/sys/dev/pci/azalia_codec.c @@ -1,4 +1,4 @@ -/* $NetBSD: azalia_codec.c,v 1.73 2009/01/18 10:40:40 cegger Exp $ */ +/* $NetBSD: azalia_codec.c,v 1.74 2009/01/27 08:23:00 markd Exp $ */ /*- * Copyright (c) 2005 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: azalia_codec.c,v 1.73 2009/01/18 10:40:40 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: azalia_codec.c,v 1.74 2009/01/27 08:23:00 markd Exp $"); #include #include @@ -267,6 +267,14 @@ azalia_codec_init_vtbl(codec_t *this) this->mixer_init = ad1984_mixer_init; this->unsol_event = ad1984_unsol_event; break; + case 0x11d4194a: + /* http://www.analog.com/static/imported-files/data_sheets/AD1984A.pdf */ + this->name = "Analog Devices AD1984A"; + this->init_dacgroup = ad1984_init_dacgroup; + this->init_widget = ad1984_init_widget; + this->mixer_init = ad1984_mixer_init; + this->unsol_event = ad1984_unsol_event; + break; case 0x11d41986: /* http://www.analog.com/en/prod/0,2877,AD1986A,00.html */ this->name = "Analog Devices AD1986A"; @@ -3540,6 +3548,7 @@ ad1983_unsol_event(codec_t *this, int tag) #define AD1984_THINKPAD 0x20ac17aa #define AD1984_DELL_OPTIPLEX_755 0x02111028 +#define AD1984A_DELL_OPTIPLEX_760 0x027f1028 static int ad1984_init_dacgroup(codec_t *this) @@ -3567,7 +3576,8 @@ ad1984_mixer_init(codec_t *this) if (err) return err; - if (this->subid == AD1984_DELL_OPTIPLEX_755) { + if (this->subid == AD1984_DELL_OPTIPLEX_755 || + this->subid == AD1984A_DELL_OPTIPLEX_760) { /* setup a unsolicited event for the headphones and speaker */ this->comresp(this, 0x12, CORB_SET_UNSOLICITED_RESPONSE, CORB_UNSOL_ENABLE | AD198X_EVENT_SPEAKER, NULL);