wm8962: error at soc_component_read_no_lock

Fabio Estevam festevam at gmail.com
Fri Jul 17 15:01:30 CEST 2020


On Fri, Jul 17, 2020 at 9:52 AM Fabio Estevam <festevam at gmail.com> wrote:
>
> On Fri, Jul 17, 2020 at 8:23 AM Mark Brown <broonie at 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


More information about the Alsa-devel mailing list