On 13/06/11 05:55, Patrick Lai wrote:
Are you referring to fixup function in the machine driver? It works for hardware parameter that is fixed per machine. For example, regardless sample rate of front-ends that are routed to same back-end, back-end sample rate is fixed to 48KHz. I am already taking advantage of the hook.
Yes. Since it's code it *could* do conditional things based on some setting if it needs to.
Yes, I don't see any better way unless propagating knowledge of front-end/back-end all the way to user-space. I plan on adding enumeration of channel mode in machine driver which sets variable read by the fix up function. So, CPU and CODEC drivers do not need to provide enumeration of channel modes. However, same control would have to be added to every machine driver.
Ok, sounds like this may be useful code for other DSPs too.
Fwiw, OMAP4 fixups are based on physical BE DAI so we always use the same config for each BE DAI atm, but flexibility would be good.
Liam