Re: 3.1-rc5 is the worst

From: Francis Moreau
Date: Wed Sep 14 2011 - 03:10:12 EST


Hello,

On Tue, Sep 13, 2011 at 10:39 AM, Takashi Iwai <tiwai@xxxxxxx> wrote:
>
> The patch below should fix the problem.  Give it a try.
>

Yes it does, thanks !

>
> ---
> From: Takashi Iwai <tiwai@xxxxxxx>
> Subject: [PATCH] ALSA: hda - Terminate the recursive connection search properly
>
> The recursive search of widget connections in snd_hda_get_conn_index()
> must be terminated at the pin and the audio-out widgets.  Otherwise
> you'll get "too deep connection" warnings unnecessarily.
>
> Signed-off-by: Takashi Iwai <tiwai@xxxxxxx>
> ---
>  sound/pci/hda/hda_codec.c |    6 +++++-
>  1 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
> index 3e7850c..f3aefef 100644
> --- a/sound/pci/hda/hda_codec.c
> +++ b/sound/pci/hda/hda_codec.c
> @@ -579,9 +579,13 @@ int snd_hda_get_conn_index(struct hda_codec *codec, hda_nid_t mux,
>                return -1;
>        }
>        recursive++;
> -       for (i = 0; i < nums; i++)
> +       for (i = 0; i < nums; i++) {
> +               unsigned int type = get_wcaps_type(get_wcaps(codec, conn[i]));
> +               if (type == AC_WID_PIN || type == AC_WID_AUD_OUT)
> +                       continue;
>                if (snd_hda_get_conn_index(codec, conn[i], nid, recursive) >= 0)
>                        return i;
> +       }
>        return -1;
>  }
>  EXPORT_SYMBOL_HDA(snd_hda_get_conn_index);
> --
> 1.7.6.1
>
>



--
Francis
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/