@@ -841,9 +841,9 @@ static hda_nid_t path_power_update(struct hda_codec *codec,
state = AC_PWRST_D0;
else
state = AC_PWRST_D3;
- if (!snd_hda_check_power_state(codec, nid, state)) {
- snd_hda_codec_write(codec, nid, 0,
- AC_VERB_SET_POWER_STATE, state);
+ if (!snd_hdac_check_power_state(&codec->core, nid, state)) {
+ snd_hdac_codec_write(&codec->core, nid, 0,
+ AC_VERB_SET_POWER_STATE, state);
changed = nid;
/* all known codecs seem to be capable to handl
* widgets state even in D3, so far.
@@ -865,7 +865,8 @@ static void sync_power_state_change(struct hda_codec *codec, hda_nid_t nid)
{
if (nid) {
msleep(10);
- snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_POWER_STATE, 0);
+ snd_hdac_codec_read(&codec->core, nid, 0,
+ AC_VERB_GET_POWER_STATE, 0);
}
}
Mover hda_generic to use newly moved snd_hdac_read/write_codec() and snd_hdac_check_power_state APIs. This was done using coccinelle script Signed-off-by: Vinod Koul <vinod.koul@intel.com> --- sound/pci/hda/hda_generic.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)