Author: araujo
Date: Tue Jul 30 02:01:49 2019
New Revision: 350433
URL: https://svnweb.freebsd.org/changeset/base/350433

Log:
  Fix sound on headset jack for ALC255 and ALC256 codec.
  
  PR:           219350 [1], [2]
  Submitted by: Masachika ISHIZUKA (ish_at_amail.plala.or.jp) [1]
                Neel Chauhan (neel_at_neelc.org) [2]
                uri Momotyuk (yurkis_at_gmail.com) [3]
  Reported by:  miwi
  Reviewed by:  mav
  Obtained from:        https://github.com/trueos/trueos/pull/279 [3]
  MFC after:    2 weeks
  Differential Revision:        https://reviews.freebsd.org/D19017

Modified:
  head/sys/dev/sound/pci/hda/hdaa_patches.c
  head/sys/dev/sound/pci/hda/hdac.h

Modified: head/sys/dev/sound/pci/hda/hdaa_patches.c
==============================================================================
--- head/sys/dev/sound/pci/hda/hdaa_patches.c   Mon Jul 29 22:07:43 2019        
(r350432)
+++ head/sys/dev/sound/pci/hda/hdaa_patches.c   Tue Jul 30 02:01:49 2019        
(r350433)
@@ -425,12 +425,21 @@ hdac_pin_patch(struct hdaa_widget *w)
        } else if (id == HDA_CODEC_ALC298 && subid == DELL_XPS9560_SUBVENDOR) {
                switch (nid) {
                case 24:
-                       config  = 0x01a1913c;
+                       config = 0x01a1913c;
                        break;
                case 26:
-                       config  = 0x01a1913d;
+                       config = 0x01a1913d;
                        break;
                }
+       } else if (id == HDA_CODEC_ALC256 && subid == DELL_I7577_SUBVENDOR ) {
+               switch (nid) {
+               case 20:
+                       patch = "as=1 seq=0";
+                       break;
+               case 33:
+                       patch = "as=1 seq=15";
+                       break;
+               }
        }
 
        if (patch != NULL)
@@ -768,6 +777,10 @@ hdaa_patch_direct(struct hdaa_devinfo *devinfo)
                        hdaa_write_coef(dev, 0x20, 0x07, 0x7cb);
                }
                break;
+       }
+       if (id == HDA_CODEC_ALC255 || id == HDA_CODEC_ALC256) {
+               val = hdaa_read_coef(dev, 0x20, 0x46);
+               hdaa_write_coef(dev, 0x20, 0x46, val|0x3000);
        }
        if (subid == APPLE_INTEL_MAC)
                hda_command(dev, HDA_CMD_12BIT(0, devinfo->nid,

Modified: head/sys/dev/sound/pci/hda/hdac.h
==============================================================================
--- head/sys/dev/sound/pci/hda/hdac.h   Mon Jul 29 22:07:43 2019        
(r350432)
+++ head/sys/dev/sound/pci/hda/hdac.h   Tue Jul 30 02:01:49 2019        
(r350433)
@@ -203,6 +203,7 @@
 #define DELL_XPSM1210_SUBVENDOR        HDA_MODEL_CONSTRUCT(DELL, 0x01d7)
 #define DELL_OPLX745_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x01da)
 #define DELL_XPS9560_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x07be)
+#define DELL_I7577_SUBVENDOR   HDA_MODEL_CONSTRUCT(DELL, 0x0802)
 #define DELL_ALL_SUBVENDOR     HDA_MODEL_CONSTRUCT(DELL, 0xffff)
 
 /* Clevo */
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to