On Thu, Aug 07, 2014 at 03:37:47PM -0400, jonsmirl@gmail.com wrote:
Since the sgtl5000 driver has the handle to the clock, can't it just ask the clock for its rate? If it directly asked the clock for its rate it looks like this codec could be bound with simple-audio-card and not need a machine driver.
I think Simple Card should already have the capability to support this without changing sgtl5000's code. It has two properties that can make it call set_sysclk() for you during the init(). They are 'clocks' and 'system-clock-frequency'. Please refer to its binding doc for details.
And the topic why not let sgtl5000 fully control the clock has been discussed in this thread: http://comments.gmane.org/gmane.linux.alsa.devel/109093
So I think the change can be done as well?
Best regards, Nicolin