Commit ddd304d8 authored by Takashi Iwai's avatar Takashi Iwai

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: default avatarTakashi Iwai <tiwai@suse.de>
parent 09a9ad69
...@@ -2291,32 +2291,7 @@ static int patch_vt1708(struct hda_codec *codec) ...@@ -2291,32 +2291,7 @@ static int patch_vt1708(struct hda_codec *codec)
return 0; return 0;
} }
static int patch_vt1709_10ch(struct hda_codec *codec) static int patch_vt1709(struct hda_codec *codec)
{
struct via_spec *spec;
int err;
/* create a codec specific record */
spec = via_new_spec(codec);
if (spec == NULL)
return -ENOMEM;
spec->aa_mix_nid = 0x18;
err = via_parse_auto_config(codec);
if (err < 0) {
via_free(codec);
return err;
}
codec->patch_ops = via_patch_ops;
return 0;
}
/*
* generic initialization of ADC, input mixers and output mixers
*/
static int patch_vt1709_6ch(struct hda_codec *codec)
{ {
struct via_spec *spec; struct via_spec *spec;
int err; int err;
...@@ -2420,13 +2395,14 @@ static void set_widgets_power_state_vt1708B(struct hda_codec *codec) ...@@ -2420,13 +2395,14 @@ static void set_widgets_power_state_vt1708B(struct hda_codec *codec)
} }
static int patch_vt1708S(struct hda_codec *codec); static int patch_vt1708S(struct hda_codec *codec);
static int patch_vt1708B_8ch(struct hda_codec *codec) static int patch_vt1708B(struct hda_codec *codec)
{ {
struct via_spec *spec; struct via_spec *spec;
int err; int err;
if (get_codec_type(codec) == VT1708BCE) if (get_codec_type(codec) == VT1708BCE)
return patch_vt1708S(codec); return patch_vt1708S(codec);
/* create a codec specific record */ /* create a codec specific record */
spec = via_new_spec(codec); spec = via_new_spec(codec);
if (spec == NULL) if (spec == NULL)
...@@ -2448,30 +2424,6 @@ static int patch_vt1708B_8ch(struct hda_codec *codec) ...@@ -2448,30 +2424,6 @@ static int patch_vt1708B_8ch(struct hda_codec *codec)
return 0; return 0;
} }
static int patch_vt1708B_4ch(struct hda_codec *codec)
{
struct via_spec *spec;
int err;
/* create a codec specific record */
spec = via_new_spec(codec);
if (spec == NULL)
return -ENOMEM;
/* automatic parse from the BIOS config */
err = via_parse_auto_config(codec);
if (err < 0) {
via_free(codec);
return err;
}
codec->patch_ops = via_patch_ops;
spec->set_widgets_power_state = set_widgets_power_state_vt1708B;
return 0;
}
/* Patch for VT1708S */ /* Patch for VT1708S */
static const struct hda_verb vt1708S_init_verbs[] = { static const struct hda_verb vt1708S_init_verbs[] = {
/* Enable Mic Boost Volume backdoor */ /* Enable Mic Boost Volume backdoor */
...@@ -3275,37 +3227,37 @@ static const struct hda_codec_preset snd_hda_preset_via[] = { ...@@ -3275,37 +3227,37 @@ static const struct hda_codec_preset snd_hda_preset_via[] = {
{ .id = 0x1106170a, .name = "VT1708", .patch = patch_vt1708}, { .id = 0x1106170a, .name = "VT1708", .patch = patch_vt1708},
{ .id = 0x1106170b, .name = "VT1708", .patch = patch_vt1708}, { .id = 0x1106170b, .name = "VT1708", .patch = patch_vt1708},
{ .id = 0x1106e710, .name = "VT1709 10-Ch", { .id = 0x1106e710, .name = "VT1709 10-Ch",
.patch = patch_vt1709_10ch}, .patch = patch_vt1709},
{ .id = 0x1106e711, .name = "VT1709 10-Ch", { .id = 0x1106e711, .name = "VT1709 10-Ch",
.patch = patch_vt1709_10ch}, .patch = patch_vt1709},
{ .id = 0x1106e712, .name = "VT1709 10-Ch", { .id = 0x1106e712, .name = "VT1709 10-Ch",
.patch = patch_vt1709_10ch}, .patch = patch_vt1709},
{ .id = 0x1106e713, .name = "VT1709 10-Ch", { .id = 0x1106e713, .name = "VT1709 10-Ch",
.patch = patch_vt1709_10ch}, .patch = patch_vt1709},
{ .id = 0x1106e714, .name = "VT1709 6-Ch", { .id = 0x1106e714, .name = "VT1709 6-Ch",
.patch = patch_vt1709_6ch}, .patch = patch_vt1709},
{ .id = 0x1106e715, .name = "VT1709 6-Ch", { .id = 0x1106e715, .name = "VT1709 6-Ch",
.patch = patch_vt1709_6ch}, .patch = patch_vt1709},
{ .id = 0x1106e716, .name = "VT1709 6-Ch", { .id = 0x1106e716, .name = "VT1709 6-Ch",
.patch = patch_vt1709_6ch}, .patch = patch_vt1709},
{ .id = 0x1106e717, .name = "VT1709 6-Ch", { .id = 0x1106e717, .name = "VT1709 6-Ch",
.patch = patch_vt1709_6ch}, .patch = patch_vt1709},
{ .id = 0x1106e720, .name = "VT1708B 8-Ch", { .id = 0x1106e720, .name = "VT1708B 8-Ch",
.patch = patch_vt1708B_8ch}, .patch = patch_vt1708B},
{ .id = 0x1106e721, .name = "VT1708B 8-Ch", { .id = 0x1106e721, .name = "VT1708B 8-Ch",
.patch = patch_vt1708B_8ch}, .patch = patch_vt1708B},
{ .id = 0x1106e722, .name = "VT1708B 8-Ch", { .id = 0x1106e722, .name = "VT1708B 8-Ch",
.patch = patch_vt1708B_8ch}, .patch = patch_vt1708B},
{ .id = 0x1106e723, .name = "VT1708B 8-Ch", { .id = 0x1106e723, .name = "VT1708B 8-Ch",
.patch = patch_vt1708B_8ch}, .patch = patch_vt1708B},
{ .id = 0x1106e724, .name = "VT1708B 4-Ch", { .id = 0x1106e724, .name = "VT1708B 4-Ch",
.patch = patch_vt1708B_4ch}, .patch = patch_vt1708B},
{ .id = 0x1106e725, .name = "VT1708B 4-Ch", { .id = 0x1106e725, .name = "VT1708B 4-Ch",
.patch = patch_vt1708B_4ch}, .patch = patch_vt1708B},
{ .id = 0x1106e726, .name = "VT1708B 4-Ch", { .id = 0x1106e726, .name = "VT1708B 4-Ch",
.patch = patch_vt1708B_4ch}, .patch = patch_vt1708B},
{ .id = 0x1106e727, .name = "VT1708B 4-Ch", { .id = 0x1106e727, .name = "VT1708B 4-Ch",
.patch = patch_vt1708B_4ch}, .patch = patch_vt1708B},
{ .id = 0x11060397, .name = "VT1708S", { .id = 0x11060397, .name = "VT1708S",
.patch = patch_vt1708S}, .patch = patch_vt1708S},
{ .id = 0x11061397, .name = "VT1708S", { .id = 0x11061397, .name = "VT1708S",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment