From patchwork Thu Jul 31 12:16:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 34628 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f198.google.com (mail-pd0-f198.google.com [209.85.192.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B425A20792 for ; Thu, 31 Jul 2014 12:47:28 +0000 (UTC) Received: by mail-pd0-f198.google.com with SMTP id fp1sf15727994pdb.5 for ; Thu, 31 Jul 2014 05:47:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:delivered-to:from:to:date :message-id:cc:subject:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list:content-type :content-transfer-encoding; bh=euI5z38yfwLitXignAglTzwA+S/N4r0jeCg4E+CwSpk=; b=MS9uufU9Ugk4yRYBbjh5Vrqxop5fV1pS6h5VA4AlXboj0wFhNChuBsU5L8Sa0ujdwT w9qgWpNa2KtrZ7ywYy9hp5tTH6eeM5azsBBMIQyzWkoJkIhp5pnWTsdOUcdHvLz6aFXy qkwsZ3EgX9DBoASMK7l8PCT16kzPsTJn6AeWegSapXst+F5glprZv5GiE8MQC9Zjrd6Q VouuypErAxZUq56kex6f7OJzSlhdf2Qh5hxEIdLzKvLOSPXkbaY5vQRx8JAU9ejFgtRW AExGglKHH8US5vKQx7N2afnk/gdkaVCVr8B3EGCzKSWmV7XzGrBGCfWJ4V8RXrgWMJQh KU1Q== X-Gm-Message-State: ALoCoQlE5xMYS8WehTNk9vlk8i4MEXHOULT93f0rfsBavUpFa6/7uZ+AcNNJJBwCdhXXtO7VTC+X X-Received: by 10.66.145.33 with SMTP id sr1mr1444075pab.18.1406810847971; Thu, 31 Jul 2014 05:47:27 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.40.81 with SMTP id w75ls734426qgw.35.gmail; Thu, 31 Jul 2014 05:47:27 -0700 (PDT) X-Received: by 10.52.35.81 with SMTP id f17mr14435646vdj.13.1406810847842; Thu, 31 Jul 2014 05:47:27 -0700 (PDT) Received: from mail-vc0-f179.google.com (mail-vc0-f179.google.com [209.85.220.179]) by mx.google.com with ESMTPS id tu4si4228617vcb.61.2014.07.31.05.47.27 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 31 Jul 2014 05:47:27 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.179 as permitted sender) client-ip=209.85.220.179; Received: by mail-vc0-f179.google.com with SMTP id hq11so4048315vcb.38 for ; Thu, 31 Jul 2014 05:47:27 -0700 (PDT) X-Received: by 10.220.50.8 with SMTP id x8mr12452918vcf.18.1406810847679; Thu, 31 Jul 2014 05:47:27 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp15350vcb; Thu, 31 Jul 2014 05:47:27 -0700 (PDT) X-Received: by 10.180.189.234 with SMTP id gl10mr15714421wic.56.1406810846615; Thu, 31 Jul 2014 05:47:26 -0700 (PDT) Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id ic10si11057848wjb.177.2014.07.31.05.47.26 for ; Thu, 31 Jul 2014 05:47:26 -0700 (PDT) Received-SPF: none (google.com: alsa-devel-bounces@alsa-project.org does not designate permitted sender hosts) client-ip=77.48.224.243; Received: by alsa0.perex.cz (Postfix, from userid 1000) id 3DDED265533; Thu, 31 Jul 2014 14:47:25 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on mail1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.2.4 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 561E82655D4; Thu, 31 Jul 2014 14:36:50 +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 6D39F2652AD; Thu, 31 Jul 2014 14:36:48 +0200 (CEST) Received: from mezzanine.sirena.org.uk (mezzanine.sirena.org.uk [106.187.55.193]) by alsa0.perex.cz (Postfix) with ESMTP id ED6B82655E7 for ; Thu, 31 Jul 2014 14:16:33 +0200 (CEST) Received: from cpc11-sgyl31-2-0-cust672.sgyl.cable.virginm.net ([94.175.94.161] helo=debutante) by mezzanine.sirena.org.uk with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1XCpHU-0004Qr-U1; Thu, 31 Jul 2014 12:16:29 +0000 Received: from broonie by debutante with local (Exim 4.83) (envelope-from ) id 1XCpHS-0004Da-4W; Thu, 31 Jul 2014 13:16:22 +0100 From: Mark Brown To: Peter Ujfalusi , Liam Girdwood Date: Thu, 31 Jul 2014 13:16:12 +0100 Message-Id: <1406808978-16175-1-git-send-email-broonie@kernel.org> X-Mailer: git-send-email 2.0.1 X-SA-Exim-Connect-IP: 94.175.94.161 X-SA-Exim-Mail-From: broonie@sirena.org.uk X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mezzanine.sirena.org.uk) Cc: alsa-devel@alsa-project.org, linaro-kernel@lists.linaro.org, Mark Brown Subject: [alsa-devel] [PATCH 1/7] ASoC: tas5086: Convert to params_width() X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: 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-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: broonie@kernel.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.179 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Mark Brown The CODEC doesn't care how data is laid out in memory. Signed-off-by: Mark Brown --- sound/soc/codecs/tas5086.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/tas5086.c b/sound/soc/codecs/tas5086.c index be7194b43b7a..249ef5c4c762 100644 --- a/sound/soc/codecs/tas5086.c +++ b/sound/soc/codecs/tas5086.c @@ -425,14 +425,14 @@ static int tas5086_hw_params(struct snd_pcm_substream *substream, } /* ... then add the offset for the sample bit depth. */ - switch (params_format(params)) { - case SNDRV_PCM_FORMAT_S16_LE: + switch (params_width(params)) { + case 16: val += 0; break; - case SNDRV_PCM_FORMAT_S20_3LE: + case 20: val += 1; break; - case SNDRV_PCM_FORMAT_S24_3LE: + case 24: val += 2; break; default: