--- ./sound/pci/hda/patch_realtek.c.orig 2011-11-25 11:37:01.303999976 +0100 +++ ./sound/pci/hda/patch_realtek.c 2011-11-25 11:39:02.780497718 +0100 @@ -3053,6 +3053,37 @@ memset(spec->private_dac_nids, 0, sizeof(spec->private_dac_nids)); spec->multiout.dac_nids = spec->private_dac_nids; + if (cfg->hp_outs == 1 && cfg->line_outs == 1 && + cfg->num_inputs >= 3 && cfg->speaker_outs >= 1) { + /* assign 0x02 as Front DAC by using speaker or hp pins */ + spec->private_dac_nids[0] = alc_auto_look_for_dac(codec, cfg->speaker_pins[0]); + /* hp , mic and line-in at the same location + * use alc_auto_fill_multi_ios() to assign surround and clfe dacs + */ + defcfg = snd_hda_codec_get_pincfg(codec, cfg->hp_pins[0]); + location = get_defcfg_location(defcfg); + spec->multiout.num_dacs = 1; + num_pins = alc_auto_fill_multi_ios(codec, location, 1); + if (num_pins > 0) { + spec->multi_ios = num_pins; + spec->ext_channel_count = 2; + spec->multiout.num_dacs = num_pins + 1; + } + /* an ugly hack to add side as multi io even side does not support input + * set pin ctl to PIN_OUT to set multi_io[2].ctl_in to PIN_OUT + */ + if (location == get_defcfg_location(snd_hda_codec_get_pincfg(codec, cfg->line_out_pins[0]))) { + spec->private_dac_nids[3] = alc_auto_look_for_dac(codec, cfg->line_out_pins[0]); + spec->multi_io[2].dac = spec->private_dac_nids[3]; + spec->multi_io[2].pin = cfg->line_out_pins[0]; + snd_hda_codec_write(codec, cfg->line_out_pins[0], 0, + AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT); + spec->multi_ios++; + spec->multiout.num_dacs++; + } + return 0; + } + /* fill hard-wired DACs first */ if (!redone) { for (i = 0; i < cfg->line_outs; i++) @@ -3645,6 +3676,19 @@ spec->multiout.max_channels = spec->ext_channel_count; if (spec->need_dac_fix && !spec->const_channel_count) spec->multiout.num_dacs = spec->multiout.max_channels / 2; + + printk(KERN_INFO "ch = %d\n",ch); + printk(KERN_INFO "max channel %d\n",spec->multiout.max_channels); + for (i=0; iautocfg.hp_outs; i++) + printk(KERN_INFO "hp dac(%d) %x pin %x\n", i, spec->multiout.hp_out_nid[i], spec->autocfg.hp_pins[i]); + for (i=0; imultiout.num_dacs; i++) + printk(KERN_INFO "private_dac(%d) %x\n", i, spec->private_dac_nids[i]); + for (i=0; iautocfg.line_outs; i++) + printk(KERN_INFO "line_out(%d) pin %x\n", i, spec->autocfg.line_out_pins[i]); + for (i=0; imultiout.num_dacs-1; i++) + printk(KERN_INFO "multi_io(%d) dac %x pin %x\n", i, spec->multi_io[i].dac, spec->multi_io[i].pin); + for (i=0; iautocfg.speaker_outs; i++) + printk(KERN_INFO "extra_out(%d) dac %x pin %x\n", i, spec->multiout.extra_out_nid[i], spec->autocfg.speaker_pins[i]); return 1; } @@ -5850,6 +5894,7 @@ ALC662_FIXUP_ASUS_MODE6, ALC662_FIXUP_ASUS_MODE7, ALC662_FIXUP_ASUS_MODE8, + ALC892_FIXUP_CLEVO_4ST_8CH, }; static const struct alc_fixup alc662_fixups[] = { @@ -5995,6 +6040,20 @@ .chained = true, .chain_id = ALC662_FIXUP_SKU_IGNORE }, + [ALC892_FIXUP_CLEVO_4ST_8CH] = { + .type = ALC_FIXUP_PINS, + .v.pins = (const struct alc_pincfg[]) { +/* + need to be same location as the other jack + may need to change the default association and sequence since + Lower Default Association values would be higher in priority for resources + such as processing nodes or Input and Output Converters. + A value of 0000b is reserved and should not be used +*/ + { 0x17, 0x01011013 }, /* Side */ + { } + }, + }, }; static const struct snd_pci_quirk alc662_fixup_tbl[] = { @@ -6008,6 +6067,8 @@ SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo Ideapad Y550P", ALC662_FIXUP_IDEAPAD), SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Ideapad Y550", ALC662_FIXUP_IDEAPAD), SND_PCI_QUIRK(0x1b35, 0x2206, "CZC P10T", ALC662_FIXUP_CZC_P10T), + SND_PCI_QUIRK(0x1558, 0x5102, "Clevo P150HM", ALC892_FIXUP_CLEVO_4ST_8CH), + SND_PCI_QUIRK(0x1558, 0x7100, "Clevo P170HM", ALC892_FIXUP_CLEVO_4ST_8CH), #if 0 /* Below is a quirk table taken from the old code.