Add kcontrol API for Headphone Jack and Spk for WM8962, from this kcontrol, you can use amixer to change freely between Headphone and Spk.
The names of the mixers
1: HP Function
2: SPK Function
amixer controls:
numid=62,iface=MIXER,name='HP Function'
numid=63,iface=MIXER,name='SPK Function'
1:
How to enable HeadPhone using this Kcontrol:
amixer cget numid=62
numid=62,iface=MIXER,name='HP Function'
; type=ENUMERATED,access=rw------,values=1,items=2
; Item #0 'off'
; Item #1 'on'
: values=0
amixer cset numid=62 1 //enable HP
numid=62,iface=MIXER,name='HP Function'
; type=ENUMERATED,access=rw------,values=1,items=2
; Item #0 'off'
; Item #1 'on'
: values=1
2:
How to enable Speaker using this Kcontrol:
amixer cget numid=63
numid=63,iface=MIXER,name='SPK Function'
; type=ENUMERATED,access=rw------,values=1,items=2
; Item #0 'off'
; Item #1 'on'
: values=0
amixer cset numid=63 1 //SPK enable
numid=63,iface=MIXER,name='SPK Function'
; type=ENUMERATED,access=rw------,values=1,items=2
; Item #0 'off'
; Item #1 'on'
: values=1