Loading sound/pci/hda/hda_codec.c +19 −0 Original line number Diff line number Diff line Loading @@ -899,6 +899,25 @@ static void restore_pincfgs(struct hda_codec *codec) } } /** * snd_hda_shutup_pins - Shut up all pins * @codec: the HDA codec * * Clear all pin controls to shup up before suspend for avoiding click noise. * The controls aren't cached so that they can be resumed properly. */ void snd_hda_shutup_pins(struct hda_codec *codec) { int i; for (i = 0; i < codec->init_pins.used; i++) { struct hda_pincfg *pin = snd_array_elem(&codec->init_pins, i); /* use read here for syncing after issuing each verb */ snd_hda_codec_read(codec, pin->nid, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, 0); } } EXPORT_SYMBOL_HDA(snd_hda_shutup_pins); static void init_hda_cache(struct hda_cache_rec *cache, unsigned int record_size); static void free_hda_cache(struct hda_cache_rec *cache); Loading sound/pci/hda/hda_codec.h +1 −0 Original line number Diff line number Diff line Loading @@ -898,6 +898,7 @@ int snd_hda_codec_set_pincfg(struct hda_codec *codec, hda_nid_t nid, unsigned int cfg); int snd_hda_add_pincfg(struct hda_codec *codec, struct snd_array *list, hda_nid_t nid, unsigned int cfg); /* for hwdep */ void snd_hda_shutup_pins(struct hda_codec *codec); /* * Mixer Loading sound/pci/hda/patch_sigmatel.c +1 −11 Original line number Diff line number Diff line Loading @@ -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, Loading Loading
sound/pci/hda/hda_codec.c +19 −0 Original line number Diff line number Diff line Loading @@ -899,6 +899,25 @@ static void restore_pincfgs(struct hda_codec *codec) } } /** * snd_hda_shutup_pins - Shut up all pins * @codec: the HDA codec * * Clear all pin controls to shup up before suspend for avoiding click noise. * The controls aren't cached so that they can be resumed properly. */ void snd_hda_shutup_pins(struct hda_codec *codec) { int i; for (i = 0; i < codec->init_pins.used; i++) { struct hda_pincfg *pin = snd_array_elem(&codec->init_pins, i); /* use read here for syncing after issuing each verb */ snd_hda_codec_read(codec, pin->nid, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, 0); } } EXPORT_SYMBOL_HDA(snd_hda_shutup_pins); static void init_hda_cache(struct hda_cache_rec *cache, unsigned int record_size); static void free_hda_cache(struct hda_cache_rec *cache); Loading
sound/pci/hda/hda_codec.h +1 −0 Original line number Diff line number Diff line Loading @@ -898,6 +898,7 @@ int snd_hda_codec_set_pincfg(struct hda_codec *codec, hda_nid_t nid, unsigned int cfg); int snd_hda_add_pincfg(struct hda_codec *codec, struct snd_array *list, hda_nid_t nid, unsigned int cfg); /* for hwdep */ void snd_hda_shutup_pins(struct hda_codec *codec); /* * Mixer Loading
sound/pci/hda/patch_sigmatel.c +1 −11 Original line number Diff line number Diff line Loading @@ -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, Loading