logo       

[PATCH] [UBUNTU:sound/pci/hda/] Add support for Medion laptops: msg#00054

Subject: [PATCH] [UBUNTU:sound/pci/hda/] Add support for Medion laptops
From 212486e556da4012d5257f1c1767c5ae365ebe29 Mon Sep 17 00:00:00 2001
From: Daniel T. Chen <crimsun@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 15 Oct 2006 21:46:01 -0400
Subject: [PATCH] [UBUNTU:sound/pci/hda/] Add support for Medion laptops

UpstreamStatus: Added in upstream alsa-kernel hg changeset:
                20ccacc019b7 
[http://hg-mirror.alsa-project.org/alsa-kernel?cmd=changeset;node=20ccacc019b744f7dce9798c49f778d37b4fb989;style=gitweb]

Tobin Davis <tdavis@xxxxxxxxxxxx> added support for Medion laptops.
Currently microphone support is not functional.

This commit is suitable for Dapper, Edgy, and Edgy+1 linux-source
(with typedef tweaking necessary for the latter two).

Signed-off-by: Daniel T Chen <crimsun@xxxxxxxxxx>
---
 sound/pci/hda/patch_realtek.c |   55 ++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 54 insertions(+), 1 deletions(-)

diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index f4ccc19..a71ab6f 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -112,6 +112,7 @@ enum {
        ALC883_6ST_DIG,
        ALC888_DEMO_BOARD,
        ALC883_ACER,
+       ALC883_MEDION,
        ALC883_AUTO,
        ALC883_MODEL_LAST,
 };
@@ -4271,7 +4272,7 @@ static struct hda_verb alc882_init_verbs
 static struct hda_verb alc882_eapd_verbs[] = {
        /* change to EAPD mode */
        {0x20, AC_VERB_SET_COEF_INDEX, 0x07},
-       {0x20, AC_VERB_SET_PROC_COEF, 0x3060},
+       {0x20, AC_VERB_SET_PROC_COEF, 0x3070},
        { } 
 };
 
@@ -4837,6 +4838,42 @@ static snd_kcontrol_new_t alc883_3ST_6ch
        { } /* end */
 };
 
+static snd_kcontrol_new_t alc883_fivestack_mixer[] = {
+       HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
+       HDA_CODEC_MUTE("Front Playback Switch", 0x14, 0x0, HDA_OUTPUT),
+       HDA_CODEC_VOLUME("Surround Playback Volume", 0x0d, 0x0, HDA_OUTPUT),
+       HDA_CODEC_MUTE("Surround Playback Switch", 0x15, 0x0, HDA_OUTPUT),
+       HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x0e, 1, 0x0, HDA_OUTPUT
+),
+       HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x0e, 2, 0x0, HDA_OUTPUT),
+       HDA_CODEC_MUTE_MONO("Center Playback Switch", 0x16, 1, 0x0, HDA_OUTPUT),
+       HDA_CODEC_MUTE_MONO("LFE Playback Switch", 0x16, 2, 0x0, HDA_OUTPUT),
+       HDA_CODEC_MUTE("Headphone Playback Switch", 0x1b, 0x0, HDA_OUTPUT),
+       HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT),
+       HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT),
+       HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT),
+       HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT),
+       HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
+       HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
+       HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT),
+       HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT),
+       HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x0b, 0x05, HDA_INPUT),
+       HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x0b, 0x05, HDA_INPUT),
+       HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT),
+       HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT),
+
+       {
+               .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+               /* .name = "Capture Source", */
+               .name = "Input Source",
+               .count = 1,
+               .info = alc883_mux_enum_info,
+               .get = alc883_mux_enum_get,
+               .put = alc883_mux_enum_put,
+       },
+       { } /* end */
+};
+
 static snd_kcontrol_new_t alc883_chmode_mixer[] = {
        {
                .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
@@ -5042,6 +5079,8 @@ static struct hda_board_config alc883_cf
          .config = ALC883_ACER },
        { .pci_subvendor = 0x1025, .pci_subdevice = 0x009f,
          .config = ALC883_ACER },
+       { .pci_subvendor = 0x161f, .pci_subdevice = 0x2054,
+         .modelname = "medion", .config = ALC883_MEDION },
        { .modelname = "auto", .config = ALC883_AUTO },
        {}
 };
@@ -5129,6 +5168,20 @@ static struct alc_config_preset alc883_p
                .channel_mode = alc883_3ST_2ch_modes,
                .input_mux = &alc883_capture_source,
        },
+       [ALC883_MEDION] = {
+               .mixers = { alc883_fivestack_mixer,
+                           alc883_chmode_mixer },
+               .init_verbs = { alc883_init_verbs,
+                               alc882_eapd_verbs },
+               .num_dacs = ARRAY_SIZE(alc883_dac_nids),
+               .dac_nids = alc883_dac_nids,
+               .num_adc_nids = ARRAY_SIZE(alc883_adc_nids),
+               .adc_nids = alc883_adc_nids,
+               .num_channel_mode = ARRAY_SIZE(alc883_sixstack_modes),
+               .channel_mode = alc883_sixstack_modes,
+               .input_mux = &alc883_capture_source,
+       }
+
 };
 
 
-- 
1.4.1


-- 
Daniel T. Chen            crimsun@xxxxxxxxxx
GPG key:  0xC88ABDA3

Attachment: pgpuAzbca5XM6.pgp
Description: PGP signature


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
audio.irate.dev...    yellowdog.gener...    ietf.ips/2002-0...    xfree86.fonts/2...    busybox/2003-07...    emacs.jdee/2004...    linux.mandrake....    hardware.microc...    user-groups.lin...    science.analysi...    version-control...    db.filemaker.de...    cluster.openmos...    mail.eyebrowse....    text.xml.xerces...    kde.devel.kwrit...    finance.moneyda...    gcc.regression/...    network.routing...    os.freebsd.deve...    recreation.radi...    qnx.openqnx.dev...    python.xml/2002...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe