From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lars-Peter Clausen Subject: Re: adau1701: Different sample rates need different firmwares Date: Thu, 17 Mar 2016 13:40:07 +0100 Message-ID: <56EAA5A7.8080208@metafoo.de> References: <56EA8C2C.4010606@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from smtp-out-014.synserver.de (smtp-out-014.synserver.de [212.40.185.14]) by alsa0.perex.cz (Postfix) with ESMTP id B71C426665D for ; Thu, 17 Mar 2016 13:40:11 +0100 (CET) In-Reply-To: <56EA8C2C.4010606@gmail.com> 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 To: Pascal Huerst Cc: "alsa-devel@alsa-project.org" List-Id: alsa-devel@alsa-project.org On 03/17/2016 11:51 AM, Pascal Huerst wrote: > Hey Lars, > > I'm having an issue with the adau1701 codec. There is this line which > checks, if the mclk/lrclk ratio has changed and whether it is necessary > to reset the codec and upload a new firmware. > > http://lxr.free-electrons.com/source/sound/soc/codecs/adau1701.c#L444 > > But if we change mclk in the machine driver (for example to playback > 44.1), this ration might not change, but still we have to upload a new > firmware, so shouldn't we probably be checking for sample rate changes > instead: > > if (adau1701->current_rate != params_rate(params) { > adau1701->current_rate = params_rate(params); > ret = adau1701_reset(codec, clkdiv, params_rate(params)); > if (ret < 0) > return ret; > } > > Or did I miss something? Sounds good! - Lars