diff mbox

[04/18] ALSA: hda: move hda_generic to use hdac helpers

Message ID 1444144075-28963-5-git-send-email-vinod.koul@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Vinod Koul Oct. 6, 2015, 3:07 p.m. UTC
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(-)
diff mbox

Patch

diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c
index 24f91114a32c..b0ef87f648bc 100644
--- a/sound/pci/hda/hda_generic.c
+++ b/sound/pci/hda/hda_generic.c
@@ -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);
 	}
 }