[alsa-devel] Choosing the sysclk in simple-card looks broken to me.

jonsmirl at gmail.com jonsmirl at gmail.com
Sun Aug 10 02:08:45 CEST 2014


The problem is in asoc_simple_card_sub_parse_of()
in the else case..
} else {
clk = of_clk_get(node, 0);
if (!IS_ERR(clk))
dai->sysclk = clk_get_rate(clk);
}

This is picking up the input clocks to the devices.  On the cpu-dai
you want to pick up the ouput mclk (my first input clock is an 80Mhz
bus clock).  My IIS output clock is: clock-output-names = "mclk0";

Setting clocks="" doesn't work either, it also picks up the input clock.

if (of_property_read_bool(np, "clocks")) {
  clk = of_clk_get(np, 0);
  if (IS_ERR(clk)) {
     ret = PTR_ERR(clk);
  return ret;

When the codec-dai bit runs it finds the input clock on the codec,
which is really my cpu-dai's output clock and it gets the correct
value.

But then simple goes and tries to set both system clocks - my 80Mhz
bus clock and the 22.5 true sysclk. And my cpu-dai barfs when it is
passed a 80Mhz sysclk.

How to fix? Is anyone using this feature?  This needs to be fixed to
pick up output clocks, not input ones.

-- 
Jon Smirl
jonsmirl at gmail.com


More information about the Alsa-devel mailing list