[alsa-devel] [PATCH 08/18] ALSA: hda: move patch_analog to use hdac helpers

Vinod Koul vinod.koul at intel.com
Tue Oct 6 17:07:45 CEST 2015


Move patch_analog to use newly moved snd_hdac_read/write_codec()
APIs.

This was done using coccinelle script

Signed-off-by: Vinod Koul <vinod.koul at intel.com>
---
 sound/pci/hda/patch_analog.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c
index c033a4ee6547..1b21a13772dc 100644
--- a/sound/pci/hda/patch_analog.c
+++ b/sound/pci/hda/patch_analog.c
@@ -89,11 +89,13 @@ static void ad198x_power_eapd_write(struct hda_codec *codec, hda_nid_t front,
 				hda_nid_t hp)
 {
 	if (snd_hda_query_pin_caps(codec, front) & AC_PINCAP_EAPD)
-		snd_hda_codec_write(codec, front, 0, AC_VERB_SET_EAPD_BTLENABLE,
-			    !codec->inv_eapd ? 0x00 : 0x02);
+		snd_hdac_codec_write(&codec->core, front, 0,
+				     AC_VERB_SET_EAPD_BTLENABLE,
+				     !codec->inv_eapd ? 0x00 : 0x02);
 	if (snd_hda_query_pin_caps(codec, hp) & AC_PINCAP_EAPD)
-		snd_hda_codec_write(codec, hp, 0, AC_VERB_SET_EAPD_BTLENABLE,
-			    !codec->inv_eapd ? 0x00 : 0x02);
+		snd_hdac_codec_write(&codec->core, hp, 0,
+				     AC_VERB_SET_EAPD_BTLENABLE,
+				     !codec->inv_eapd ? 0x00 : 0x02);
 }
 
 static void ad198x_power_eapd(struct hda_codec *codec)
-- 
2.4.3



More information about the Alsa-devel mailing list