From patchwork Wed Jun 4 11:19:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ShaRab Shaik X-Patchwork-Id: 4303691 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6FBAF9F326 for ; Thu, 5 Jun 2014 06:48:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6A2EF202E9 for ; Thu, 5 Jun 2014 06:48:52 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id CCABB20125 for ; Thu, 5 Jun 2014 06:48:50 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 792862608EA; Thu, 5 Jun 2014 08:48:49 +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=-1.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id D490A2608EA; Thu, 5 Jun 2014 08:48:38 +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 14835261B19; Wed, 4 Jun 2014 13:20:48 +0200 (CEST) Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) by alsa0.perex.cz (Postfix) with ESMTP id 17726262634 for ; Wed, 4 Jun 2014 13:20:38 +0200 (CEST) Received: by mail-wi0-f181.google.com with SMTP id n15so1218584wiw.14 for ; Wed, 04 Jun 2014 04:20:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:cc:content-type; bh=8yFK/Yk0GICddks8z7wUBduGcwsG56jfNFXcPciSOaI=; b=PLz53ZhQl/gnMdXwbDzPpsHBVicNDhTeXusX4BPHirlsZSo6iUAEAaVYGHxxJx6Zkh QqbCeKTteaOueArOVE8VtGFN/c4Q8hFqeOwbzWTY6H6mNELT3mTINNFQLiS0ha7AKtXC YETEfc6CqOt1bH313+hVoeutJtowcfe83j/OyxRh8Q4mzfUfZAOGivIqUoZpMdWE5WGC hdrmtSeKNwT7oaIa5M8Ymdl21/GGLQlNpOjt1P2iG7yjUERvMa4JdoP4oWYG3CabbPd+ 9CGarww804F9qWHexq55NYU7y4j77Nt8UmooZjn1N7xfQaO2W1Et+702eWksJJAH7mZU 11wg== X-Received: by 10.180.105.72 with SMTP id gk8mr4325075wib.32.1401880835516; Wed, 04 Jun 2014 04:20:35 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.31.138 with HTTP; Wed, 4 Jun 2014 04:19:54 -0700 (PDT) From: ShaRab Shaik Date: Wed, 4 Jun 2014 16:49:54 +0530 Message-ID: To: perex@perex.cz, tiwai@suse.de, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, broonie@kernel.org, lgirdwood@gmail.com X-Mailman-Approved-At: Thu, 05 Jun 2014 08:48:37 +0200 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: ShaRab Shaik Subject: [alsa-devel] [PATCH] sound: tlv320aic32x4: Fixed Coding style issues 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From 617d7a25f3c0c08e0b95b24de2d1ea0f3f4b98c7 Mon Sep 17 00:00:00 2001 From: Shahina Shaik Date: Wed, 4 Jun 2014 16:27:19 +0530 Subject: [PATCH] sound: tlv320aic32x4: Fixed Coding style issues. Fixed brace coding style, lines morethan 80 characters issues. Replaced printk with pr_err as pr_err is prefered than printk. Signed-off-by: Shahina Shaik --- sound/soc/codecs/tlv320aic32x4.c | 34 +++++++++++++++++++--------------- 1 files changed, 19 insertions(+), 15 deletions(-) } @@ -323,7 +323,7 @@ static int aic32x4_set_dai_sysclk(struct snd_soc_dai *codec_dai, aic32x4->sysclk = freq; return 0; } - printk(KERN_ERR "aic32x4: invalid frequency to set DAI system clock\n"); + pr_err(KERN_ERR "aic32x4: invalid frequency to set DAI system clock\n"); return -EINVAL; } @@ -349,7 +349,7 @@ static int aic32x4_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) case SND_SOC_DAIFMT_CBS_CFS: break; default: - printk(KERN_ERR "aic32x4: invalid DAI master/slave interface\n"); + pr_err(KERN_ERR "aic32x4: invalid DAI master/slave interface\n"); return -EINVAL; } @@ -374,7 +374,7 @@ static int aic32x4_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) (AIC32X4_LEFT_JUSTIFIED_MODE << AIC32X4_PLLJ_SHIFT); break; default: - printk(KERN_ERR "aic32x4: invalid DAI interface format\n"); + pr_err(KERN_ERR "aic32x4: invalid DAI interface format\n"); return -EINVAL; } @@ -395,7 +395,7 @@ static int aic32x4_hw_params(struct snd_pcm_substream *substream, i = aic32x4_get_divs(aic32x4->sysclk, params_rate(params)); if (i < 0) { - printk(KERN_ERR "aic32x4: sampling rate not supported\n"); + pr_err(KERN_ERR "aic32x4: sampling rate not supported\n"); return i; } @@ -626,32 +626,36 @@ static int aic32x4_probe(struct snd_soc_codec *codec) snd_soc_write(codec, AIC32X4_MICBIAS, AIC32X4_MICBIAS_LDOIN | AIC32X4_MICBIAS_2075V); } - if (aic32x4->power_cfg & AIC32X4_PWR_AVDD_DVDD_WEAK_DISABLE) { + if (aic32x4->power_cfg & AIC32X4_PWR_AVDD_DVDD_WEAK_DISABLE) snd_soc_write(codec, AIC32X4_PWRCFG, AIC32X4_AVDDWEAKDISABLE); - } + tmp_reg = (aic32x4->power_cfg & AIC32X4_PWR_AIC32X4_LDO_ENABLE) ? AIC32X4_LDOCTLEN : 0; snd_soc_write(codec, AIC32X4_LDOCTL, tmp_reg); tmp_reg = snd_soc_read(codec, AIC32X4_CMMODE); - if (aic32x4->power_cfg & AIC32X4_PWR_CMMODE_LDOIN_RANGE_18_36) { + if (aic32x4->power_cfg & AIC32X4_PWR_CMMODE_LDOIN_RANGE_18_36) tmp_reg |= AIC32X4_LDOIN_18_36; - } - if (aic32x4->power_cfg & AIC32X4_PWR_CMMODE_HP_LDOIN_POWERED) { + + if (aic32x4->power_cfg & AIC32X4_PWR_CMMODE_HP_LDOIN_POWERED) tmp_reg |= AIC32X4_LDOIN2HP; - } + snd_soc_write(codec, AIC32X4_CMMODE, tmp_reg); /* Mic PGA routing */ if (aic32x4->micpga_routing & AIC32X4_MICPGA_ROUTE_LMIC_IN2R_10K) - snd_soc_write(codec, AIC32X4_LMICPGANIN, AIC32X4_LMICPGANIN_IN2R_10K); + snd_soc_write(codec, AIC32X4_LMICPGANIN, + AIC32X4_LMICPGANIN_IN2R_10K); else - snd_soc_write(codec, AIC32X4_LMICPGANIN, AIC32X4_LMICPGANIN_CM1L_10K); + snd_soc_write(codec, AIC32X4_LMICPGANIN, + AIC32X4_LMICPGANIN_CM1L_10K); if (aic32x4->micpga_routing & AIC32X4_MICPGA_ROUTE_RMIC_IN1L_10K) - snd_soc_write(codec, AIC32X4_RMICPGANIN, AIC32X4_RMICPGANIN_IN1L_10K); + snd_soc_write(codec, AIC32X4_RMICPGANIN, + AIC32X4_RMICPGANIN_IN1L_10K); else - snd_soc_write(codec, AIC32X4_RMICPGANIN, AIC32X4_RMICPGANIN_CM1R_10K); + snd_soc_write(codec, AIC32X4_RMICPGANIN, + AIC32X4_RMICPGANIN_CM1R_10K); aic32x4_set_bias_level(codec, SND_SOC_BIAS_STANDBY); From 617d7a25f3c0c08e0b95b24de2d1ea0f3f4b98c7 Mon Sep 17 00:00:00 2001 From: Shahina Shaik Date: Wed, 4 Jun 2014 16:27:19 +0530 Subject: [PATCH] sound: tlv320aic32x4: Fixed Coding style issues. Fixed brace coding style, lines morethan 80 characters issues. Replaced printk with pr_err as pr_err is prefered than printk. Signed-off-by: Shahina Shaik --- sound/soc/codecs/tlv320aic32x4.c | 34 +++++++++++++++++++--------------- 1 files changed, 19 insertions(+), 15 deletions(-) diff --git a/sound/soc/codecs/tlv320aic32x4.c b/sound/soc/codecs/tlv320aic32x4.c index 1d9b117..9e45490 100644 --- a/sound/soc/codecs/tlv320aic32x4.c +++ b/sound/soc/codecs/tlv320aic32x4.c @@ -306,7 +306,7 @@ static inline int aic32x4_get_divs(int mclk, int rate) return i; } } - printk(KERN_ERR "aic32x4: master clock and sample rate is not supported\n"); + pr_err(KERN_ERR "aic32x4: master clock and sample rate is not supported\n"); return -EINVAL; } @@ -323,7 +323,7 @@ static int aic32x4_set_dai_sysclk(struct snd_soc_dai *codec_dai, aic32x4->sysclk = freq; return 0; } - printk(KERN_ERR "aic32x4: invalid frequency to set DAI system clock\n"); + pr_err(KERN_ERR "aic32x4: invalid frequency to set DAI system clock\n"); return -EINVAL; } @@ -349,7 +349,7 @@ static int aic32x4_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) case SND_SOC_DAIFMT_CBS_CFS: break; default: - printk(KERN_ERR "aic32x4: invalid DAI master/slave interface\n"); + pr_err(KERN_ERR "aic32x4: invalid DAI master/slave interface\n"); return -EINVAL; } @@ -374,7 +374,7 @@ static int aic32x4_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) (AIC32X4_LEFT_JUSTIFIED_MODE << AIC32X4_PLLJ_SHIFT); break; default: - printk(KERN_ERR "aic32x4: invalid DAI interface format\n"); + pr_err(KERN_ERR "aic32x4: invalid DAI interface format\n"); return -EINVAL; } @@ -395,7 +395,7 @@ static int aic32x4_hw_params(struct snd_pcm_substream *substream, i = aic32x4_get_divs(aic32x4->sysclk, params_rate(params)); if (i < 0) { - printk(KERN_ERR "aic32x4: sampling rate not supported\n"); + pr_err(KERN_ERR "aic32x4: sampling rate not supported\n"); return i; } @@ -626,32 +626,36 @@ static int aic32x4_probe(struct snd_soc_codec *codec) snd_soc_write(codec, AIC32X4_MICBIAS, AIC32X4_MICBIAS_LDOIN | AIC32X4_MICBIAS_2075V); } - if (aic32x4->power_cfg & AIC32X4_PWR_AVDD_DVDD_WEAK_DISABLE) { + if (aic32x4->power_cfg & AIC32X4_PWR_AVDD_DVDD_WEAK_DISABLE) snd_soc_write(codec, AIC32X4_PWRCFG, AIC32X4_AVDDWEAKDISABLE); - } + tmp_reg = (aic32x4->power_cfg & AIC32X4_PWR_AIC32X4_LDO_ENABLE) ? AIC32X4_LDOCTLEN : 0; snd_soc_write(codec, AIC32X4_LDOCTL, tmp_reg); tmp_reg = snd_soc_read(codec, AIC32X4_CMMODE); - if (aic32x4->power_cfg & AIC32X4_PWR_CMMODE_LDOIN_RANGE_18_36) { + if (aic32x4->power_cfg & AIC32X4_PWR_CMMODE_LDOIN_RANGE_18_36) tmp_reg |= AIC32X4_LDOIN_18_36; - } - if (aic32x4->power_cfg & AIC32X4_PWR_CMMODE_HP_LDOIN_POWERED) { + + if (aic32x4->power_cfg & AIC32X4_PWR_CMMODE_HP_LDOIN_POWERED) tmp_reg |= AIC32X4_LDOIN2HP; - } + snd_soc_write(codec, AIC32X4_CMMODE, tmp_reg); /* Mic PGA routing */ if (aic32x4->micpga_routing & AIC32X4_MICPGA_ROUTE_LMIC_IN2R_10K) - snd_soc_write(codec, AIC32X4_LMICPGANIN, AIC32X4_LMICPGANIN_IN2R_10K); + snd_soc_write(codec, AIC32X4_LMICPGANIN, + AIC32X4_LMICPGANIN_IN2R_10K); else - snd_soc_write(codec, AIC32X4_LMICPGANIN, AIC32X4_LMICPGANIN_CM1L_10K); + snd_soc_write(codec, AIC32X4_LMICPGANIN, + AIC32X4_LMICPGANIN_CM1L_10K); if (aic32x4->micpga_routing & AIC32X4_MICPGA_ROUTE_RMIC_IN1L_10K) - snd_soc_write(codec, AIC32X4_RMICPGANIN, AIC32X4_RMICPGANIN_IN1L_10K); + snd_soc_write(codec, AIC32X4_RMICPGANIN, + AIC32X4_RMICPGANIN_IN1L_10K); else - snd_soc_write(codec, AIC32X4_RMICPGANIN, AIC32X4_RMICPGANIN_CM1R_10K); + snd_soc_write(codec, AIC32X4_RMICPGANIN, + AIC32X4_RMICPGANIN_CM1R_10K); aic32x4_set_bias_level(codec, SND_SOC_BIAS_STANDBY); -- 1.7.0.4