aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2011-06-21 10:33:55 -0400
committerTakashi Iwai <tiwai@suse.de>2011-06-21 10:33:55 -0400
commitddd304d8be4ffbb3662a92da515b1c74376b2280 (patch)
treeb578730f35b7ff90a9cf97cc9b1ab639a22c2e00 /sound/pci
parent09a9ad69a5467fbda3fd358d2be155c22aa416e4 (diff)
ALSA: hda - Remove redundant VT1709 and VT1708B codes
Unify the VT1709 10ch and 6ch parsers, as well as VT1708B 8ch and 4ch parsers. They have no difference now. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/patch_via.c86
1 files changed, 19 insertions, 67 deletions
diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c
index bceb6b2364fe..899b96631312 100644
--- a/sound/pci/hda/patch_via.c
+++ b/sound/pci/hda/patch_via.c
@@ -2291,32 +2291,7 @@ static int patch_vt1708(struct hda_codec *codec)
2291 return 0; 2291 return 0;
2292} 2292}
2293 2293
2294static int patch_vt1709_10ch(struct hda_codec *codec) 2294static int patch_vt1709(struct hda_codec *codec)
2295{
2296 struct via_spec *spec;
2297 int err;
2298
2299 /* create a codec specific record */
2300 spec = via_new_spec(codec);
2301 if (spec == NULL)
2302 return -ENOMEM;
2303
2304 spec->aa_mix_nid = 0x18;
2305
2306 err = via_parse_auto_config(codec);
2307 if (err < 0) {
2308 via_free(codec);
2309 return err;
2310 }
2311
2312 codec->patch_ops = via_patch_ops;
2313
2314 return 0;
2315}
2316/*
2317 * generic initialization of ADC, input mixers and output mixers
2318 */
2319static int patch_vt1709_6ch(struct hda_codec *codec)
2320{ 2295{
2321 struct via_spec *spec; 2296 struct via_spec *spec;
2322 int err; 2297 int err;
@@ -2420,13 +2395,14 @@ static void set_widgets_power_state_vt1708B(struct hda_codec *codec)
2420} 2395}
2421 2396
2422static int patch_vt1708S(struct hda_codec *codec); 2397static int patch_vt1708S(struct hda_codec *codec);
2423static int patch_vt1708B_8ch(struct hda_codec *codec) 2398static int patch_vt1708B(struct hda_codec *codec)
2424{ 2399{
2425 struct via_spec *spec; 2400 struct via_spec *spec;
2426 int err; 2401 int err;
2427 2402
2428 if (get_codec_type(codec) == VT1708BCE) 2403 if (get_codec_type(codec) == VT1708BCE)
2429 return patch_vt1708S(codec); 2404 return patch_vt1708S(codec);
2405
2430 /* create a codec specific record */ 2406 /* create a codec specific record */
2431 spec = via_new_spec(codec); 2407 spec = via_new_spec(codec);
2432 if (spec == NULL) 2408 if (spec == NULL)
@@ -2448,30 +2424,6 @@ static int patch_vt1708B_8ch(struct hda_codec *codec)
2448 return 0; 2424 return 0;
2449} 2425}
2450 2426
2451static int patch_vt1708B_4ch(struct hda_codec *codec)
2452{
2453 struct via_spec *spec;
2454 int err;
2455
2456 /* create a codec specific record */
2457 spec = via_new_spec(codec);
2458 if (spec == NULL)
2459 return -ENOMEM;
2460
2461 /* automatic parse from the BIOS config */
2462 err = via_parse_auto_config(codec);
2463 if (err < 0) {
2464 via_free(codec);
2465 return err;
2466 }
2467
2468 codec->patch_ops = via_patch_ops;
2469
2470 spec->set_widgets_power_state = set_widgets_power_state_vt1708B;
2471
2472 return 0;
2473}
2474
2475/* Patch for VT1708S */ 2427/* Patch for VT1708S */
2476static const struct hda_verb vt1708S_init_verbs[] = { 2428static const struct hda_verb vt1708S_init_verbs[] = {
2477 /* Enable Mic Boost Volume backdoor */ 2429 /* Enable Mic Boost Volume backdoor */
@@ -3275,37 +3227,37 @@ static const struct hda_codec_preset snd_hda_preset_via[] = {
3275 { .id = 0x1106170a, .name = "VT1708", .patch = patch_vt1708}, 3227 { .id = 0x1106170a, .name = "VT1708", .patch = patch_vt1708},
3276 { .id = 0x1106170b, .name = "VT1708", .patch = patch_vt1708}, 3228 { .id = 0x1106170b, .name = "VT1708", .patch = patch_vt1708},
3277 { .id = 0x1106e710, .name = "VT1709 10-Ch", 3229 { .id = 0x1106e710, .name = "VT1709 10-Ch",
3278 .patch = patch_vt1709_10ch}, 3230 .patch = patch_vt1709},
3279 { .id = 0x1106e711, .name = "VT1709 10-Ch", 3231 { .id = 0x1106e711, .name = "VT1709 10-Ch",
3280 .patch = patch_vt1709_10ch}, 3232 .patch = patch_vt1709},
3281 { .id = 0x1106e712, .name = "VT1709 10-Ch", 3233 { .id = 0x1106e712, .name = "VT1709 10-Ch",
3282 .patch = patch_vt1709_10ch}, 3234 .patch = patch_vt1709},
3283 { .id = 0x1106e713, .name = "VT1709 10-Ch", 3235 { .id = 0x1106e713, .name = "VT1709 10-Ch",
3284 .patch = patch_vt1709_10ch}, 3236 .patch = patch_vt1709},
3285 { .id = 0x1106e714, .name = "VT1709 6-Ch", 3237 { .id = 0x1106e714, .name = "VT1709 6-Ch",
3286 .patch = patch_vt1709_6ch}, 3238 .patch = patch_vt1709},
3287 { .id = 0x1106e715, .name = "VT1709 6-Ch", 3239 { .id = 0x1106e715, .name = "VT1709 6-Ch",
3288 .patch = patch_vt1709_6ch}, 3240 .patch = patch_vt1709},
3289 { .id = 0x1106e716, .name = "VT1709 6-Ch", 3241 { .id = 0x1106e716, .name = "VT1709 6-Ch",
3290 .patch = patch_vt1709_6ch}, 3242 .patch = patch_vt1709},
3291 { .id = 0x1106e717, .name = "VT1709 6-Ch", 3243 { .id = 0x1106e717, .name = "VT1709 6-Ch",
3292 .patch = patch_vt1709_6ch}, 3244 .patch = patch_vt1709},
3293 { .id = 0x1106e720, .name = "VT1708B 8-Ch", 3245 { .id = 0x1106e720, .name = "VT1708B 8-Ch",
3294 .patch = patch_vt1708B_8ch}, 3246 .patch = patch_vt1708B},
3295 { .id = 0x1106e721, .name = "VT1708B 8-Ch", 3247 { .id = 0x1106e721, .name = "VT1708B 8-Ch",
3296 .patch = patch_vt1708B_8ch}, 3248 .patch = patch_vt1708B},
3297 { .id = 0x1106e722, .name = "VT1708B 8-Ch", 3249 { .id = 0x1106e722, .name = "VT1708B 8-Ch",
3298 .patch = patch_vt1708B_8ch}, 3250 .patch = patch_vt1708B},
3299 { .id = 0x1106e723, .name = "VT1708B 8-Ch", 3251 { .id = 0x1106e723, .name = "VT1708B 8-Ch",
3300 .patch = patch_vt1708B_8ch}, 3252 .patch = patch_vt1708B},
3301 { .id = 0x1106e724, .name = "VT1708B 4-Ch", 3253 { .id = 0x1106e724, .name = "VT1708B 4-Ch",
3302 .patch = patch_vt1708B_4ch}, 3254 .patch = patch_vt1708B},
3303 { .id = 0x1106e725, .name = "VT1708B 4-Ch", 3255 { .id = 0x1106e725, .name = "VT1708B 4-Ch",
3304 .patch = patch_vt1708B_4ch}, 3256 .patch = patch_vt1708B},
3305 { .id = 0x1106e726, .name = "VT1708B 4-Ch", 3257 { .id = 0x1106e726, .name = "VT1708B 4-Ch",
3306 .patch = patch_vt1708B_4ch}, 3258 .patch = patch_vt1708B},
3307 { .id = 0x1106e727, .name = "VT1708B 4-Ch", 3259 { .id = 0x1106e727, .name = "VT1708B 4-Ch",
3308 .patch = patch_vt1708B_4ch}, 3260 .patch = patch_vt1708B},
3309 { .id = 0x11060397, .name = "VT1708S", 3261 { .id = 0x11060397, .name = "VT1708S",
3310 .patch = patch_vt1708S}, 3262 .patch = patch_vt1708S},
3311 { .id = 0x11061397, .name = "VT1708S", 3263 { .id = 0x11061397, .name = "VT1708S",