ALSA: hda - Fix D3 clock stop check for codecs with own set_power_state op
authorTakashi Iwai <tiwai@suse.de>
Tue, 28 Aug 2012 16:59:20 +0000 (09:59 -0700)
committerTakashi Iwai <tiwai@suse.de>
Thu, 30 Aug 2012 14:48:55 +0000 (07:48 -0700)
commit432c641e013d6e294e2ddf06d32a610eb1d4d856
tree09cb193f39c9c4b6fa7126a49c291707449f6dbc
parent68467f51c1b578ad98593bf5dee4337bd8d7798d
ALSA: hda - Fix D3 clock stop check for codecs with own set_power_state op

When a codec provides its own set_power_state op, the D3-clock-stop
isn't checked correctly.  And the recent changes for repeating the
state-setting operation isn't applied to such a codec, too.

This patch fixes these issues by moving the call of codec's own op to
the place where the generic power-set operation is done, and move the
power-state synchronization code out of
snd_hda_set_power_state_to_all() so that it can be called always at
the end of power-up/down sequence, and updates the D3 clock-stop flag
properly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_codec.c