All of lore.kernel.org
 help / color / mirror / Atom feed
* adau1701: Different sample rates need different firmwares
@ 2016-03-17 10:51 Pascal Huerst
  2016-03-17 12:40 ` Lars-Peter Clausen
  0 siblings, 1 reply; 2+ messages in thread
From: Pascal Huerst @ 2016-03-17 10:51 UTC (permalink / raw)
  To: Lars-Peter Clausen; +Cc: alsa-devel@alsa-project.org

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?

regards
pascal

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: adau1701: Different sample rates need different firmwares
  2016-03-17 10:51 adau1701: Different sample rates need different firmwares Pascal Huerst
@ 2016-03-17 12:40 ` Lars-Peter Clausen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars-Peter Clausen @ 2016-03-17 12:40 UTC (permalink / raw)
  To: Pascal Huerst; +Cc: 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-03-17 12:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-17 10:51 adau1701: Different sample rates need different firmwares Pascal Huerst
2016-03-17 12:40 ` Lars-Peter Clausen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.