aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/pci/hda/patch_via.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c
index 299a18b735a3..269bb365752b 100644
--- a/sound/pci/hda/patch_via.c
+++ b/sound/pci/hda/patch_via.c
@@ -159,6 +159,7 @@ struct via_spec {
159#endif 159#endif
160}; 160};
161 161
162static enum VIA_HDA_CODEC get_codec_type(struct hda_codec *codec);
162static struct via_spec * via_new_spec(struct hda_codec *codec) 163static struct via_spec * via_new_spec(struct hda_codec *codec)
163{ 164{
164 struct via_spec *spec; 165 struct via_spec *spec;
@@ -169,6 +170,10 @@ static struct via_spec * via_new_spec(struct hda_codec *codec)
169 170
170 codec->spec = spec; 171 codec->spec = spec;
171 spec->codec = codec; 172 spec->codec = codec;
173 spec->codec_type = get_codec_type(codec);
174 /* VT1708BCE & VT1708S are almost same */
175 if (spec->codec_type == VT1708BCE)
176 spec->codec_type = VT1708S;
172 return spec; 177 return spec;
173} 178}
174 179
@@ -2203,10 +2208,6 @@ static int via_init(struct hda_codec *codec)
2203 for (i = 0; i < spec->num_iverbs; i++) 2208 for (i = 0; i < spec->num_iverbs; i++)
2204 snd_hda_sequence_write(codec, spec->init_verbs[i]); 2209 snd_hda_sequence_write(codec, spec->init_verbs[i]);
2205 2210
2206 spec->codec_type = get_codec_type(codec);
2207 if (spec->codec_type == VT1708BCE)
2208 spec->codec_type = VT1708S; /* VT1708BCE & VT1708S are almost
2209 same */
2210 /* Lydia Add for EAPD enable */ 2211 /* Lydia Add for EAPD enable */
2211 if (!spec->dig_in_nid) { /* No Digital In connection */ 2212 if (!spec->dig_in_nid) { /* No Digital In connection */
2212 if (spec->dig_in_pin) { 2213 if (spec->dig_in_pin) {