On Thu, Jun 06, 2013 at 03:44:04PM +0200, Daniel Mack wrote:
Would it be an idea to define some commonly used dividers in the core? If they start at 0x80000000, they won't collide with existing ones, and we could simply add them as alternative case statements to existing drivers.
I don't think this is a terribly sensible idea; as soon as you start relying on these dividers in machine code you're going to run into drivers that just don't implement them either due to hardware or due to them being able to figure things out by themselves and...
Some commonly used ones I can think of are
MCLK / BCLK MCLK / LRCLK BCLK / LRCLK
That way, platform code could just pass the values dows to the codec drivers, whether or not they know what to do with it.
...frankly the above all look like dividers that the drivers should just be figuring out all by themselves anyway without bothering the machine driver. If that's the sort of stuff you're having to do it seems more generally useful to work on making the relevant drivers require less manual control by the machine driver.