Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752686AbdIAVhw (ORCPT ); Fri, 1 Sep 2017 17:37:52 -0400 Received: from mail-bl2nam02on0126.outbound.protection.outlook.com ([104.47.38.126]:55000 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752400AbdIAVhv (ORCPT ); Fri, 1 Sep 2017 17:37:51 -0400 From: Ryan Lee To: Mark Brown CC: "lgirdwood@gmail.com" , "perex@perex.cz" , "tiwai@suse.com" , "kuninori.morimoto.gx@renesas.com" , "alsa-devel@alsa-project.org" , "linux-kernel@vger.kernel.org" , "ryan.lee.maxim@gmail.com" Subject: RE: [PATCH 1/9] ASoC: max98927: Added support for DSP_A and DSP_B format Thread-Topic: [PATCH 1/9] ASoC: max98927: Added support for DSP_A and DSP_B format Thread-Index: AQHTIFXIGgsXcT0jr0C0laJnFZGdzaKbsW2AgATjAoA= Date: Fri, 1 Sep 2017 21:37:48 +0000 Message-ID: References: <1503963061-14763-1-git-send-email-ryans.lee@maximintegrated.com> <20170829190015.kpscn3uuwbvwlp6e@sirena.org.uk> In-Reply-To: <20170829190015.kpscn3uuwbvwlp6e@sirena.org.uk> Accept-Language: en-US, ko-KR Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=RyanS.Lee@maximintegrated.com; x-originating-ip: [204.17.143.20] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;BY2PR11MB0648;6:/wooiUYqgVdNaoDW4YOHH4c2Qd5SB6uuAiy2ZPae4giVtiamRFXF+pF1NxnosQ4tePyGWmLwrKqnEJ9s22eef17zcABWEzrs27E3UrUXhBNAkqXxsXVRju8fzhFcEGR1zn7K6a2gXYycCrhMrz5i3S8oZTjMNZ2u4R1YNtRrtXkauGBayt8dMwlR9Y3m9xo6Vv6m2FgSCMCEg1Cgv3GnwGAUTLBWEjgsVOaPSETc8q2CpsG2Tokt5NX9HwefrqeHbq/NAM2SUQygzE3MSml6beLLL2sRHFPr+X+/yg1Di3abbcj7ZUZtItls29tDUsJmIahgc9BHIx17WeKNrkBUOw==;5:90oTc1xBDbQZ2NofafcjiVg8G7WDVO2BHEhJA6mnYIJsERbKYYkIY43qToCRVZ7vKmr3a2HB8rQpQ70zEAe0KrdWAapZ005Ut1+skwLgTzmCn48cUsS1bs3tP3DFu8JNnbMkkiMgiX6ecX/IOJ8LbA==;24:CzqswX/p3vfhaW/w5yj1ijgclGylZHKtqNeD4hHmDSHP8RZSKPF1SczcC84KA4P79So0QjYd26B7YbvJWujcITZT3xN0HftNBdeChJVNQjI=;7:DKGZi/HRznIUcdtDKJHkSzofG+jL7RXUXB8yXQexDl9mllID3n6ayNpve5SAw9kbUpgGseJ2+3NQJCUbtZlrAw3/B4N6T6FznbUO2UZp30t4clLBUyj5y7aecwIK0hsq1/x0ElKfN8Ph9kDEb/U+s9FdTA+dWXNI/M9z4NGPq3RyVlDHCKOv7vS/hcxwfKGjCbG8KIgCrUS7nQukxjX8Y1aTryuw7vE1WCVekesLaqA= x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: 96955001-bd0a-4cdb-274d-08d4f181b0b4 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(48565401081)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:BY2PR11MB0648; x-ms-traffictypediagnostic: BY2PR11MB0648: x-exchange-antispam-report-test: UriScan:(9452136761055)(108721460000369); x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(93006095)(93001095)(100000703101)(100105400095)(6055026)(6041248)(20161123560025)(20161123558100)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123555025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:BY2PR11MB0648;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:BY2PR11MB0648; x-forefront-prvs: 0417A3FFD2 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(39860400002)(189002)(377454003)(13464003)(199003)(24454002)(8676002)(25786009)(229853002)(6116002)(102836003)(3846002)(72206003)(81156014)(39060400002)(7696004)(81166006)(189998001)(7736002)(77096006)(97736004)(2950100002)(6506006)(6916009)(5660300001)(6436002)(86362001)(478600001)(105586002)(101416001)(53936002)(110136004)(3280700002)(106356001)(3660700001)(2906002)(76176999)(54356999)(55016002)(50986999)(66066001)(4326008)(8936002)(305945005)(2900100001)(6246003)(74316002)(54906002)(68736007)(9686003)(14454004)(99286003)(33656002);DIR:OUT;SFP:1102;SCL:1;SRVR:BY2PR11MB0648;H:BY2PR11MB0837.namprd11.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-OriginatorOrg: maximintegrated.com X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Sep 2017 21:37:48.2035 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: fbd909df-ea69-4788-a554-f24b7854ad03 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR11MB0648 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by nfs id v81LbvY6016177 Content-Length: 1211 Lines: 29 >-----Original Message----- >From: Mark Brown [mailto:broonie@kernel.org] >Sent: Tuesday, August 29, 2017 12:00 PM >To: Ryan Lee >Cc: lgirdwood@gmail.com; perex@perex.cz; tiwai@suse.com; >kuninori.morimoto.gx@renesas.com; alsa-devel@alsa-project.org; linux- >kernel@vger.kernel.org; ryan.lee.maxim@gmail.com >Subject: Re: [PATCH 1/9] ASoC: max98927: Added support for DSP_A and DSP_B >format > >On Mon, Aug 28, 2017 at 04:30:53PM -0700, Ryan Lee wrote: > >> + if ((max98927->iface == SND_SOC_DAIFMT_DSP_A) || >> + (max98927->iface == SND_SOC_DAIFMT_DSP_B)) >> + return 0; >> + >> + /* BCLK configuration */ > >Why do we not configure the BCLK in DSP modes? That's unusual and seems >likely to break some systems that rely on exact clocking. I put this code to avoid overwrite BCLK value in TDM mode. BCLK is being configured by ' max98927_dai_tdm_slot'. Now I added one more variable to check TDM mode instead of checking DAI_FMT. > >Also if we're selecting on format a switch statement is generally better to make >any further special casing easier in future. OK. Thanks. But I kept if statement on the modified version because it only have two cases, tdm and non-tdm.