Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753093AbdDDIy5 (ORCPT ); Tue, 4 Apr 2017 04:54:57 -0400 Received: from mx0b-001ae601.pphosted.com ([67.231.152.168]:45705 "EHLO mx0b-001ae601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752137AbdDDIyy (ORCPT ); Tue, 4 Apr 2017 04:54:54 -0400 Authentication-Results: ppops.net; spf=none smtp.mailfrom=ckeepax@opensource.wolfsonmicro.com Date: Tue, 4 Apr 2017 09:55:07 +0100 From: Charles Keepax To: Daniel Baluta CC: Mark Brown , Liam Girdwood , Jaroslav Kysela , , Lars-Peter Clausen , , , Linux Kernel Mailing List , , , Subject: Re: [alsa-devel][PATCH v2 2/2] ASoC: wm8960: Let wm8960 driver configure its bit clock and frame clock Message-ID: <20170404085507.GW6986@localhost.localdomain> References: <1420615905-4078-1-git-send-email-zidan.wang@freescale.com> <1420615905-4078-2-git-send-email-zidan.wang@freescale.com> <20150114192703.GH3043@sirena.org.uk> <20150115133439.GA29323@b50113> <20170403133434.GU6986@localhost.localdomain> <20170403135436.GV6986@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=2 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1702020001 definitions=main-1704040081 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1245 Lines: 36 On Tue, Apr 04, 2017 at 10:55:00AM +0300, Daniel Baluta wrote: > > > On Mon, Apr 3, 2017 at 4:54 PM, Charles Keepax > wrote: > > On Mon, Apr 03, 2017 at 04:39:40PM +0300, Daniel Baluta wrote: > >> On Mon, Apr 3, 2017 at 4:34 PM, Charles Keepax > >> wrote: > > Is the problem here that the PLL part of the code is making the > > same assumption as the direct part of the code was, that the bclk > > should be exact? > > Yes. > > > After wm8960_configure_sysclk fails to find a LRCLK, we try to use the > PLL. > > Anyhow, here we don't even reach to check if the PLL can be used because > there is no solution for the following system: > > freq_out = sysclk * sysclk_divs[i]; > sysclk = lrclk * dac_divs[j]; > sysclk == bclk * bclk_divs[k] > > > Perhaps, we can also try here to relax bitclk computation like we did for when > sysclk was directly derived from mclk. Exactly that is what I am saying it looks like the PLL part of the process still assumes it requires bclk to be an exact frequency if we relax that, the same way we did for the direct MCLK then we should be good. Thanks, Charles