alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* HDA:  Add support for Acer Aspire laptops.
@ 2007-08-06 20:29 Tobin Davis
  2007-08-07 10:18 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Tobin Davis @ 2007-08-06 20:29 UTC (permalink / raw)
  To: ALSA Developers, Takashi Iwai

[-- Attachment #1: Type: text/plain, Size: 259 bytes --]

This patch adds support for some Acer Aspire systems.


Signed off by Tobin Davis <tdavis@dsl-only.net>

I was actually sent this patch by someone on IRC.  They approved for it
to be submitted, and I don't see anything in the code to cause it to be
kept out.

[-- Attachment #2: acer-aspire.patch --]
[-- Type: text/x-patch, Size: 3949 bytes --]

diff -urN alsa-driver-1.0.14.orig/alsa-kernel/pci/hda/patch_realtek.c alsa-driver-1.0.14/alsa-kernel/pci/hda/patch_realtek.c
--- alsa-driver-1.0.14.orig/alsa-kernel/pci/hda/patch_realtek.c	2007-06-04 09:28:54.000000000 +0200
+++ alsa-driver-1.0.14/alsa-kernel/pci/hda/patch_realtek.c	2007-07-25 17:41:40.000000000 +0200
@@ -157,6 +157,7 @@
 	ALC883_TARGA_DIG,
 	ALC883_TARGA_2ch_DIG,
 	ALC883_ACER,
+	ALC883_ACER_ASPIRE,
 	ALC883_MEDION,
 	ALC883_MEDION_MD2,	
 	ALC883_LAPTOP_EAPD,
@@ -5995,6 +5996,33 @@
 	{ } /* end */
 };	
 
+static struct snd_kcontrol_new alc883_acer_aspire_mixer[] = {
+	HDA_CODEC_VOLUME("Front Playback Volume", 0x0d, 0x0, HDA_OUTPUT),
+	HDA_CODEC_MUTE("Front Playback Switch", 0x15, 0x0, HDA_OUTPUT),
+	HDA_CODEC_VOLUME("Headphone Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
+	HDA_CODEC_MUTE("Headphone Playback Switch", 0x14, 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("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
+	HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, 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("Capture Volume", 0x08, 0x0, HDA_INPUT),
+	HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT),
+	HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x09, 0x0, HDA_INPUT),
+	HDA_CODEC_MUTE_IDX("Capture Switch", 1, 0x09, 0x0, HDA_INPUT),
+	{
+		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+		/* .name = "Capture Source", */
+		.name = "Input Source",
+		.count = 2,
+		.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,
@@ -6176,6 +6204,18 @@
 	{ } /* end */
 };
 
+static struct hda_verb alc883_acer_aspire_verbs[] = {
+	{0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
+	{0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
+	{0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
+	{0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
+
+	{0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
+
+	{0x14, AC_VERB_SET_UNSOLICITED_ENABLE, ALC880_HP_EVENT | AC_USRSP_EN},
+	{ } /* end */
+};
+
 /* toggle speaker-output according to the hp-jack state */
 static void alc883_medion_md2_automute(struct hda_codec *codec)
 {
@@ -6362,6 +6402,7 @@
 	[ALC883_TARGA_DIG]	= "targa-dig",
 	[ALC883_TARGA_2ch_DIG]	= "targa-2ch-dig",
 	[ALC883_ACER]		= "acer",
+	[ALC883_ACER_ASPIRE]	= "acer-aspire",
 	[ALC883_MEDION]		= "medion",
 	[ALC883_MEDION_MD2]	= "medion-md2",
 	[ALC883_LAPTOP_EAPD]	= "laptop-eapd",
@@ -6392,6 +6433,7 @@
 	SND_PCI_QUIRK(0x1462, 0x4319, "MSI", ALC883_TARGA_DIG),
 	SND_PCI_QUIRK(0x1462, 0x4324, "MSI", ALC883_TARGA_DIG),
 	SND_PCI_QUIRK(0x1462, 0xa422, "MSI", ALC883_TARGA_2ch_DIG),
+	SND_PCI_QUIRK(0x1025, 0x0110, "Acer Aspire", ALC883_ACER_ASPIRE),
 	SND_PCI_QUIRK(0x1025, 0, "Acer laptop", ALC883_ACER),
 	SND_PCI_QUIRK(0x15d9, 0x8780, "Supermicro PDSBA", ALC883_3ST_6ch),
 	SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_MEDION),
@@ -6503,6 +6545,20 @@
 		.channel_mode = alc883_3ST_2ch_modes,
 		.input_mux = &alc883_capture_source,
 	},
+	[ALC883_ACER_ASPIRE] = {
+		.mixers = { alc883_acer_aspire_mixer},
+		.init_verbs = { alc883_init_verbs, alc883_acer_aspire_verbs},
+		.num_dacs = ARRAY_SIZE(alc883_dac_nids),
+		.dac_nids = alc883_dac_nids,
+		.dig_out_nid = ALC883_DIGOUT_NID,
+		.num_adc_nids = ARRAY_SIZE(alc883_adc_nids),
+		.adc_nids = alc883_adc_nids,
+		.num_channel_mode = ARRAY_SIZE(alc883_3ST_2ch_modes),
+		.channel_mode = alc883_3ST_2ch_modes,
+		.input_mux = &alc883_capture_source,
+		.unsol_event = alc883_medion_md2_unsol_event,
+		.init_hook = alc883_medion_md2_automute,
+	},	
 	[ALC883_MEDION] = {
 		.mixers = { alc883_fivestack_mixer,
 			    alc883_chmode_mixer },

[-- Attachment #3: Type: text/plain, Size: 160 bytes --]

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: HDA:  Add support for Acer Aspire laptops.
  2007-08-06 20:29 HDA: Add support for Acer Aspire laptops Tobin Davis
@ 2007-08-07 10:18 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2007-08-07 10:18 UTC (permalink / raw)
  To: Tobin Davis; +Cc: ALSA Developers

At Mon, 06 Aug 2007 13:29:04 -0700,
Tobin Davis wrote:
> 
> This patch adds support for some Acer Aspire systems.
> 
> Signed off by Tobin Davis <tdavis@dsl-only.net>                                       

Applied, thanks.

> I was actually sent this patch by someone on IRC.  They approved for it to be
> submitted, and I don't see anything in the code to cause it to be kept out.

I guess there are lots of other unmerged fixes.  People tend to paste
on blogs or forums, but unfortunately, many of them aren't sent back
to the upstream.

If any of you know of such patches, just let us know.


Takashi

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-08-07 10:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-06 20:29 HDA: Add support for Acer Aspire laptops Tobin Davis
2007-08-07 10:18 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).