On Wed, Oct 14, 2015 at 12:57:38PM +0000, Jie, Yang wrote:
int (*suspend)(struct snd_soc_dai *dai); int (*resume)(struct snd_soc_dai *dai); /* compress dai */
- bool compress_dai;
- int (*compress_new)(struct snd_soc_pcm_runtime *rtd, int num);
This feels a little awkward to be using a function pointer here. It somewhat implies I might want to customise this function but am I every going to want to set this to something other than snd_soc_new_compress?
Hi Charles, we used compress_dai bool before(in v2), but for that we need add empty inline soc_compress_new(), Takashi suggest we use callback func pointer here, it can be compress_new or any other creation here. This is flexible and can be extended if any new stuff has to be handled.
If everyone else is happy with it, then I don't mind. It obviously works, just felt a little odd to me.
Thanks, Charles