aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/patch_analog.c28
1 files changed, 25 insertions, 3 deletions
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c
index 2befeebd909e..f486eb16a386 100644
--- a/sound/pci/hda/patch_analog.c
+++ b/sound/pci/hda/patch_analog.c
@@ -2142,6 +2142,10 @@ static struct snd_kcontrol_new ad1988_spdif_in_mixers[] = {
2142 { } /* end */ 2142 { } /* end */
2143}; 2143};
2144 2144
2145static struct snd_kcontrol_new ad1989_spdif_out_mixers[] = {
2146 HDA_CODEC_VOLUME("IEC958 Playback Volume", 0x1b, 0x0, HDA_OUTPUT),
2147 { } /* end */
2148};
2145 2149
2146/* 2150/*
2147 * initialization verbs 2151 * initialization verbs
@@ -2242,6 +2246,13 @@ static struct hda_verb ad1988_spdif_init_verbs[] = {
2242 { } 2246 { }
2243}; 2247};
2244 2248
2249/* AD1989 has no ADC -> SPDIF route */
2250static struct hda_verb ad1989_spdif_init_verbs[] = {
2251 /* SPDIF out pin */
2252 {0x1b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE | 0x27}, /* 0dB */
2253 { }
2254};
2255
2245/* 2256/*
2246 * verbs for 3stack (+dig) 2257 * verbs for 3stack (+dig)
2247 */ 2258 */
@@ -2949,10 +2960,19 @@ static int patch_ad1988(struct hda_codec *codec)
2949 spec->mixers[spec->num_mixers++] = ad1988_capture_mixers; 2960 spec->mixers[spec->num_mixers++] = ad1988_capture_mixers;
2950 spec->init_verbs[spec->num_init_verbs++] = ad1988_capture_init_verbs; 2961 spec->init_verbs[spec->num_init_verbs++] = ad1988_capture_init_verbs;
2951 if (spec->multiout.dig_out_nid) { 2962 if (spec->multiout.dig_out_nid) {
2952 spec->mixers[spec->num_mixers++] = ad1988_spdif_out_mixers; 2963 if (codec->vendor_id >= 0x11d4989a) {
2953 spec->init_verbs[spec->num_init_verbs++] = ad1988_spdif_init_verbs; 2964 spec->mixers[spec->num_mixers++] =
2965 ad1989_spdif_out_mixers;
2966 spec->init_verbs[spec->num_init_verbs++] =
2967 ad1989_spdif_init_verbs;
2968 } else {
2969 spec->mixers[spec->num_mixers++] =
2970 ad1988_spdif_out_mixers;
2971 spec->init_verbs[spec->num_init_verbs++] =
2972 ad1988_spdif_init_verbs;
2973 }
2954 } 2974 }
2955 if (spec->dig_in_nid) 2975 if (spec->dig_in_nid && codec->vendor_id < 0x11d4989a)
2956 spec->mixers[spec->num_mixers++] = ad1988_spdif_in_mixers; 2976 spec->mixers[spec->num_mixers++] = ad1988_spdif_in_mixers;
2957 2977
2958 codec->patch_ops = ad198x_patch_ops; 2978 codec->patch_ops = ad198x_patch_ops;
@@ -4184,5 +4204,7 @@ struct hda_codec_preset snd_hda_preset_analog[] = {
4184 { .id = 0x11d41986, .name = "AD1986A", .patch = patch_ad1986a }, 4204 { .id = 0x11d41986, .name = "AD1986A", .patch = patch_ad1986a },
4185 { .id = 0x11d41988, .name = "AD1988", .patch = patch_ad1988 }, 4205 { .id = 0x11d41988, .name = "AD1988", .patch = patch_ad1988 },
4186 { .id = 0x11d4198b, .name = "AD1988B", .patch = patch_ad1988 }, 4206 { .id = 0x11d4198b, .name = "AD1988B", .patch = patch_ad1988 },
4207 { .id = 0x11d4989a, .name = "AD1989A", .patch = patch_ad1988 },
4208 { .id = 0x11d4989b, .name = "AD1989B", .patch = patch_ad1988 },
4187 {} /* terminator */ 4209 {} /* terminator */
4188}; 4210};