On Mon, Aug 11, 2014 at 07:56:12AM -0400, jonsmirl@gmail.com wrote:
It looks like the problem is that Simple Card also configures cpu-dai via set_sysclk() with direction SND_SOC_CLOCK_IN while it fetches the sysclk rate not from MCLK source but from 'sound-dai' -- cpu-dai node itself, when the binding for sound-dai doesn't have clock or frequency assignment, although this fetching works out for codec-dai side.
In your case, Simple Card sets both sides of dai with different sysclk rates, and meanwhile the sysclk rate for cpu-dai is incorrect.
Is it true?
Yes, that is what is going on. Trying to use sgtl5000 with simple-audio exposed that issue. Without removing that 'else' clause there is no way to tell simple-audio just to leave the cpu-dai alone.
This issue remained in Simple Card shall be fixed. But I don't think it's a good idea to _just_ remove that 'else' since its does work for codec-dai. Instead, I think you might need to check the set_sysclk() of cpu-dai driver as I mentioned in the last mail:
The sysclk direction is only valid when indicating MCLK as sysclk (FSYNC or BCLK shall follow CBS_CFS/CBM_CFM setting).So basically if cpu-dai driver gets sysclk configuration with SND_SOC_CLOCK_IN, shouldn't it just set the internal direction for MCLK's PAD and return the call directly? (I'm guessing there also might be some tiny work for your cpu-dai driver to enhance the validation part.)
Best regards, Nicolin