• Janusz Krzysztofik's avatar
    ASoC: ams-delta: Take control over audio mute GPIO pins · 73681f4f
    Janusz Krzysztofik authored
    Since commit 1137ceee ("ARM: OMAP1: ams-delta: Don't request unused
    GPIOs"), on-board audio has appeared muted.  It has been discovered that
    believed to be unused GPIO pins "hookflash1" and "hookflash2" need to be
    set low for audible sound in handsfree and handset mode respectively.
    
    According to Amstrad E3 wiki, the purpose of both pins hasn't been
    clearly identified.  Original Amstrad software used to produce a high
    pulse on them when the phone was taken off hook or recall was pressed.
    With the current findings, we can assume the pins provide a kind of
    audio mute function, separately for handset and handsfree operation
    modes.
    
    Commit 2afdb4c4 ("ARM: OMAP1: ams-delta: Fix audio permanently
    muted") attempted to fix the issue temporarily by hogging the GPIO pin
    "hookflash1" renamed to "audio_mute", however the fix occurred
    incomplete as it restored audible sound only for handsfree mode.
    
    Stop hogging that pin, rename the pins to "handsfree_mute" and
    "handset_mute" respectively and implement appropriate DAPM event
    callbacks for "Speaker" and "Earpiece" DAPM widgets.
    
    Fixes: 1137ceee ("ARM: OMAP1: ams-delta: Don't request unused GPIOs")
    Signed-off-by: default avatarJanusz Krzysztofik <jmkrzyszt@gmail.com>
    Reviewed-by: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
    Link: https://lore.kernel.org/r/20190907111650.15440-1-jmkrzyszt@gmail.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
    73681f4f
ams-delta.c 16 KB