Skip to contentSkip to conversation

adau1701: Different sample rates need different firmwares

DISCUSSION Pascal Huerst 2 participants 2 messages Mar 17, 2016

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw
Quoted 13 lines · Pascal Huerst

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:

Quoted 8 lines
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