Ok I seem to have found a working fix for it with headphones enabled in my elemntary OS luna [ with lts-raring HWE for precise]
In /etc/modprobe.d/alsa-base.conf , add :
options snd-hda-intel model=ref
now you can enable sub-woofer with command :
amixer set 'Mono Mux' DAC1
but headphone jack sensing doesnt work for sub-woofer
and you need to manual deactivate by command :
amixer set 'Mono Mux' Mixer
To Automate it acpi events could not be used , but pulseaudio configs are to be used. :
In /usr/share/pulseaudio/alsa-mixer/paths/analog-output.conf , add the following at the bottom just before .include analog-output.conf.common
[Element Mono Mux]
enumeration = select
[Option Mono Mux:DAC1]
name = analog-output
and also in /usr/share/pulseaudio/alsa-mixer/paths/analog-output-headphones.conf , add the following at the bottom just before .include analog-output.conf.common
[Element Mono Mux]
enumeration = select
[Option Mono Mux:Mixer]
name = analog-output-headphones
After that either restart the pc or run pulseaudio -k && sudo alsa force-reload
Now check if it has worked . either by playing out a song or opening alsamixer and connecting and disconnecting the headphone .
It seems that adding options snd-hda-intel model=ref
to alsa-base.conf doesn't work in Ubuntu 13.10 Saucy as pointed out in this askubuntu question. and i dont know if headphones jack sensing works if following the answer mentioned in that question or if there is chirping noise from audio , as i haven't yet installed a 13.10 saucy or lts-saucy HWE.
And also hda-jack-retask can be obtained in older versions using ppa:diwic/ppa
Hope it helped.
EDIT : Editing more confs . analog-output-speaker.conf , anolog-output-speaker-always.conf etc.. in the same manner was required.