From patchwork Tue May 12 06:58:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zidan Wang X-Patchwork-Id: 6386021 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 495AD9F1C2 for ; Tue, 12 May 2015 06:57:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 665F7203B5 for ; Tue, 12 May 2015 06:57:46 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 3550B203A0 for ; Tue, 12 May 2015 06:57:45 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 4C6CF26548E; Tue, 12 May 2015 08:57:44 +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, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id C9876265363; Tue, 12 May 2015 08:57:19 +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 0CEE32654C2; Tue, 12 May 2015 08:57:18 +0200 (CEST) Received: from na01-bl2-obe.outbound.protection.outlook.com (mail-bl2on0143.outbound.protection.outlook.com [65.55.169.143]) by alsa0.perex.cz (Postfix) with ESMTP id 8DE8626517F for ; Tue, 12 May 2015 08:56:42 +0200 (CEST) Received: from BY2PR03CA003.namprd03.prod.outlook.com (10.255.93.20) by DM2PR0301MB1262.namprd03.prod.outlook.com (10.160.219.27) with Microsoft SMTP Server (TLS) id 15.1.160.19; Tue, 12 May 2015 06:56:41 +0000 Received: from BN1BFFO11FD013.protection.gbl (10.255.93.4) by BY2PR03CA003.outlook.office365.com (10.255.93.20) with Microsoft SMTP Server (TLS) id 15.1.160.19 via Frontend Transport; Tue, 12 May 2015 06:56:40 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=freescale.com; freescale.mail.onmicrosoft.com; dkim=none (message not signed) header.d=none; Received-SPF: Fail (protection.outlook.com: domain of freescale.com does not designate 192.88.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Received: from az84smr01.freescale.net (192.88.158.2) by BN1BFFO11FD013.mail.protection.outlook.com (10.58.144.76) with Microsoft SMTP Server (TLS) id 15.1.160.8 via Frontend Transport; Tue, 12 May 2015 06:56:40 +0000 Received: from b50113.ap.freescale.net (b50113.ap.freescale.net [10.192.241.89]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id t4C6uaAm009289; Mon, 11 May 2015 23:56:36 -0700 From: Zidan Wang To: Date: Tue, 12 May 2015 14:58:21 +0800 Message-ID: X-Mailer: git-send-email 1.9.1 In-Reply-To: References: X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD013; 1:dvPAKxPK3apm83t6W/m1BHteCCRLArbR+e02G8Lo+csno9eiaANsqDDbQ21mKUJbWG1B9V45Cc4STJhgGVos8+DLUfEiNr5Btx30DIjHKtMV7AgcSuw5YZQx2sk5EzTFlX61qDPpz5YBbd1VMx1NRiDuEluIyaFG7ArcsABIw4EWR7Ma02tx3bMSZ3ro7YBcrija+0FQMfbAO6CQXbh3gzGJam52QrAn4HANHtVwrJ6meyOC48t171QnfE0UhAIh6JEWzy/0uvEo4EBIFt084NAgv/t3ygD2P6jc2rZbPfq2WtcLVZVi2fUZFX1+Kk2+yPFQ8rmHHTREH7v/mwjJEA== X-Forefront-Antispam-Report: CIP:192.88.158.2; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(339900001)(189002)(199003)(50226001)(36756003)(62966003)(6806004)(77096005)(105606002)(2351001)(87936001)(2950100001)(5001960100002)(107886002)(50466002)(19580395003)(110136002)(46102003)(48376002)(85426001)(50986999)(189998001)(106466001)(76176999)(229853001)(118296001)(77156002)(33646002)(86362001)(47776003)(104016003)(92566002)(19580405001)(4001430100001); DIR:OUT; SFP:1102; SCL:1; SRVR:DM2PR0301MB1262; H:az84smr01.freescale.net; FPR:; SPF:Fail; MLV:sfv; MX:1; A:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM2PR0301MB1262; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005006)(3002001); SRVR:DM2PR0301MB1262; BCL:0; PCL:0; RULEID:; SRVR:DM2PR0301MB1262; X-Forefront-PRVS: 0574D4712B X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 May 2015 06:56:40.0676 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d; Ip=[192.88.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0301MB1262 Cc: alsa-devel@alsa-project.org, lars@metafoo.de, Zidan Wang , patches@opensource.wolfsonmicro.com, lgirdwood@gmail.com, linux-kernel@vger.kernel.org, broonie@kernel.org, ckeepax@opensource.wolfsonmicro.com Subject: [alsa-devel] [PATCH 2/4] ASoC: wm8960: add 32 bit word length support 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 According to referance manual, right justify mode can't support 32 bit word length. Signed-off-by: Zidan Wang Acked-by: Charles Keepax --- sound/soc/codecs/wm8960.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c index b072501..2559e31 100644 --- a/sound/soc/codecs/wm8960.c +++ b/sound/soc/codecs/wm8960.c @@ -655,6 +655,12 @@ static int wm8960_hw_params(struct snd_pcm_substream *substream, case 24: iface |= 0x0008; break; + case 32: + /* right justify mode does not support 32 word length */ + if ((iface & 0x3) != 0) { + iface |= 0x000c; + break; + } default: dev_err(codec->dev, "unsupported width %d\n", params_width(params)); @@ -1050,7 +1056,7 @@ static int wm8960_set_dai_sysclk(struct snd_soc_dai *dai, int clk_id, #define WM8960_FORMATS \ (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ - SNDRV_PCM_FMTBIT_S24_LE) + SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE) static const struct snd_soc_dai_ops wm8960_dai_ops = { .hw_params = wm8960_hw_params,