From patchwork Tue Oct 6 15:07:48 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 7336111 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 217BDBEEA4 for ; Tue, 6 Oct 2015 15:23:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4752520660 for ; Tue, 6 Oct 2015 15:23:34 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id CC815205EB for ; Tue, 6 Oct 2015 15:23:31 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id F1D3E265DDD; Tue, 6 Oct 2015 17:23:30 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id CBF112658D5; Tue, 6 Oct 2015 17:15:08 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 0B0572657BE; Tue, 6 Oct 2015 17:15:07 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by alsa0.perex.cz (Postfix) with ESMTP id 2830926574A for ; Tue, 6 Oct 2015 17:10:33 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP; 06 Oct 2015 08:08:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,644,1437462000"; d="scan'208";a="804820808" Received: from vkoul-mobl.iind.intel.com ([10.252.23.210]) by fmsmga001.fm.intel.com with ESMTP; 06 Oct 2015 08:08:32 -0700 From: Vinod Koul To: alsa-devel@alsa-project.org Date: Tue, 6 Oct 2015 16:07:48 +0100 Message-Id: <1444144075-28963-12-git-send-email-vinod.koul@intel.com> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1444144075-28963-1-git-send-email-vinod.koul@intel.com> References: <1444144075-28963-1-git-send-email-vinod.koul@intel.com> Cc: liam.r.girdwood@linux.intel.com, tiwai@suse.de, broonie@kernel.org, Vinod Koul , patches.audio@intel.com Subject: [alsa-devel] [PATCH 11/18] ALSA: hda: move to use hdac helpers X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Move to use newly moved snd_hdac_write_codec() API This was done using coccinelle script Signed-off-by: Vinod Koul --- sound/pci/hda/patch_conexant.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index ca03c40609fc..c6cdfae01cc0 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c @@ -147,9 +147,9 @@ static void cx_auto_turn_eapd(struct hda_codec *codec, int num_pins, int i; for (i = 0; i < num_pins; i++) { if (snd_hda_query_pin_caps(codec, pins[i]) & AC_PINCAP_EAPD) - snd_hda_codec_write(codec, pins[i], 0, - AC_VERB_SET_EAPD_BTLENABLE, - on ? 0x02 : 0); + snd_hdac_codec_write(&codec->core, pins[i], 0, + AC_VERB_SET_EAPD_BTLENABLE, + on ? 0x02 : 0); } } @@ -168,9 +168,9 @@ static void cx_auto_vmaster_hook_mute_led(void *private_data, int enabled) struct hda_codec *codec = private_data; struct conexant_spec *spec = codec->spec; - snd_hda_codec_write(codec, spec->mute_led_eapd, 0, - AC_VERB_SET_EAPD_BTLENABLE, - enabled ? 0x00 : 0x02); + snd_hdac_codec_write(&codec->core, spec->mute_led_eapd, 0, + AC_VERB_SET_EAPD_BTLENABLE, + enabled ? 0x00 : 0x02); } static int cx_auto_build_controls(struct hda_codec *codec) @@ -212,8 +212,8 @@ static void cx_auto_reboot_notify(struct hda_codec *codec) cx_auto_turn_eapd(codec, spec->num_eapds, spec->eapds, false); snd_hda_codec_set_power_to_all(codec, codec->core.afg, AC_PWRST_D3); - snd_hda_codec_write(codec, codec->core.afg, 0, - AC_VERB_SET_POWER_STATE, AC_PWRST_D3); + snd_hdac_codec_write(&codec->core, codec->core.afg, 0, + AC_VERB_SET_POWER_STATE, AC_PWRST_D3); } static void cx_auto_free(struct hda_codec *codec) @@ -367,8 +367,8 @@ static void olpc_xo_update_mic_boost(struct hda_codec *codec) (ch ? AC_AMP_SET_RIGHT : AC_AMP_SET_LEFT); if (!spec->dc_enable) val |= snd_hda_codec_amp_read(codec, 0x17, ch, HDA_OUTPUT, 0); - snd_hda_codec_write(codec, 0x17, 0, - AC_VERB_SET_AMP_GAIN_MUTE, val); + snd_hdac_codec_write(&codec->core, 0x17, 0, + AC_VERB_SET_AMP_GAIN_MUTE, val); } }