aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2008-04-15 18:46:42 +0200
committerTakashi Iwai <tiwai@suse.de>2008-04-24 12:00:36 +0200
commit3adb8abc70aaf5c071f27576069c8b01783cca83 (patch)
treeacfc0ad65345bb55762b9198f03bf5fdac1de04d /sound
parentad5fada51d33b408ad3d2d0848ef6744b5daf06f (diff)
downloadkernel_samsung_smdk4412-3adb8abc70aaf5c071f27576069c8b01783cca83.zip
kernel_samsung_smdk4412-3adb8abc70aaf5c071f27576069c8b01783cca83.tar.gz
kernel_samsung_smdk4412-3adb8abc70aaf5c071f27576069c8b01783cca83.tar.bz2
[ALSA] hda - Add support of AD1989A/AD1989B
Added the support of AD1989A and AD1989B codecs. These codecs can have multiple SPDIF devices, but currently we handle only one SPDIF. If any real devices with two SPDIF interfaces (likely one for SPDIF and one for HDMI), we'll fix this rightly. Otherwise, these codecs are pretty similar with AD1988. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-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 2befeeb..f486eb1 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[] = {
{ } /* end */
};
+static struct snd_kcontrol_new ad1989_spdif_out_mixers[] = {
+ HDA_CODEC_VOLUME("IEC958 Playback Volume", 0x1b, 0x0, HDA_OUTPUT),
+ { } /* end */
+};
/*
* initialization verbs
@@ -2242,6 +2246,13 @@ static struct hda_verb ad1988_spdif_init_verbs[] = {
{ }
};
+/* AD1989 has no ADC -> SPDIF route */
+static struct hda_verb ad1989_spdif_init_verbs[] = {
+ /* SPDIF out pin */
+ {0x1b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE | 0x27}, /* 0dB */
+ { }
+};
+
/*
* verbs for 3stack (+dig)
*/
@@ -2949,10 +2960,19 @@ static int patch_ad1988(struct hda_codec *codec)
spec->mixers[spec->num_mixers++] = ad1988_capture_mixers;
spec->init_verbs[spec->num_init_verbs++] = ad1988_capture_init_verbs;
if (spec->multiout.dig_out_nid) {
- spec->mixers[spec->num_mixers++] = ad1988_spdif_out_mixers;
- spec->init_verbs[spec->num_init_verbs++] = ad1988_spdif_init_verbs;
+ if (codec->vendor_id >= 0x11d4989a) {
+ spec->mixers[spec->num_mixers++] =
+ ad1989_spdif_out_mixers;
+ spec->init_verbs[spec->num_init_verbs++] =
+ ad1989_spdif_init_verbs;
+ } else {
+ spec->mixers[spec->num_mixers++] =
+ ad1988_spdif_out_mixers;
+ spec->init_verbs[spec->num_init_verbs++] =
+ ad1988_spdif_init_verbs;
+ }
}
- if (spec->dig_in_nid)
+ if (spec->dig_in_nid && codec->vendor_id < 0x11d4989a)
spec->mixers[spec->num_mixers++] = ad1988_spdif_in_mixers;
codec->patch_ops = ad198x_patch_ops;
@@ -4184,5 +4204,7 @@ struct hda_codec_preset snd_hda_preset_analog[] = {
{ .id = 0x11d41986, .name = "AD1986A", .patch = patch_ad1986a },
{ .id = 0x11d41988, .name = "AD1988", .patch = patch_ad1988 },
{ .id = 0x11d4198b, .name = "AD1988B", .patch = patch_ad1988 },
+ { .id = 0x11d4989a, .name = "AD1989A", .patch = patch_ad1988 },
+ { .id = 0x11d4989b, .name = "AD1989B", .patch = patch_ad1988 },
{} /* terminator */
};