From patchwork Tue Feb 23 06:53:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Axel Lin X-Patchwork-Id: 8387861 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 411C6C0553 for ; Tue, 23 Feb 2016 06:53:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7A2A02066F for ; Tue, 23 Feb 2016 06:53:41 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 3ABE62040F for ; Tue, 23 Feb 2016 06:53:40 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 14925261501; Tue, 23 Feb 2016 07:53:33 +0100 (CET) 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_SIGNED, RCVD_IN_DNSWL_NONE, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id D5885260686; Tue, 23 Feb 2016 07:53:24 +0100 (CET) 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 088DA2606E6; Tue, 23 Feb 2016 07:53:24 +0100 (CET) Received: from mail-pf0-f180.google.com (mail-pf0-f180.google.com [209.85.192.180]) by alsa0.perex.cz (Postfix) with ESMTP id 2E3512605B4 for ; Tue, 23 Feb 2016 07:53:18 +0100 (CET) Received: by mail-pf0-f180.google.com with SMTP id q63so106944426pfb.0 for ; Mon, 22 Feb 2016 22:53:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ingics-com.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:cc:date:content-type:mime-version :content-transfer-encoding; bh=ApfbxPGV1fKgXDBFN9rDDJiEmDMmX759KPphcP3FiAA=; b=QEHiqKqYQo9r5m4POEWQbNCf6FM84H43PHNYum+WZ0avxe7ORQM4rDwo4lcXgj0KIt wWikiNpKijXiMHHk59GhFrMlI8Ivh2ZgzZpC1Y2BHiRmBwBn4kks33ivPy5UP+Dh+WMy 8eCZot8CLwtPEqn2i7gbO90zYXWxy7oE+uFBNnHUQIqpyCce7U82XHYLHWaM6k07uPiY 3T8uJoZSpc2qAVUnvMC09BWAwYtTgzatAZiOsxo65wO4aKZCqrd2E0+ndgyct21kpv0S lcSlEuO2SkWjVaUeAZFFMPJ47OkCwltjulTRQogKfZAIhQMMd5FACeT4YxVw+9UMD44e JpgA== 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=ApfbxPGV1fKgXDBFN9rDDJiEmDMmX759KPphcP3FiAA=; b=jwVgEEYAZ6jjQAkSfOdMvGQpIjzMr7w9bxrbpzSwtR2tWNT3RZfz+NwK+SEr9zPij3 iUsAf7yYfB42XPYaJUkHIJfB57OVBUzowGQaWPte+tMSZPfOMabXPL2t0Rr8wFnA03gj HxRiLPESY5ZW0T9410RWmDcHfjVoV1IZRcdxWGUcWrb7auXACSFd+FH17V5lOdE/wYB4 mjKONXr0kfLOf0GNzdqaqT7eeqBM3/hF8Mzx961Xpk4H1+OvuOvJVDbbGlNqnowqCwe8 w70L/UoJJ3guwIFmQO/AOynOwzEpPEhw9k5MhMtBRi2e16M54BLMBmmSfcBrXxdtb/dx JXAA== X-Gm-Message-State: AG10YOR5EWoERliI+XeNfk8HNAd9NokTvJGXJlQtlG+iI1zU3RGbK+nL4L2bif1eolPHcw== X-Received: by 10.98.12.221 with SMTP id 90mr43934184pfm.95.1456210397341; Mon, 22 Feb 2016 22:53:17 -0800 (PST) Received: from phoenix (36-239-215-26.dynamic-ip.hinet.net. [36.239.215.26]) by smtp.gmail.com with ESMTPSA id 17sm41268371pfp.96.2016.02.22.22.53.14 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 22 Feb 2016 22:53:16 -0800 (PST) Message-ID: <1456210393.15964.0.camel@ingics.com> From: Axel Lin To: Mark Brown Date: Tue, 23 Feb 2016 14:53:13 +0800 X-Mailer: Evolution 3.12.11-0ubuntu3 Mime-Version: 1.0 Cc: alsa-devel@alsa-project.org, Liam Girdwood , anish kumar Subject: [alsa-devel] [PATCH] ASoC: max9867: Use params_width instead of open-coded 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/max9867.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/soc/codecs/max9867.c b/sound/soc/codecs/max9867.c index ab7a94d..e3ee391 100755 --- a/sound/soc/codecs/max9867.c +++ b/sound/soc/codecs/max9867.c @@ -206,10 +206,9 @@ static int max9867_dai_hw_params(struct snd_pcm_substream *substream, unsigned long int bclk_rate, pclk_bclk_ratio; int bclk_value; - bclk_rate = params_rate(params) * 2 * - snd_pcm_format_width(params_format(params)); + bclk_rate = params_rate(params) * 2 * params_width(params); pclk_bclk_ratio = max9867->pclk/bclk_rate; - switch (snd_pcm_format_width(params_format(params))) { + switch (params_width(params)) { case 8: case 16: switch (pclk_bclk_ratio) {