diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-12-27 11:18:59 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-12-27 13:39:14 +0100 |
commit | 92ee6162c48fab24f0676969f0f147fc12f8f21c (patch) | |
tree | 631e0b20ad7d7aa4ce43719fbb3cc7ddfcbe2255 /sound/pci/hda/patch_sigmatel.c | |
parent | 043958e602ac2cbf918c0dab1e4e2a7f9751ebf6 (diff) | |
download | talos-obmc-linux-92ee6162c48fab24f0676969f0f147fc12f8f21c.tar.gz talos-obmc-linux-92ee6162c48fab24f0676969f0f147fc12f8f21c.zip |
ALSA: hda - Add snd_hda_shutup_pins() helper function
Add a common helper function for clearing pin controls before suspend.
Use the pincfg array instead of looking through all widget tree.
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.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 69dd5a4e52f2..dc1d9f124578 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -4385,18 +4385,8 @@ static void stac92xx_free_kctls(struct hda_codec *codec) static void stac92xx_shutup(struct hda_codec *codec) { struct sigmatel_spec *spec = codec->spec; - int i; - hda_nid_t nid; - /* reset each pin before powering down DAC/ADC to avoid click noise */ - nid = codec->start_nid; - for (i = 0; i < codec->num_nodes; i++, nid++) { - unsigned int wcaps = get_wcaps(codec, nid); - unsigned int wid_type = get_wcaps_type(wcaps); - if (wid_type == AC_WID_PIN) - snd_hda_codec_read(codec, nid, 0, - AC_VERB_SET_PIN_WIDGET_CONTROL, 0); - } + snd_hda_shutup_pins(codec); if (spec->eapd_mask) stac_gpio_set(codec, spec->gpio_mask, |