[alsa-devel] Failed to set cache compression type

Fabio Estevam festevam at gmail.com
Mon Jun 2 16:13:34 CEST 2014


On Mon, Jun 2, 2014 at 11:10 AM, Lars-Peter Clausen <lars at metafoo.de> wrote:

> I think snd_soc_cache_init() should return 0 rather than -EINVAL if reg_size
> is 0.

Yes, this fixes the issue:

--- a/sound/soc/soc-cache.c
+++ b/sound/soc/soc-cache.c
@@ -73,7 +73,7 @@ int snd_soc_cache_init(struct snd_soc_codec *codec)
        reg_size = codec_drv->reg_cache_size * codec_drv->reg_word_size;

        if (!reg_size)
-               return -EINVAL;
+               return 0;

        mutex_init(&codec->cache_rw_mutex);


More information about the Alsa-devel mailing list