Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754058AbdCOPeL (ORCPT ); Wed, 15 Mar 2017 11:34:11 -0400 Received: from mail-eopbgr10045.outbound.protection.outlook.com ([40.107.1.45]:55018 "EHLO EUR02-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751280AbdCOPdT (ORCPT ); Wed, 15 Mar 2017 11:33:19 -0400 Authentication-Results: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=nxp.com; From: Daniel Baluta To: , , CC: , , , , , , Subject: [RFC PATCH 0/2] wm8960: Relax bit clock computation Date: Wed, 15 Mar 2017 17:33:04 +0200 Message-ID: <1489591986-6302-1-git-send-email-daniel.baluta@nxp.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [192.88.146.1] X-ClientProxiedBy: HE1PR0701CA0064.eurprd07.prod.outlook.com (10.168.191.32) To DB4PR04MB507.eurprd04.prod.outlook.com (10.141.239.149) X-MS-Office365-Filtering-Correlation-Id: 49f33f1c-cd9d-41fd-cd6b-08d46bb89991 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(48565401081);SRVR:DB4PR04MB507; X-Microsoft-Exchange-Diagnostics: 1;DB4PR04MB507;3:7ccQTBFm76QQ9Uwl9zcUeltpvmsHdjJ7BfrMVy1vJgpWYuhjy0ZRvmbyRbd05YZr2IeldYBFCUEph9+PSo2S09WzV8WAJ3ghjZ3BKDo6Tm3/pii8bFiyIyAVRjafw5lnaiBxV/FYtiahcXlQUH8OkuIBx95eVs5OPA8KwQI/rmu8ZYXaTIU5dY24Pr6RhHNDWrZyVnfRz0XoNGttzVuUuT9Nf47hY78AqR2kjFR3JYgXoRWU4EnrnNc6J7w3PlhePpQZvTtMyvAIQvorzH+O8bD+iFsH2Te54B+d+Ao+AZQ=;25:nFSrZQope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9CBRi/hd95F0jtYQKZsP54KikQT3ZSkbKXOizGHfLKuTRygw/5uP43zFB3DwCxQdsv/7v6pcuDFUsNgNmgxxLiswPe6hR29RfgsnfYCPM4ap2BleKS4P9EdmQgUTN7N+Cu8uCH/8euLVTjVn9EeeKaxaFv8ybaJf2a7I5TpCIzh1OXF8XBOQQ6tq3i5oauHm X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6055026)(6041248)(20161123555025)(20161123560025)(20161123564025)(20161123558025)(20161123562025)(6072148);SRVR:DB4PR04MB507;BCL:0;PCL:0;RULEID:;SRVR:DB4PR04MB507; X-Microsoft-Exchange-Diagnostics: 1;DB4PR04MB507;4:10Q5jFvmkFh+qVW/mls5b/+pG79fKa9xZ02Rq6NFNUtnES2uZFq0fcCjR34FXkSA8E8rzvM/dqRY0y3fB6MAd1QmBsknvAZq2itWb0EDlYK2YCA55qZgS0RPF6zwFC9GoNlUnp6G87DvuYSTXzOsdlFFaQszRedDnlSKa0ZM5+hVTJZx2nhDdqxmeQ1um1VmMIQhtbSvR608ClmP7/SvFwHtj6Exj2QD9P7+kR480A3uZawVbR0ZrLzEvIZAS37MTGPU5n2M50+ZE3uH0aCmCzLZxmGdVXu9kdGYlAvf8Oscz5I10oRMFjynX63T7hGimXQ03qHRjah0r6ouWebVBvbT+vZAEppc5Jaoyv8NhEEfVMO2sngx4KR2Jo74mR6AHaa2hoGXETGKb1kYzyv1pPdRF9Ds2rTiy0DpwADgbVBYMRgpljWZ7WUB7Pldiyazwe1sJERZJboHQWoOd+176v+gp1if7Pgg7G0pUxWWNlZ5S0XoJbpa6SsX/2W/TFQOx1IMfnLl83dZ5tniqVbXSDaTeA47Fn5WATqKuE/2zmOSmGXL2fEMKB3YHcJhZbWCIva8QsIUVC8FLrNUeQLpVXeAY76Yi1p9odR21Gc7teLt3gTA8l9+jv7tg8jif5gg X-Forefront-PRVS: 02475B2A01 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6009001)(39860400002)(39410400002)(39450400003)(39840400002)(39850400002)(189998001)(53936002)(50226002)(66066001)(6506006)(48376002)(86362001)(50466002)(54906002)(81166006)(966004)(6486002)(5003940100001)(25786008)(8676002)(4326008)(6306002)(5660300001)(33646002)(42186005)(6666003)(36756003)(50986999)(1720100001)(47776003)(6116002)(38730400002)(7736002)(6512007)(2201001)(3846002)(53376002)(2906002)(305945005)(217873001);DIR:OUT;SFP:1101;SCL:1;SRVR:DB4PR04MB507;H:fsr-ub1664-118.ea.freescale.net;FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;DB4PR04MB507;23:PL8e7XPmaQ8ER1SO6QkWqNipa5V1WZdBMdPANHOCRN?= =?us-ascii?Q?qPfkZj1G47X0pUlMGDJZQwVDseJvbUtzwGNFOyjEhv7SWbnOz1/D0N4W/hK+?= =?us-ascii?Q?ZW7PP9sYRnosUN3Kkl1RFCIXGXITwahfuPY278IKkLRlrwb0x4R+L/fL5xvc?= =?us-ascii?Q?PmlzZsjWkVQhj8sSvrjG0mCDHU1AJAfzzb+1mPO9ASa2U7gRpGuveHT8ud/Z?= =?us-ascii?Q?i/CjAXBbtOAz1FZuZrtaXJqxv6QgHa00gSum6GYnTRzD/2rq0tPSLzIayFUq?= =?us-ascii?Q?QpRoZdOHHyXjSgy7+AgnbKXoHHTNdRDtkPhJ8V+OkcJnOASOEziTpgNYLgXf?= =?us-ascii?Q?XSrEy+cKuXwAxkSPNTbIDBt75lzmVeABzyeiZXK5WItFYAuhp6b7dRxvinhC?= =?us-ascii?Q?8ueT0efxVpv9FZWNzPohJjmhYxXXzm8QYAF7KPxmQOvIOJ320Yr4mJZluN7S?= =?us-ascii?Q?4X+/Df7oAn+pszNPaeYmSk89Q5w2sxtVwlPOS+iyHUqOOr8NH7s2lb2N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AZOCsNSDnHVc1lEzivdQGu+w9X1J7I3GLRPyxHu4yBtpdLHuPtMQ65dsTmL1X2+kFvQYLdvE0vKICchHOonO2Evs+YZOw=;5:vdljfMpCSpdHmOnh8I9dve6eCFq8+BewyYRKvyKoq4fnEFZhyYIy1MoD+m8ryDq9hG6qAByPH+W0qfhnFJIlXcJuz1Y4yoVwHLD3jtWoByVao98NJj872rFIohCY1AGoAxjcRVJDaG0mKOuPK4IZfw==;24:8Su1VfdmPsUDIPLf2S/O1x46/HCCfhsoS0IzxrgI0DhvYmS2VeSJMvo0C2OdkQrajE4rnwRM98g+RpJbGleh75i1NhCWn7NasaN7f38Fxfo= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;DB4PR04MB507;7:4AcdwOaL1+ljwQobzVOwop3iv1g8LMgLnVlHTj034BJ6G4cE1/oi5HAZk2HjA8MflK8R6kN6ZFxVM518AwFeih+y6uMB6fSUtRg47YJzl5TNujx6O/61YwkNQTlSNm6OXpDrxirkQULPCvgOYXVaSYlqwOMAaeDJnC7UJ/9DNDShB1OFtLtlOnnRJtGHsrDhRdAypLwz8n4ZiqnsxCRGwR3/R7BnBpa57MUeYu5jAXf0XF4nclSo191UyGZONSVu65ANg661qfSHrjUIeE9jF+06UMlt10Oy6FsCRCDEy3jPyvwX1NVRHQjF1smNRjo4V0VhqlFeBW7izpLyDm5z5g== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Mar 2017 15:33:14.6174 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB4PR04MB507 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 970 Lines: 31 This patch series allows running S20_3LE encoded samples on wm8960 codec. First patch does a small refactoring of sysclk frequency search because wm8960_configure_sysclk was getting pretty convoluted. The second patch allows relaxing bitclock computation in the way that if an exact bitclk couldn't be derived from sysclk it chooses the smalles available bitclk greater than the desired bitclk. For a better reviewing experience you can checked the squashed version of this patches here: http://pastebin.com/gBJ3DBSu Note that this is a follow up of: "ASoC: wm8960: Use physical width for bclk" discussion archived here: http://mailman.alsa-project.org/pipermail/alsa-devel/2017-March/118735.html Daniel Baluta (2): ASoC: codec: wm8960: Refactor sysclk freq search ASoC: codec: wm8960: Relax bit clock computation sound/soc/codecs/wm8960.c | 113 +++++++++++++++++++++++++++++++++++++--------- 1 file changed, 91 insertions(+), 22 deletions(-) -- 2.7.4