Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965430AbeAJFCV (ORCPT + 1 other); Wed, 10 Jan 2018 00:02:21 -0500 Received: from mail-sn1nam02on0108.outbound.protection.outlook.com ([104.47.36.108]:45082 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932544AbeAJFCQ (ORCPT ); Wed, 10 Jan 2018 00:02:16 -0500 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=RyanS.Lee@maximintegrated.com; From: Ryan Lee To: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, ryans.lee@maximintegrated.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Cc: ryan.lee.maxim@gmail.com Subject: [PATCH 3/4] ASoC: max98373: Added TDM off if parameters are all zeroes Date: Tue, 9 Jan 2018 21:02:00 -0800 Message-Id: <1515560521-10850-3-git-send-email-ryans.lee@maximintegrated.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1515560521-10850-1-git-send-email-ryans.lee@maximintegrated.com> References: <1515560521-10850-1-git-send-email-ryans.lee@maximintegrated.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [204.17.143.20] X-ClientProxiedBy: CY4PR08CA0046.namprd08.prod.outlook.com (10.173.247.160) To BLUPR11MB0834.namprd11.prod.outlook.com (10.163.217.144) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: de12c1c7-8d66-4f8e-d25c-08d557e750dc X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(48565401081)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060)(7193020);SRVR:BLUPR11MB0834; X-Microsoft-Exchange-Diagnostics: 1;BLUPR11MB0834;3:OOyE3oO0NYvyIf98JUiW9U2HxRzeJhD1yk+g4kf/aVO4PZHeGSVcq+BmTUARIPrjmxGvxx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RL8EHH1h5+GMJjRwwolF4Rhhkrj2HZgS8GermWDSuSKFQwlp+56R5c3Sv7cOflaHuU/32LTKOKcqwmBI6lNTkdGUs3B71Sgvwn1pY+1jJPEz2D/7kIgVQj7yOiAnpJMWFugxdE9xHIWSbqx8Mo/Rj3S2ZasIPLy8xj8nBGeZXm/dTtHwR8XmBBYjik5huzsFELcIpLFko2UVkSOZ2BptMOZBt1f3GlfL015PewaTXet5/TMYiqG1sWXtrVDOvYhExOjkqE+uE3y9GXjO86U7HoUhJy2;4:tEjAHFURMvCyAINxm+vN0gVzkicvBYnhLwiWShtPp8xqFUCTrJK95iHpLI/lAw+8ovsYYjz6pexqI5r3ab5KZy8l+YFG0I4xb68WK4AQ2XntfSy3W1VtVPnNaY/dvDp7HU8eAUG5AJTSGs6iBCJ1hiaN6NiQRAAFc6lDEdP2UChNdO1Dw1aR8RIh1knR0WsvDevEyEVDJhb9fkeRsEHotsXLmTP/xiEUb0w2HyUeURw0ysGVNGUeztWi8LK/8HhnE3SrKsgZA07xhhap6BGe7hFeQjcTWCUE5hi4pg3NmyDZW+oHB+xCF6uaGax4lVjT X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(108721460000369); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040470)(2401047)(8121501046)(5005006)(3231023)(944501075)(10201501046)(3002001)(93006095)(93001095)(6055026)(6041268)(20161123564045)(20161123560045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(6072148)(201708071742011);SRVR:BLUPR11MB0834;BCL:0;PCL:0;RULEID:(100000803101)(100110400095);SRVR:BLUPR11MB0834; X-Forefront-PRVS: 0548586081 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(346002)(376002)(39380400002)(39860400002)(366004)(396003)(199004)(189003)(54534003)(81166006)(53936002)(86362001)(39060400002)(2906002)(6512007)(4326008)(72206003)(16586007)(16526018)(106356001)(316002)(97736004)(2950100002)(6666003)(105586002)(6486002)(51416003)(7736002)(305945005)(478600001)(68736007)(47776003)(36756003)(8676002)(76176011)(8936002)(5660300001)(59450400001)(81156014)(386003)(48376002)(6506007)(6116002)(66066001)(50226002)(50466002)(53416004)(69596002)(52116002)(25786009)(3846002);DIR:OUT;SFP:1102;SCL:1;SRVR:BLUPR11MB0834;H:ryan-ThinkPad-T430.maxim-ic.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BLUPR11MB0834;23:vvWLGlxSNUobN3rgEIlr4vn+KXItvyZi7TuWB+PSv?= =?us-ascii?Q?4XH6z///QwZvLWqtIRWACEIshqkueyH27usUvlyffAUGYXje+eiMT3BO63pb?= =?us-ascii?Q?rRD4tcw0gsAhbNeQrCmyBLEzvwV5HSbGnLiF8vlH/P6zXlkhjciI8ZhG61p5?= =?us-ascii?Q?qJv6NZ17o9/0Gsp0ICM9oVaA0KfjvzbUYSN4LDWUH2HhS9OG5OynonKVeXF4?= =?us-ascii?Q?bn4WBmrCjaac9tGgxQ8/xMLJeVZqBiYF04X15nt003PXOmSx6Hr7yqg3aT/g?= =?us-ascii?Q?81xEjljV8C8sAA0df7LGc5Jvn8100AghBmvKju8Yokp4/UgrPS4FDEQYs81n?= =?us-ascii?Q?2roAY4d/GBFsiU9fTzHs16ipQTLzSqBa0Ybv9PlLH6aKmekceMoePEtWrYig?= =?us-ascii?Q?V5mpKO1vikuk4Kj+Ch93OLvroo61wPylXJ0PHu3WbecwuIIiFdwZk7z9pqaD?= =?us-ascii?Q?0pbVVenO66NNukDUFnJwI0QsJpggh2FjkJl6sIlsdHBhA4umvbAGcyqtZjQV?= =?us-ascii?Q?0taBftKcG2ItbNA/bvyjzOTiRqI8byaSlMZW0NRTLRwtVWZKZO3H3ioPnVB7?= =?us-ascii?Q?q8Rj+b3VN92S/oSiGwbZLamTl/HghDBmlZFkzFMwVZeyHifAwpHwuEcpUbWX?= =?us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tv/+ONjcY2Xz0+TbC5H4TBsgD1M2Jd0cI=;5:+YynoNEHe5I42CEZVmv83WL7Wsl1IKMkGr6omXLi6UgmeNVhEBkl3cKLZLId9L4v97Ra5St3ORb0SC3ofvQm+hm0AOLl3E3179Z/ct5Qg2FhoouXRIm0fzKe368S4lrnmcF2E5TUWCkrqzk+4US6ytlH+mxlWDfZNB2NCwYTzf4=;24:z+705WfwkWBtZHGHEgyGsrIwG8BFn2m2L9okxIj8rh/rwEsiThEzthKQC8MJ1MoQDnFqB73valtUlohIO63XNKtMGelg7VVhbIIfnYyi4qI=;7:Ee2yYnWxfsH+dLkSt/5xVDS/rf1cB3E4joAI21o++N5+myw3uRABaVjdQlQJVS08ZCfAJbm5ixDbFruOhKj/IIF678wgM8D/Knu18t9Foz0JPmfgE/swA4ouUtroCQgWjXIfjabtHH3LcA+HHLr3glXrJXxTffsTa6eRWUiy+v+QeEyU0cDjCWito0+IEyoLzWZPeoYj4GO+yoWYMC2XXGE7OAb/vFdao20bdcGTKIoktEl5YF/OMQ1oHkdVPxf+ SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: maximintegrated.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jan 2018 05:02:14.0847 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: de12c1c7-8d66-4f8e-d25c-08d557e750dc X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fbd909df-ea69-4788-a554-f24b7854ad03 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR11MB0834 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: Signed-off-by: Ryan Lee --- Changelog: Added tdm_mode off condition when all input parameters are zero sound/soc/codecs/max98373.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sound/soc/codecs/max98373.c b/sound/soc/codecs/max98373.c index 77b86c4..c5ff30f 100644 --- a/sound/soc/codecs/max98373.c +++ b/sound/soc/codecs/max98373.c @@ -311,7 +311,10 @@ static int max98373_dai_tdm_slot(struct snd_soc_dai *dai, unsigned int mask; int x, slot_found; - max98373->tdm_mode = true; + if (!tx_mask && !rx_mask && !slots && !slot_width) + max98373->tdm_mode = false; + else + max98373->tdm_mode = true; /* BCLK configuration */ bsel = max98373_get_bclk_sel(slots * slot_width); -- 2.7.4