From patchwork Fri Dec 18 09:29:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zidan Wang X-Patchwork-Id: 7881441 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 5D1799F1AF for ; Fri, 18 Dec 2015 09:27:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 53A53204AB for ; Fri, 18 Dec 2015 09:27:24 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 0B745202C8 for ; Fri, 18 Dec 2015 09:27:23 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 315BC26581E; Fri, 18 Dec 2015 10:27:21 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Status: No, score=-2.6 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, NO_DNS_FOR_FROM,RCVD_IN_DNSWL_LOW,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 75008265680; Fri, 18 Dec 2015 10:27:13 +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 1E57826572A; Fri, 18 Dec 2015 10:27:12 +0100 (CET) Received: from na01-by2-obe.outbound.protection.outlook.com (mail-by2on0101.outbound.protection.outlook.com [207.46.100.101]) by alsa0.perex.cz (Postfix) with ESMTP id 47D0226559B for ; Fri, 18 Dec 2015 10:27:03 +0100 (CET) Received: from BLUPR03CA012.namprd03.prod.outlook.com (10.255.124.29) by BY1PR0301MB1255.namprd03.prod.outlook.com (10.161.203.27) with Microsoft SMTP Server (TLS) id 15.1.355.16; Fri, 18 Dec 2015 09:27:01 +0000 Received: from BN1AFFO11FD020.protection.gbl (10.255.124.4) by BLUPR03CA012.outlook.office365.com (10.255.124.29) with Microsoft SMTP Server (TLS) id 15.1.361.13 via Frontend Transport; Fri, 18 Dec 2015 09:27:00 +0000 Authentication-Results: spf=permerror (sender IP is 192.88.168.50) smtp.mailfrom=freescale.com; freescale.mail.onmicrosoft.com; dkim=none (message not signed) header.d=none; freescale.mail.onmicrosoft.com; dmarc=none action=none header.from=freescale.com; Received-SPF: PermError (protection.outlook.com: domain of freescale.com used an invalid SPF mechanism) Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1AFFO11FD020.mail.protection.outlook.com (10.58.52.80) with Microsoft SMTP Server (TLS) id 15.1.355.15 via Frontend Transport; Fri, 18 Dec 2015 09:27:00 +0000 Received: from b50113.ap.freescale.net (b50113.ap.freescale.net [10.192.241.29]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id tBI9QsG1029862; Fri, 18 Dec 2015 02:26:55 -0700 From: Zidan Wang To: Date: Fri, 18 Dec 2015 17:29:13 +0800 Message-ID: X-Mailer: git-send-email 1.9.1 X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD020; 1:UAS/MmZaZtCrA//bMDBsalLVyQz4jfEUClLwXWJIEHhAjposSy6fbZdhtwtx0z06yKrQwMI9etsw+gGb+iv37K/lmFutWtLwzahlZZy9CVxlAUfhKF51EQdCoL8lQf3eiHw1w6B5BU0fGZ0cC8zGmash7BoGtSZzC/246tyPThhD1/bcBliHBCjH4J+bfAigodoVqA4vjlet3tP4/8mXnnQCm0z1lluJ6u3ZOruGSkhIwor5+I5/LPNVJrnVWvtngH5ag6ibPz4U3pD7wnuoqZLv5leck6lanvDs6t5m6bR1JLLCJ8SNGOz3jHY9k0ItfXKHPqqxWfVVh5ZxId+0CVXwLRAwlzmLMKDpg3pvgUOxzZZT+F7XOLKd68CQxmZqzcbiDUhBTbxlAcfw8X1koaMWIAWBAtqS6+lv7vB/0lZugchlO/Eu+NVG4L8/0gV4 X-Forefront-Antispam-Report: CIP:192.88.168.50; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(2980300002)(448002)(3190300001)(189002)(199003)(5008740100001)(81156007)(5003940100001)(33646002)(104016004)(6806005)(11100500001)(77096005)(36756003)(92566002)(586003)(1220700001)(85326001)(50466002)(1096002)(118296001)(48376002)(47776003)(106466001)(19580405001)(50226001)(50986999)(2351001)(97736004)(229853001)(5001960100002)(110136002)(107886002)(86362001)(87936001)(19580395003)(189998001)(4001430100002); DIR:OUT; SFP:1102; SCL:1; SRVR:BY1PR0301MB1255; H:tx30smr01.am.freescale.net; FPR:; SPF:PermError; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Exchange-Diagnostics: 1; BY1PR0301MB1255; 2:rQTzCjyMkFGcbRrQB+m3lnbtGcsO7wSqqfQGedUOGVFyCA3IHnPv6zv7tw0sJYRxzLQxwQEX23Jp6mGiGrI5tdc0rGjPJEPIgvpQ+sH20f+Fzi+F3uT3pLMLz+TEBrvOSeKObE3RG3EuJXFXQ+OYzg==; 3:9xNg06VoJj0wha2y/KYlgx93jxhKC1eEswzSQziZc+nJPVQLkqiG7fEVu5cN33s86LKrMlVJ2Cr7RDHT8dp0u8EvfWse+be1ZIRelqdFeVeZPupzEskIgmaZnvKD+NgjeTTrZXCTdtZ7usKf5O/FVJ6uAz49q3k4KhRrT6QFNa+PWnfHP5cdeUjMjlev8qWuylkUetjL9GiCiladNzT45HxpnoRlOP/lY5dq208lUjg=; 25:WmusBicQlGhFQUHOaTiA5DygYOlrLfFv6mQ9ijAocV1EymPK/FRqChfH/RLBJ3gDL8QblSlipZ8ZPRTvhUS0ZCk31bV0+5smweEMG67hcxS57m9/bLvFBMw4Dtr1h9TrKX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X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(101931422205132); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(520078)(5005006)(8121501046)(3002001)(10201501046); SRVR:BY1PR0301MB1255; BCL:0; PCL:0; RULEID:; SRVR:BY1PR0301MB1255; X-Forefront-PRVS: 07943272E1 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY1PR0301MB1255; 23:ThRuEr95AfTzl2OfybTI80iF+1q3ODIFMpyDrg7?= =?us-ascii?Q?w8dHCHeUrSCB8GmbD8r1Ol5H7f4bud6qGm1KI3LvhqENiA3tgMWv2l6M21Ds?= =?us-ascii?Q?ildMNto18bYsWjQZkKVLb384l7lbiRx1jtxN8vrp/3XjCtZD4Sai8wvT4JfY?= =?us-ascii?Q?mlZM8p+qnL3zUP5U2s9N3M2HKlfFe2oZWEYDF0aT6wPw3R25NPAy9/oKgA4Y?= =?us-ascii?Q?MxPUAzjKdp/wezTDmUrGGLz4E0S3mX1TYxJPXdRS/OLjmu5Odw6gO9xp0m9S?= =?us-ascii?Q?PVDzYy7zu2nyLIgmqYnT69Z0k9ngc2ftuvjB6Vej1fByebv2vaM4kHFHUrZU?= =?us-ascii?Q?dvxOLHfde4qiZGzvc5Bf8z7hbbJLQF2zyuysAKVTxkvekuQf0EwZ/rI+Nmd3?= =?us-ascii?Q?0mmJHRvOmEtOBL0sWgxhbG6kwVXlTccXXZIBBtu8rMJV5gSAD/4G0tw7e7I+?= =?us-ascii?Q?tyR6Kmoe/Eh5ivF9mOjsp9nc/2K7Sj2K2UuODAkqfMc9VNHyGMKkPhDucKDR?= =?us-ascii?Q?DzwU1qDY641tlrw2slBasuVwmvFSf8u4vYu9Ih4mgMfSQC1BCM6bDmTOfJW2?= =?us-ascii?Q?rWaZTnCq7Dk9ZhzENF8zAeZqjRlCjsChVRgcbnGx050/cTA9xwH8wI3S91TP?= =?us-ascii?Q?2pVs7xKXcD6gDBHDX54SwBjzjMmlKzNcxFDncsy72csHqocbeagqwtRSdeAT?= =?us-ascii?Q?pX/KqqTEXNzK2dZp0wV7qzOHJD6vulYahz6ULXyzY4A03YY+TAvH1gj7XiFJ?= =?us-ascii?Q?ypnrnZjowRbib+h6XHudMfPg/V6cVCIVVQZ/O+aFY9Yj0cICvWqBhpb8aemM?= =?us-ascii?Q?F7ijNf6cTVRLIHNp58rOYAzTVKj+qTlk4eiat/5jJSY6imiVpDbjOF4tURUt?= =?us-ascii?Q?RORwZkWeuOUvD/gxFYDArknIrTBza3frfp5RJ4FaSp6uwkSysQeJ6KzhcwUa?= =?us-ascii?Q?h3ZXNqbBqK1YmPcZebdyyVH6Txc8XTyE7Mrx6tgTbvPW8B5T9bgZzRijkzsU?= =?us-ascii?Q?iv70t+QMlkBxDryM+Yqx421OfzZm9r3w80Oa25SjxYKkteTgiIS7f8iUQh7v?= =?us-ascii?Q?TMm2E3fA=3D?= X-Microsoft-Exchange-Diagnostics: 1; BY1PR0301MB1255; 5:NUOZW3vTgB6BT+uOXwtchACt5mYvICWu2mvBTp6NPnv55NNkpoNTgxOMdLEr08MSy/Rw/wj+Le1/Xz6N1cr+xwVFoHtiUZpJo7/qLe/bV/COwnCaL2tcUC0il25tzCJWpDddN84dAnGkBMN8R9m9Yg==; 24:Lj8t9UacKvFoDrvkP9hE6djEkUTTc3fBjNWCtp6T4wFJi19JzlUWP2++WeKjh6W7qmmAD59pH8x9DiuKxOb3gx8q8IE5X8UpbuAxTM7K3fQ= X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Dec 2015 09:27:00.1076 (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.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0301MB1255 Cc: alsa-devel@alsa-project.org, Zidan Wang , Xiubo.Lee@gmail.com, tiwai@suse.com, nicoleotsuka@gmail.com Subject: [alsa-devel] [PATCH] ASoC: fsl_asrc: old version asrc only support even numbered channels 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 The latest asrc's channel bits is 4 bit, the old asrc's channel bits is 3. For the old version asrc, channel should be a even number. Signed-off-by: Zidan Wang --- sound/soc/fsl/fsl_asrc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/soc/fsl/fsl_asrc.c b/sound/soc/fsl/fsl_asrc.c index be78dc9..484e46ca 100644 --- a/sound/soc/fsl/fsl_asrc.c +++ b/sound/soc/fsl/fsl_asrc.c @@ -113,7 +113,8 @@ static int fsl_asrc_request_pair(int channels, struct fsl_asrc_pair *pair) if (index == ASRC_INVALID_PAIR) { dev_err(dev, "all pairs are busy now\n"); ret = -EBUSY; - } else if (asrc_priv->channel_avail < channels) { + } else if (asrc_priv->channel_avail < channels || + (asrc_priv->channel_bits < 4 && channels % 2 != 0)) { dev_err(dev, "can't afford required channels: %d\n", channels); ret = -EINVAL; } else {