diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-12-21 09:23:01 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-01-12 02:43:19 -0500 |
commit | ecac3ed174034755ebc0b29393fb501ffd0b2afc (patch) | |
tree | 930026f25baa08d9cab413ff76d29e72009119f3 | |
parent | 38cf6f1a41e40a33d80924554b356fcd5b5d2751 (diff) |
ALSA: hda - Add inv_eapd flag to struct hda_codec
Add the new flag, codec->inv_eapd, indicating that the EAPD
implementation is inverted.
There are always broken hardware in the world.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | sound/pci/hda/hda_codec.h | 1 | ||||
-rw-r--r-- | sound/pci/hda/hda_generic.c | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h index 2d9a51cb4a8e..369ffafae8a9 100644 --- a/sound/pci/hda/hda_codec.h +++ b/sound/pci/hda/hda_codec.h | |||
@@ -866,6 +866,7 @@ struct hda_codec { | |||
866 | unsigned int pins_shutup:1; /* pins are shut up */ | 866 | unsigned int pins_shutup:1; /* pins are shut up */ |
867 | unsigned int no_trigger_sense:1; /* don't trigger at pin-sensing */ | 867 | unsigned int no_trigger_sense:1; /* don't trigger at pin-sensing */ |
868 | unsigned int no_jack_detect:1; /* Machine has no jack-detection */ | 868 | unsigned int no_jack_detect:1; /* Machine has no jack-detection */ |
869 | unsigned int inv_eapd:1; /* broken h/w: inverted EAPD control */ | ||
869 | unsigned int pcm_format_first:1; /* PCM format must be set first */ | 870 | unsigned int pcm_format_first:1; /* PCM format must be set first */ |
870 | unsigned int epss:1; /* supporting EPSS? */ | 871 | unsigned int epss:1; /* supporting EPSS? */ |
871 | unsigned int cached_write:1; /* write only to caches */ | 872 | unsigned int cached_write:1; /* write only to caches */ |
diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c index ff15aea836da..f5bc1853ddd8 100644 --- a/sound/pci/hda/hda_generic.c +++ b/sound/pci/hda/hda_generic.c | |||
@@ -545,6 +545,8 @@ static void set_pin_eapd(struct hda_codec *codec, hda_nid_t pin, bool enable) | |||
545 | if (spec->own_eapd_ctl || | 545 | if (spec->own_eapd_ctl || |
546 | !(snd_hda_query_pin_caps(codec, pin) & AC_PINCAP_EAPD)) | 546 | !(snd_hda_query_pin_caps(codec, pin) & AC_PINCAP_EAPD)) |
547 | return; | 547 | return; |
548 | if (codec->inv_eapd) | ||
549 | enable = !enable; | ||
548 | snd_hda_codec_update_cache(codec, pin, 0, | 550 | snd_hda_codec_update_cache(codec, pin, 0, |
549 | AC_VERB_SET_EAPD_BTLENABLE, | 551 | AC_VERB_SET_EAPD_BTLENABLE, |
550 | enable ? 0x02 : 0x00); | 552 | enable ? 0x02 : 0x00); |