]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: hda - Fix runtime PM leftover refcounts
authorTakashi Iwai <tiwai@suse.de>
Tue, 28 Aug 2012 16:14:29 +0000 (09:14 -0700)
committerTakashi Iwai <tiwai@suse.de>
Thu, 30 Aug 2012 14:48:49 +0000 (07:48 -0700)
commit01373675f87d7ab061bc7f69aea271116fcfefcb
tree52bd817b23e2274425bc6c8cc1776405bea8f7ea
parentba2627201dce8a70f97d2c523f618acc7029be2f
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>
sound/pci/hda/hda_codec.c
sound/pci/hda/hda_codec.h
sound/pci/hda/hda_intel.c