* wm8962: error at soc_component_read_no_lock @ 2020-07-16 17:02 Fabio Estevam 2020-07-16 23:26 ` Kuninori Morimoto 0 siblings, 1 reply; 7+ messages in thread From: Fabio Estevam @ 2020-07-16 17:02 UTC (permalink / raw) To: Kuninori Morimoto, Mark Brown, Nicolin Chen, S.j. Wang, Charles Keepax Cc: Linux-ALSA Hi, Running linux-next 20200714 on a imx6q sabresd I see the following errors: wm8962 0-001a: ASoC: error at soc_component_read_no_lock on wm8962.0-001a: -16 wm8962 0-001a: ASoC: error at soc_component_read_no_lock on wm8962.0-001a: -16 input: WM8962 Beep Generator as /devices/platform/soc/2100000.bus/21a0000.i2c/i2c-0/0-001a/input/input3 wm8962 0-001a: ASoC: error at soc_component_read_no_lock on wm8962.0-001a: -16 wm8962 0-001a: ASoC: error at soc_component_read_no_lock on wm8962.0-001a: -16 Despite these errors, the codec probes fine. What is the correct way to avoid such errors? Thanks, Fabio Estevam ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: wm8962: error at soc_component_read_no_lock 2020-07-16 17:02 wm8962: error at soc_component_read_no_lock Fabio Estevam @ 2020-07-16 23:26 ` Kuninori Morimoto 2020-07-17 11:23 ` Mark Brown 0 siblings, 1 reply; 7+ messages in thread From: Kuninori Morimoto @ 2020-07-16 23:26 UTC (permalink / raw) To: Fabio Estevam Cc: Nicolin Chen, S.j. Wang, Mark Brown, Charles Keepax, Linux-ALSA Hi Fabio > wm8962 0-001a: ASoC: error at soc_component_read_no_lock on wm8962.0-001a: -16 > wm8962 0-001a: ASoC: error at soc_component_read_no_lock on wm8962.0-001a: -16 > input: WM8962 Beep Generator as > /devices/platform/soc/2100000.bus/21a0000.i2c/i2c-0/0-001a/input/input3 > wm8962 0-001a: ASoC: error at soc_component_read_no_lock on wm8962.0-001a: -16 > wm8962 0-001a: ASoC: error at soc_component_read_no_lock on wm8962.0-001a: -16 > > Despite these errors, the codec probes fine. > > What is the correct way to avoid such errors? New component function indicates above when error. It seems yours couldn't read because of busy. I think it had been happened, but didn't indicate it before. Thank you for your help !! Best regards --- Kuninori Morimoto ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: wm8962: error at soc_component_read_no_lock 2020-07-16 23:26 ` Kuninori Morimoto @ 2020-07-17 11:23 ` Mark Brown 2020-07-17 12:52 ` Fabio Estevam 0 siblings, 1 reply; 7+ messages in thread From: Mark Brown @ 2020-07-17 11:23 UTC (permalink / raw) To: Kuninori Morimoto Cc: Nicolin Chen, Charles Keepax, S.j. Wang, Fabio Estevam, Linux-ALSA [-- Attachment #1: Type: text/plain, Size: 969 bytes --] On Fri, Jul 17, 2020 at 08:26:33AM +0900, Kuninori Morimoto wrote: > > wm8962 0-001a: ASoC: error at soc_component_read_no_lock on wm8962.0-001a: -16 > > wm8962 0-001a: ASoC: error at soc_component_read_no_lock on wm8962.0-001a: -16 > > input: WM8962 Beep Generator as > > /devices/platform/soc/2100000.bus/21a0000.i2c/i2c-0/0-001a/input/input3 > > wm8962 0-001a: ASoC: error at soc_component_read_no_lock on wm8962.0-001a: -16 > > wm8962 0-001a: ASoC: error at soc_component_read_no_lock on wm8962.0-001a: -16 > > Despite these errors, the codec probes fine. > > What is the correct way to avoid such errors? > New component function indicates above when error. > It seems yours couldn't read because of busy. > I think it had been happened, but didn't indicate it before. Right, IIRC the wm8962 had some registers that weren't accessible all the time and possibly also some volatile bits - the driver will need updates to handle things better for these widgets. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 488 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: wm8962: error at soc_component_read_no_lock 2020-07-17 11:23 ` Mark Brown @ 2020-07-17 12:52 ` Fabio Estevam 2020-07-17 13:01 ` Fabio Estevam 0 siblings, 1 reply; 7+ messages in thread From: Fabio Estevam @ 2020-07-17 12:52 UTC (permalink / raw) To: Mark Brown Cc: Nicolin Chen, S.j. Wang, Charles Keepax, Linux-ALSA, Kuninori Morimoto On Fri, Jul 17, 2020 at 8:23 AM Mark Brown <broonie@kernel.org> wrote: > Right, IIRC the wm8962 had some registers that weren't accessible all > the time and possibly also some volatile bits - the driver will need > updates to handle things better for these widgets. Thanks, Mark. I instrumented the code to print the register names so we can see where soc_component_read_no_lock fails: [ 6.010526] ************ register is 512 (WM8962_GPIO_BASE) [ 6.014540] wm8962 0-001a: ASoC: error at soc_component_read_no_lock on wm8962.0-001a: -16 [ 6.030852] ************ register is 515 (This register does not exist) [ 6.034806] wm8962 0-001a: ASoC: error at soc_component_read_no_lock on wm8962.0-001a: -16 [ 6.162651] ************ register is 48 (WM8962_ADDITIONAL_CONTROL_4) [ 6.166524] wm8962 0-001a: ASoC: error at soc_component_read_no_lock on wm8962.0-001a: -16 [ 6.174911] ************ register is 48 (WM8962_ADDITIONAL_CONTROL_4) [ 6.178779] wm8962 0-001a: ASoC: error at soc_component_read_no_lock on wm8962.0-001a: -16 Charles, Shengjiu, any suggestions, please? Thanks ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: wm8962: error at soc_component_read_no_lock 2020-07-17 12:52 ` Fabio Estevam @ 2020-07-17 13:01 ` Fabio Estevam 2020-07-17 14:02 ` Fabio Estevam 2020-07-17 15:17 ` Mark Brown 0 siblings, 2 replies; 7+ messages in thread From: Fabio Estevam @ 2020-07-17 13:01 UTC (permalink / raw) To: Mark Brown Cc: Nicolin Chen, S.j. Wang, Charles Keepax, Linux-ALSA, Kuninori Morimoto On Fri, Jul 17, 2020 at 9:52 AM Fabio Estevam <festevam@gmail.com> wrote: > > On Fri, Jul 17, 2020 at 8:23 AM Mark Brown <broonie@kernel.org> wrote: > > > Right, IIRC the wm8962 had some registers that weren't accessible all > > the time and possibly also some volatile bits - the driver will need > > updates to handle things better for these widgets. > > Thanks, Mark. > > I instrumented the code to print the register names so we can see > where soc_component_read_no_lock fails: > > [ 6.010526] ************ register is 512 (WM8962_GPIO_BASE) > [ 6.014540] wm8962 0-001a: ASoC: error at > soc_component_read_no_lock on wm8962.0-001a: -16 > > [ 6.030852] ************ register is 515 (This register does not exist) > [ 6.034806] wm8962 0-001a: ASoC: error at > soc_component_read_no_lock on wm8962.0-001a: -16 > > [ 6.162651] ************ register is 48 (WM8962_ADDITIONAL_CONTROL_4) > [ 6.166524] wm8962 0-001a: ASoC: error at > soc_component_read_no_lock on wm8962.0-001a: -16 > [ 6.174911] ************ register is 48 (WM8962_ADDITIONAL_CONTROL_4) > [ 6.178779] wm8962 0-001a: ASoC: error at > soc_component_read_no_lock on wm8962.0-001a: -16 > > Charles, Shengjiu, any suggestions, please? If I move WM8962_ADDITIONAL_CONTROL_4 to the non-volatile region, the two errors related to this register are gone: --- a/sound/soc/codecs/wm8962.c +++ b/sound/soc/codecs/wm8962.c @@ -149,6 +149,7 @@ static const struct reg_default wm8962_reg[] = { { 38, 0x0008 }, /* R38 - Right input PGA control */ { 40, 0x0000 }, /* R40 - SPKOUTL volume */ + { 48, 0x0000 }, /* R48 - Additional control(4) */ { 41, 0x0000 }, /* R41 - SPKOUTR volume */ { 49, 0x0010 }, /* R49 - Class D Control 1 */ @@ -790,7 +791,6 @@ static bool wm8962_volatile_register(struct device *dev, unsigned int reg) case WM8962_CLOCKING1: case WM8962_SOFTWARE_RESET: case WM8962_THERMAL_SHUTDOWN_STATUS: - case WM8962_ADDITIONAL_CONTROL_4: case WM8962_DC_SERVO_6: case WM8962_INTERRUPT_STATUS_1: case WM8962_INTERRUPT_STATUS_2: Is this a correct approach? Thanks ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: wm8962: error at soc_component_read_no_lock 2020-07-17 13:01 ` Fabio Estevam @ 2020-07-17 14:02 ` Fabio Estevam 2020-07-17 15:17 ` Mark Brown 1 sibling, 0 replies; 7+ messages in thread From: Fabio Estevam @ 2020-07-17 14:02 UTC (permalink / raw) To: Mark Brown Cc: Nicolin Chen, S.j. Wang, Charles Keepax, Linux-ALSA, Kuninori Morimoto On Fri, Jul 17, 2020 at 10:01 AM Fabio Estevam <festevam@gmail.com> wrote: > If I move WM8962_ADDITIONAL_CONTROL_4 to the non-volatile region, the > two errors related to this register are gone: > > --- a/sound/soc/codecs/wm8962.c > +++ b/sound/soc/codecs/wm8962.c > @@ -149,6 +149,7 @@ static const struct reg_default wm8962_reg[] = { > { 38, 0x0008 }, /* R38 - Right input PGA control */ > > { 40, 0x0000 }, /* R40 - SPKOUTL volume */ > + { 48, 0x0000 }, /* R48 - Additional control(4) */ > { 41, 0x0000 }, /* R41 - SPKOUTR volume */ > > { 49, 0x0010 }, /* R49 - Class D Control 1 */ > @@ -790,7 +791,6 @@ static bool wm8962_volatile_register(struct device > *dev, unsigned int reg) > case WM8962_CLOCKING1: > case WM8962_SOFTWARE_RESET: > case WM8962_THERMAL_SHUTDOWN_STATUS: > - case WM8962_ADDITIONAL_CONTROL_4: > case WM8962_DC_SERVO_6: > case WM8962_INTERRUPT_STATUS_1: > case WM8962_INTERRUPT_STATUS_2: > > Is this a correct approach? I have sent a patch that fixes the soc_component_read_no_lock errors for the GPIO registers. I can send a formal patch for fixing soc_component_read_no_lock error WM8962_ADDITIONAL_CONTROL_4 if this proposal looks good. Thanks ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: wm8962: error at soc_component_read_no_lock 2020-07-17 13:01 ` Fabio Estevam 2020-07-17 14:02 ` Fabio Estevam @ 2020-07-17 15:17 ` Mark Brown 1 sibling, 0 replies; 7+ messages in thread From: Mark Brown @ 2020-07-17 15:17 UTC (permalink / raw) To: Fabio Estevam Cc: Nicolin Chen, S.j. Wang, Charles Keepax, Linux-ALSA, Kuninori Morimoto [-- Attachment #1: Type: text/plain, Size: 431 bytes --] On Fri, Jul 17, 2020 at 10:01:30AM -0300, Fabio Estevam wrote: > If I move WM8962_ADDITIONAL_CONTROL_4 to the non-volatile region, the > two errors related to this register are gone: IIRC that register really did have some volatile bits in it, I can't remember what they were or if they were important though. It's not fundamentally wrong and if the volatile bits don't practically matter for Linux it would be sensible enough. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 488 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-07-17 15:19 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-07-16 17:02 wm8962: error at soc_component_read_no_lock Fabio Estevam 2020-07-16 23:26 ` Kuninori Morimoto 2020-07-17 11:23 ` Mark Brown 2020-07-17 12:52 ` Fabio Estevam 2020-07-17 13:01 ` Fabio Estevam 2020-07-17 14:02 ` Fabio Estevam 2020-07-17 15:17 ` 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.