lkml.org 
[lkml]   [2012]   [Jan]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[010/129] ALSA: HDA: Fix automute for Cirrus Logic 421x
    3.2-stable review patch.  If anyone has any objections, please let me know.

    ------------------
    Content-Length: 1423
    Lines: 42

    From: David Henningsson <david.henningsson@canonical.com>

    commit 78e2a928e377d5124932d4399c6c581908b027a0 upstream.

    There was a bug in the automute logic causing speakers not to
    mute when headphones were plugged in.

    Tested-by: Hsin-Yi Chen <hychen@canonical.com>
    Signed-off-by: David Henningsson <david.henningsson@canonical.com>
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

    ---
    sound/pci/hda/patch_cirrus.c | 14 ++++++--------
    1 file changed, 6 insertions(+), 8 deletions(-)

    --- a/sound/pci/hda/patch_cirrus.c
    +++ b/sound/pci/hda/patch_cirrus.c
    @@ -920,16 +920,14 @@ static void cs_automute(struct hda_codec

    /* mute speakers if spdif or hp jack is plugged in */
    for (i = 0; i < cfg->speaker_outs; i++) {
    + int pin_ctl = hp_present ? 0 : PIN_OUT;
    + /* detect on spdif is specific to CS421x */
    + if (spdif_present && (spec->vendor_nid == CS421X_VENDOR_NID))
    + pin_ctl = 0;
    +
    nid = cfg->speaker_pins[i];
    snd_hda_codec_write(codec, nid, 0,
    - AC_VERB_SET_PIN_WIDGET_CONTROL,
    - hp_present ? 0 : PIN_OUT);
    - /* detect on spdif is specific to CS421x */
    - if (spec->vendor_nid == CS421X_VENDOR_NID) {
    - snd_hda_codec_write(codec, nid, 0,
    - AC_VERB_SET_PIN_WIDGET_CONTROL,
    - spdif_present ? 0 : PIN_OUT);
    - }
    + AC_VERB_SET_PIN_WIDGET_CONTROL, pin_ctl);
    }
    if (spec->gpio_eapd_hp) {
    unsigned int gpio = hp_present ?



    \
     
     \ /
      Last update: 2012-01-24 03:47    [W:4.086 / U:0.020 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site