mirror of
https://github.com/adulau/aha.git
synced 2024-12-30 12:46:17 +00:00
ALSA: hda - Add VREF powerdown sequence for another board
Add powerdown sequence for VREF using a shared jack when the headphone is present and the microphone isn't on. Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
bca68467b5
commit
fd60cc897a
1 changed files with 18 additions and 0 deletions
|
@ -4413,6 +4413,24 @@ static void stac92xx_unsol_event(struct hda_codec *codec, unsigned int res)
|
|||
if (spec->num_pwrs > 0)
|
||||
stac92xx_pin_sense(codec, event->nid);
|
||||
stac92xx_report_jack(codec, event->nid);
|
||||
|
||||
switch (codec->subsystem_id) {
|
||||
case 0x103c308f:
|
||||
if (event->nid == 0xb) {
|
||||
int pin = AC_PINCTL_IN_EN;
|
||||
|
||||
if (get_pin_presence(codec, 0xa)
|
||||
&& get_pin_presence(codec, 0xb))
|
||||
pin |= AC_PINCTL_VREF_80;
|
||||
if (!get_pin_presence(codec, 0xb))
|
||||
pin |= AC_PINCTL_VREF_80;
|
||||
|
||||
/* toggle VREF state based on mic + hp pin
|
||||
* status
|
||||
*/
|
||||
stac92xx_auto_set_pinctl(codec, 0x0a, pin);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case STAC_VREF_EVENT:
|
||||
data = snd_hda_codec_read(codec, codec->afg, 0,
|
||||
|
|
Loading…
Reference in a new issue