• Mark Brown's avatar
    ASoC: Add Speyside headset jack detection support · 68688e78
    Mark Brown authored
    Speyside makes use of support the WM8915 has for detecting the polarity
    of the microphone and ground connections on headsets, using a GPIO to
    control the polarity of the ground connection and switching between the
    two microphone bias supplies available on the device in order to do so.
    As a result of this the detection support is more involved than for most
    other CODECs, using a callback to configure the current polarity of the
    jack and translate this into the board-specific connections required for
    the current scenario.
    
    On Android some additional work is required to hook this up to the
    application layer as the Android HeadsetObserver monitors a custom
    drivers/switch API rather than the standard Linux APIs.  This can be
    done by either updating HeadsetObserver or modifying the ALSA core to
    report via drivers/switch as well.
    Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
    Acked-by: default avatarJassi Brar <jassisinghbrar@gmail.com>
    Acked-by: default avatarLiam Girdwood <lrg@ti.com>
    68688e78
speyside.c 6.97 KB