On Mon, Jun 15, 2015 at 02:46:23PM +0000, Jie, Yang wrote:
Here I used -EPERM to return and tell caller that compress operation is not permitted, does it make sense, Takashi?
The question is whether a runtime error is the best option. A runtime error won't be caught by build tests but only when actually running by a user.
Unfortunately, here cpu_dai->driver->compress_dai is a runtime value, which means we need compress API when it is true. Seems it is not easy to decide it at compile stage?
The machine driver (which is presumably the thing that should be doing the select here, it's not user visible) really ought to know if the DAI links it is creating are for compressed audio. This is why I'm still surprised there's no driver updates as part of this patch. If the Intel drivers referencing compressed don't actually implement it then I'd expect to see patches cleaning up the references to compressed audio.