• Enric Balletbo i Serra's avatar
    SoC: rockchip: rockchip_max98090: Enable MICBIAS for headset keypress detection · f86621cd
    Enric Balletbo i Serra authored
    The TS3A227E says that the headset keypress detection needs the MICBIAS
    power in order to report the key events to ensure proper operation
    The headset keypress detection needs the MICBIAS power in order to report
    the key events all the time as long as MIC is present. So MICBIAS pin
    is forced on when a MICROPHONE is detected.
    
    On Veyron Minnie I observed that if the MICBIAS power is not present and
    the key press detection is activated (just because it is enabled when you
    insert a headset), it randomly reports a keypress on insert.
    E.g. (KEY_PLAYPAUSE)
    
     Event: (SW_HEADPHONE_INSERT), value 1
     Event: (SW_MICROPHONE_INSERT), value 1
     Event: -------------- SYN_REPORT ------------
     Event: (KEY_PLAYPAUSE), value 1
    
    Userspace thinks that KEY_PLAYPAUSE is pressed and produces the annoying
    effect that the media player starts a play/pause loop.
    
    Note that, although most of the time the key reported is the one
    associated with BTN_0, not always this is true. On my tests I also saw
    different keys reported
    Signed-off-by: default avatarEnric Balletbo i Serra <enric.balletbo@collabora.com>
    Link: https://lore.kernel.org/r/20190719173929.24065-1-enric.balletbo@collabora.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
    f86621cd
rockchip_max98090.c 6.48 KB