Message ID | 54E681A8.6040702@suse.de (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
On 20/02/15 01:36, Andreas Färber wrote: >>> >> So it seems the mclk is not always set up properly by the kernel, >>> >> relying on firmware. Who's in charge of setting that clock up? >> > >> > Right, it seems audio is only working due the firmware doing some previous >> > setup. Probably it works on every boot if you have "sound init" as a part of >> > the u-boot boot commands? > > Indeed it does, 24 MHz without the reparenting patch, and sound working. You can have parent of the CLKOUT clock set by the clk core if it is specified in device tree in the PMU (the clkout clock supplier) device node. Similarly as we did for the Odroix U3: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/exynos4412-odroid-common.dtsi#n39 Relying on the clk_set_rate() to set the parent clock is not optimal IMO. Presumably you need to set select stable parent clock for clkout like XXTI. But I'm not very familiar with exyno5250 and that might be something different.
Hello Sylwester, On 02/20/2015 01:12 PM, Sylwester Nawrocki wrote: > On 20/02/15 01:36, Andreas Färber wrote: >>>> >> So it seems the mclk is not always set up properly by the kernel, >>>> >> relying on firmware. Who's in charge of setting that clock up? >>> > >>> > Right, it seems audio is only working due the firmware doing some previous >>> > setup. Probably it works on every boot if you have "sound init" as a part of >>> > the u-boot boot commands? >> >> Indeed it does, 24 MHz without the reparenting patch, and sound working. > > You can have parent of the CLKOUT clock set by the clk core if it is > specified in device tree in the PMU (the clkout clock supplier) device > node. > > Similarly as we did for the Odroix U3: > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/exynos4412-odroid-common.dtsi#n39 > > Relying on the clk_set_rate() to set the parent clock is not optimal > IMO. Presumably you need to set select stable parent clock for clkout > like XXTI. But I'm not very familiar with exyno5250 and that might be > something different. > Thanks a lot for your suggestion. I'll drop Tushar's patch to allow clkout to be reparent during set_rate then and change his DTS patch to set a default parent for CLKOUT using "assigned-clock-parents". Best regards, Javier -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/sound/soc/codecs/max98088.c b/sound/soc/codecs/max98088.c index 1aa81321afba..46dc64675c26 100644 --- a/sound/soc/codecs/max98088.c +++ b/sound/soc/codecs/max98088.c @@ -1365,6 +1365,7 @@ static int max98088_dai_set_sysclk(struct snd_soc_dai *dai, if (!IS_ERR(max98088->mclk)) { freq = clk_round_rate(max98088->mclk, freq); + dev_warn(codec->dev, "freq = %u\n", freq); clk_set_rate(max98088->mclk, freq); }