-----Original Message----- From: Mark Brown [mailto:broonie@kernel.org] Sent: Monday, June 15, 2015 11:06 PM To: Jie, Yang Cc: Takashi Iwai; alsa-devel@alsa-project.org; Girdwood, Liam R; vinod.koul@linux.intel.com; ramesh.babu@linux.intel.com; Zhang, Vivian Subject: Re: [PATCH v2 1/2] ASoC: soc-compress: add a config item for soc- compress
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.
Mark, as you may see in this patch(1/2), I have added this selection to sound/ Soc/intel/Kconfig, we can find .compress_dai =1 in sst-mfld-platform-pcm.c, the compressed is referenced in sst-mfld-platform-pcm.c:sst_platform_dai, here copy the related part from the patch:
b/sound/soc/intel/Kconfig index 791953f..e559174 100644 --- a/sound/soc/intel/Kconfig +++ b/sound/soc/intel/Kconfig @@ -12,6 +12,7 @@ config SND_MFLD_MACHINE
config SND_SST_MFLD_PLATFORM tristate + select SND_SOC_COMPRESS
config SND_SST_IPC tristate
~Keyon