Revision: 691
http://svn.sourceforge.net/hackndev/?rev=691&view=rev
Author: holger_bocklet
Date: 2006-12-02 11:44:15 -0800 (Sat, 02 Dec 2006)
Log Message:
-----------
headphone mixer control for ucb1400, backport from alsa 1.0.12, kernel 2.6.18
Modified Paths:
--------------
linux4palm/linux/trunk/sound/pci/ac97/ac97_codec.c
linux4palm/linux/trunk/sound/pci/ac97/ac97_patch.c
linux4palm/linux/trunk/sound/pci/ac97/ac97_patch.h
Modified: linux4palm/linux/trunk/sound/pci/ac97/ac97_codec.c
===================================================================
--- linux4palm/linux/trunk/sound/pci/ac97/ac97_codec.c 2006-12-02 17:02:45 UTC (rev 690)
+++ linux4palm/linux/trunk/sound/pci/ac97/ac97_codec.c 2006-12-02 19:44:15 UTC (rev 691)
@@ -151,7 +151,7 @@
{ 0x4e534300, 0xffffffff, "LM4540,43,45,46,48", NULL, NULL }, // only guess --jk
{ 0x4e534331, 0xffffffff, "LM4549", NULL, NULL },
{ 0x4e534350, 0xffffffff, "LM4550", patch_lm4550, NULL }, // volume wrap fix
-{ 0x50534304, 0xffffffff, "UCB1400", NULL, NULL },
+{ 0x50534304, 0xffffffff, "UCB1400", patch_ucb1400, NULL },
{ 0x53494c20, 0xffffffe0, "Si3036,8", mpatch_si3036, mpatch_si3036, AC97_MODEM_PATCH },
{ 0x54524102, 0xffffffff, "TR28022", NULL, NULL },
{ 0x54524106, 0xffffffff, "TR28026", NULL, NULL },
Modified: linux4palm/linux/trunk/sound/pci/ac97/ac97_patch.c
===================================================================
--- linux4palm/linux/trunk/sound/pci/ac97/ac97_patch.c 2006-12-02 17:02:45 UTC (rev 690)
+++ linux4palm/linux/trunk/sound/pci/ac97/ac97_patch.c 2006-12-02 19:44:15 UTC (rev 691)
@@ -2855,3 +2855,33 @@
ac97->res_table = lm4550_restbl;
return 0;
}
+
+/*
+ * UCB1400 codec
+ */
+static const struct snd_kcontrol_new snd_ac97_controls_ucb1400[] = {
+AC97_SINGLE("Headphone Driver", 0x6a, 6, 1, 0),
+AC97_SINGLE("DC Filter", 0x6a, 4, 1, 0),
+AC97_SINGLE("Smart Power Mode", 0x6c, 4, 3, 0),
+};
+
+static int patch_ucb1400_specific(struct snd_ac97 * ac97)
+{
+ int idx, err;
+ for (idx = 0; idx < ARRAY_SIZE(snd_ac97_controls_ucb1400); idx++)
+ if ((err = snd_ctl_add(ac97->bus->card, snd_ctl_new1(&snd_ac97_controls_ucb1400[idx], ac97))) < 0)
+ return err;
+ return 0;
+}
+
+static struct snd_ac97_build_ops patch_ucb1400_ops = {
+ .build_specific = patch_ucb1400_specific,
+};
+
+int patch_ucb1400(struct snd_ac97 * ac97)
+{
+ ac97->build_ops = &patch_ucb1400_ops;
+ snd_ac97_write(ac97, 0x6a, 0x0050);
+ snd_ac97_write(ac97, 0x6c, 0x0030);
+ return 0;
+}
Modified: linux4palm/linux/trunk/sound/pci/ac97/ac97_patch.h
===================================================================
--- linux4palm/linux/trunk/sound/pci/ac97/ac97_patch.h 2006-12-02 17:02:45 UTC (rev 690)
+++ linux4palm/linux/trunk/sound/pci/ac97/ac97_patch.h 2006-12-02 19:44:15 UTC (rev 691)
@@ -58,5 +58,6 @@
int patch_vt1616(struct snd_ac97 * ac97);
int patch_vt1617a(struct snd_ac97 * ac97);
int patch_it2646(struct snd_ac97 * ac97);
+int patch_ucb1400(struct snd_ac97 * ac97);
int mpatch_si3036(struct snd_ac97 * ac97);
int patch_lm4550(struct snd_ac97 * ac97);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|