diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-11 15:45:59 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-11 15:45:59 -0400 |
commit | 0fb3767b0a5601dd0d528bc8dbefc0567a34b7ec (patch) | |
tree | 76eed01d088080863f5bf97e37ae4ec1adf9d0a5 /sound/pci | |
parent | 0edcd16a4def296bd6492ae0c10a3c4aef9ef7c0 (diff) | |
parent | 42d4ab832d843b5a512b373c86e70caa43a041c8 (diff) |
Merge tag 'sound-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai:
"A few small fixes (and cleanups) for HD-audio, USB-audio and ASoC"
* tag 'sound-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ALSA: usb-audio: fix regression for fixed stream quirk
ALSA: hda - Keep halting ALC5505 DSP
ASoC: wm8962: fix NULL pdata pointer
ASoC: imx-sgtl5000: return E_PROBE_DEFER if ssi/codec not found
ASoC: Samsung: Remove redundant comment
ALSA: hda - Fix EAPD vmaster hook for AD1884 & co
ASoC: samsung: Remove obsolete GPIO based DT pinmuxing
ASoC: mxs: register saif mclk to clock framework
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/hda/patch_analog.c | 12 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 19 |
2 files changed, 26 insertions, 5 deletions
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index 977b0d878dae..d97f0d61a15b 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c | |||
@@ -2112,6 +2112,9 @@ static void ad_vmaster_eapd_hook(void *private_data, int enabled) | |||
2112 | { | 2112 | { |
2113 | struct hda_codec *codec = private_data; | 2113 | struct hda_codec *codec = private_data; |
2114 | struct ad198x_spec *spec = codec->spec; | 2114 | struct ad198x_spec *spec = codec->spec; |
2115 | |||
2116 | if (!spec->eapd_nid) | ||
2117 | return; | ||
2115 | snd_hda_codec_update_cache(codec, spec->eapd_nid, 0, | 2118 | snd_hda_codec_update_cache(codec, spec->eapd_nid, 0, |
2116 | AC_VERB_SET_EAPD_BTLENABLE, | 2119 | AC_VERB_SET_EAPD_BTLENABLE, |
2117 | enabled ? 0x02 : 0x00); | 2120 | enabled ? 0x02 : 0x00); |
@@ -3601,13 +3604,16 @@ static void ad1884_fixup_hp_eapd(struct hda_codec *codec, | |||
3601 | { | 3604 | { |
3602 | struct ad198x_spec *spec = codec->spec; | 3605 | struct ad198x_spec *spec = codec->spec; |
3603 | 3606 | ||
3604 | if (action == HDA_FIXUP_ACT_PRE_PROBE) { | 3607 | switch (action) { |
3608 | case HDA_FIXUP_ACT_PRE_PROBE: | ||
3609 | spec->gen.vmaster_mute.hook = ad_vmaster_eapd_hook; | ||
3610 | break; | ||
3611 | case HDA_FIXUP_ACT_PROBE: | ||
3605 | if (spec->gen.autocfg.line_out_type == AUTO_PIN_SPEAKER_OUT) | 3612 | if (spec->gen.autocfg.line_out_type == AUTO_PIN_SPEAKER_OUT) |
3606 | spec->eapd_nid = spec->gen.autocfg.line_out_pins[0]; | 3613 | spec->eapd_nid = spec->gen.autocfg.line_out_pins[0]; |
3607 | else | 3614 | else |
3608 | spec->eapd_nid = spec->gen.autocfg.speaker_pins[0]; | 3615 | spec->eapd_nid = spec->gen.autocfg.speaker_pins[0]; |
3609 | if (spec->eapd_nid) | 3616 | break; |
3610 | spec->gen.vmaster_mute.hook = ad_vmaster_eapd_hook; | ||
3611 | } | 3617 | } |
3612 | } | 3618 | } |
3613 | 3619 | ||
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 14ac9b0e740c..8bd226149868 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -37,6 +37,9 @@ | |||
37 | #include "hda_jack.h" | 37 | #include "hda_jack.h" |
38 | #include "hda_generic.h" | 38 | #include "hda_generic.h" |
39 | 39 | ||
40 | /* keep halting ALC5505 DSP, for power saving */ | ||
41 | #define HALT_REALTEK_ALC5505 | ||
42 | |||
40 | /* unsol event tags */ | 43 | /* unsol event tags */ |
41 | #define ALC_DCVOL_EVENT 0x08 | 44 | #define ALC_DCVOL_EVENT 0x08 |
42 | 45 | ||
@@ -2659,15 +2662,27 @@ static void alc5505_dsp_init(struct hda_codec *codec) | |||
2659 | alc5505_coef_set(codec, 0x880c, 0x00000004); /* DRAM Function control */ | 2662 | alc5505_coef_set(codec, 0x880c, 0x00000004); /* DRAM Function control */ |
2660 | alc5505_coef_set(codec, 0x880c, 0x00000003); | 2663 | alc5505_coef_set(codec, 0x880c, 0x00000003); |
2661 | alc5505_coef_set(codec, 0x880c, 0x00000010); | 2664 | alc5505_coef_set(codec, 0x880c, 0x00000010); |
2665 | |||
2666 | #ifdef HALT_REALTEK_ALC5505 | ||
2667 | alc5505_dsp_halt(codec); | ||
2668 | #endif | ||
2662 | } | 2669 | } |
2663 | 2670 | ||
2671 | #ifdef HALT_REALTEK_ALC5505 | ||
2672 | #define alc5505_dsp_suspend(codec) /* NOP */ | ||
2673 | #define alc5505_dsp_resume(codec) /* NOP */ | ||
2674 | #else | ||
2675 | #define alc5505_dsp_suspend(codec) alc5505_dsp_halt(codec) | ||
2676 | #define alc5505_dsp_resume(codec) alc5505_dsp_back_from_halt(codec) | ||
2677 | #endif | ||
2678 | |||
2664 | #ifdef CONFIG_PM | 2679 | #ifdef CONFIG_PM |
2665 | static int alc269_suspend(struct hda_codec *codec) | 2680 | static int alc269_suspend(struct hda_codec *codec) |
2666 | { | 2681 | { |
2667 | struct alc_spec *spec = codec->spec; | 2682 | struct alc_spec *spec = codec->spec; |
2668 | 2683 | ||
2669 | if (spec->has_alc5505_dsp) | 2684 | if (spec->has_alc5505_dsp) |
2670 | alc5505_dsp_halt(codec); | 2685 | alc5505_dsp_suspend(codec); |
2671 | return alc_suspend(codec); | 2686 | return alc_suspend(codec); |
2672 | } | 2687 | } |
2673 | 2688 | ||
@@ -2696,7 +2711,7 @@ static int alc269_resume(struct hda_codec *codec) | |||
2696 | alc_inv_dmic_sync(codec, true); | 2711 | alc_inv_dmic_sync(codec, true); |
2697 | hda_call_check_power_status(codec, 0x01); | 2712 | hda_call_check_power_status(codec, 0x01); |
2698 | if (spec->has_alc5505_dsp) | 2713 | if (spec->has_alc5505_dsp) |
2699 | alc5505_dsp_back_from_halt(codec); | 2714 | alc5505_dsp_resume(codec); |
2700 | return 0; | 2715 | return 0; |
2701 | } | 2716 | } |
2702 | #endif /* CONFIG_PM */ | 2717 | #endif /* CONFIG_PM */ |