Comment 42 for bug 1516025

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

(In reply to mohammed imran from comment #2)
> #define assoc_of_nid(c,p)
> get_defcfg_association(snd_hda_codec_get_pincfg(c,p))
>
> if ((cfg->speaker_outs == 2) && (cfg->hp_outs == 2))
> if (cfg->line_out_type == AUTO_PIN_HP_OUT)
> for(i=0; i<2; i++)
> if (assoc_of_nid(codec,cfg->line_out_pins[i]) >
> assoc_of_nid(codec,cfg->speaker_pins[i]))
> badness++;
>
> add the above in fill_and_eval_dacs() in hda_generic.c after
>
> if ( spec->mixer_nid) {
>
> }
>
> this increase badness of cfg->line_out_type == AUTO_PIN_HP_OUT by one when
> the second headphone have higher def association than subwoofer , driver
> create speaker and bass speaker volume controls and headphone volume control
> for headset and headphone

the easyway is to assign preferred dac for the output pins to force which output pin can get a volume control and which pins need to share volume control

spec->gen.preferred_dacs = preferred_pair;