[ALSA] hda-codec - Add IEC958 digital out support for Lenovo Thinkpads T61/X61

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Thursday, January 31, 2008 - 5:02 pm

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ebf00c...
Commit:     ebf00c54a6e1be0ae25d41236a063747c74ed5bf
Parent:     c481fca3e68155459e9805dc8c303e012ccbee54
Author:     Jerone Young <jerone@gmail.com>
AuthorDate: Mon Jan 7 12:22:18 2008 +0100
Committer:  Jaroslav Kysela <perex@perex.cz>
CommitDate: Thu Jan 31 17:29:45 2008 +0100

    [ALSA] hda-codec - Add IEC958 digital out support for Lenovo Thinkpads T61/X61
    
    This patch adds IEC958 digital out support for the AD1984 sound card.
    This card can be found in Lenovo Thinkapds T61/X61. The digital out is
    not located on the Thinkpad, but optional docking station (it's coxial
    digital out). I've add this support as it is done the exact same way
    for the AD1983 & AD1884.
    I have tested this patch with my Lenovo Thinkpad T61 hooked up to a
    docking station (that has the digital coxial) and then run to my home
    theater reciever. Works like a charm :-)
    
    Signed-off-by: Jerone Young <jerone@gmail.com>
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
 sound/pci/hda/patch_analog.c |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c
index 0fa5f00..67144dc 100644
--- a/sound/pci/hda/patch_analog.c
+++ b/sound/pci/hda/patch_analog.c
@@ -3095,6 +3095,16 @@ static struct snd_kcontrol_new ad1984_thinkpad_mixers[] = {
 		.get = ad198x_mux_enum_get,
 		.put = ad198x_mux_enum_put,
 	},
+	/* SPDIF controls */
+	HDA_CODEC_VOLUME("IEC958 Playback Volume", 0x1b, 0x0, HDA_OUTPUT),
+	{
+		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+		.name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,NONE) "Source",
+		/* identical with ad1983 */
+		.info = ad1983_spdif_route_info,
+		.get = ad1983_spdif_route_get,
+		.put = ad1983_spdif_route_put,
+	},
 	{ } /* end */
 };
 
@@ -3197,7 +3207,7 @@ static int patch_ad1984(struct hda_codec *codec)
 		codec->patch_ops.build_pcms = ad1984_build_pcms;
 		break;
 	case AD1984_THINKPAD:
-		spec->multiout.dig_out_nid = 0;
+		spec->multiout.dig_out_nid = AD1884_SPDIF_OUT;
 		spec->input_mux = &ad1984_thinkpad_capture_source;
 		spec->mixers[0] = ad1984_thinkpad_mixers;
 		spec->init_verbs[spec->num_init_verbs++] = ad1984_thinkpad_init_verbs;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[ALSA] hda-codec - Add IEC958 digital out support for Leno ..., Linux Kernel Mailing ..., (Thu Jan 31, 5:02 pm)