[alsa-devel] Patch for ALC882
So after many months of wrestling with Realtek's technical support, I finally managed to get all four of my speakers to work in my ASUS A7J laptop. The patch was intended to replace alsa-kernel/pci/hda/patch_realtek.c in 1.0.14rc4 and that was the last version I successfully tested it on. Since then, I haven't managed to get all four speaker to work. I am not sure why Realtek never posted this patch, but I figured that perhaps some of the ALSA brains might be able to make sense of it and integrate properly into HEAD.
At Mon, 14 Jan 2008 17:48:34 -0800, Kip Warner wrote:
So after many months of wrestling with Realtek's technical support, I finally managed to get all four of my speakers to work in my ASUS A7J laptop. The patch was intended to replace alsa-kernel/pci/hda/patch_realtek.c in 1.0.14rc4 and that was the last version I successfully tested it on. Since then, I haven't managed to get all four speaker to work. I am not sure why Realtek never posted this patch, but I figured that perhaps some of the ALSA brains might be able to make sense of it and integrate properly into HEAD.
Could you make a diff against your base-version (1.0.14rc4, I suppose)? Otherwise it's hard to know what is your addition.
Thanks,
Takashi
On Tue, 2008-01-15 at 11:11 +0100, Takashi Iwai wrote:
Could you make a diff against your base-version (1.0.14rc4, I suppose)? Otherwise it's hard to know what is your addition.
Thanks,
Takashi
I generated it with the following. Hopefully I remembered to do it right.
$ diff -u alsa-driver-1.0.14/alsa-kernel/pci/hda/patch_realtek.c patch_realtek.c > /home/kip/Desktop/Realtek.patch
At Tue, 15 Jan 2008 14:07:08 -0800, Kip Warner wrote:
On Tue, 2008-01-15 at 11:11 +0100, Takashi Iwai wrote:
Could you make a diff against your base-version (1.0.14rc4, I suppose)? Otherwise it's hard to know what is your addition.
Thanks,
Takashi
I generated it with the following. Hopefully I remembered to do it right.
$ diff -u alsa-driver-1.0.14/alsa-kernel/pci/hda/patch_realtek.c patch_realtek.c > /home/kip/Desktop/Realtek.patch
I'm afraid that you did something wrong. As you can see, this patch is simply a complete replacement. Maybe you changed EOL to DOS style?
Takashi
On Wed, 2008-01-16 at 13:08 +0100, Takashi Iwai wrote:
I'm afraid that you did something wrong. As you can see, this patch is simply a complete replacement. Maybe you changed EOL to DOS style?
Takashi
Sorry about that. I am pretty sure I did it right this time with --strip-trailing-cr.
On Wed, 2008-01-16 at 13:08 +0100, Takashi Iwai wrote:
Sorry to bother you again Takashi, but did my Realtek patch ever get merged into mainline?
At Thu, 17 Jan 2008 19:00:27 -0800, Kip Warner wrote:
On Wed, 2008-01-16 at 13:08 +0100, Takashi Iwai wrote:
Sorry to bother you again Takashi, but did my Realtek patch ever get merged into mainline?
Not yet. You mixed up many things in your patch. So it cannot be applied as is. I need to sort out the real fix in the patch at first.
Takashi
On Fri, 2008-01-18 at 07:52 +0100, Takashi Iwai wrote:
Not yet. You mixed up many things in your patch. So it cannot be applied as is. I need to sort out the real fix in the patch at first.
Takashi
If it makes any difference, the latest nightly works just fine as is with my card. Also, the Realtek developer who made the patch can be reached at pshou pshou AT realtek.com.tw.
At Thu, 17 Jan 2008 23:05:24 -0800, Kip Warner wrote:
On Fri, 2008-01-18 at 07:52 +0100, Takashi Iwai wrote:
Not yet. You mixed up many things in your patch. So it cannot be applied as is. I need to sort out the real fix in the patch at first.
Takashi
If it makes any difference, the latest nightly works just fine as is with my card. Also, the Realtek developer who made the patch can be reached at pshou pshou AT realtek.com.tw.
The necessary changes are likely only what's in the below. Could you try it with the latest HG version, or the latest daily snapshot tarball?
Takashi
diff -r 1cb5fe1b2443 pci/hda/patch_realtek.c --- a/pci/hda/patch_realtek.c Thu Jan 17 17:44:49 2008 +0100 +++ b/pci/hda/patch_realtek.c Fri Jan 18 08:28:15 2008 +0100 @@ -5645,7 +5645,9 @@ static struct hda_verb alc882_asus_a7j_v
{0x18, AC_VERB_SET_CONNECT_SEL, 0x02}, /* mic/clfe */ {0x1a, AC_VERB_SET_CONNECT_SEL, 0x01}, /* line/surround */ - {0x1b, AC_VERB_SET_CONNECT_SEL, 0x00}, /* HP */ + {0x1b, AC_VERB_SET_CONNECT_SEL, 0x00}, /* line */ + {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, + {0x1b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE}, { } /* end */ };
@@ -5969,7 +5971,8 @@ static struct alc_config_preset alc882_p [ALC882_ASUS_A7J] = { .mixers = { alc882_asus_a7j_mixer, alc882_chmode_mixer, alc882_capture_mixer }, - .init_verbs = { alc882_init_verbs, alc882_asus_a7j_verbs}, + .init_verbs = { alc882_init_verbs, alc882_asus_a7j_verbs, + alc880_gpio1_init_verbs }, .num_dacs = ARRAY_SIZE(alc882_dac_nids), .dac_nids = alc882_dac_nids, .dig_out_nid = ALC882_DIGOUT_NID,
On Fri, 2008-01-18 at 11:00 +0100, Takashi Iwai wrote:
The necessary changes are likely only what's in the below. Could you try it with the latest HG version, or the latest daily snapshot tarball?
Takashi
diff -r 1cb5fe1b2443 pci/hda/patch_realtek.c --- a/pci/hda/patch_realtek.c Thu Jan 17 17:44:49 2008 +0100 +++ b/pci/hda/patch_realtek.c Fri Jan 18 08:28:15 2008 +0100 @@ -5645,7 +5645,9 @@ static struct hda_verb alc882_asus_a7j_v
{0x18, AC_VERB_SET_CONNECT_SEL, 0x02}, /* mic/clfe */ {0x1a, AC_VERB_SET_CONNECT_SEL, 0x01}, /* line/surround */
- {0x1b, AC_VERB_SET_CONNECT_SEL, 0x00}, /* HP */
- {0x1b, AC_VERB_SET_CONNECT_SEL, 0x00}, /* line */
- {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
- {0x1b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE}, { } /* end */
};
@@ -5969,7 +5971,8 @@ static struct alc_config_preset alc882_p [ALC882_ASUS_A7J] = { .mixers = { alc882_asus_a7j_mixer, alc882_chmode_mixer, alc882_capture_mixer },
.init_verbs = { alc882_init_verbs, alc882_asus_a7j_verbs},
.init_verbs = { alc882_init_verbs, alc882_asus_a7j_verbs,
.num_dacs = ARRAY_SIZE(alc882_dac_nids), .dac_nids = alc882_dac_nids, .dig_out_nid = ALC882_DIGOUT_NID,alc880_gpio1_init_verbs },
I just applied your patch against the latest alsa-driver-hg20080120 bzip'd tarball. I tried it both with and without the patch and both ways produce proper four speaker sound. Please let me know if I can be of any further assistance.
At Sun, 20 Jan 2008 18:04:07 -0800, Kip Warner wrote:
On Fri, 2008-01-18 at 11:00 +0100, Takashi Iwai wrote:
The necessary changes are likely only what's in the below. Could you try it with the latest HG version, or the latest daily snapshot tarball?
Takashi
diff -r 1cb5fe1b2443 pci/hda/patch_realtek.c --- a/pci/hda/patch_realtek.c Thu Jan 17 17:44:49 2008 +0100 +++ b/pci/hda/patch_realtek.c Fri Jan 18 08:28:15 2008 +0100 @@ -5645,7 +5645,9 @@ static struct hda_verb alc882_asus_a7j_v
{0x18, AC_VERB_SET_CONNECT_SEL, 0x02}, /* mic/clfe */ {0x1a, AC_VERB_SET_CONNECT_SEL, 0x01}, /* line/surround */
- {0x1b, AC_VERB_SET_CONNECT_SEL, 0x00}, /* HP */
- {0x1b, AC_VERB_SET_CONNECT_SEL, 0x00}, /* line */
- {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
- {0x1b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE}, { } /* end */
};
@@ -5969,7 +5971,8 @@ static struct alc_config_preset alc882_p [ALC882_ASUS_A7J] = { .mixers = { alc882_asus_a7j_mixer, alc882_chmode_mixer, alc882_capture_mixer },
.init_verbs = { alc882_init_verbs, alc882_asus_a7j_verbs},
.init_verbs = { alc882_init_verbs, alc882_asus_a7j_verbs,
.num_dacs = ARRAY_SIZE(alc882_dac_nids), .dac_nids = alc882_dac_nids, .dig_out_nid = ALC882_DIGOUT_NID,alc880_gpio1_init_verbs },
I just applied your patch against the latest alsa-driver-hg20080120 bzip'd tarball. I tried it both with and without the patch and both ways produce proper four speaker sound. Please let me know if I can be of any further assistance.
Hm, so do you mean that the HG version works as is even without the patch above? To be sure, try to reboot in both cases.
Takashi
On Mon, 2008-01-21 at 12:22 +0100, Takashi Iwai wrote:
Hm, so do you mean that the HG version works as is even without the patch above? To be sure, try to reboot in both cases.
Takashi
Granted I didn't reboot, but I am pretty confident that I had rmmod'd the old driver, /etc/init.d/alsasound stop, sudo make install, cp module to new ubuntu modules location (not sure why they have their modules in a different location - but they do).
On Mon, 2008-01-21 at 12:22 +0100, Takashi Iwai wrote:
Hm, so do you mean that the HG version works as is even without the patch above? To be sure, try to reboot in both cases.
Takashi
Oh, and I forgot. Yes, it worked in the HG version without the patch (and with it).
participants (2)
-
Kip Warner
-
Takashi Iwai