* Failed to set cache compression type
@ 2014-06-02 13:43 Fabio Estevam
2014-06-02 14:02 ` Jarkko Nikula
0 siblings, 1 reply; 6+ messages in thread
From: Fabio Estevam @ 2014-06-02 13:43 UTC (permalink / raw)
To: Mark Brown; +Cc: alsa-devel@alsa-project.org, Lars-Peter Clausen
Hi,
I am booting linux-next 20140602 on a mx6qsabresd and I get the following probe
error:
wm8962 0-001a: customer id 0 revision D
wm8962 0-001a: ASoC: Failed to set cache compression type: -22
imx-wm8962 sound: snd_soc_register_card failed (-22)
imx-wm8962: probe of sound failed with error -22
What is the proper way to fix it?
Thanks,
Fabio Estevam
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Failed to set cache compression type
2014-06-02 13:43 Failed to set cache compression type Fabio Estevam
@ 2014-06-02 14:02 ` Jarkko Nikula
2014-06-02 14:10 ` Lars-Peter Clausen
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Jarkko Nikula @ 2014-06-02 14:02 UTC (permalink / raw)
To: Fabio Estevam, Mark Brown; +Cc: alsa-devel@alsa-project.org, Lars-Peter Clausen
On 06/02/2014 04:43 PM, Fabio Estevam wrote:
> Hi,
>
> I am booting linux-next 20140602 on a mx6qsabresd and I get the following probe
> error:
>
> wm8962 0-001a: customer id 0 revision D
> wm8962 0-001a: ASoC: Failed to set cache compression type: -22
> imx-wm8962 sound: snd_soc_register_card failed (-22)
> imx-wm8962: probe of sound failed with error -22
>
> What is the proper way to fix it?
>
I was looking at this too and it was introduced by the commit
b59dce53ef61 ("ASoC: cache: Fix possible ZERO_SIZE_PTR pointer
dereferencing error.").
If I understood commit 657254714ad2 ("ASoC: io: Remove support for ASoC
cache in conjunction with regmap") right should we remove remaining
soc-cache use? All codec drivers seems to include regmap.h although some
of them are still calling soc_cache_sync().
--
Jarkko
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Failed to set cache compression type
2014-06-02 14:02 ` Jarkko Nikula
@ 2014-06-02 14:10 ` Lars-Peter Clausen
2014-06-02 14:13 ` Fabio Estevam
2014-06-02 14:10 ` Mark Brown
2014-06-02 15:09 ` Mark Brown
2 siblings, 1 reply; 6+ messages in thread
From: Lars-Peter Clausen @ 2014-06-02 14:10 UTC (permalink / raw)
To: Jarkko Nikula; +Cc: alsa-devel@alsa-project.org, Mark Brown, Fabio Estevam
On 06/02/2014 04:02 PM, Jarkko Nikula wrote:
> On 06/02/2014 04:43 PM, Fabio Estevam wrote:
>> Hi,
>>
>> I am booting linux-next 20140602 on a mx6qsabresd and I get the following
>> probe
>> error:
>>
>> wm8962 0-001a: customer id 0 revision D
>> wm8962 0-001a: ASoC: Failed to set cache compression type: -22
>> imx-wm8962 sound: snd_soc_register_card failed (-22)
>> imx-wm8962: probe of sound failed with error -22
>>
>> What is the proper way to fix it?
>>
> I was looking at this too and it was introduced by the commit b59dce53ef61
> ("ASoC: cache: Fix possible ZERO_SIZE_PTR pointer dereferencing error.").
I think snd_soc_cache_init() should return 0 rather than -EINVAL if reg_size
is 0.
>
> If I understood commit 657254714ad2 ("ASoC: io: Remove support for ASoC
> cache in conjunction with regmap") right should we remove remaining
> soc-cache use? All codec drivers seems to include regmap.h although some of
> them are still calling soc_cache_sync().
Yes, ASoC level support for caching is going to be removed, hopefully sooner
than later. If a driver still uses soc_cache_sync() even though it has
switched to regmap for IO that's a bug.
- Lars
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Failed to set cache compression type
2014-06-02 14:02 ` Jarkko Nikula
2014-06-02 14:10 ` Lars-Peter Clausen
@ 2014-06-02 14:10 ` Mark Brown
2014-06-02 15:09 ` Mark Brown
2 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2014-06-02 14:10 UTC (permalink / raw)
To: Jarkko Nikula
Cc: alsa-devel@alsa-project.org, Lars-Peter Clausen, Fabio Estevam
[-- Attachment #1.1: Type: text/plain, Size: 403 bytes --]
On Mon, Jun 02, 2014 at 05:02:50PM +0300, Jarkko Nikula wrote:
> If I understood commit 657254714ad2 ("ASoC: io: Remove support for ASoC
> cache in conjunction with regmap") right should we remove remaining
> soc-cache use? All codec drivers seems to include regmap.h although some of
> them are still calling soc_cache_sync().
Anything using both regmap and the ASoC cache is definitely broken, yes.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Failed to set cache compression type
2014-06-02 14:10 ` Lars-Peter Clausen
@ 2014-06-02 14:13 ` Fabio Estevam
0 siblings, 0 replies; 6+ messages in thread
From: Fabio Estevam @ 2014-06-02 14:13 UTC (permalink / raw)
To: Lars-Peter Clausen; +Cc: alsa-devel@alsa-project.org, Mark Brown, Jarkko Nikula
On Mon, Jun 2, 2014 at 11:10 AM, Lars-Peter Clausen <lars@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);
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Failed to set cache compression type
2014-06-02 14:02 ` Jarkko Nikula
2014-06-02 14:10 ` Lars-Peter Clausen
2014-06-02 14:10 ` Mark Brown
@ 2014-06-02 15:09 ` Mark Brown
2 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2014-06-02 15:09 UTC (permalink / raw)
To: Jarkko Nikula
Cc: alsa-devel@alsa-project.org, Lars-Peter Clausen, Fabio Estevam
[-- Attachment #1.1: Type: text/plain, Size: 766 bytes --]
On Mon, Jun 02, 2014 at 05:02:50PM +0300, Jarkko Nikula wrote:
> I was looking at this too and it was introduced by the commit b59dce53ef61
> ("ASoC: cache: Fix possible ZERO_SIZE_PTR pointer dereferencing error.").
I've just fixed that now, the error checking isn't right - it should be
returning 0 not -EINVAL.
> If I understood commit 657254714ad2 ("ASoC: io: Remove support for ASoC
> cache in conjunction with regmap") right should we remove remaining
> soc-cache use? All codec drivers seems to include regmap.h although some of
> them are still calling soc_cache_sync().
There's still the AC'97 stuff at least, plus the ab8500 though if that
ends up blocking anything I'm just inclined to reapply the conversion
patch and let someone fix it if they care.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-06-02 16:18 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-02 13:43 Failed to set cache compression type Fabio Estevam
2014-06-02 14:02 ` Jarkko Nikula
2014-06-02 14:10 ` Lars-Peter Clausen
2014-06-02 14:13 ` Fabio Estevam
2014-06-02 14:10 ` Mark Brown
2014-06-02 15:09 ` Mark Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.