aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/patch_analog.c60
1 files changed, 60 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c
index 845e949a7f63..19f08846d6fc 100644
--- a/sound/pci/hda/patch_analog.c
+++ b/sound/pci/hda/patch_analog.c
@@ -3141,6 +3141,20 @@ static struct hda_input_mux ad1984_thinkpad_capture_source = {
3141 }, 3141 },
3142}; 3142};
3143 3143
3144
3145/*
3146 * Dell Precision T3400
3147 */
3148static struct hda_input_mux ad1984_dell_desktop_capture_source = {
3149 .num_items = 3,
3150 .items = {
3151 { "Front Mic", 0x0 },
3152 { "Line-In", 0x1 },
3153 { "Mix", 0x3 },
3154 },
3155};
3156
3157
3144static struct snd_kcontrol_new ad1984_thinkpad_mixers[] = { 3158static struct snd_kcontrol_new ad1984_thinkpad_mixers[] = {
3145 HDA_CODEC_VOLUME("PCM Playback Volume", 0x04, 0x0, HDA_OUTPUT), 3159 HDA_CODEC_VOLUME("PCM Playback Volume", 0x04, 0x0, HDA_OUTPUT),
3146 /* HDA_CODEC_VOLUME_IDX("PCM Playback Volume", 1, 0x03, 0x0, HDA_OUTPUT), */ 3160 /* HDA_CODEC_VOLUME_IDX("PCM Playback Volume", 1, 0x03, 0x0, HDA_OUTPUT), */
@@ -3200,6 +3214,44 @@ static struct hda_verb ad1984_thinkpad_init_verbs[] = {
3200 { } /* end */ 3214 { } /* end */
3201}; 3215};
3202 3216
3217/*
3218 * Dell Precision T3400
3219 */
3220static struct snd_kcontrol_new ad1984_dell_desktop_mixers[] = {
3221 HDA_CODEC_VOLUME("PCM Playback Volume", 0x04, 0x0, HDA_OUTPUT),
3222 HDA_CODEC_MUTE("Headphone Playback Switch", 0x11, 0x0, HDA_OUTPUT),
3223 HDA_CODEC_MUTE("Speaker Playback Switch", 0x12, 0x0, HDA_OUTPUT),
3224 HDA_CODEC_VOLUME_MONO("Mono Playback Volume", 0x13, 1, 0x0, HDA_OUTPUT),
3225 HDA_CODEC_MUTE_MONO("Mono Playback Switch", 0x13, 1, 0x0, HDA_OUTPUT),
3226 HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x20, 0x00, HDA_INPUT),
3227 HDA_CODEC_MUTE("Front Mic Playback Switch", 0x20, 0x00, HDA_INPUT),
3228 HDA_CODEC_VOLUME("Line-In Playback Volume", 0x20, 0x01, HDA_INPUT),
3229 HDA_CODEC_MUTE("Line-In Playback Switch", 0x20, 0x01, HDA_INPUT),
3230 /*
3231 HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x20, 0x03, HDA_INPUT),
3232 HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x20, 0x03, HDA_INPUT),
3233 */
3234 HDA_CODEC_VOLUME("Line-In Boost", 0x15, 0x0, HDA_INPUT),
3235 HDA_CODEC_VOLUME("Front Mic Boost", 0x14, 0x0, HDA_INPUT),
3236 HDA_CODEC_VOLUME("Capture Volume", 0x0c, 0x0, HDA_OUTPUT),
3237 HDA_CODEC_MUTE("Capture Switch", 0x0c, 0x0, HDA_OUTPUT),
3238 HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x0d, 0x0, HDA_OUTPUT),
3239 HDA_CODEC_MUTE_IDX("Capture Switch", 1, 0x0d, 0x0, HDA_OUTPUT),
3240 {
3241 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
3242 /* The multiple "Capture Source" controls confuse alsamixer
3243 * So call somewhat different..
3244 */
3245 /* .name = "Capture Source", */
3246 .name = "Input Source",
3247 .count = 2,
3248 .info = ad198x_mux_enum_info,
3249 .get = ad198x_mux_enum_get,
3250 .put = ad198x_mux_enum_put,
3251 },
3252 { } /* end */
3253};
3254
3203/* Digial MIC ADC NID 0x05 + 0x06 */ 3255/* Digial MIC ADC NID 0x05 + 0x06 */
3204static int ad1984_pcm_dmic_prepare(struct hda_pcm_stream *hinfo, 3256static int ad1984_pcm_dmic_prepare(struct hda_pcm_stream *hinfo,
3205 struct hda_codec *codec, 3257 struct hda_codec *codec,
@@ -3253,17 +3305,20 @@ static int ad1984_build_pcms(struct hda_codec *codec)
3253enum { 3305enum {
3254 AD1984_BASIC, 3306 AD1984_BASIC,
3255 AD1984_THINKPAD, 3307 AD1984_THINKPAD,
3308 AD1984_DELL_DESKTOP,
3256 AD1984_MODELS 3309 AD1984_MODELS
3257}; 3310};
3258 3311
3259static const char *ad1984_models[AD1984_MODELS] = { 3312static const char *ad1984_models[AD1984_MODELS] = {
3260 [AD1984_BASIC] = "basic", 3313 [AD1984_BASIC] = "basic",
3261 [AD1984_THINKPAD] = "thinkpad", 3314 [AD1984_THINKPAD] = "thinkpad",
3315 [AD1984_DELL_DESKTOP] = "dell_desktop",
3262}; 3316};
3263 3317
3264static struct snd_pci_quirk ad1984_cfg_tbl[] = { 3318static struct snd_pci_quirk ad1984_cfg_tbl[] = {
3265 /* Lenovo Thinkpad T61/X61 */ 3319 /* Lenovo Thinkpad T61/X61 */
3266 SND_PCI_QUIRK(0x17aa, 0, "Lenovo Thinkpad", AD1984_THINKPAD), 3320 SND_PCI_QUIRK(0x17aa, 0, "Lenovo Thinkpad", AD1984_THINKPAD),
3321 SND_PCI_QUIRK(0x1028, 0x0214, "Dell T3400", AD1984_DELL_DESKTOP),
3267 {} 3322 {}
3268}; 3323};
3269 3324
@@ -3290,6 +3345,11 @@ static int patch_ad1984(struct hda_codec *codec)
3290 spec->mixers[0] = ad1984_thinkpad_mixers; 3345 spec->mixers[0] = ad1984_thinkpad_mixers;
3291 spec->init_verbs[spec->num_init_verbs++] = ad1984_thinkpad_init_verbs; 3346 spec->init_verbs[spec->num_init_verbs++] = ad1984_thinkpad_init_verbs;
3292 break; 3347 break;
3348 case AD1984_DELL_DESKTOP:
3349 spec->multiout.dig_out_nid = 0;
3350 spec->input_mux = &ad1984_dell_desktop_capture_source;
3351 spec->mixers[0] = ad1984_dell_desktop_mixers;
3352 break;
3293 } 3353 }
3294 return 0; 3354 return 0;
3295} 3355}