From patchwork Fri Jul 24 08:11:25 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Axel Lin X-Patchwork-Id: 6857911 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 67F27C05AC for ; Fri, 24 Jul 2015 08:12:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 709D920625 for ; Fri, 24 Jul 2015 08:12:10 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 2C19220641 for ; Fri, 24 Jul 2015 08:12:09 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 41F5B260593; Fri, 24 Jul 2015 10:12:08 +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.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 09D6B260564; Fri, 24 Jul 2015 10:12:05 +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 1BB9326057F; Fri, 24 Jul 2015 10:12:04 +0200 (CEST) Received: from mail-pd0-f175.google.com (mail-pd0-f175.google.com [209.85.192.175]) by alsa0.perex.cz (Postfix) with ESMTP id DD335260558 for ; Fri, 24 Jul 2015 10:11:56 +0200 (CEST) Received: by pdjr16 with SMTP id r16so10224411pdj.3 for ; Fri, 24 Jul 2015 01:11:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:subject:from:to:cc:date:content-type :mime-version:content-transfer-encoding; bh=FXSdnFrIYX1JV5OQtMpKW4f6Nl8SvYZMzQ0dUWnHSUg=; b=BpDGSGKu+kTzbPoRPpxZDbBTLI0VZidggbUVy+jBEPNyAwHJs6M70b6q+DJfMBEvxp UrYRwwa6w+xQWuhBPl35f4GHQ+4ox2ZVPIjTT6wnFXDxa9VZCUVJabwgLySnFf6IY9vw orAFHRLBD4cAJGd6YV99T6d0+ENtgQnnGejXffBFNPVeOOMe2hAj21dqQ3DIjDkADUQi 9J+VEDOLqCS7nJOTlHtstLGNZe/fP600qqvENFPw7YL2YVh46/ChaM3LOAVXhvJ4wi8g oMsUaeewRi6SSQ4vGbQ3nrA3edu08qfGFLx7VyHPgvjLFIym5P+bmq1PslFHK8+Z+sev MqFQ== X-Gm-Message-State: ALoCoQnsCd4C7QOTsq11TnQORXQPgfJH9aR9aBjxqWljYZmbratEFZqZZNQoaEGfVrxp+94Gu74i X-Received: by 10.66.146.132 with SMTP id tc4mr28358213pab.124.1437725515132; Fri, 24 Jul 2015 01:11:55 -0700 (PDT) Received: from phoenix.local ([163.26.71.6]) by smtp.gmail.com with ESMTPSA id j4sm12979314pdp.36.2015.07.24.01.11.36 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Jul 2015 01:11:46 -0700 (PDT) Message-ID: <1437725485.4914.0.camel@ingics.com> From: Axel Lin To: Mark Brown Date: Fri, 24 Jul 2015 16:11:25 +0800 X-Mailer: Evolution 3.12.10-0ubuntu1~14.10.1 Mime-Version: 1.0 Cc: Charles Keepax , Ralph Birt , Liam Girdwood , alsa-devel@alsa-project.org, Anish Kumar Subject: [alsa-devel] [PATCH] ASoC: Use params_width() at appropriate places 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 Signed-off-by: Axel Lin --- sound/soc/codecs/max98925.c | 2 +- sound/soc/codecs/pcm512x.c | 4 ++-- sound/soc/codecs/wm2200.c | 2 +- sound/soc/codecs/wm5100.c | 2 +- sound/soc/codecs/wm8776.c | 4 ++-- sound/soc/codecs/wm8996.c | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sound/soc/codecs/max98925.c b/sound/soc/codecs/max98925.c index ebb648a..5990de3 100644 --- a/sound/soc/codecs/max98925.c +++ b/sound/soc/codecs/max98925.c @@ -430,7 +430,7 @@ static int max98925_dai_hw_params(struct snd_pcm_substream *substream, struct snd_soc_codec *codec = dai->codec; struct max98925_priv *max98925 = snd_soc_codec_get_drvdata(codec); - switch (snd_pcm_format_width(params_format(params))) { + switch (params_width(params)) { case 16: regmap_update_bits(max98925->regmap, MAX98925_FORMAT, diff --git a/sound/soc/codecs/pcm512x.c b/sound/soc/codecs/pcm512x.c index de16429..047c489 100644 --- a/sound/soc/codecs/pcm512x.c +++ b/sound/soc/codecs/pcm512x.c @@ -1117,7 +1117,7 @@ static int pcm512x_hw_params(struct snd_pcm_substream *substream, params_rate(params), params_channels(params)); - switch (snd_pcm_format_width(params_format(params))) { + switch (params_width(params)) { case 16: alen = PCM512x_ALEN_16; break; @@ -1132,7 +1132,7 @@ static int pcm512x_hw_params(struct snd_pcm_substream *substream, break; default: dev_err(codec->dev, "Bad frame size: %d\n", - snd_pcm_format_width(params_format(params))); + params_width(params)); return -EINVAL; } diff --git a/sound/soc/codecs/wm2200.c b/sound/soc/codecs/wm2200.c index 35199fc..fd1439e 100644 --- a/sound/soc/codecs/wm2200.c +++ b/sound/soc/codecs/wm2200.c @@ -1702,7 +1702,7 @@ static int wm2200_hw_params(struct snd_pcm_substream *substream, int *bclk_rates; /* Data sizes if not using TDM */ - wl = snd_pcm_format_width(params_format(params)); + wl = params_width(params); if (wl < 0) return wl; fl = snd_soc_params_to_frame_size(params); diff --git a/sound/soc/codecs/wm5100.c b/sound/soc/codecs/wm5100.c index 8120b0c..c2cdcae 100644 --- a/sound/soc/codecs/wm5100.c +++ b/sound/soc/codecs/wm5100.c @@ -1408,7 +1408,7 @@ static int wm5100_hw_params(struct snd_pcm_substream *substream, base = dai->driver->base; /* Data sizes if not using TDM */ - wl = snd_pcm_format_width(params_format(params)); + wl = params_width(params); if (wl < 0) return wl; fl = snd_soc_params_to_frame_size(params); diff --git a/sound/soc/codecs/wm8776.c b/sound/soc/codecs/wm8776.c index 592866d..183c9a4 100644 --- a/sound/soc/codecs/wm8776.c +++ b/sound/soc/codecs/wm8776.c @@ -265,7 +265,7 @@ static int wm8776_hw_params(struct snd_pcm_substream *substream, } /* Set word length */ - switch (snd_pcm_format_width(params_format(params))) { + switch (params_width(params)) { case 16: iface = 0; break; @@ -280,7 +280,7 @@ static int wm8776_hw_params(struct snd_pcm_substream *substream, break; default: dev_err(codec->dev, "Unsupported sample size: %i\n", - snd_pcm_format_width(params_format(params))); + params_width(params)); return -EINVAL; } diff --git a/sound/soc/codecs/wm8996.c b/sound/soc/codecs/wm8996.c index 2a696db..f7ccd9f 100644 --- a/sound/soc/codecs/wm8996.c +++ b/sound/soc/codecs/wm8996.c @@ -1780,7 +1780,7 @@ static int wm8996_hw_params(struct snd_pcm_substream *substream, wm8996->rx_rate[dai->id] = params_rate(params); /* Needs looking at for TDM */ - bits = snd_pcm_format_width(params_format(params)); + bits = params_width(params); if (bits < 0) return bits; aifdata |= (bits << WM8996_AIF1TX_WL_SHIFT) | bits;