From 9fcdab3772fbc5fa64d50ffbef9fdac356d3fef7 Mon Sep 17 00:00:00 2001 From: Lydia Wang Date: Sat, 10 Oct 2009 19:07:26 +0800 Subject: [PATCH] --- yaml --- r: 170271 b: refs/heads/master c: 744ff5f487925223beb6e21460c8cec468b54ab4 h: refs/heads/master i: 170269: ae0fe335f826c07ab412a80044164342e9da3cb7 170267: 192e80ed0a92ae5827a8cac718cef6d43b383dd5 170263: 5634e21a5b72b0e27efe0a844c59acf62ea5c619 170255: 945a7b20535700d6dadd067a4cf5f1c346d3cd09 170239: bf796ac066378f9d5fb2448352f5c14fbdd07aee v: v3 --- [refs] | 2 +- trunk/sound/pci/hda/patch_via.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index f7a11c776d4c..62c8c42be435 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b6153e1175a46db9dde17d12609adba7d72330b9 +refs/heads/master: 744ff5f487925223beb6e21460c8cec468b54ab4 diff --git a/trunk/sound/pci/hda/patch_via.c b/trunk/sound/pci/hda/patch_via.c index 9dfe1b55970c..e7d739f12247 100644 --- a/trunk/sound/pci/hda/patch_via.c +++ b/trunk/sound/pci/hda/patch_via.c @@ -88,8 +88,9 @@ enum VIA_HDA_CODEC { CODEC_TYPES, }; -static enum VIA_HDA_CODEC get_codec_type(u32 vendor_id) +static enum VIA_HDA_CODEC get_codec_type(struct hda_codec *codec) { + u32 vendor_id = codec->vendor_id; u16 ven_id = vendor_id >> 16; u16 dev_id = vendor_id & 0xffff; enum VIA_HDA_CODEC codec_type; @@ -141,7 +142,7 @@ static int mic_boost_tlv(struct snd_kcontrol *kcontrol, int op_flag, struct hda_codec *codec = snd_kcontrol_chip(kcontrol); hda_nid_t nid = get_amp_nid(kcontrol); - if (get_codec_type(codec->vendor_id) == VT1708S + if (get_codec_type(codec) == VT1708S && (nid == 0x1a || nid == 0x1e)) { if (size < 4 * sizeof(unsigned int)) return -ENOMEM; @@ -163,7 +164,7 @@ static int mic_boost_volume_info(struct snd_kcontrol *kcontrol, struct hda_codec *codec = snd_kcontrol_chip(kcontrol); hda_nid_t nid = get_amp_nid(kcontrol); - if (get_codec_type(codec->vendor_id) == VT1708S + if (get_codec_type(codec) == VT1708S && (nid == 0x1a || nid == 0x1e)) { uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->count = 2;