lkml.org 
[lkml]   [2012]   [Sep]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[ 026/108] ALSA: hda - dont create dysfunctional mixer controls for ca0132
    Date
    From: Greg KH <gregkh@linuxfoundation.org>

    3.5-stable review patch. If anyone has any objections, please let me know.

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

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

    commit c41999a23929f30808bae6009d8065052d4d73fd upstream.

    It's possible that these amps are settable somehow, e g through
    secret codec verbs, but for now, don't create the controls (as
    they won't be working anyway, and cause errors in amixer).

    BugLink: https://bugs.launchpad.net/bugs/1038651
    Signed-off-by: David Henningsson <david.henningsson@canonical.com>
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    sound/pci/hda/patch_ca0132.c | 8 ++++++++
    1 file changed, 8 insertions(+)

    --- a/sound/pci/hda/patch_ca0132.c
    +++ b/sound/pci/hda/patch_ca0132.c
    @@ -275,6 +275,10 @@ static int _add_switch(struct hda_codec
    int type = dir ? HDA_INPUT : HDA_OUTPUT;
    struct snd_kcontrol_new knew =
    HDA_CODEC_MUTE_MONO(namestr, nid, chan, 0, type);
    + if ((query_amp_caps(codec, nid, type) & AC_AMPCAP_MUTE) == 0) {
    + snd_printdd("Skipping '%s %s Switch' (no mute on node 0x%x)\n", pfx, dirstr[dir], nid);
    + return 0;
    + }
    sprintf(namestr, "%s %s Switch", pfx, dirstr[dir]);
    return snd_hda_ctl_add(codec, nid, snd_ctl_new1(&knew, codec));
    }
    @@ -286,6 +290,10 @@ static int _add_volume(struct hda_codec
    int type = dir ? HDA_INPUT : HDA_OUTPUT;
    struct snd_kcontrol_new knew =
    HDA_CODEC_VOLUME_MONO(namestr, nid, chan, 0, type);
    + if ((query_amp_caps(codec, nid, type) & AC_AMPCAP_NUM_STEPS) == 0) {
    + snd_printdd("Skipping '%s %s Volume' (no amp on node 0x%x)\n", pfx, dirstr[dir], nid);
    + return 0;
    + }
    sprintf(namestr, "%s %s Volume", pfx, dirstr[dir]);
    return snd_hda_ctl_add(codec, nid, snd_ctl_new1(&knew, codec));
    }



    \
     
     \ /
      Last update: 2012-09-13 05:01    [W:4.239 / U:0.156 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site