Skip to contentSkip to conversation

HDA: CLFE DAC on ALC889 (Acer Aspire 8930G)

PATCH Hector Martin 2 participants 4 messages Dec 3, 2008 – Dec 7, 2008

lore
Share & tools
lore
#0 lore raw

I've been trying to get ALSA working with this laptop. So far the attached patch adds rear support to the existing 4930g model, and tries to add CLFE support. However, I haven't been able to get CLFE to work. I don't seem to get any audio through DACs/mixers other than the first two (front and rear).

I can assign the CLFE output (pin 0x16) to the front or rear DAC and hear the front audio through the CLFE speakers. I can also force the front DAC (0x02) or rear DAC (0x03) to use the CLFE stream and hear it through the front or rear speakers, so the audio is getting to the codec. But either DACs 0x04 and 0x05 aren't working, or their associated mixers (0x0e and 0x0f) aren't passing through the audio, or the OUT pins don't like selections above 1. I've checked that they're unmuted and that the volumes are turned up on both. I've also tried the 0x25->0x26 DAC/mixer auxiliary pathway, which doesn't work either.

Here's what the relevant NIDs correspond to:
0x02 - (normally) Front DAC
0x03 - (normally) Rear DAC
0x04 - (normally) CLFE DAC
0x05 - (presumably) side DAC (no side speakers)

0x0c - (normally) Front mixer
0x0d - (normally) Rear mixer
0x0e - (normally) CLFE mixer
0x0f - (presumably) side mixer

0x14 - Front speakers pin
0x15 - Headphones pin (also EAPD for speaker amp)
0x16 - CLFE speakers pin
0x1b - Rear speakers pin

Here's what the codec graph looks like:
http://marcansoft.com/transf/codec.png

Any ideas? I'm pretty stumped here. Are there any other magic bits to enable the remaining DACs or mixers?

Signature · 2 lines
Hector Martin ([email protected])
Public Key: http://www.marcansoft.com/marcan.asc
Quoted 1 line

From 8aaa46dfda9b7c0ab19021532750adb03ded877e Mon Sep 17 00:00:00 2001

From: Hector Martin <[email protected]>
Date: Wed, 3 Dec 2008 01:50:49 +0100
Subject: [PATCH - snd-intel-hda 1/1] Add partial 8930G support

pci/hda/patch_realtek.c +18 -1
index 4afa0c9..6d6e06a 100644
@@ -1302,7 +1302,7 @@ static struct hda_verb alc888_acer_aspire_4930g_verbs[] = {
 	{0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0xb)},
 /* Enable unsolicited event for HP jack */
 	{0x15, AC_VERB_SET_UNSOLICITED_ENABLE, ALC880_HP_EVENT | AC_USRSP_EN},
-/* Connect Internal HP to front */
+/* Connect Front speakers to front */
 	{0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
 	{0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
 	{0x14, AC_VERB_SET_CONNECT_SEL, 0x00},
@@ -1310,6 +1310,16 @@ static struct hda_verb alc888_acer_aspire_4930g_verbs[] = {
 	{0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
 	{0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
 	{0x15, AC_VERB_SET_CONNECT_SEL, 0x00},
+/* Connect Rear speakers to rear */
+	{0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
+	{0x1b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
+	{0x1b, AC_VERB_SET_CONNECT_SEL, 0x01},
+/* Connect CLFE speakers to CLFE */
+	{0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
+	{0x16, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
+	{0x16, AC_VERB_SET_CONNECT_SEL, 0x02},
+/* Set EAPD to enable speakers */
+	{0x15, AC_VERB_SET_EAPD_BTLENABLE, 0x02},
 	{ }
 };
 
@@ -1365,8 +1375,15 @@ static void alc888_acer_aspire_4930g_automute(struct hda_codec *codec)
 	present = snd_hda_codec_read(codec, 0x15, 0,
 				     AC_VERB_GET_PIN_SENSE, 0) & 0x80000000;
 	bits = present ? HDA_AMP_MUTE : 0;
+	/* Front */
 	snd_hda_codec_amp_stereo(codec, 0x14, HDA_OUTPUT, 0,
 				 HDA_AMP_MUTE, bits);
+	/* CLFE */
+	snd_hda_codec_amp_stereo(codec, 0x16, HDA_OUTPUT, 0,
+				 HDA_AMP_MUTE, bits);
+	/* Rear */
+	snd_hda_codec_amp_stereo(codec, 0x1b, HDA_OUTPUT, 0,
+				 HDA_AMP_MUTE, bits);
 }
 
 static void alc888_acer_aspire_4930g_unsol_event(struct hda_codec *codec,
Signature · 1 line
1.5.6.4

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#1 lore raw

At Wed, 03 Dec 2008 01:59:14 +0100,

Quoted 7 lines · Hector Martin

I've been trying to get ALSA working with this laptop. So far the attached patch adds rear support to the existing 4930g model, and tries to add CLFE support. However, I haven't been able to get CLFE to work. I don't seem to get any audio through DACs/mixers other than the first two (front and rear).

Quoted 7 lines

I can assign the CLFE output (pin 0x16) to the front or rear DAC and hear the front audio through the CLFE speakers. I can also force the front DAC (0x02) or rear DAC (0x03) to use the CLFE stream and hear it through the front or rear speakers, so the audio is getting to the codec. But either DACs 0x04 and 0x05 aren't working, or their associated mixers (0x0e and 0x0f) aren't passing through the audio, or the OUT pins don't like selections above 1.

Did you change "Channel Mode" setting?

The only concern with your change is the possible incompatibility with the existing 4930g model. If the pin mapping is identical, then it's fine to change the existing code. If not, it'd be safer to create a new model preset.

thanks,

Takashi

#2 lore raw
Quoted 1 line · Takashi Iwai

Did you change "Channel Mode" setting?

Yes, of course.

Quoted 4 lines

The only concern with your change is the possible incompatibility with the existing 4930g model. If the pin mapping is identical, then it's fine to change the existing code. If not, it'd be safer to create a new model preset.

Right. I'm just adding new output pin configurations, so there's a good chance that it can be unified with the existing 4930g model. Someone would have to test it on 4930g to make sure it doesn't break anything though.

Signature · 2 lines
Hector Martin ([email protected])
Public Key: http://www.marcansoft.com/marcan.asc
#3 lore raw
In reply to Takashi Iwai

Spent another couple hours tinkering, but still nothing. I've dumped out all GET requests for the DAC nids and the mixer nids. No difference between the working ones and the nonworking ones (other than the StreamID). Argh.

I hope this doesn't have anything to do with that stupid undocumented "decryption module" that Realtek puts in front of the DACs.

Does Realtek usually handle queries about these things? Maybe I should fire them an e-mail and see if they can provide any suggestions.

Signature · 2 lines
Hector Martin ([email protected])
Public Key: http://www.marcansoft.com/marcan.asc