From patchwork Wed Feb 13 17:47:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Thomson X-Patchwork-Id: 10812041 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 809E31399 for ; Thu, 14 Feb 2019 08:56:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6F50D2A473 for ; Thu, 14 Feb 2019 08:56:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 60AC72D31E; Thu, 14 Feb 2019 08:56:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=2.0 tests=BAYES_00,FROM_WORDY, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RDNS_NONE autolearn=no version=3.3.1 Received: from alsa0.perex.cz (unknown [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6CE862A473 for ; Thu, 14 Feb 2019 08:56:24 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 0D0782679D2; Thu, 14 Feb 2019 09:45:26 +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 2B30E267917; Thu, 14 Feb 2019 09:45:18 +0100 (CET) Received: from mail1.bemta25.messagelabs.com (mail1.bemta25.messagelabs.com [195.245.230.66]) by alsa0.perex.cz (Postfix) with ESMTP id 27B75267989 for ; Thu, 14 Feb 2019 09:45:16 +0100 (CET) Received: from [46.226.52.200] (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256 bits)) by server-2.bemta.az-b.eu-west-1.aws.symcld.net id 0F/30-04268-89A256C5; Thu, 14 Feb 2019 08:45:12 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrLKsWRWlGSWpSXmKPExsUS3ulwWHeGVmq MwaVHqhanWvawW1y5eIjJYurDJ2wW3650MFlc3jWHzaJzVz+rxYbvaxkd2D02fG5i82i99JfN Y+esu+wem1Z1snnse7uMzWP9lqssHp83yQWwR7Fm5iXlVySwZvTsvsBW8Je9omfWIaYGxhNsX YxcHEIC2xglTv/qYIZw1jNKzL3xk6WLkRPIqZBY+vAomM0r4CZx58xrVhCbTcBCYvKJB2wgNo uAqsT3uSvYuxg5OIQFPCTm75IBCYsIdDFKnD/qDTKTWWA+o8S2hVdZIeYISpyc+QRsJrOAhMT BFy+YIXYZSJxe0AgWlxCwl5j+/iozyEwJAX2JxmOxEGFDie+zvkGVmEvs3LGcDVU5ppo/p34y Y6pBZltLXP8wi20Co9gsJNfNQnLdAkamVYwWSUWZ6RkluYmZObqGBga6hoZGuoaW5rqGxqZ6i VW6SXqppbrlqcUluoZ6ieXFesWVuck5KXp5qSWbGIHRmlJwtH0H44/l6YcYJTmYlER5jS+mxA jxJeWnVGYkFmfEF5XmpBYfYpTh4FCS4NXVTI0REixKTU+tSMvMAaYNmLQEB4+SCK8gSJq3uCA xtzgzHSJ1ilFRSpz3MkhCACSRUZoH1wZLVZcYZaWEeRkZGBiEeApSi3IzS1DlXzGKczAqCfMm gkzhycwrgZv+CmgxE9DipyIpIItLEhFSUg2MRVn7eJ6f0jbbNe+lno/eIeZLdUm82wNXpmTni HzMeV1d2L6oL3pq/EXjG6nP/Nc6Gq2bxdi/buK5irS0KakPZM2LIl3PVjge653ktmvDyzfLaj dKuM9aoCAZI7OmoMLVdd1/oT2T3oQoLK4XZJ/0/om+6gPNS3q85lyOqpF7n7R2Ry7NWK2pxFK ckWioxVxUnAgAoMAD9lADAAA= X-Env-Sender: Adam.Thomson.Opensource@diasemi.com X-Msg-Ref: server-15.tower-288.messagelabs.com!1550133911!2392454!5 X-Originating-IP: [87.137.64.195] X-SYMC-ESS-Client-Auth: outbound-route-from=pass X-StarScan-Received: X-StarScan-Version: 9.31.5; banners=-,-,- X-VirusChecked: Checked Received: (qmail 12469 invoked from network); 14 Feb 2019 08:45:12 -0000 Received: from unknown (HELO NB-EX-CASHUB01.diasemi.com) (87.137.64.195) by server-15.tower-288.messagelabs.com with AES128-SHA256 encrypted SMTP; 14 Feb 2019 08:45:12 -0000 Received: from SW-EX-CASHUB01.diasemi.com (10.20.16.141) by NB-EX-CASHUB01.diasemi.com (10.1.16.141) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 14 Feb 2019 09:45:11 +0100 Received: from swsrvapps-01.diasemi.com (10.20.28.141) by SW-EX-CASHUB01.diasemi.com (10.20.16.140) with Microsoft SMTP Server id 14.3.408.0; Wed, 13 Feb 2019 17:47:31 +0000 Received: by swsrvapps-01.diasemi.com (Postfix, from userid 22379) id A1C223FB79; Wed, 13 Feb 2019 17:47:31 +0000 (GMT) Message-ID: From: Adam Thomson Date: Wed, 13 Feb 2019 17:47:31 +0000 To: Mark Brown , Liam Girdwood , Takashi Iwai , Jaroslav Kysela MIME-Version: 1.0 X-KSE-AttachmentFiltering-Interceptor-Info: protection disabled X-KSE-ServerInfo: sw-ex-cashub01.diasemi.com, 9 X-KSE-Antivirus-Interceptor-Info: scan successful X-KSE-Antivirus-Info: Clean, bases: 13/02/2019 16:08:00 X-KSE-AttachmentFiltering-Interceptor-Info: protection disabled X-KSE-Antivirus-Interceptor-Info: scan successful X-KSE-Antivirus-Info: Clean, bases: 14/02/2019 04:08:00 X-KSE-AttachmentFiltering-Interceptor-Info: protection disabled X-KSE-AttachmentFiltering-Interceptor-Info: protection disabled X-EXCLAIMER-MD-CONFIG: 8d172408-bd6a-42b1-8e53-daaedf35a5af Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Support Opensource , Akshu Agrawal Subject: [alsa-devel] [PATCH 0/2] ASoC: da7219: BCLK and TDM flexibility improvements 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 This patch set updates the driver to be more flexible regarding the BCLK and TDM configurations of the device. Previously the BCLK rate was fixed at 64 periods per WCLK, when the codec is DAI clock master, but to satisfy devices which prefer a lower rate, and to save power, the BCLK rate is now calculated based on hw_params() data. As a fallout of the BCLK efforts it was also apparent that the TDM code could be made more flexible as well. The device is capable of automatically detecting the BCLK rate when it is clock slave, so previous limitations imposed were not necessary. The mask handling is now used as an input to determine the BCLK offset to align closer with other examples within ALSA. Adam Thomson (2): ASoC: da7219: Add support for master mode BCLK rate adjustment ASoC: da7219: Update TDM usage to be more flexible sound/soc/codecs/da7219.c | 116 +++++++++++++++++++++++++++++----------------- sound/soc/codecs/da7219.h | 1 + 2 files changed, 74 insertions(+), 43 deletions(-)