summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_codec.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-08-28 09:14:29 -0700
committerTakashi Iwai <tiwai@suse.de>2012-08-30 07:48:49 -0700
commit68467f51c1b578ad98593bf5dee4337bd8d7798d (patch)
tree52bd817b23e2274425bc6c8cc1776405bea8f7ea /sound/pci/hda/hda_codec.h
parent48ee7cb8b4867093c75eb5102f2359c9799b3341 (diff)
ALSA: hda - Fix runtime PM leftover refcounts
When the HD-audio is removed, it leaves the refcounts when codecs are powered up (usually yes) in the destructor. For fixing the unbalance, and cleaning up the code mess, this patch changes the following: - change pm_notify callback to take the explicit power on/off state, - check of D3 stop-clock and keep_link_on flags is moved to the caller side, - call pm_notify callback in snd_hda_codec_new() and snd_hda_codec_free() so that the refcounts are proprely updated. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_codec.h')
-rw-r--r--sound/pci/hda/hda_codec.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h
index 72477ccb20f..2e5a22fec0b 100644
--- a/sound/pci/hda/hda_codec.h
+++ b/sound/pci/hda/hda_codec.h
@@ -616,7 +616,7 @@ struct hda_bus_ops {
void (*bus_reset)(struct hda_bus *bus);
#ifdef CONFIG_SND_HDA_POWER_SAVE
/* notify power-up/down from codec to controller */
- void (*pm_notify)(struct hda_bus *bus, struct hda_codec *codec);
+ void (*pm_notify)(struct hda_bus *bus, bool power_up);
#endif
};