On Wed, Jun 17, 2015 at 08:24:48AM +0530, Vinod Koul wrote:
On Tue, Jun 16, 2015 at 06:36:22PM +0200, Takashi Iwai wrote:
Please remember to delete unneeded context from replies.
if (cpu_dai->driver->create) ret = cpu_dai->driver->create(rtd, num);
and each driver passes soc_new_compress (or whatever) there. This is flexible and can be extended if any new stuff has to be handled. Even PCM creation or dai widget links can be passed in that form, too.
and the default would be snd_pcm_new so that *most* drivers dont need to add this. Only Intel atom driver should add soc_new_compress() as create ops, hence direct reference so no gaurds required
Looks good to me then, Mark you okay with this approach?
I'm not sure this fully helps. This will put the reference in the CPU driver which if there's sharing with non-compressed DAIs means that any machine driver using the platform needs to select the compressed audio code. It also means that we're still in the situation whre if a machine *can* support compressed audio it *must* support compressed audio, it's not clear to me that people doing this sort of memory optimisation are always going to be doing it on hardware that doesn't have the capacity for compressed audio (or won't in the future). But then I don't know exactly how much memory is being saved here...