Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-3]: src/sys/dev/pci Pull up following revision(s) (requested by k...



details:   https://anonhg.NetBSD.org/src/rev/3bea20ca7671
branches:  netbsd-3
changeset: 577777:3bea20ca7671
user:      tron <tron%NetBSD.org@localhost>
date:      Fri Jan 27 22:37:06 2006 +0000

description:
Pull up following revision(s) (requested by kent in ticket #1124):
        sys/dev/pci/azalia_codec.c: revision 1.7
readable names for AD1981HD codec

diffstat:

 sys/dev/pci/azalia_codec.c |  52 ++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 50 insertions(+), 2 deletions(-)

diffs (87 lines):

diff -r add2e43454bc -r 3bea20ca7671 sys/dev/pci/azalia_codec.c
--- a/sys/dev/pci/azalia_codec.c        Fri Jan 27 22:36:34 2006 +0000
+++ b/sys/dev/pci/azalia_codec.c        Fri Jan 27 22:37:06 2006 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: azalia_codec.c,v 1.4.2.6 2006/01/27 22:32:15 tron Exp $        */
+/*     $NetBSD: azalia_codec.c,v 1.4.2.7 2006/01/27 22:37:06 tron Exp $        */
 
 /*-
  * Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: azalia_codec.c,v 1.4.2.6 2006/01/27 22:32:15 tron Exp $");
+__KERNEL_RCSID(0, "$NetBSD: azalia_codec.c,v 1.4.2.7 2006/01/27 22:37:06 tron Exp $");
 
 #include <sys/null.h>
 #include <sys/systm.h>
@@ -53,6 +53,7 @@
 static int     alc880_init_dacgroup(codec_t *);
 static int     alc882_init_dacgroup(codec_t *);
 static int     alc882_init_widget(const codec_t *, widget_t *, nid_t);
+static int     ad1981hd_init_widget(const codec_t *, widget_t *, nid_t);
 static int     stac9221_init_dacgroup(codec_t *);
 
 
@@ -74,6 +75,11 @@
                this->init_dacgroup = alc882_init_dacgroup;
                this->init_widget = alc882_init_widget;
                break;
+       case 0x11d41981:
+               /* http://www.analog.com/en/prod/0,2877,AD1981HD,00.html */
+               this->name = "Analog Devices AD1981HD";
+               this->init_widget = ad1981hd_init_widget;
+               break;
        case 0x83847680:
                this->name = "Sigmatel STAC9221";
                this->init_dacgroup = stac9221_init_dacgroup;
@@ -411,6 +417,48 @@
 }
 
 /* ----------------------------------------------------------------
+ * Analog Device AD1981HD
+ * ---------------------------------------------------------------- */
+
+static int
+ad1981hd_init_widget(const codec_t *this, widget_t *w, nid_t nid)
+{
+       switch (nid) {
+       case 0x05:
+               strlcpy(w->name, AudioNline "out", sizeof(w->name));
+               break;
+       case 0x06:
+               strlcpy(w->name, "hp", sizeof(w->name));
+               break;
+       case 0x07:
+               strlcpy(w->name, AudioNmono, sizeof(w->name));
+               break;
+       case 0x08:
+               strlcpy(w->name, AudioNmicrophone, sizeof(w->name));
+               break;
+       case 0x09:
+               strlcpy(w->name, AudioNline "in", sizeof(w->name));
+               break;
+       case 0x0d:
+               strlcpy(w->name, "beep", sizeof(w->name));
+               break;
+       case 0x17:
+               strlcpy(w->name, AudioNaux, sizeof(w->name));
+               break;
+       case 0x18:
+               strlcpy(w->name, AudioNmicrophone "2", sizeof(w->name));
+               break;
+       case 0x19:
+               strlcpy(w->name, AudioNcd, sizeof(w->name));
+               break;
+       case 0x1d:
+               strlcpy(w->name, AudioNspeaker, sizeof(w->name));
+               break;
+       }
+       return 0;
+}
+
+/* ----------------------------------------------------------------
  * Sigmatel STAC9221 and STAC9221D
  * ---------------------------------------------------------------- */
 



Home | Main Index | Thread Index | Old Index