Skip to contentSkip to conversation

Patch: Add support for Medion laptops.

PATCH Tobin Davis 4 participants 7 messages Oct 12, 2006 – Oct 13, 2006

lore
Share & tools
lore
#0 lore raw

Summary: Add support for Medion laptops

Description:
This patch adds audio support for Medion's line of laptops, based on code shipped with the laptops. Microphone support is still being explored.

Signed off by:

Signature · 1 line
Tobin Davis <[email protected]>
alsa-kernel/pci/hda/patch_realtek.c renamed from alsa-kernel/pci/hda/patch_realtek.c.orig +53 -1
@@ -112,6 +112,7 @@
 	ALC883_6ST_DIG,
 	ALC888_DEMO_BOARD,
 	ALC883_ACER,
+	ALC883_MEDION,
 	ALC883_AUTO,
 	ALC883_MODEL_LAST,
 };
@@ -4309,7 +4310,7 @@
 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},
 	{ } 
 };
 
@@ -4875,6 +4876,41 @@
 	{ } /* 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 struct snd_kcontrol_new alc883_chmode_mixer[] = {
 	{
 		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
@@ -5080,6 +5116,8 @@
 	  .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 },
 	{}
 };
@@ -5167,6 +5205,20 @@
 		.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,
+	}
+
 };
 
 

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

#1 lore raw

At Thu, 12 Oct 2006 12:27:49 -0700,

Quoted 7 lines · Tobin Davis

Summary: Add support for Medion laptops

Description:
This patch adds audio support for Medion's line of laptops, based on code shipped with the laptops. Microphone support is still being explored.

Don't forget to add the model entry in ALSA-Configuration.txt, too. Otherwise it looks fine.

Thanks,

Takashi

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

#2 lore raw
Quoted 5 lines · Takashi Iwai

At Thu, 12 Oct 2006 12:27:49 -0700,

Quoted 3 lines · Tobin Davis

Summary: Add support for Medion laptops

Quoted 7 lines
Quoted 4 lines

Description:
This patch adds audio support for Medion's line of laptops, based on code shipped with the laptops. Microphone support is still being explored.

Don't forget to add the model entry in ALSA-Configuration.txt, too. Otherwise it looks fine.

Done. I added it to the original patch.

Signature · 1 line
Tobin Davis <[email protected]>
alsa-kernel/pci/hda/patch_realtek.c renamed from alsa-kernel/pci/hda/patch_realtek.c.orig +53 -1
@@ -112,6 +112,7 @@
 	ALC883_6ST_DIG,
 	ALC888_DEMO_BOARD,
 	ALC883_ACER,
+	ALC883_MEDION,
 	ALC883_AUTO,
 	ALC883_MODEL_LAST,
 };
@@ -4309,7 +4310,7 @@
 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},
 	{ } 
 };
 
@@ -4875,6 +4876,41 @@
 	{ } /* 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 struct snd_kcontrol_new alc883_chmode_mixer[] = {
 	{
 		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
@@ -5080,6 +5116,8 @@
 	  .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 },
 	{}
 };
@@ -5167,6 +5205,20 @@
 		.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,
+	}
+
 };
 
 
alsa-kernel/Documentation/ALSA-Configuration.txt renamed from alsa-kernel/Documentation/ALSA-Configuration.txt~ +1 -0
@@ -822,6 +822,7 @@
 	  3stack-6ch-dig 3-jack 6-channel with SPDIF I/O
 	  6stack-dig-demo  6-jack digital for Intel demo board
 	  acer		Acer laptops (Travelmate 3012WTMi, Aspire 5600, etc)
+	  medion	Medion Laptops
 	  auto		auto-config reading BIOS (default)
 
 	ALC861/660

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

#3 lore raw

At Thu, 12 Oct 2006 13:04:58 -0700,

Quoted 8 lines · Tobin Davis

[1 <text/plain (7bit)>]

Quoted 5 lines · Takashi Iwai

At Thu, 12 Oct 2006 12:27:49 -0700,

Quoted 3 lines · Tobin Davis

Summary: Add support for Medion laptops

Quoted 8 lines
Quoted 7 lines
Quoted 4 lines

Description:
This patch adds audio support for Medion's line of laptops, based on code shipped with the laptops. Microphone support is still being explored.

Don't forget to add the model entry in ALSA-Configuration.txt, too. Otherwise it looks fine.

Done. I added it to the original patch.

Thanks. Applied to HG tree now.

Takashi

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

#4 lore raw

Hi,

Sorry, I've been quite busy these days.
I'm sorry to say that the last HG tree doesn't work for my Medion laptop. This is strange because I seem to have the same laptop as albox and Andrew, and it works for them! But I tried last Tobin's patch which didn't work, and the last HG tree does the same. The effect is as usual: it seems to work, but no sound. I tried again my hack to be sure, and this one's still working. With the HG tree, I'm still having these xruns that I don't have with the hacked tree. I tried to use the last alsa-lib, but with no more success.

Andrew & albox: are you doing something special?

Remy

Quoted 24 lines · Takashi Iwai

At Thu, 12 Oct 2006 13:04:58 -0700,

Quoted 8 lines · Tobin Davis

[1 <text/plain (7bit)>]

Quoted 5 lines · Takashi Iwai

At Thu, 12 Oct 2006 12:27:49 -0700,

Quoted 3 lines · Tobin Davis

Summary: Add support for Medion laptops

Quoted 8 lines
Quoted 7 lines
Quoted 4 lines

Description:
This patch adds audio support for Medion's line of laptops, based on code shipped with the laptops. Microphone support is still being explored.

Don't forget to add the model entry in ALSA-Configuration.txt, too. Otherwise it looks fine.

Done. I added it to the original patch.

Thanks. Applied to HG tree now.

Takashi

Quoted 9 lines

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

#5 lore raw

Double check to see if you have any "model=" lines in your modprobe file. Also, compile with "--with-debug=detect", load the driver, and post the output from "dmesg" & "cat /proc/asound/card0/codec#*".

I noticed that Takashi fixed a missing comma in my patch in the alc883_cfg_tbl, at the end of the MEDION line (thanks, Takashi). Make sure that you have this correction.

Tobin

Quoted 49 lines · Remy Bruno

Hi,

Sorry, I've been quite busy these days.
I'm sorry to say that the last HG tree doesn't work for my Medion laptop. This is strange because I seem to have the same laptop as albox and Andrew, and it works for them! But I tried last Tobin's patch which didn't work, and the last HG tree does the same. The effect is as usual: it seems to work, but no sound. I tried again my hack to be sure, and this one's still working. With the HG tree, I'm still having these xruns that I don't have with the hacked tree. I tried to use the last alsa-lib, but with no more success.

Andrew & albox: are you doing something special?

Remy

Quoted 33 lines · Takashi Iwai

At Thu, 12 Oct 2006 13:04:58 -0700,

Quoted 8 lines · Tobin Davis

[1 <text/plain (7bit)>]

Quoted 5 lines · Takashi Iwai

At Thu, 12 Oct 2006 12:27:49 -0700,

Quoted 3 lines · Tobin Davis

Summary: Add support for Medion laptops

Quoted 8 lines
Quoted 7 lines
Quoted 4 lines

Description:
This patch adds audio support for Medion's line of laptops, based on code shipped with the laptops. Microphone support is still being explored.

Don't forget to add the model entry in ALSA-Configuration.txt, too. Otherwise it looks fine.

Done. I added it to the original patch.

Thanks. Applied to HG tree now.

Takashi

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

Signature · 8 lines
Tobin Davis <[email protected]>


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
#6 lore raw
Quoted 3 lines · Tobin Davis

Double check to see if you have any "model=" lines in your modprobe file. Also, compile with "--with-debug=detect", load the driver, and post the output from "dmesg" & "cat /proc/asound/card0/codec#*".

btw, if model is overriden by a parameter, the driver should just print that info (eg: "model overriden by user: XXX") so that this could be guessed from dmesg output and help some lost end users.

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642