lkml.org 
[lkml]   [2011]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[197/262] ALSA: hda/realtek - Skip invalid digital out pins
    3.0-stable review patch.  If anyone has any objections, please let me know.

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

    From: Takashi Iwai <tiwai@suse.de>

    commit 51e4152a969aa6d2306492ebf143932dcb535c9b upstream.

    Some BIOS report invalid pins as digital output pins. The driver checks
    the connection but it doesn't do it fully correctly, and it leaves some
    undefined value as the audio-out widget, which makes the driver spewing
    warnings. This patch fixes the issue.

    Reference: https://bugzilla.novell.com/show_bug.cgi?id=727348

    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

    ---
    sound/pci/hda/patch_realtek.c | 12 +++++++-----
    1 file changed, 7 insertions(+), 5 deletions(-)

    --- a/sound/pci/hda/patch_realtek.c
    +++ b/sound/pci/hda/patch_realtek.c
    @@ -2088,25 +2088,27 @@ static void alc_auto_init_digital(struct
    static void alc_auto_parse_digital(struct hda_codec *codec)
    {
    struct alc_spec *spec = codec->spec;
    - int i, err;
    + int i, err, nums;
    hda_nid_t dig_nid;

    /* support multiple SPDIFs; the secondary is set up as a slave */
    + nums = 0;
    for (i = 0; i < spec->autocfg.dig_outs; i++) {
    err = snd_hda_get_connections(codec,
    spec->autocfg.dig_out_pins[i],
    &dig_nid, 1);
    - if (err < 0)
    + if (err <= 0)
    continue;
    - if (!i) {
    + if (!nums) {
    spec->multiout.dig_out_nid = dig_nid;
    spec->dig_out_type = spec->autocfg.dig_out_type[0];
    } else {
    spec->multiout.slave_dig_outs = spec->slave_dig_outs;
    - if (i >= ARRAY_SIZE(spec->slave_dig_outs) - 1)
    + if (nums >= ARRAY_SIZE(spec->slave_dig_outs) - 1)
    break;
    - spec->slave_dig_outs[i - 1] = dig_nid;
    + spec->slave_dig_outs[nums - 1] = dig_nid;
    }
    + nums++;
    }

    if (spec->autocfg.dig_in_pin) {



    \
     
     \ /
      Last update: 2011-11-10 04:37    [W:6.416 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site