On Thu, Sep 25, 2014 at 03:24:45PM +0800, Scott Jiang wrote:
2014-09-24 19:42 GMT+08:00 Mark Brown broonie@kernel.org:
These sound more like extended functionality and tweaks rather than massive updates which need a completely separate driver - new modes and so on.
Yes, it looks similar in i2s mode. But in tdm mode, because we don't need to copy 2 channels user buffer to 8 channels dma buffer, it might looks very different. If you think this patch is not good, I'd send a new one after I merged tdm driver.
Well, I'd rather not see the driver split into two separate drivers again if at all possible - ideally just the bits that need splitting. It sounds like you need separate copy operations for the two cases but otherwise things are fairly similar? If the driver ended up being nothing but conditional code that'd be bad but if it's just a few places then it's going to be better to avoid duplicating the entire thing.
By the way, if the channel order of hardware is different from what is expected by alsa, the copy work is left to plugin or driver?
If the format is just not something ALSA understands then the driver ought to do it. If ALSA does understand it but it's just not what most applications want then the plugin should be a better choice.