diff options
author | Arnd Bergmann <arnd@arndb.de> | 2013-04-09 09:50:59 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2013-04-09 10:01:23 -0400 |
commit | 835f9c38bbb4498c3d43b7466964bdadbb1fd244 (patch) | |
tree | ade5aec66bc7ddb97048c4f141932de0f93369b9 /sound/pci/hda/patch_sigmatel.c | |
parent | f5f29151588744ea2e283971cb0ad403ee04e3e2 (diff) | |
parent | a937536b868b8369b98967929045f1df54234323 (diff) |
Merge tag 'v3.9-rc3' into next/multiplatform
Linux 3.9-rc3
Conflicts:
arch/arm/Kconfig
arch/arm/mach-spear/spear3xx.c
arch/arm/plat-spear/Kconfig
This is a dependency for ux500/multiplatform
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'sound/pci/hda/patch_sigmatel.c')
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 83d5335ac348..dafe04ae8c72 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -815,6 +815,29 @@ static int find_mute_led_cfg(struct hda_codec *codec, int default_polarity) | |||
815 | return 0; | 815 | return 0; |
816 | } | 816 | } |
817 | 817 | ||
818 | /* check whether a built-in speaker is included in parsed pins */ | ||
819 | static bool has_builtin_speaker(struct hda_codec *codec) | ||
820 | { | ||
821 | struct sigmatel_spec *spec = codec->spec; | ||
822 | hda_nid_t *nid_pin; | ||
823 | int nids, i; | ||
824 | |||
825 | if (spec->gen.autocfg.line_out_type == AUTO_PIN_SPEAKER_OUT) { | ||
826 | nid_pin = spec->gen.autocfg.line_out_pins; | ||
827 | nids = spec->gen.autocfg.line_outs; | ||
828 | } else { | ||
829 | nid_pin = spec->gen.autocfg.speaker_pins; | ||
830 | nids = spec->gen.autocfg.speaker_outs; | ||
831 | } | ||
832 | |||
833 | for (i = 0; i < nids; i++) { | ||
834 | unsigned int def_conf = snd_hda_codec_get_pincfg(codec, nid_pin[i]); | ||
835 | if (snd_hda_get_input_pin_attr(def_conf) == INPUT_PIN_ATTR_INT) | ||
836 | return true; | ||
837 | } | ||
838 | return false; | ||
839 | } | ||
840 | |||
818 | /* | 841 | /* |
819 | * PC beep controls | 842 | * PC beep controls |
820 | */ | 843 | */ |
@@ -3890,6 +3913,12 @@ static int patch_stac92hd73xx(struct hda_codec *codec) | |||
3890 | return err; | 3913 | return err; |
3891 | } | 3914 | } |
3892 | 3915 | ||
3916 | /* Don't GPIO-mute speakers if there are no internal speakers, because | ||
3917 | * the GPIO might be necessary for Headphone | ||
3918 | */ | ||
3919 | if (spec->eapd_switch && !has_builtin_speaker(codec)) | ||
3920 | spec->eapd_switch = 0; | ||
3921 | |||
3893 | codec->proc_widget_hook = stac92hd7x_proc_hook; | 3922 | codec->proc_widget_hook = stac92hd7x_proc_hook; |
3894 | 3923 | ||
3895 | snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE); | 3924 | snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE); |