diff options
author | Lydia Wang <lydiawang@viatech.com.cn> | 2009-10-10 07:07:26 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-10-11 11:54:01 -0400 |
commit | 744ff5f487925223beb6e21460c8cec468b54ab4 (patch) | |
tree | b03466cc4b5077a5be88ca42f8b7530a9b90c411 /sound | |
parent | b6153e1175a46db9dde17d12609adba7d72330b9 (diff) |
ALSA: HDA VIA: Change get_codec_type argument to hda_codec type
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/patch_via.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c index 9dfe1b55970c..e7d739f12247 100644 --- a/sound/pci/hda/patch_via.c +++ b/sound/pci/hda/patch_via.c | |||
@@ -88,8 +88,9 @@ enum VIA_HDA_CODEC { | |||
88 | CODEC_TYPES, | 88 | CODEC_TYPES, |
89 | }; | 89 | }; |
90 | 90 | ||
91 | static enum VIA_HDA_CODEC get_codec_type(u32 vendor_id) | 91 | static enum VIA_HDA_CODEC get_codec_type(struct hda_codec *codec) |
92 | { | 92 | { |
93 | u32 vendor_id = codec->vendor_id; | ||
93 | u16 ven_id = vendor_id >> 16; | 94 | u16 ven_id = vendor_id >> 16; |
94 | u16 dev_id = vendor_id & 0xffff; | 95 | u16 dev_id = vendor_id & 0xffff; |
95 | enum VIA_HDA_CODEC codec_type; | 96 | enum VIA_HDA_CODEC codec_type; |
@@ -141,7 +142,7 @@ static int mic_boost_tlv(struct snd_kcontrol *kcontrol, int op_flag, | |||
141 | struct hda_codec *codec = snd_kcontrol_chip(kcontrol); | 142 | struct hda_codec *codec = snd_kcontrol_chip(kcontrol); |
142 | hda_nid_t nid = get_amp_nid(kcontrol); | 143 | hda_nid_t nid = get_amp_nid(kcontrol); |
143 | 144 | ||
144 | if (get_codec_type(codec->vendor_id) == VT1708S | 145 | if (get_codec_type(codec) == VT1708S |
145 | && (nid == 0x1a || nid == 0x1e)) { | 146 | && (nid == 0x1a || nid == 0x1e)) { |
146 | if (size < 4 * sizeof(unsigned int)) | 147 | if (size < 4 * sizeof(unsigned int)) |
147 | return -ENOMEM; | 148 | return -ENOMEM; |
@@ -163,7 +164,7 @@ static int mic_boost_volume_info(struct snd_kcontrol *kcontrol, | |||
163 | struct hda_codec *codec = snd_kcontrol_chip(kcontrol); | 164 | struct hda_codec *codec = snd_kcontrol_chip(kcontrol); |
164 | hda_nid_t nid = get_amp_nid(kcontrol); | 165 | hda_nid_t nid = get_amp_nid(kcontrol); |
165 | 166 | ||
166 | if (get_codec_type(codec->vendor_id) == VT1708S | 167 | if (get_codec_type(codec) == VT1708S |
167 | && (nid == 0x1a || nid == 0x1e)) { | 168 | && (nid == 0x1a || nid == 0x1e)) { |
168 | uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; | 169 | uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; |
169 | uinfo->count = 2; | 170 | uinfo->count = 2; |