aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_sigmatel.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-11-21 10:33:22 -0500
committerJaroslav Kysela <perex@suse.cz>2006-01-03 06:29:27 -0500
commit54d174031576a2855c49611d83d4946bde81b504 (patch)
tree6bdcefaccb78bddfa1a3ea7b429e1178b479999d /sound/pci/hda/patch_sigmatel.c
parent1b98ea4791892399d8c23c93e117567eeff38887 (diff)
[ALSA] hda-codec - Fix connection list parsing
Modules: HDA Codec driver,HDA generic driver - Fix connection list parsing (with ranged flag). - Increase the max number of connections - Introduce widget capabilities cache - Power up/down widgets at init, suspend and resume Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_sigmatel.c')
-rw-r--r--sound/pci/hda/patch_sigmatel.c25
1 files changed, 1 insertions, 24 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index d8d68f5b6131..c8c539cb4a8f 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -624,7 +624,7 @@ static int stac92xx_auto_create_hp_ctls(struct hda_codec *codec, struct auto_pin
624 if (! pin) 624 if (! pin)
625 return 0; 625 return 0;
626 626
627 wid_caps = snd_hda_param_read(codec, pin, AC_PAR_AUDIO_WIDGET_CAP); 627 wid_caps = get_wcaps(codec, pin);
628 if (wid_caps & AC_WCAP_UNSOL_CAP) 628 if (wid_caps & AC_WCAP_UNSOL_CAP)
629 /* Enable unsolicited responses on the HP widget */ 629 /* Enable unsolicited responses on the HP widget */
630 snd_hda_codec_write(codec, pin, 0, 630 snd_hda_codec_write(codec, pin, 0,
@@ -786,33 +786,10 @@ static int stac9200_parse_auto_config(struct hda_codec *codec)
786 return 1; 786 return 1;
787} 787}
788 788
789static int stac92xx_init_pstate(struct hda_codec *codec)
790{
791 hda_nid_t nid, nid_start;
792 int nodes;
793
794 snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_POWER_STATE, 0x00);
795
796 nodes = snd_hda_get_sub_nodes(codec, codec->afg, &nid_start);
797 for (nid = nid_start; nid < nodes + nid_start; nid++) {
798 unsigned int wid_caps = snd_hda_param_read(codec, nid,
799 AC_PAR_AUDIO_WIDGET_CAP);
800 if (wid_caps & AC_WCAP_POWER)
801 snd_hda_codec_write(codec, nid, 0,
802 AC_VERB_SET_POWER_STATE, 0x00);
803 }
804
805 mdelay(100);
806
807 return 0;
808}
809
810static int stac92xx_init(struct hda_codec *codec) 789static int stac92xx_init(struct hda_codec *codec)
811{ 790{
812 struct sigmatel_spec *spec = codec->spec; 791 struct sigmatel_spec *spec = codec->spec;
813 792
814 stac92xx_init_pstate(codec);
815
816 snd_hda_sequence_write(codec, spec->init); 793 snd_hda_sequence_write(codec, spec->init);
817 794
818 stac92xx_auto_init_multi_out(codec); 795 stac92xx_auto_init_multi_out(codec);