Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752653AbbELG4o (ORCPT ); Tue, 12 May 2015 02:56:44 -0400 Received: from mail-by2on0112.outbound.protection.outlook.com ([207.46.100.112]:4567 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751843AbbELG4m (ORCPT ); Tue, 12 May 2015 02:56:42 -0400 X-Greylist: delayed 74001 seconds by postgrey-1.27 at vger.kernel.org; Tue, 12 May 2015 02:56:42 EDT 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; From: Zidan Wang To: CC: , , , , , , , Zidan Wang Subject: [alsa-devel][PATCH 2/4] ASoC: wm8960: add 32 bit word length support 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 Content-Type: text/plain 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 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1348 Lines: 42 According to referance manual, right justify mode can't support 32 bit word length. Signed-off-by: Zidan Wang --- 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, -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/