[oss-devel] ALC268 hdaudio auto detect headphone presence ?
Hannu Savolainen
hannu at opensound.com
Sat Jun 14 00:21:12 EEST 2008
Wannabe Tsotsi kirjoitti:
> Hannu wrote:
>
> > This is something that needs to be done when the hdaudio driver is
> > rewritten (during this year). However before that it may not be
> possible.
>
> Do you have a particular approach in mind ?
There are few things that need to be done.
1) Finding out when something gets plugged or unpluged to the jacks.
This can be done by implementing support for "unsolicited responses"
sent by the codec when
something gets plugged/unplugged. Otherwise the driver could use
timeout() callbacks to check the jack precense detection bits every
(say) 10 seconds.
2) Finding out which jack (pin widget) is the headphone and which jacks
are connected to the speaker(s). In most systems this can be done by
observing the association/sequence fields of the CONFIG_DEFAULT
registers of the pin widgets. My current understanding is that sequence
value of 0xe (or was it 0xf) tells that this jack is the headphone. When
something gets plugged to it then all other pin widgets sharing the same
association number should be muted.
3) Muting/unmuting the speakers can be done by clearing the output (amp)
enable bits of the pin widgets.
Best regards,
Hannu
More information about the oss-devel
mailing list