Comment 197 for bug 1332900

Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :

you need to add function just before coef_fw alc668_coefs in patch_realtek.c

static void alc668_fixup_dell_alienware(struct hda_codec *codec,
        const struct hda_fixup *fix, int action)
{
 const struct hda_pintbl pincfgs[] = {
  { 0x1a, 0x90170111 }, /* subwoofer */
  { 0x1b, 0x03a1113c }, /* headset mic */
  { }
 };
static hda_nid_t preferred_pair[] = {
  0x14, 0x03,
     0x1a, 0x04,
  0x15, 0x02,
  0x16, 0x02,
  0
 };
 struct alc_spec *spec = codec->spec;

 switch (action) {
 case HDA_FIXUP_ACT_PRE_PROBE:
  snd_hda_apply_pincfgs(codec, pincfgs);
  spec->gen.preferred_dacs = preferred_pair;
  break;
 }
}

add the following line after ALC668_FIXUP_DELL_XPS13, in enum

 ALC668_FIXUP_DELL_ALIENWARE,

add following to hda_fixup alc662_fixups

[ALC668_FIXUP_DELL_ALIENWARE] = {
  .type = HDA_FIXUP_FUNC,
  .v.func = alc668_fixup_dell_alienware,
  .chained = true,
  .chain_id = ALC668_FIXUP_HEADSET_MODE
 },

add the following pci quirk to snd_pci_quirk alc662_fixup_tbl

  SND_PCI_QUIRK(0x1028, 0x05ab, "Dell Alienware 18", ALC668_FIXUP_DELL_ALIENWARE),

recompile alsa driver

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/tree/sound/pci/hda/hda_local.h

if you want the driver output debug info to system log about the headset type, need to change

#define codec_dbg(codec, fmt, args...) \
 dev_dbg(hda_codec_dev(codec), fmt, ##args)

to

#define codec_dbg(codec, fmt, args...) \
 dev_info(hda_codec_dev(codec), fmt, ##args)