From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755981AbdIGXDY (ORCPT ); Thu, 7 Sep 2017 19:03:24 -0400 Received: from mail-pg0-f66.google.com ([74.125.83.66]:36121 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751456AbdIGXDX (ORCPT ); Thu, 7 Sep 2017 19:03:23 -0400 X-Google-Smtp-Source: ADKCNb71Zz9tE8zFonzcDy8O+yP3J4kVvfJZicmWZq0wlsWoahAXaSuo8yaRYuDPK3NfvbTCSKQ66g== Date: Thu, 7 Sep 2017 16:03:48 -0700 From: Nicolin Chen To: Mark Brown Cc: =?utf-8?Q?=C5=81ukasz?= Majewski , Timur Tabi , Xiubo Li , Fabio Estevam , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] sound: soc: fsl: Do not set DAI sysclk when it is equal to system freq Message-ID: <20170907230345.GA20531@Asurada-Nvidia> References: <1504436701-20700-1-git-send-email-lukma@denx.de> <20170905050602.GA2774@Asurada-CZ80> <20170905075247.GA6112@Asurada> <20170905151550.5mhb535p22lsohlh@sirena.org.uk> <20170905174528.GA23906@Asurada-Nvidia> <20170907134411.uzwh54lstzmvp6dd@sirena.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170907134411.uzwh54lstzmvp6dd@sirena.co.uk> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 07, 2017 at 02:44:11PM +0100, Mark Brown wrote: > > On the other hand, the sys clock (baudclk in the driver) should be > > configured whenever it's related to external clock outputs. When I > > implemented this set_sysclk() for fsl_ssi.c, I used it to set this > > sys clock (baudclk) by a machine driver, in order to set bit clock. > > Then someone patched the driver by moving all the code to set_bclk() > > to make machine drivers simpler. Now the set_sysclk() is remained > > to give machine drivers a chance to override clock configurations > > in the hw_params(). This could be used in TDM or some other special > > cases (It could also have a purpose for backwards compatibility). > > > So here, we should set baudclk (BCLK generator). > > No, that's just going to cause confusion - if all the other drivers are > using set_sysclk() to set an input clock rate to the IP rather than an > output clock but your driver does something else then sooner or later > someone will run into trouble with that. I admit I had that concern. Probably I should have deprecated this set_sysclk(). I will try to patch it and hw_params() accordingly.