lkml.org 
[lkml]   [2016]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Date
    Subject[PATCH 3.16 110/217] ALSA: hda - Fix unconditional GPIO toggle via automute
    3.16.35-rc1 review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Takashi Iwai <tiwai@suse.de>

    commit 1f7c6658962fa1260c1658d681bd6bb0c746b99a upstream.

    Cirrus HD-audio driver may adjust GPIO pins for EAPD dynamically
    depending on the jack plug state. This works fine for the auto-mute
    mode where the speaker gets muted upon the HP jack plug. OTOH, when
    the auto-mute mode is off, this turns off the EAPD unexpectedly
    depending on the jack state, which results in the silent speaker
    output.

    This patch fixes the silent speaker output issue by setting GPIO bits
    constantly when the auto-mute mode is off.

    Reported-and-tested-by: moosotc@gmail.com
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
    ---
    sound/pci/hda/patch_cirrus.c | 8 ++++++--
    1 file changed, 6 insertions(+), 2 deletions(-)

    --- a/sound/pci/hda/patch_cirrus.c
    +++ b/sound/pci/hda/patch_cirrus.c
    @@ -176,8 +176,12 @@ static void cs_automute(struct hda_codec
    snd_hda_gen_update_outputs(codec);

    if (spec->gpio_eapd_hp || spec->gpio_eapd_speaker) {
    - spec->gpio_data = spec->gen.hp_jack_present ?
    - spec->gpio_eapd_hp : spec->gpio_eapd_speaker;
    + if (spec->gen.automute_speaker)
    + spec->gpio_data = spec->gen.hp_jack_present ?
    + spec->gpio_eapd_hp : spec->gpio_eapd_speaker;
    + else
    + spec->gpio_data =
    + spec->gpio_eapd_hp | spec->gpio_eapd_speaker;
    snd_hda_codec_write(codec, 0x01, 0,
    AC_VERB_SET_GPIO_DATA, spec->gpio_data);
    }
    \
     
     \ /
      Last update: 2016-04-27 02:21    [W:8.214 / U:0.052 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site