aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_via.c
diff options
context:
space:
mode:
authorLydia Wang <lydiawang@viatech.com.cn>2009-10-10 07:08:39 -0400
committerTakashi Iwai <tiwai@suse.de>2009-10-11 11:58:44 -0400
commitbb3c6bfc3f7a5416d85c5dbc312e2d47fc672eef (patch)
treebc3e6fb52ae6e1826c423777bcfc0d58e94ff27e /sound/pci/hda/patch_via.c
parenteb7188cafcb7aa1419b8889494cdbd4e6a01da1c (diff)
ALSA: HDA VIA: Add VT1828S and VT2020 support.
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/pci/hda/patch_via.c')
-rw-r--r--sound/pci/hda/patch_via.c26
1 files changed, 21 insertions, 5 deletions
diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c
index c78385340694..2e7e72c83a52 100644
--- a/sound/pci/hda/patch_via.c
+++ b/sound/pci/hda/patch_via.c
@@ -179,6 +179,8 @@ static enum VIA_HDA_CODEC get_codec_type(struct hda_codec *codec)
179 else if ((dev_id & 0xfff) == 0x428 179 else if ((dev_id & 0xfff) == 0x428
180 && (dev_id >> 12) < 8) 180 && (dev_id >> 12) < 8)
181 codec_type = VT1718S; 181 codec_type = VT1718S;
182 else if (dev_id == 0x0441 || dev_id == 0x4441)
183 codec_type = VT1718S;
182 else 184 else
183 codec_type = UNKNOWN; 185 codec_type = UNKNOWN;
184 return codec_type; 186 return codec_type;
@@ -4323,21 +4325,31 @@ static int patch_vt1718S(struct hda_codec *codec)
4323 spec->init_verbs[spec->num_iverbs++] = vt1718S_volume_init_verbs; 4325 spec->init_verbs[spec->num_iverbs++] = vt1718S_volume_init_verbs;
4324 spec->init_verbs[spec->num_iverbs++] = vt1718S_uniwill_init_verbs; 4326 spec->init_verbs[spec->num_iverbs++] = vt1718S_uniwill_init_verbs;
4325 4327
4326 spec->stream_name_analog = "VT1718S Analog"; 4328 if (codec->vendor_id == 0x11060441)
4329 spec->stream_name_analog = "VT2020 Analog";
4330 else if (codec->vendor_id == 0x11064441)
4331 spec->stream_name_analog = "VT1828S Analog";
4332 else
4333 spec->stream_name_analog = "VT1718S Analog";
4327 spec->stream_analog_playback = &vt1718S_pcm_analog_playback; 4334 spec->stream_analog_playback = &vt1718S_pcm_analog_playback;
4328 spec->stream_analog_capture = &vt1718S_pcm_analog_capture; 4335 spec->stream_analog_capture = &vt1718S_pcm_analog_capture;
4329 4336
4330 spec->stream_name_digital = "VT1718S Digital"; 4337 if (codec->vendor_id == 0x11060441)
4338 spec->stream_name_digital = "VT2020 Digital";
4339 else if (codec->vendor_id == 0x11064441)
4340 spec->stream_name_digital = "VT1828S Digital";
4341 else
4342 spec->stream_name_digital = "VT1718S Digital";
4331 spec->stream_digital_playback = &vt1718S_pcm_digital_playback; 4343 spec->stream_digital_playback = &vt1718S_pcm_digital_playback;
4332 if (codec->vendor_id == 0x11060428) 4344 if (codec->vendor_id == 0x11060428 || codec->vendor_id == 0x11060441)
4333 spec->stream_digital_capture = &vt1718S_pcm_digital_capture; 4345 spec->stream_digital_capture = &vt1718S_pcm_digital_capture;
4334 4346
4335 if (!spec->adc_nids && spec->input_mux) { 4347 if (!spec->adc_nids && spec->input_mux) {
4336 spec->adc_nids = vt1718S_adc_nids; 4348 spec->adc_nids = vt1718S_adc_nids;
4337 spec->num_adc_nids = ARRAY_SIZE(vt1718S_adc_nids); 4349 spec->num_adc_nids = ARRAY_SIZE(vt1718S_adc_nids);
4338 get_mux_nids(codec); 4350 get_mux_nids(codec);
4339 override_mic_boost(codec, 0x1a, 0, 3, 40); 4351 override_mic_boost(codec, 0x2b, 0, 3, 40);
4340 override_mic_boost(codec, 0x1e, 0, 3, 40); 4352 override_mic_boost(codec, 0x29, 0, 3, 40);
4341 spec->mixers[spec->num_mixers] = vt1718S_capture_mixer; 4353 spec->mixers[spec->num_mixers] = vt1718S_capture_mixer;
4342 spec->num_mixers++; 4354 spec->num_mixers++;
4343 } 4355 }
@@ -4429,6 +4441,10 @@ static struct hda_codec_preset snd_hda_preset_via[] = {
4429 .patch = patch_vt1718S}, 4441 .patch = patch_vt1718S},
4430 { .id = 0x11064428, .name = "VT1718S", 4442 { .id = 0x11064428, .name = "VT1718S",
4431 .patch = patch_vt1718S}, 4443 .patch = patch_vt1718S},
4444 { .id = 0x11060441, .name = "VT2020",
4445 .patch = patch_vt1718S},
4446 { .id = 0x11064441, .name = "VT1828S",
4447 .patch = patch_vt1718S},
4432 {} /* terminator */ 4448 {} /* terminator */
4433}; 4449};
4434 4450