On Wed, Nov 03, 2010 at 03:32:21PM -0200, Shazaum wrote:
> a little test in freebsd 6.2 audio worked

going by what they kept in their current driver, and what alsa does,
perhaps this helps.  probably doesn't fix the internal speaker, but
might get headphone output working.

-- 
[email protected]
SDF Public Access UNIX System - http://sdf.lonestar.org

Index: azalia.h
===================================================================
RCS file: /cvs/src/sys/dev/pci/azalia.h,v
retrieving revision 1.62
diff -u -p azalia.h
--- azalia.h    10 Sep 2010 15:11:23 -0000      1.62
+++ azalia.h    6 Nov 2010 21:54:24 -0000
@@ -510,6 +510,8 @@
 #define AZ_QRK_WID_BEEP_1D     0x00002000
 #define AZ_QRK_WID_OVREF50     0x00004000
 #define AZ_QRK_WID_AD1981_OAMP 0x00008000
+#define AZ_QRK_WID_OVREF100    0x00010000
+#define AZ_QRK_WID_HP_0F       0x00020000
 
 /* memory-mapped types */
 typedef struct {
Index: azalia_codec.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/azalia_codec.c,v
retrieving revision 1.151
diff -u -p azalia_codec.c
--- azalia_codec.c      10 Sep 2010 15:11:23 -0000      1.151
+++ azalia_codec.c      6 Nov 2010 21:54:24 -0000
@@ -96,6 +96,9 @@ azalia_codec_init_vtbl(codec_t *this)
                break;
        case 0x10ec0861:
                this->name = "Realtek ALC861";
+               if (this->subid == 0x90751584) {        /* CCE_X20II ??? */
+                       this->qrks |= AZ_QRK_WID_OVREF100 | AZ_QRK_WID_HP_0F;
+               }
                break;
        case 0x10ec0880:
                this->name = "Realtek ALC880";
@@ -1928,6 +1931,8 @@ azalia_mixer_set(codec_t *this, nid_t nid, int target,
                        value |= CORB_PWC_OUTPUT;
                        if (this->qrks & AZ_QRK_WID_OVREF50)
                                value |= CORB_PWC_VREF_50;
+                       if (this->qrks & AZ_QRK_WID_OVREF100)
+                               value |= CORB_PWC_VREF_100;
                } else {
                        value &= ~CORB_PWC_OUTPUT;
                        value |= CORB_PWC_INPUT;
@@ -2434,6 +2439,13 @@ azalia_codec_widget_quirks(codec_t *this, nid_t nid)
            ((nid == 0x05) || (nid == 0x06) || (nid == 0x07) ||
            (nid == 0x09) || (nid == 0x18))) {
                azalia_ampcap_ov(w, COP_OUTPUT_AMPCAP, 31, 33, 6, 30, 1);
+       }
+
+       if ((this->qrks & AZ_QRK_WID_HP_0F) && (nid == 0x0f)) {
+               azalia_pin_config_ov(w, CORB_CD_DEVICE_MASK, CORB_CD_HEADPHONE);
+               azalia_pin_config_ov(w, CORB_CD_PORT_MASK, CORB_CD_JACK);
+               w->widgetcap |= COP_AWCAP_STEREO;
+               w->enable = 1;
        }
 
        return(0);

Reply via email to