[alsa-devel] [PATCH] Ensure codec patch files are checked for the correct codec ID

Takashi Iwai tiwai at suse.de
Mon Jul 26 10:34:14 CEST 2010


At Mon, 26 Jul 2010 10:22:59 +0200,
David Henningsson wrote:
> 
> This one never got merged (and I forgot to cc Takashi...), so I'm just
> reposting it.
> 
> Link to original post:
> http://mailman.alsa-project.org/pipermail/alsa-devel/2010-June/028302.html
> 
> -- 
> David Henningsson, Canonical Ltd.
> http://launchpad.net/~diwic
> [2 0001-Ensure-codec-patch-files-are-checked-for-the-correct.patch <text/x-patch (7bit)>]
> >From ae4e9f41cf404d879b14be56591c4d5c6b403b71 Mon Sep 17 00:00:00 2001
> From: David Henningsson <diwic at ubuntu.com>
> Date: Wed, 2 Jun 2010 16:56:41 +0200
> Subject: [PATCH] Ensure codec patch files are checked for the correct codec ID
>  Signed-off-by: David Henningsson <diwic at ubuntu.com>

Thanks, applied with a slight coding style fix.


Takashi

> 
> ---
>  sound/pci/hda/hda_hwdep.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/sound/pci/hda/hda_hwdep.c b/sound/pci/hda/hda_hwdep.c
> index a1fc837..0e2cb27 100644
> --- a/sound/pci/hda/hda_hwdep.c
> +++ b/sound/pci/hda/hda_hwdep.c
> @@ -649,7 +649,9 @@ static void parse_codec_mode(char *buf, struct hda_bus *bus,
>  	*codecp = NULL;
>  	if (sscanf(buf, "%i %i %i", &vendorid, &subid, &caddr) == 3) {
>  		list_for_each_entry(codec, &bus->codec_list, list) {
> -			if (codec->addr == caddr) {
> +			if (codec->vendor_id == vendorid && 
> +					codec->subsystem_id == subid && 
> +					codec->addr == caddr) {
>  				*codecp = codec;
>  				break;
>  			}
> -- 
> 1.7.0.4
> 


More information about the Alsa-devel mailing list