All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vinod Koul <vinod.koul@intel.com>
To: alsa-devel@alsa-project.org
Cc: liam.r.girdwood@linux.intel.com, tiwai@suse.de,
	broonie@kernel.org, Vinod Koul <vinod.koul@intel.com>,
	patches.audio@intel.com
Subject: [PATCH 14/18] ALSA: hda: move patch_si3054 to use hdac helpers
Date: Tue,  6 Oct 2015 16:07:51 +0100	[thread overview]
Message-ID: <1444144075-28963-15-git-send-email-vinod.koul@intel.com> (raw)
In-Reply-To: <1444144075-28963-1-git-send-email-vinod.koul@intel.com>

Move patch_si3054 to use newly moved snd_hdac_read/write_codec()
APIs

This was done using coccinelle script

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

diff --git a/sound/pci/hda/patch_si3054.c b/sound/pci/hda/patch_si3054.c
index 5104bebb2286..5c2a3f7e9b6d 100644
--- a/sound/pci/hda/patch_si3054.c
+++ b/sound/pci/hda/patch_si3054.c
@@ -75,8 +75,8 @@
 #define SI3054_CHIPID_CODEC_ID      (1<<12)
 
 /* si3054 codec registers (nodes) access macros */
-#define GET_REG(codec,reg) (snd_hda_codec_read(codec,reg,0,SI3054_VERB_READ_NODE,0))
-#define SET_REG(codec,reg,val) (snd_hda_codec_write(codec,reg,0,SI3054_VERB_WRITE_NODE,val))
+#define GET_REG(codec,reg) (snd_hdac_codec_read(&codec->core,reg,0,SI3054_VERB_READ_NODE,0))
+#define SET_REG(codec,reg,val) (snd_hdac_codec_write(&codec->core,reg,0,SI3054_VERB_WRITE_NODE,val))
 #define SET_REG_CACHE(codec,reg,val) \
 	snd_hda_codec_write_cache(codec,reg,0,SI3054_VERB_WRITE_NODE,val)
 
@@ -226,8 +226,10 @@ static int si3054_init(struct hda_codec *codec)
 					    SI3054_VERB_WRITE_NODE))
 		return -ENOMEM;
 
-	snd_hda_codec_write(codec, AC_NODE_ROOT, 0, AC_VERB_SET_CODEC_RESET, 0);
-	snd_hda_codec_write(codec, codec->core.mfg, 0, AC_VERB_SET_STREAM_FORMAT, 0);
+	snd_hdac_codec_write(&codec->core, AC_NODE_ROOT, 0,
+			     AC_VERB_SET_CODEC_RESET, 0);
+	snd_hdac_codec_write(&codec->core, codec->core.mfg, 0,
+			     AC_VERB_SET_STREAM_FORMAT, 0);
 	SET_REG(codec, SI3054_LINE_RATE, 9600);
 	SET_REG(codec, SI3054_LINE_LEVEL, SI3054_DTAG_MASK|SI3054_ATAG_MASK);
 	SET_REG(codec, SI3054_EXTENDED_MID, 0);
-- 
2.4.3

  parent reply	other threads:[~2015-10-06 15:09 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-06 15:07 [PATCH 00/18] ALSA: hdac: move hdac helpers to core Vinod Koul
2015-10-06 15:07 ` [PATCH 01/18] ALSA: hdac: Copy codec " Vinod Koul
2015-10-06 15:07 ` [PATCH 02/18] ALSA: hda: move hda beep to use hdac helpers Vinod Koul
2015-10-06 15:07 ` [PATCH 03/18] ALSA: hda: move hda_eld " Vinod Koul
2015-10-06 15:07 ` [PATCH 04/18] ALSA: hda: move hda_generic " Vinod Koul
2015-10-06 15:07 ` [PATCH 05/18] ALSA: hda: move hda_hwdep " Vinod Koul
2015-10-06 15:07 ` [PATCH 06/18] ALSA: hda: move hda_jack " Vinod Koul
2015-10-06 15:07 ` [PATCH 07/18] ALSA: hda: move hda_proc " Vinod Koul
2015-10-06 15:07 ` [PATCH 08/18] ALSA: hda: move patch_analog " Vinod Koul
2015-10-06 15:07 ` [PATCH 09/18] ALSA: hda: move patch_ca0132.c " Vinod Koul
2015-10-06 15:07 ` [PATCH 10/18] ALSA: hda: move patch_cirrus " Vinod Koul
2015-10-06 15:07 ` [PATCH 11/18] ALSA: hda: move " Vinod Koul
2015-10-06 15:07 ` [PATCH 12/18] ALSA: hda: move patch_hdmi " Vinod Koul
2015-10-06 15:07 ` [PATCH 13/18] ALSA: hda: move patch_realtek " Vinod Koul
2015-10-06 15:07 ` Vinod Koul [this message]
2015-10-06 15:07 ` [PATCH 15/18] ALSA: hda: move patch_sigmatel " Vinod Koul
2015-10-06 15:07 ` [PATCH 16/18] ALSA: hda: move patch_via " Vinod Koul
2015-10-06 15:07 ` [PATCH 17/18] ALSA: hda: move hda_codec " Vinod Koul
2015-10-06 15:07 ` [PATCH 18/18] ALSA: hda: remove the old helpers Vinod Koul
2015-10-06 18:12 ` [PATCH 00/18] ALSA: hdac: move hdac helpers to core Takashi Iwai
2015-10-07 10:52   ` Koul, Vinod

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1444144075-28963-15-git-send-email-vinod.koul@intel.com \
    --to=vinod.koul@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=patches.audio@intel.com \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.