lkml.org 
[lkml]   [2010]   [Feb]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH] OLPC: ALSA: fix cs5535audio's MIC GPIO to enable input

    Previously the MIC GPIO was set to output mode, and when checking the status
    after setting it we were checking OUTPUT_VAL. This worked, though I'm not
    quite sure why. Instead, if we actually check the READ_BACK value, it
    doesn't work unless the GPIO is in bidirectional mode. Thus, enable
    input mode as well.

    Signed-off-by: Andres Salomon <dilinger@collabora.co.uk>
    ---
    sound/pci/cs5535audio/cs5535audio_olpc.c | 1 +
    1 files changed, 1 insertions(+), 0 deletions(-)

    diff --git a/sound/pci/cs5535audio/cs5535audio_olpc.c b/sound/pci/cs5535audio/cs5535audio_olpc.c
    index 50da49b..f5574f2 100644
    --- a/sound/pci/cs5535audio/cs5535audio_olpc.c
    +++ b/sound/pci/cs5535audio/cs5535audio_olpc.c
    @@ -157,6 +157,7 @@ int __devinit olpc_quirks(struct snd_card *card, struct snd_ac97 *ac97)
    return -EIO;
    }
    gpio_direction_output(OLPC_GPIO_MIC_AC, 0);
    + gpio_direction_input(OLPC_GPIO_MIC_AC);

    /* drop the original AD1888 HPF control */
    memset(&elem, 0, sizeof(elem));
    --
    1.5.6.5


    \
     
     \ /
      Last update: 2010-02-25 00:47    [W:2.943 / U:0.088 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site