wm8962: error at soc_component_read_no_lock
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
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
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.
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
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
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
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.
participants (3)
-
Fabio Estevam
-
Kuninori Morimoto
-
Mark Brown