hda-intel, ALC861 and Asus A6rp laptop - problem with headphones almost solved
Hi!
Alsa: 1.0.13rc2
Kernel: 2.6.17.11
Linux: Ubuntu 6.06 Dapper Drake
Laptop: Asus A6rp-ap002
Sound chpset: ALC861
I was working on patch for Alsa, that could allow me and other owners of Asus A6rp laptop use headphones.
Here is bug whitch I posted some time ago:
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=2320
As I wrote in it the model=uniwill-m31 is working for me, but without headphones...
Few days ago I found free time to read output of codec#0 and find a solution for my problem.
In the attachement you can find codec#0 output and .patch file for patch_realtek.c.
Basically this file works, but not always.
After modyfing the file I typed this command in terminal in alsa-driver-1.0.13rc2 directory:
make && sudo make install && sleep 3 && sudo /etc/init.d/alsasound restart And the sound appeard in headphones and everything was working fine, even 6ch mode was working (built-in speakers, mic and line-in jacks as outputs, hp jack - silent(?) ).
To make the sound clear I had to mute in gnome volume manager line-in and cd-in.
The problem is that the sound was only to the next start of alsasound... Really don't know why...
I made few changes in patch_realtek.c, recompiled Alsa and undo changes and one more time recompiled Alsa and the sound was back again... Now, after reboot, there is no sound in headphones... And recompiling doesn't help...
Propably the sound will appear after (x)th compilation, but why? Why it is not working all the time?
And why the ALC861 is detected to be the ALC660?
Hope someone will help me 100% solve this problem.
Mariusz
P.S.
The new kernel 2.6.18 has been released. I'm going to try Alsa with it.
patch_realtek.c 2006-09-23 19:25:45.000000000 +0200 renamed from patch_realtek.c 2006-09-12 15:40:56.000000000 +0200 +157 -0
@@ -91,6 +91,7 @@ ALC861_3ST_DIG, ALC861_6ST_DIG, ALC861_UNIWILL_M31, + ALC861_ASUS_A6RP, ALC861_AUTO, ALC861_MODEL_LAST, };
@@ -6070,6 +6071,45 @@ { 4, alc861_uniwill_m31_ch4_init }, }; +/* Set mic1 and line-in as input and unmute the mixer */ +static struct hda_verb alc861_asus_a6rp_ch2_init[] = { + /* set pin widget 1Ah (line in) for input */ + { 0x0c, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x20 }, + /* set pin widget 18h (mic1/2) for input, for mic also enable the vref */ + { 0x0d, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24 }, + + { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0xb00c }, +#if 0 + { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x01 << 8)) }, /*mic*/ + { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x02 << 8)) }, /*line-in*/+#endif + { } /* end */ +}; +/* Set mic1 nad line-in as output and mute mixer */ +static struct hda_verb alc861_asus_a6rp_ch6_init[] = { + /* set pin widget 1Ah (line in) for output (Back Surround)*/ + { 0x0c, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40 }, +// { 0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE }, + /* set pin widget 18h (mic1) for output (CLFE)*/ + { 0x0d, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40 }, +// { 0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE }, + + { 0x0c, AC_VERB_SET_CONNECT_SEL, 0x00 }, + { 0x0d, AC_VERB_SET_CONNECT_SEL, 0x00 }, + + { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0xb080 }, +//#if 0 + { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, (0x7080 | (0x01 << 8)) }, /*mic*/ + { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, (0x7080 | (0x02 << 8)) }, /*line in*/+//#endif + { } /* end */ +}; + +static struct hda_channel_mode alc861_asus_a6rp_modes[2] = { + { 2, alc861_asus_a6rp_ch2_init }, + { 6, alc861_asus_a6rp_ch6_init }, +}; + /* patch-ALC861 */ static struct snd_kcontrol_new alc861_base_mixer[] = {
@@ -6188,6 +6228,48 @@ }, { } /* end */ }; + +static struct snd_kcontrol_new alc861_asus_a6rp_mixer[] = { + /* output mixer control */ + HDA_CODEC_MUTE("Front Playback Switch", 0x03, 0x0, HDA_OUTPUT), + HDA_CODEC_MUTE("Surround Playback Switch", 0x06, 0x0, HDA_OUTPUT), + HDA_CODEC_MUTE_MONO("Center Playback Switch", 0x05, 1, 0x0, HDA_OUTPUT),+ HDA_CODEC_MUTE_MONO("LFE Playback Switch", 0x05, 2, 0x0, HDA_OUTPUT), + /*HDA_CODEC_MUTE("Side Playback Switch", 0x04, 0x0, HDA_OUTPUT), */ + + /* Input mixer control */ + /* HDA_CODEC_VOLUME("Input Playback Volume", 0x15, 0x0, HDA_OUTPUT), + HDA_CODEC_MUTE("Input Playback Switch", 0x15, 0x0, HDA_OUTPUT), */ + HDA_CODEC_VOLUME("CD Playback Volume", 0x15, 0x0, HDA_INPUT), + HDA_CODEC_MUTE("CD Playback Switch", 0x15, 0x0, HDA_INPUT), + HDA_CODEC_VOLUME("Line Playback Volume", 0x15, 0x02, HDA_INPUT), + HDA_CODEC_MUTE("Line Playback Switch", 0x15, 0x02, HDA_INPUT), + HDA_CODEC_VOLUME("Mic Playback Volume", 0x15, 0x01, HDA_INPUT), + HDA_CODEC_MUTE("Mic Playback Switch", 0x15, 0x01, HDA_INPUT), + HDA_CODEC_MUTE("Front Mic Playback Switch", 0x10, 0x01, HDA_OUTPUT), + HDA_CODEC_MUTE("Headphone Playback Switch", 0x1a, 0x03, HDA_OUTPUT), // was HDA_INPUT(?) + + /* Capture mixer control */ + 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", + .count = 1, + .info = alc_mux_enum_info, + .get = alc_mux_enum_get, + .put = alc_mux_enum_put, + }, + { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "Channel Mode", + .info = alc_ch_mode_info, + .get = alc_ch_mode_get, + .put = alc_ch_mode_put, + .private_value = ARRAY_SIZE(alc861_asus_a6rp_modes), + }, + { } +}; /* * generic initialization of ADC, input mixers and output mixers
@@ -6377,6 +6459,68 @@ { } }; +static struct hda_verb alc861_asus_a6rp_init_verbs[] = { + /* + * Unmute ADC0 and set the default input to mic-in + */ + /* port-A for surround (rear panel) | according to codec#0 this is the HP jack*/ + { 0x0e, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc0 }, // was 0x00 + /* route front PCM to HP */ + //{ 0x0e, AC_VERB_SET_CONNECT_SEL, 0x01 }, + /* port-B for mic-in (rear panel) with vref */ + { 0x0d, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24 }, + /* port-C for line-in (rear panel) */ + { 0x0c, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x20 }, + /* port-D for Front */ + { 0x0b, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40 }, + { 0x0b, AC_VERB_SET_CONNECT_SEL, 0x00 }, + /* port-E for HP out (front panel) */ + { 0x0f, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24 }, // this has to be set to VREF80 + /* route front PCM to HP */ + { 0x0f, AC_VERB_SET_CONNECT_SEL, 0x01 }, + /* port-F for mic-in (front panel) with vref */ + { 0x10, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24 }, + /* port-G for CLFE (rear panel) */ + { 0x1f, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x00 }, + /* port-H for side (rear panel) */ + { 0x20, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x00 }, + /* CD-in */ + { 0x11, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x20 }, + /* route front mic to ADC1*/ + {0x08, AC_VERB_SET_CONNECT_SEL, 0x00}, + {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, + /* Unmute DAC0~3 & spdif out*/ + {0x03, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, + {0x04, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, + {0x05, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, + {0x06, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, + {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, + + /* Unmute Mixer 14 (mic) 1c (Line in)*/ + {0x014, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, + {0x014, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, + {0x01c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, + {0x01c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, + + /* Unmute Stereo Mixer 15 */ + {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, + {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, + {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(2)}, + {0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0xb00c }, //Output 0~12 step + + {0x16, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, + {0x16, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, + {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, + {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, + {0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, + {0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, + {0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, + {0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, + {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(3)}, // hp used DAC 3 (Front) + {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(2)}, + { } +}; + /* * generic initialization of ADC, input mixers and output mixers */
@@ -6714,6 +6858,9 @@ { .modelname = "uniwill-m31", .config = ALC861_UNIWILL_M31}, { .pci_subvendor = 0x1584, .pci_subdevice = 0x9072, .config = ALC861_UNIWILL_M31 }, + { .modelname = "asus-a6rp", .config = ALC861_ASUS_A6RP}, + { .pci_subvendor = 0x1043, .pci_subdevice = 0x1393, + .config = ALC861_ASUS_A6RP }, { .modelname = "auto", .config = ALC861_AUTO }, {} };
@@ -6781,6 +6928,19 @@ .adc_nids = alc861_adc_nids, .input_mux = &alc861_capture_source, }, + [ALC861_ASUS_A6RP] = { + .mixers = { alc861_asus_a6rp_mixer }, + .init_verbs = { alc861_asus_a6rp_init_verbs }, + .num_dacs = ARRAY_SIZE(alc861_dac_nids), + .dac_nids = alc861_dac_nids, + .dig_out_nid = ALC861_DIGOUT_NID, + .num_channel_mode = ARRAY_SIZE(alc861_asus_a6rp_modes), + .channel_mode = alc861_asus_a6rp_modes, + .need_dac_fix = 1, + .num_adc_nids = ARRAY_SIZE(alc861_adc_nids), + .adc_nids = alc861_adc_nids, + .input_mux = &alc861_capture_source, + }, };
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel
At Sat, 23 Sep 2006 20:08:23 +0200,
Quoted 24 lines · Mariusz Domanski
Hi!
Alsa: 1.0.13rc2
Kernel: 2.6.17.11
Linux: Ubuntu 6.06 Dapper Drake
Laptop: Asus A6rp-ap002
Sound chpset: ALC861I was working on patch for Alsa, that could allow me and other owners of Asus A6rp laptop use headphones.
Here is bug whitch I posted some time ago: https://bugtrack.alsa-project.org/alsa-bug/
view.php?id=2320
As I wrote in it the model=uniwill-m31 is working for me, but without headphones... Few days ago I found free time to read output of codec#0 and find a solution for my problem.
In the attachement you can find codec#0 output and .patch file forpatch_realtek.c. Basically this file works, but not always.
After modyfing the file I typed this command in terminal in alsa-driver-1.0.13rc2 directory:
make && sudo make install && sleep 3 && sudo/etc/init.d/alsasoundrestart And the sound appeard in headphones and everything was working fine, even 6ch mode was working (built-in speakers, mic and line-in jacks as outputs, hp jack - silent(?) ).
Quoted 8 lines
To make the sound clear I had to mute in gnome volume manager line-in and cd-in. The problem is that the sound was only to the next start of alsasound... Really don't know why...
I made few changes inpatch_realtek.c, recompiled Alsa and undo changes and one more time recompiled Alsa and the sound was back again...
Now, after reboot, there is no sound in headphones... And recompiling doesn't help... Propably the sound will appear after (x)th compilation, but why? Why it is not working all the time?
No idea. A weird hardware...
Quoted 1 line
And why the ALC861 is detected to be the ALC660?
Simply because they are almost compatible (according to Realtek).
Quoted 15 lines
patch_realtek.c 2006-09-23 19:25:45.000000000 +0200 renamed from patch_realtek.c 2006-09-12 15:40:56.000000000 +0200 +2
-0@@ -91,6 +91,7 @@ ALC861_3ST_DIG, ALC861_6ST_DIG, ALC861_UNIWILL_M31, + ALC861_ASUS_A6RP, ALC861_AUTO, ALC861_MODEL_LAST, };@@ -6070,6 +6071,45 @@ { 4, alc861_uniwill_m31_ch4_init }, }; +/* Set mic1 and line-in as input and unmute the mixer */
patch_realtek.c 2006-09-23 19:25:45.000000000 +0200 line 6084
Quoted 10 lines
patch_realtek.c 2006-09-23 19:25:45.000000000 +0200 renamed from patch_realtek.c 2006-09-12 15:40:56.000000000 +0200 +10
-0+static struct hda_verb alc861_asus_a6rp_ch2_init[] = { + /* set pin widget 1Ah (line in) for input */ + { 0x0c, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x20 }, + /* set pin widget 18h (mic1/2) for input, for mic also enable the vref */ + { 0x0d, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24 }, + + { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0xb00c }, +#if 0 + { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x01 << 8)) }, /*mic*/ + { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x02 << 8)) }, /*line-in*/+#endif
The patch looks broken. Could you regenerated it?
thanks,
Takashi
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
2006/9/25, Takashi Iwai <[email protected]>:
Quoted 17 lines
Quoted 2 lines
Quoted 2 lines
Propably the sound will appear after (x)th compilation, but why? Why it
is not working
Quoted 14 lines
Quoted 1 line
all the time?
No idea. A weird hardware...
Quoted 1 line
And why the ALC861 is detected to be the ALC660?
Simply because they are almost compatible (according to Realtek).
The patch looks broken. Could you regenerated it?
thanks,
Takashi
Here is patch (now I'll write it as a part of email):
patch_realtek.c 2006-09-23 19:25:45.000000000 +0200 renamed from patch_realtek.c 2006-09-12 15:40:56.000000000 +0200 +0 -0
@@ -91,6 +91,7 @@
ALC861_3ST_DIG,ALC861_6ST_DIG,ALC861_UNIWILL_M31,
+ ALC861_ASUS_A6RP,ALC861_AUTO,ALC861_MODEL_LAST,
};
@@ -6070,6 +6071,45 @@
{ 4, alc861_uniwill_m31_ch4_init },
};
+/* Set mic1 and line-in as input and unmute the mixer */ +static struct hda_verb alc861_asus_a6rp_ch2_init[] = {
+ /* set pin widget 1Ah (line in) for input */
+ { 0x0c, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x20 },
+ /* set pin widget 18h (mic1/2) for input, for mic also enable the vref */
+ { 0x0d, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24 },
+
+ { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0xb00c },
+#if 0
+ { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x01 << 8)) }, /*mic*/
+ { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x02 << 8)) }, /*line-in*/ +#endif
+ { } /* end */
+};
+/* Set mic1 nad line-in as output and mute mixer */
+static struct hda_verb alc861_asus_a6rp_ch6_init[] = {
+ /* set pin widget 1Ah (line in) for output (Back Surround)*/
+ { 0x0c, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40 },
+// { 0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE },
+ /* set pin widget 18h (mic1) for output (CLFE)*/
+ { 0x0d, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40 },
+// { 0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE },
+
+ { 0x0c, AC_VERB_SET_CONNECT_SEL, 0x00 },
+ { 0x0d, AC_VERB_SET_CONNECT_SEL, 0x00 },
+
+ { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0xb080 },
+//#if 0
+ { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, (0x7080 | (0x01 << 8)) }, /*mic*/
+ { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, (0x7080 | (0x02 << 8)) }, /*line in*/ +//#endif
+ { } /* end */
+};
+
+static struct hda_channel_mode alc861_asus_a6rp_modes[2] = {
+ { 2, alc861_asus_a6rp_ch2_init },
+ { 6, alc861_asus_a6rp_ch6_init },
+};
+
/* patch-ALC861 */
static struct snd_kcontrol_new alc861_base_mixer[] = {
@@ -6188,6 +6228,48 @@
},
{ } /* end */
};
+
+static struct snd_kcontrol_new alc861_asus_a6rp_mixer[] = {
+ /* output mixer control */
+ HDA_CODEC_MUTE("Front Playback Switch", 0x03, 0x0, HDA_OUTPUT),
+ HDA_CODEC_MUTE("Surround Playback Switch", 0x06, 0x0, HDA_OUTPUT),
+ HDA_CODEC_MUTE_MONO("Center Playback Switch", 0x05, 1, 0x0, HDA_OUTPUT),
+ HDA_CODEC_MUTE_MONO("LFE Playback Switch", 0x05, 2, 0x0, HDA_OUTPUT),
+ /*HDA_CODEC_MUTE("Side Playback Switch", 0x04, 0x0, HDA_OUTPUT), */ +
+ /* Input mixer control */
+ /* HDA_CODEC_VOLUME("Input Playback Volume", 0x15, 0x0, HDA_OUTPUT),
+ HDA_CODEC_MUTE("Input Playback Switch", 0x15, 0x0, HDA_OUTPUT), */
+ HDA_CODEC_VOLUME("CD Playback Volume", 0x15, 0x0, HDA_INPUT),
+ HDA_CODEC_MUTE("CD Playback Switch", 0x15, 0x0, HDA_INPUT),
+ HDA_CODEC_VOLUME("Line Playback Volume", 0x15, 0x02, HDA_INPUT),
+ HDA_CODEC_MUTE("Line Playback Switch", 0x15, 0x02, HDA_INPUT),
+ HDA_CODEC_VOLUME("Mic Playback Volume", 0x15, 0x01, HDA_INPUT),
+ HDA_CODEC_MUTE("Mic Playback Switch", 0x15, 0x01, HDA_INPUT),
+ HDA_CODEC_MUTE("Front Mic Playback Switch", 0x10, 0x01, HDA_OUTPUT),
+ HDA_CODEC_MUTE("Headphone Playback Switch", 0x1a, 0x03, HDA_OUTPUT), // was HDA_INPUT(?)
+
+ /* Capture mixer control */
+ 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",
+ .count = 1,
+ .info = alc_mux_enum_info,
+ .get = alc_mux_enum_get,
+ .put = alc_mux_enum_put,
+ },
+ {
+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+ .name = "Channel Mode",
+ .info = alc_ch_mode_info,
+ .get = alc_ch_mode_get,
+ .put = alc_ch_mode_put,
+ .private_value = ARRAY_SIZE(alc861_asus_a6rp_modes),
+ },
+ { }
+};
/*
* generic initialization of ADC, input mixers and output mixers @@ -6377,6 +6459,68 @@
{ }
};
+static struct hda_verb alc861_asus_a6rp_init_verbs[] = {
+ /*
+ * Unmute ADC0 and set the default input to mic-in
+ */
+ /* port-A for surround (rear panel) | according to my codec#0 this is the HP jack*/
+ { 0x0e, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc0 }, // was 0x00
+ /* route front PCM to HP */
+ //{ 0x0e, AC_VERB_SET_CONNECT_SEL, 0x01 },
+ /* port-B for mic-in (rear panel) with vref */
+ { 0x0d, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24 },
+ /* port-C for line-in (rear panel) */
+ { 0x0c, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x20 },
+ /* port-D for Front */
+ { 0x0b, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40 },
+ { 0x0b, AC_VERB_SET_CONNECT_SEL, 0x00 },
+ /* port-E for HP out (front panel) */
+ { 0x0f, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24 }, // this has to be set to VREF80
+ /* route front PCM to HP */
+ { 0x0f, AC_VERB_SET_CONNECT_SEL, 0x01 },
+ /* port-F for mic-in (front panel) with vref */
+ { 0x10, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24 },
+ /* port-G for CLFE (rear panel) */
+ { 0x1f, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x00 },
+ /* port-H for side (rear panel) */
+ { 0x20, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x00 },
+ /* CD-in */
+ { 0x11, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x20 },
+ /* route front mic to ADC1*/
+ {0x08, AC_VERB_SET_CONNECT_SEL, 0x00},
+ {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
+ /* Unmute DAC0~3 & spdif out*/
+ {0x03, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
+ {0x04, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
+ {0x05, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
+ {0x06, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
+ {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
+
+ /* Unmute Mixer 14 (mic) 1c (Line in)*/
+ {0x014, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
+ {0x014, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
+ {0x01c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
+ {0x01c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
+
+ /* Unmute Stereo Mixer 15 */
+ {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
+ {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
+ {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(2)},
+ {0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0xb00c }, //Output 0~12 step +
+ {0x16, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
+ {0x16, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
+ {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
+ {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
+ {0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
+ {0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
+ {0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
+ {0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
+ {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(3)}, // hp used DAC 3 (Front)
+ {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(2)},
+ { }
+};
+
/*
* generic initialization of ADC, input mixers and output mixers */
@@ -6714,6 +6858,9 @@
{ .modelname = "uniwill-m31", .config = ALC861_UNIWILL_M31},
{ .pci_subvendor = 0x1584, .pci_subdevice = 0x9072,
.config = ALC861_UNIWILL_M31 },
+ { .modelname = "asus-a6rp", .config = ALC861_ASUS_A6RP},
+ { .pci_subvendor = 0x1043, .pci_subdevice = 0x1393,
+ .config = ALC861_ASUS_A6RP },
{ .modelname = "auto", .config = ALC861_AUTO },
{}
};
@@ -6781,6 +6928,19 @@
.adc_nids = alc861_adc_nids,
.input_mux = &alc861_capture_source,
},
+ [ALC861_ASUS_A6RP] = {
+ .mixers = { alc861_asus_a6rp_mixer },
+ .init_verbs = { alc861_asus_a6rp_init_verbs },
+ .num_dacs = ARRAY_SIZE(alc861_dac_nids),
+ .dac_nids = alc861_dac_nids,
+ .dig_out_nid = ALC861_DIGOUT_NID,
+ .num_channel_mode = ARRAY_SIZE(alc861_asus_a6rp_modes),
+ .channel_mode = alc861_asus_a6rp_modes,
+ .need_dac_fix = 1,
+ .num_adc_nids = ARRAY_SIZE(alc861_adc_nids),
+ .adc_nids = alc861_adc_nids,
+ .input_mux = &alc861_capture_source,
+ },
};
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel
At Mon, 25 Sep 2006 20:25:50 +0200,
Quoted 14 lines · Mariusz Domanski
2006/9/25, Takashi Iwai <[email protected]>:
Quoted 1 line
Quoted 1 line
Propably the sound will appear after (x)th compilation, but why? Why it is not
working
>> all the time?>No idea. A weird hardware...
>> And why the ALC861 is detected to be the ALC660?
>Simply because they are almost compatible (according to Realtek).
Quoted 7 lines
>The patch looks broken. Could you regenerated it?
>thanks,
>Takashi
Here is patch (now I'll write it as a part of email):
... and it's more broken now :)
Could you give the correct patch as an attachment? Also, try to avoid C++ style comments as much as possible.
Thanks,
Takashi
Quoted 197 lines
patch_realtek.c 2006-09-23 19:25:45.000000000 +0200 renamed from patch_realtek.c 2006-09-12 15:40:56.000000000 +0200 +40
-0@@ -91,6 +91,7 @@ ALC861_3ST_DIG, ALC861_6ST_DIG, ALC861_UNIWILL_M31, + ALC861_ASUS_A6RP, ALC861_AUTO, ALC861_MODEL_LAST, };@@ -6070,6 +6071,45 @@ { 4, alc861_uniwill_m31_ch4_init }, }; +/* Set mic1 and line-in as input and unmute the mixer */ +static struct hda_verb alc861_asus_a6rp_ch2_init[] = { + /* set pin widget 1Ah (line in) for input */ + { 0x0c, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x20 }, + /* set pin widget 18h (mic1/2) for input, for mic also enable the vref */ + { 0x0d, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24 }, + + { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0xb00c }, +#if 0 + { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x01 << 8)) }, /*mic*/ + { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x02 << 8)) }, /*line-in*/ +#endif + { } /* end */ +}; +/* Set mic1 nad line-in as output and mute mixer */ +static struct hda_verb alc861_asus_a6rp_ch6_init[] = { + /* set pin widget 1Ah (line in) for output (Back Surround)*/ + { 0x0c, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40 }, +// { 0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE }, + /* set pin widget 18h (mic1) for output (CLFE)*/ + { 0x0d, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40 }, +// { 0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE }, + + { 0x0c, AC_VERB_SET_CONNECT_SEL, 0x00 }, + { 0x0d, AC_VERB_SET_CONNECT_SEL, 0x00 }, + + { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0xb080 }, +//#if 0 + { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, (0x7080 | (0x01 << 8)) }, /*mic*/ + { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, (0x7080 | (0x02 << 8)) }, /*line in*/ +//#endif + { } /* end */ +}; + +static struct hda_channel_mode alc861_asus_a6rp_modes[2] = { + { 2, alc861_asus_a6rp_ch2_init }, + { 6, alc861_asus_a6rp_ch6_init }, +}; + /* patch-ALC861 */ static struct snd_kcontrol_new alc861_base_mixer[] = {@@ -6188,6 +6228,48 @@ },{ } /* end */
};patch_realtek.c 2006-09-23 19:25:45.000000000 +0200 renamed from patch_realtek.c 2006-09-12 15:40:56.000000000 +0200 +20
-0+ +static struct snd_kcontrol_new alc861_asus_a6rp_mixer[] = { + /* output mixer control */ + HDA_CODEC_MUTE("Front Playback Switch", 0x03, 0x0, HDA_OUTPUT), + HDA_CODEC_MUTE("Surround Playback Switch", 0x06, 0x0, HDA_OUTPUT), + HDA_CODEC_MUTE_MONO("Center Playback Switch", 0x05, 1, 0x0, HDA_OUTPUT), + HDA_CODEC_MUTE_MONO("LFE Playback Switch", 0x05, 2, 0x0, HDA_OUTPUT), + /*HDA_CODEC_MUTE("Side Playback Switch", 0x04, 0x0, HDA_OUTPUT), */ + + /* Input mixer control */ + /* HDA_CODEC_VOLUME("Input Playback Volume", 0x15, 0x0, HDA_OUTPUT), + HDA_CODEC_MUTE("Input Playback Switch", 0x15, 0x0, HDA_OUTPUT), */ + HDA_CODEC_VOLUME("CD Playback Volume", 0x15, 0x0, HDA_INPUT), + HDA_CODEC_MUTE("CD Playback Switch", 0x15, 0x0, HDA_INPUT), + HDA_CODEC_VOLUME("Line Playback Volume", 0x15, 0x02, HDA_INPUT), + HDA_CODEC_MUTE("Line Playback Switch", 0x15, 0x02, HDA_INPUT), + HDA_CODEC_VOLUME("Mic Playback Volume", 0x15, 0x01, HDA_INPUT), + HDA_CODEC_MUTE("Mic Playback Switch", 0x15, 0x01, HDA_INPUT), + HDA_CODEC_MUTE("Front Mic Playback Switch", 0x10, 0x01, HDA_OUTPUT), + HDA_CODEC_MUTE("Headphone Playback Switch", 0x1a, 0x03, HDA_OUTPUT), // was
HDA_INPUT(?)patch_realtek.c 2006-09-23 19:25:45.000000000 +0200 renamed from patch_realtek.c 2006-09-12 15:40:56.000000000 +0200 +22
-0+ + /* Capture mixer control */ + 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", + .count = 1, + .info = alc_mux_enum_info, + .get = alc_mux_enum_get, + .put = alc_mux_enum_put, + }, + { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "Channel Mode", + .info = alc_ch_mode_info, + .get = alc_ch_mode_get, + .put = alc_ch_mode_put, + .private_value = ARRAY_SIZE(alc861_asus_a6rp_modes), + }, + { } +};/*
* generic initialization of ADC, input mixers and output mixerspatch_realtek.c 2006-09-23 19:25:45.000000000 +0200 renamed from patch_realtek.c 2006-09-12 15:40:56.000000000 +0200 +71
-0@@ -6377,6 +6459,68 @@ { } }; +static struct hda_verb alc861_asus_a6rp_init_verbs[] = { + /* + * Unmute ADC0 and set the default input to mic-in + */ + /* port-A for surround (rear panel) | according to my codec#0 this is the HP jack*/ + { 0x0e, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc0 }, // was 0x00 + /* route front PCM to HP */ + //{ 0x0e, AC_VERB_SET_CONNECT_SEL, 0x01 }, + /* port-B for mic-in (rear panel) with vref */ + { 0x0d, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24 }, + /* port-C for line-in (rear panel) */ + { 0x0c, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x20 }, + /* port-D for Front */ + { 0x0b, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40 }, + { 0x0b, AC_VERB_SET_CONNECT_SEL, 0x00 }, + /* port-E for HP out (front panel) */ + { 0x0f, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24 }, // this has to be set to VREF80 + /* route front PCM to HP */ + { 0x0f, AC_VERB_SET_CONNECT_SEL, 0x01 }, + /* port-F for mic-in (front panel) with vref */ + { 0x10, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24 }, + /* port-G for CLFE (rear panel) */ + { 0x1f, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x00 }, + /* port-H for side (rear panel) */ + { 0x20, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x00 }, + /* CD-in */ + { 0x11, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x20 }, + /* route front mic to ADC1*/ + {0x08, AC_VERB_SET_CONNECT_SEL, 0x00}, + {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, + /* Unmute DAC0~3 & spdif out*/ + {0x03, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, + {0x04, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, + {0x05, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, + {0x06, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, + {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, + + /* Unmute Mixer 14 (mic) 1c (Line in)*/ + {0x014, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, + {0x014, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, + {0x01c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, + {0x01c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, + + /* Unmute Stereo Mixer 15 */ + {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, + {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, + {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(2)}, + {0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0xb00c }, //Output 0~12 step + + {0x16, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, + {0x16, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, + {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, + {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, + {0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, + {0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, + {0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, + {0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, + {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(3)}, // hp used DAC 3 (Front) + {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(2)}, + { } +}; + /* * generic initialization of ADC, input mixers and output mixers */@@ -6714,6 +6858,9 @@ { .modelname = "uniwill-m31", .config = ALC861_UNIWILL_M31}, { .pci_subvendor = 0x1584, .pci_subdevice = 0x9072, .config = ALC861_UNIWILL_M31 }, + { .modelname = "asus-a6rp", .config = ALC861_ASUS_A6RP}, + { .pci_subvendor = 0x1043, .pci_subdevice = 0x1393, + .config = ALC861_ASUS_A6RP }, { .modelname = "auto", .config = ALC861_AUTO }, {} };@@ -6781,6 +6928,19 @@ .adc_nids = alc861_adc_nids, .input_mux = &alc861_capture_source, }, + [ALC861_ASUS_A6RP] = { + .mixers = { alc861_asus_a6rp_mixer }, + .init_verbs = { alc861_asus_a6rp_init_verbs }, + .num_dacs = ARRAY_SIZE(alc861_dac_nids), + .dac_nids = alc861_dac_nids, + .dig_out_nid = ALC861_DIGOUT_NID,
patch_realtek.c 2006-09-23 19:25:45.000000000 +0200 line 6946
Quoted 10 lines
patch_realtek.c 2006-09-23 19:25:45.000000000 +0200 renamed from patch_realtek.c 2006-09-12 15:40:56.000000000 +0200 +7
-0+ .num_channel_mode = ARRAY_SIZE(alc861_asus_a6rp_modes), + .channel_mode = alc861_asus_a6rp_modes, + .need_dac_fix = 1, + .num_adc_nids = ARRAY_SIZE(alc861_adc_nids), + .adc_nids = alc861_adc_nids, + .input_mux = &alc861_capture_source, + }, };
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
2006/9/26, Takashi Iwai <[email protected]>:
Quoted 36 lines
Quoted 8 lines
At Mon, 25 Sep 2006 20:25:50 +0200,
Quoted 5 lines · Mariusz Domanski
2006/9/25, Takashi Iwai <[email protected]>:
Quoted 1 line
Quoted 1 line
Propably the sound will appear after (x)th compilation, but why?
Why it is not
Quoted 26 lines
Quoted 9 lines
working
>> all the time?>No idea. A weird hardware...
>> And why the ALC861 is detected to be the ALC660?
>Simply because they are almost compatible (according to Realtek).
Quoted 7 lines
>The patch looks broken. Could you regenerated it?
>thanks,
>Takashi
Here is patch (now I'll write it as a part of email):
... and it's more broken now :)
Could you give the correct patch as an attachment? Also, try to avoid C++ style comments as much as possible.
Thanks,
Takashi
Ok, I really don't know why the patch doesn't want to work... It looks well, but produces errors when applied...
Anyway, I'm sending attachement with modified patch_realtek.c and patch file which should work but doesn't...
I'm sure you will know what has been changed :)
Mariusz
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel
At Tue, 26 Sep 2006 16:43:32 +0200,
Quoted 38 lines · Mariusz Domanski
2006/9/26, Takashi Iwai <[email protected]>:
Quoted 7 lines
At Mon, 25 Sep 2006 20:25:50 +0200,
Quoted 5 lines · Mariusz Domanski
2006/9/25, Takashi Iwai <[email protected]>:
Quoted 1 line
Quoted 1 line
Propably the sound will appear after (x)th compilation, but why? Why it
is not >> working >> >> all the time? >> >> >No idea. A weird hardware... >> >> >> And why the ALC861 is detected to be the ALC660? >> >> >Simply because they are almost compatible (according to Realtek). >> >> >The patch looks broken. Could you regenerated it? >> >> >thanks, >> >> >Takashi >> >> Here is patch (now I'll write it as a part of email): > >... and it's more broken now :) > >Could you give the correct patch as an attachment? >Also, try to avoid C++ style comments as much as possible. > > >Thanks, > >Takashi
Quoted 4 lines
Ok, I really don't know why the patch doesn't want to work... It looks well, but produces errors when applied...
Anyway, I'm sending attachement with modifiedpatch_realtek.cand patch file which should work but doesn't...
Maybe the gzipped patch should have sufficed. So, it's kept unmodified by the mailer.
I'm now looking at your new patch, and found that you do _not_ comment out #if 0 for mic and line-in verbs as you did in the earlier patch. Namely, in the earler version:
+//#if 0
+ { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, (0x7080 | (0x01 << 8)) }, /*mic*/
+ { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, (0x7080 | (0x02 << 8)) }, /*line in*/ +//#endif
+ { } /* end */
while the '//' are removed in the newer version.
Is it intentional?
Otherwise it looks fine.
Thanks,
Takashi
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
2006/9/26, Takashi Iwai <[email protected]>:
Quoted 66 lines
At Tue, 26 Sep 2006 16:43:32 +0200,
Quoted 10 lines · Mariusz Domanski
2006/9/26, Takashi Iwai <[email protected]>:
Quoted 7 lines
At Mon, 25 Sep 2006 20:25:50 +0200,
Quoted 5 lines · Mariusz Domanski
2006/9/25, Takashi Iwai <[email protected]>:
Quoted 1 line
Quoted 1 line
Propably the sound will appear after (x)th compilation,
but why? Why it
Quoted 9 lines
is not
>> working
>> >> all the time?
>>
>> >No idea. A weird hardware...
>>
>> >> And why the ALC861 is detected to be the ALC660?
>>
>> >Simply because they are almost compatible (according toRealtek).
Quoted 15 lines
Quoted 15 lines
Quoted 8 lines
Quoted 6 lines
The patch looks broken. Could you regenerated it?
thanks,
Takashi
Here is patch (now I'll write it as a part of email):
... and it's more broken now :)
Could you give the correct patch as an attachment? Also, try to avoid C++ style comments as much as possible.
Quoted 5 lines
Quoted 3 lines
Thanks,
Takashi
Ok, I really don't know why the patch doesn't want to work... It looks
well, but
Quoted 2 lines
produces errors when applied...
Anyway, I'm sending attachement with modifiedpatch_realtek.cand patchfile which
Quoted 1 line
should work but doesn't...
Maybe the gzipped patch should have sufficed. So, it's kept unmodified by the mailer.
I'm now looking at your new patch, and found that you do _not_ comment out #if 0 for mic and line-in verbs as you did in the earlier patch. Namely, in the earler version:
(quoted diff) +5
-0+//#if 0 + { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, (0x7080 | (0x01 << 8)) }, /*mic*/ + { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, (0x7080 | (0x02 << 8)) }, /*line in*/ +//#endif + { } /* end */while the '//' are removed in the newer version.
Is it intentional?
Quoted 7 lines
Otherwise it looks fine.
Thanks,
Takashi
Well... It does't seem to make difference for me.. Now it does't want to work with comment tags and withotu them... It only works _sometimes_.
I wrote in bugreport that when model=3stack is chosen and channel mode is set to 6ch the line-in and mic works as output, but I can now tell you that was one of these _sometimes_ and it worked only once, but worked, and there in the sourcecode the #if 0 is not commented out. Later, when testing my patch everything worked with #if 0 commented out.. So... It doesn't change anything in my case...
I wasn't sure what i was doing writing this patch... :) I just read almost whole patch_realtek.c and codec#0 output and saw that there is something wrong... At first I was doing changes which had sense for me (mixer and pin config from uniwill, 0x0e as HP, 2ch and 6ch modes from
3stack) but it didn't work, so I started to make other changes, when changed HDA_INPUT to HDA_OUTPUT in the mixer, the sound appeard in the mixer,
then I changed something in the code and recompiled Alsa, sound disappeard so I was making other changeswas until I got sount in headphones. When I got it, i also noticed that it is only to the next start of Alsa and this is the point where I'm standing now and don't know what to do next... Even codec#0 outputs are same, when comparing the one when everything was working and the one made now, when it doesn't work...
The situation is too complicated for me so I'm asking you for help, because it is so close to the finish :)
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel
At Tue, 26 Sep 2006 17:43:26 +0200,
Quoted 73 lines · Mariusz Domanski
2006/9/26, Takashi Iwai <[email protected]>:
At Tue, 26 Sep 2006 16:43:32 +0200,
Mariusz Domanski wrote:
>
> 2006/9/26, Takashi Iwai <[email protected]>:
>
> >At Mon, 25 Sep 2006 20:25:50 +0200,
> >Mariusz Domanski wrote:
> >>
> >>
> > >2006/9/25, Takashi Iwai <[email protected]>:
> >>
> >> >> Propably the sound will appear after (x)th compilation, but why?
Why it
> is not
> >> working
> >> >> all the time?
> >>
> >> >No idea. A weird hardware...
> >>
> >> >> And why the ALC861 is detected to be the ALC660?
> >>
> >> >Simply because they are almost compatible (according to Realtek).
> >>
> >> >The patch looks broken. Could you regenerated it?
> >>
> >> >thanks,
> >>
> >> >Takashi
> >>
> >> Here is patch (now I'll write it as a part of email):
> >
> >... and it's more broken now :)
> >
> >Could you give the correct patch as an attachment?
> >Also, try to avoid C++ style comments as much as possible.
> >
> >
> >Thanks,
> >
> >Takashi
>
> Ok, I really don't know why the patch doesn't want to work... It looks well, but > produces errors when applied...
> Anyway, I'm sending attachement with modifiedpatch_realtek.cand patch file which
> should work but doesn't...Maybe the gzipped patch should have sufficed. So, it's kept unmodified by the mailer.
I'm now looking at your new patch, and found that you do _not_ comment out #if 0 for mic and line-in verbs as you did in the earlier patch. Namely, in the earler version:
+//#if 0
+ {0x15,AC_VERB_SET_AMP_GAIN_MUTE, (0x7080| (0x01<< 8)) }, /*mic*/
+ {0x15,AC_VERB_SET_AMP_GAIN_MUTE, (0x7080| (0x02<< 8)) }, /*line in*/ +//#endif
+ { } /* end */while the '//' are removed in the newer version. Is it intentional?
Otherwise it looks fine.
Thanks,
Takashi
Quoted 8 lines
Well... It does't seem to make difference for me.. Now it does't want to work with comment tags and withotu them... It only works _sometimes_.
I wrote in bugreport that when model=3stack is chosen and channel mode is set to 6ch the line-in and mic works as output, but I can now tell you that was one of these _sometimes_ and it worked only once, but worked, and there in the sourcecode the #if 0 is not commented out. Later, when testing my patch everything worked with #if 0 commented out.. So... It doesn't change anything in my case...
Hm, that's weird. For more precise analysis, try the following:
- get a "bad" state (e.g. mic/line doesn't work) then get dump by copying /proc/asound/card0/codec#* file.
- change the code, get a "good" state, and do the same dump
- compare two dump files.
Sometimes the things don't work as expected, and this is often caused by simple human mistakes. Comparing dumps would reveal whether the hardware states are really changed or not, at least.
Takashi
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
2006/9/26, Takashi Iwai <[email protected]>:
Quoted 104 lines
At Tue, 26 Sep 2006 17:43:26 +0200,
Quoted 4 lines · Mariusz Domanski
2006/9/26, Takashi Iwai <[email protected]>:
Quoted 12 lines
At Tue, 26 Sep 2006 16:43:32 +0200, Mariusz Domanski wrote: > > 2006/9/26, Takashi Iwai <[email protected]>: > > >At Mon, 25 Sep 2006 20:25:50 +0200, > >Mariusz Domanski wrote: > >> > >> > > >2006/9/25, Takashi Iwai <[email protected]>: > >> > >> >> Propably the sound will appear after (x)thcompilation, but why?
Quoted 10 lines
Why it
> is not
> >> working
> >> >> all the time?
> >>
> >> >No idea. A weird hardware...
> >>
> >> >> And why the ALC861 is detected to be the ALC660?
> >>
> >> >Simply because they are almost compatible (accordingto Realtek).
Quoted 15 lines
Quoted 15 lines
Quoted 15 lines
Quoted 8 lines
Quoted 6 lines
The patch looks broken. Could you regenerated it?
thanks,
Takashi
Here is patch (now I'll write it as a part of email):
... and it's more broken now :)
Could you give the correct patch as an attachment? Also, try to avoid C++ style comments as much as possible.
Quoted 5 lines
Quoted 5 lines
Quoted 3 lines
Thanks,
Takashi
Ok, I really don't know why the patch doesn't want to work... It
looks well, but
Quoted 2 lines
Quoted 2 lines
produces errors when applied...
Anyway, I'm sending attachement with modifiedpatch_realtek.candpatch file
Quoted 7 lines
which
> should work but doesn't...Maybe the gzipped patch should have sufficed. So, it's kept unmodified by the mailer.
I'm now looking at your new patch, and found that you do _not_
comment
Quoted 5 lines
out #if 0 for mic and line-in verbs as you did in the earlier patch. Namely, in the earler version:
+//#if 0
+ {0x15,AC_VERB_SET_AMP_GAIN_MUTE, (0x7080| (0x01<< 8)) },/*mic*/
Quoted 1 line
+ {
0x15,AC_VERB_SET_AMP_GAIN_MUTE, (0x7080| (0x02<< 8)) },/*line in*/
Quoted 6 lines
+//#endif
+ { } /* end */while the '//' are removed in the newer version. Is it intentional?
Quoted 7 lines
Otherwise it looks fine.
Thanks,
Takashi
Well... It does't seem to make difference for me.. Now it does't want to
work with
Quoted 3 lines
comment tags and withotu them... It only works _sometimes_.
I wrote in bugreport that when model=3stack is chosen and channel mode
is set to 6ch
Quoted 1 line
the line-in and mic works as output, but I can now tell you that was one
of these
Quoted 1 line
_sometimes_ and it worked only once, but worked, and there in the
sourcecode the #if 0
Quoted 1 line
is not commented out. Later, when testing my patch everything worked
with #if 0
Quoted 1 line
commented out.. So... It doesn't change anything in my case...
Hm, that's weird. For more precise analysis, try the following:
- get a "bad" state (e.g. mic/line doesn't work) then get dump by copying /proc/asound/card0/codec#* file.
- change the code, get a "good" state, and do the same dump
- compare two dump files.
Quoted 7 lines
Sometimes the things don't work as expected, and this is often caused by simple human mistakes. Comparing dumps would reveal whether the hardware states are really changed or not, at least.
Takashi
I have codec#0 output saved when everything was working. There is little change according to outpiu which codec#0 gives me now.
Part of "good" codec#0:
Node 0x15 [Audio Mixer] wcaps 0x20050f: Stereo Amp-In Amp-Out Amp-In caps: ofs=0x0c, nsteps=0x17, stepsize=0x0b, mute=1 Amp-In vals: [0x95 0x95] [0x80 0x80] [0x80 0x80] Amp-Out caps: ofs=0x0c, nsteps=0x0c, stepsize=0x0b, mute=1 Amp-Out vals: [0x0c 0x0c]
Power: 0x0
Connection: 30x11 0x14 0x1c
Now the 3rd line is:
Amp-In vals: [0x95 0x95] [0x95 0x95] [0x95 0x95]
This is the only change.
What does this mean?
How can I change it?
Can this cause this whole strange problem?
I can try to change something but I don't know what exactly should be changed, so i'll be changing various values :P
Thanks for your support :)
Mariusz
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel
At Tue, 26 Sep 2006 20:14:58 +0200,
Quoted 14 lines · Mariusz Domanski
I have codec#0 output saved when everything was working. There is little change according to outpiu which codec#0 gives me now.
Part of "good" codec#0:
Node0x15[Audio Mixer] wcaps0x20050f: Stereo Amp-In Amp-Out Amp-In caps: ofs=0x0c, nsteps=0x17, stepsize=0x0b, mute=1 Amp-In vals: [0x950x95] [0x800x80] [0x800x80] Amp-Out caps: ofs=0x0c, nsteps=0x0c, stepsize=0x0b, mute=1 Amp-Out vals: [0x0c0x0c]
Power:0x0
Connection: 30x110x140x1c
Quoted 2 lines
Now the 3rd line is:
Amp-In vals: [0x950x95] [0x950x95] [0x950x95]
Above all, _what_ happened by this change?
Quoted 3 lines
This is the only change.
What does this mean?
It means that the amp-input values are changed.
But they are still muted (bit 7 [0x80] is on), so in theory, they shouldn't make any difference. No other changes at all?
Quoted 1 line
How can I change it?
Via mixer elements, most likely.
You can check the mixer elements you created which ones have the NID 0x15 (and INPUT direction).
Quoted 1 line
Can this cause this whole strange problem?
You'd better to take a look at the block diagram in ALC861 datasheet to understand what's happning.
The widget 0x15 is "analog mixer" that takes all inputs from line, mic, etc and passes to ADC and the output mixer. The three values are volumes from inputs to this mixer from CD, line and mic input pins.
Quoted 2 lines
I can try to change something but I don't know what exactly should be changed, so i'll be changing various values :P
That's my question, too. First, you have to recognize the way to reproduce the problem. Debugging randomly happening problem is quite hard. We need to know the cause, not only the result.
Takashi
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
A message that is not in the archive (sent off-list or not yet received): [email protected]
At Thu, 28 Sep 2006 00:37:19 +0200,
Quoted 56 lines · Mariusz Domanski
2006/9/27, Takashi Iwai <[email protected]>:
At Tue, 26 Sep 2006 20:14:58 +0200,
Mariusz Domanski wrote:
>
> I have codec#0 output saved when everything was working.
> There is little change according to outpiu which codec#0 gives me now. >
> Part of "good" codec#0:
> Node0x15[Audio Mixer] wcaps0x20050f: Stereo Amp-In Amp-Out > Amp-In caps: ofs=0x0c, nsteps=0x17, stepsize=0x0b, mute=1 > Amp-In vals: [0x950x95] [0x800x80] [0x800x80]
> Amp-Out caps: ofs=0x0c, nsteps=0x0c, stepsize=0x0b, mute=1 > Amp-Out vals: [0x0c0x0c]
> Power:0x0
> Connection: 3
>0x110x140x1c
>
> Now the 3rd line is:
> Amp-In vals: [0x950x95] [0x950x95] [0x950x95]Above all, _what_ happened by this change?
> This is the only change.
>
> What does this mean?It means that the amp-input values are changed.
But they are still muted (bit 7 [0x80] is on), so in theory, they shouldn't make any difference. No other changes at all?> How can I change it?
Via mixer elements, most likely.
You can check the mixer elements you created which ones have the NID0x15(and INPUT direction).> Can this cause this whole strange problem?
You'd better to take a look at the block diagram in ALC861 datasheet to understand what's happning.
The widget
0x15is "analog mixer" that takes all inputs from line, mic, etc and passes to ADC and the output mixer. The three values are volumes from inputs to this mixer from CD, line and mic input pins.> I can try to change something but I don't know what exactly should be changed, so
> i'll be changing various values :PThat's my question, too. First, you have to recognize the way to reproduce the problem. Debugging randomly happening problem is quite hard. We need to know the cause, not only the result.
Quoted 6 lines
Takashi
Well that's great question... What cause the problem? I really would like to know... :)
If I would know how to reproduce this problem I would tell
you...
If you can ever get a "good" state, then there must be a cause. You need to find out how to get a good and a bad state, the step to reproduce (e.g. first boot Windows, or whatever). Then check the internal state of the device. This is the most important thing to debug this kind of problems.
Quoted 2 lines
I mean now this problem is present - headphones are not working :P codec#0 shows
PIN_OUT(0x40) on headphones jack, but there is no sound...
Which PIN node? The headphone jack takes usually PIN_HP (0xc0) with HP-overdrive bit. You should also trace the connection line between the pin and DAC, and check whether all widgets are unmuted/adjusted throughout the line.
Quoted 3 lines
I can tell you that when line-in is unmuted and master mixer and line-in mixers are set to 100% I'm about to hear music... It's very very quiet and with high frequency noises...
Sorry, it's not clear what you mean here. Please describe more exactly what you did, step by step?
Quoted 3 lines
The most strange thing is that, as I wrote before, the sound was and disappeard after
Alsa restart...
Is the device state restored via alsactl automatically? Usually, udev takes a charge to call "alsactl restore" after module reloading. You can call "alsactl save" before restart, and call "alsactl restore" after restart manually.
Quoted 2 lines
Does Alsa have any config files that could be changed during restart? What can be changed during Alsa restart?
The device is set up to be muted per default (depending on the driver implementation, though). You have to adjust it to unmuted state. Calling "alsactl restore" would restore to the last saved state.
This whole thing depends on the distribution you use. I cannot tell the exact detail.
Quoted 2 lines
I'll try to make the headphones working... What should I do if I'll do it? Any special things to do?
Has the headphone _ever_ worked? If not, we can do only blind shots.
Quoted 8 lines
What about looking at datasheet... Well... I don't understand much, I'm not a driver
programmer. I just can think and read and I'm trying to make something knowing almost nothing :)Now I'm looking at datasheet and can only tell what I knew earlier:
PORT-A - SURR-OUT -0x0e- surround, but in my case hp jack (?) [let say it can work]
OK, that's good to know.
Quoted 3 lines
PORT-B - MIC1 -
0x0d- mic jack or built-in mic [works]
PORT-C - LINE1 -0x0c- line-in jack [propably works, I have nothing to test it] PORT-D - FRONT -0x0b- front out (built-in speakers) [works]
Is it muted automatically when HP is plugged, or it still continues to output sounds? If it keeps sound, we'll need a pin detection (if auto-toggling feature is needed).
Quoted 2 lines
PORT-E - LINE2 -
0x0f- usually hp, but not in my case, has to be set to0x24(mic-input as I understand) or nothing does work...
0x24 is to set INPUT and VREF 80%. Yes, it's a usual setting for mic input.
Quoted 1 line
PORT-F - MIC2 -
0x10- built-in mic or mic jack [works]
Hm, what is the difference from port-B?
Takashi
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
2006/9/29, Takashi Iwai <[email protected]>:
Quoted 56 lines
Quoted 12 lines
At Thu, 28 Sep 2006 00:37:19 +0200,
Quoted 9 lines · Mariusz Domanski
2006/9/27, Takashi Iwai <[email protected]>:
At Tue, 26 Sep 2006 20:14:58 +0200,
Mariusz Domanski wrote:
>
> I have codec#0 output saved when everything was working. > There is little change according to outpiu which codec#0 givesme now.
Quoted 20 lines
Quoted 20 lines
Quoted 11 lines
Part of "good" codec#0:
Node0x15[Audio Mixer] wcaps0x20050f: Stereo Amp-In Amp-Out Amp-In caps: ofs=0x0c, nsteps=0x17, stepsize=0x0b, mute=1 Amp-In vals: [0x950x95] [0x800x80] [0x800x80] Amp-Out caps: ofs=0x0c, nsteps=0x0c, stepsize=0x0b, mute=1 Amp-Out vals: [0x0c0x0c]
Power:0x0
Connection: 30x110x140x1cQuoted 2 lines
Now the 3rd line is:
Amp-In vals: [0x950x95] [0x950x95] [0x950x95]Above all, _what_ happened by this change?
> This is the only change.
>
> What does this mean?Quoted 8 lines
Quoted 8 lines
It means that the amp-input values are changed.
But they are still muted (bit 7 [0x80] is on), so in theory, they shouldn't make any difference. No other changes at all?> How can I change it?
Via mixer elements, most likely.
You can check the mixer elements you created which ones have theNID
Quoted 5 lines
Quoted 5 lines
0x15(and INPUT direction).> Can this cause this whole strange problem?
You'd better to take a look at the block diagram in ALC861
datasheet
Quoted 4 lines
Quoted 4 lines
to understand what's happning.
The widget
0x15is "analog mixer" that takes all inputs from line, mic, etc and passes to ADC and the output mixer. The three valuesare
Quoted 1 line
Quoted 1 line
volumes from inputs to this mixer from CD, line and mic input
pins.
Quoted 1 line
Quoted 1 line
Quoted 15 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
I can try to change something but I don't know what exactly
should be changed,
Quoted 5 lines
Quoted 5 lines
so
> i'll be changing various values :PThat's my question, too. First, you have to recognize the way to reproduce the problem. Debugging randomly happening problem is
quite
Quoted 7 lines
Quoted 4 lines
hard. We need to know the cause, not only the result.
Takashi
Well that's great question... What cause the problem? I really would
like to know... :)
Quoted 7 lines
Quoted 1 line
If I would know how to reproduce this problem I would tell you...
If you can ever get a "good" state, then there must be a cause. You need to find out how to get a good and a bad state, the step to reproduce (e.g. first boot Windows, or whatever). Then check the internal state of the device. This is the most important thing to debug this kind of problems.
The worst thing is that I don't see any reason the "good" state is changing to the "bad" one...
Headphones DID work few times, just after recompilation, reinstallation of modules and restarting alsasound. Headphones were working well as they sould work always but just after restarting Alsa or rebooting laptop they weren't working... (I wrote about this in previous mails)
Quoted 2 lines
Quoted 2 lines
I mean now this problem is present - headphones are not working :P codec#0 shows
PIN_OUT(0x40) on headphones jack, but there is no
sound...
Quoted 5 lines
Which PIN node? The headphone jack takes usually
PIN_HP(0xc0) with HP-overdrive bit. You should also trace the connection line between the pin and DAC, and check whether all widgets are unmuted/adjusted throughout the line.
I know that the hp jack should take PIN_HP, it is even set in my patch, but codec#0 shows:
Pin-ctls: 0x40: OUT
for hp jack.
How can I chceck if all widgets between pin and DAC are unmuted?
Quoted 1 line
Quoted 1 line
I can tell you that when line-in is unmuted and master mixer and line-in
mixers
Quoted 5 lines
Quoted 2 lines
are set to 100% I'm about to hear music... It's very very quiet and with high frequency noises...
Sorry, it's not clear what you mean here. Please describe more exactly what you did, step by step?
It's always when I'm writing "there is no sound". Basically there is no sound, but: if you set PCM to 100% and unmute line-in and set it also to 100% (I'm using gnome-volume-manager), the sound can be heard. This sound is very very quiet and with high frequency noises.
Quoted 8 lines
Quoted 3 lines
The most strange thing is that, as I wrote before, the sound was and disappeard after
Alsa restart...Is the device state restored via alsactl automatically? Usually, udev takes a charge to call "alsactl restore" after module reloading. You can call "alsactl save" before restart, and call "alsactl restore" after restart manually.
I don't know if the device state is restored via alsactl automatically. How can i check it?
Dou you mean that after alsasound restart the mixers states should be set like before restart?
Quoted 9 lines
Quoted 2 lines
Does Alsa have any config files that could be changed during restart? What can be changed during Alsa restart?
The device is set up to be muted per default (depending on the driver implementation, though). You have to adjust it to unmuted state. Calling "alsactl restore" would restore to the last saved state.
This whole thing depends on the distribution you use. I cannot tell the exact detail.
As I wrote in the first mail I'm using Ubuntu 6.06 Dapper Drake with kernel 2.6.17.11 (I had to remove earlier emails, because it would be too long email and it would be hard to read everything, all our mails are archived in the alsa-devel archive of course, on
http://news.gmane.org/gmane.linux.alsa.devel thread posted on 23 Sep 20:08). And what about muted mixers per default... It's strange but every time I fully recompile Alsa (with make clean before recompilation) the default level of PCM (which is set after alsasound restart) is different. Once it's 45%, another time 80%, 60% or 10%... Strange... I think that earlier (with previous versions of Alsa) mixer was muted until I changed it or called alsaconf.
Quoted 1 line
Quoted 1 line
I'll try to make the headphones working... What should I do if I'll do
it? Any
Quoted 3 lines
Quoted 1 line
special things to do?
Has the headphone _ever_ worked? If not, we can do only blind shots.
As I wrote - worked few times.
Quoted 5 lines
Quoted 5 lines
What about looking at datasheet... Well... I don't understand much, I'm not a driver
programmer. I just can think and read and I'm trying to make something knowing almost nothing :)
Quoted 8 lines
Quoted 3 lines
Now I'm looking at datasheet and can only tell what I knew earlier:
PORT-A - SURR-OUT -0x0e- surround, but in my case hp jack (?) [let say it can work]OK, that's good to know.
Quoted 2 lines
PORT-B - MIC1 -
0x0d- mic jack or built-in mic [works] PORT-C - LINE1 -0x0c- line-in jack [propably works, I have nothing to
test it]
Quoted 5 lines
Quoted 1 line
PORT-D - FRONT -
0x0b- front out (built-in speakers) [works]Is it muted automatically when HP is plugged, or it still continues to output sounds? If it keeps sound, we'll need a pin detection (if auto-toggling feature is needed).
The FRONT is muted every time I plug something into hp jack, even if headphones are not working.
Quoted 4 lines
Quoted 2 lines
PORT-E - LINE2 -
0x0f- usually hp, but not in my case, has to be set to0x24(mic-input as I understand) or nothing does work...
0x24is to set INPUT and VREF 80%. Yes, it's a usual setting for mic
input.
Quoted 4 lines
Quoted 2 lines
PORT-F - MIC2 -
0x10- built-in mic or mic jack [works]Hm, what is the difference from port-B?
PORT-B and PORT-F - I suppose that one is mic jack, 2nd is built-in mic (there is built-in mic which is muted, when something is plugged into mic jack).
Quoted 1 line
Takashi
Mariusz
P.S.
I have some problems sending mails to alsa-devel...
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel
2006/9/29, Takashi Iwai <[email protected]>:
Quoted 48 lines
Quoted 12 lines
At Thu, 28 Sep 2006 00:37:19 +0200,
Quoted 9 lines · Mariusz Domanski
2006/9/27, Takashi Iwai <[email protected]>:
At Tue, 26 Sep 2006 20:14:58 +0200,
Quoted 3 lines · Mariusz Domanski
I have codec#0 output saved when everything was working. There is little change according to outpiu which codec#0 gives me
now.
Quoted 35 lines
Quoted 35 lines
Quoted 11 lines
Part of "good" codec#0:
Node0x15[Audio Mixer] wcaps0x20050f: Stereo Amp-In Amp-Out Amp-In caps: ofs=0x0c, nsteps=0x17, stepsize=0x0b, mute=1 Amp-In vals: [0x950x95] [0x800x80] [0x800x80] Amp-Out caps: ofs=0x0c, nsteps=0x0c, stepsize=0x0b, mute=1 Amp-Out vals: [0x0c0x0c]
Power:0x0
Connection: 30x110x140x1cQuoted 2 lines
Now the 3rd line is:
Amp-In vals: [0x950x95] [0x950x95] [0x950x95]Above all, _what_ happened by this change?
Quoted 3 lines
This is the only change.
What does this mean?
It means that the amp-input values are changed.
But they are still muted (bit 7 [0x80] is on), so in theory, they shouldn't make any difference. No other changes at all?Quoted 1 line
How can I change it?
Via mixer elements, most likely.
You can check the mixer elements you created which ones have the NID0x15(and INPUT direction).Quoted 1 line
Can this cause this whole strange problem?
You'd better to take a look at the block diagram in ALC861 datasheet to understand what's happning.
Quoted 18 lines
Quoted 5 lines
Quoted 5 lines
The widget
0x15is "analog mixer" that takes all inputs from line, mic, etc and passes to ADC and the output mixer. The three values are volumes from inputs to this mixer from CD, line and mic input pins.Quoted 1 line
I can try to change something but I don't know what exactly should
be changed,
Quoted 12 lines
Quoted 9 lines
so
Quoted 1 line
i'll be changing various values :P
That's my question, too. First, you have to recognize the way to reproduce the problem. Debugging randomly happening problem is quite hard. We need to know the cause, not only the result.
Takashi
Well that's great question... What cause the problem? I really would
like to know... :)
Quoted 7 lines
Quoted 1 line
If I would know how to reproduce this problem I would tell you...
If you can ever get a "good" state, then there must be a cause. You need to find out how to get a good and a bad state, the step to reproduce (e.g. first boot Windows, or whatever). Then check the internal state of the device. This is the most important thing to debug this kind of problems.
The worst thing is that I don't see any reason the "good" state is changing to the "bad" one...
Headphones DID work few times, just after recompilation, reinstallation of modules and restarting alsasound. Headphones were working well as they sould work always but just after restarting Alsa or rebooting laptop they weren't working... (I wrote about this in previous mails)
Quoted 2 lines
Quoted 2 lines
I mean now this problem is present - headphones are not working :P codec#0 shows
PIN_OUT(0x40) on headphones jack, but there is no
sound...
Quoted 5 lines
Which PIN node? The headphone jack takes usually
PIN_HP(0xc0) with HP-overdrive bit. You should also trace the connection line between the pin and DAC, and check whether all widgets are unmuted/adjusted throughout the line.
I know that the hp jack should take PIN_HP, it is even set in my patch, but codec#0 shows:
Pin-ctls: 0x40: OUT
for hp jack.
How can I chceck if all widgets between pin and DAC are unmuted?
Quoted 1 line
Quoted 1 line
I can tell you that when line-in is unmuted and master mixer and line-in
mixers
Quoted 5 lines
Quoted 2 lines
are set to 100% I'm about to hear music... It's very very quiet and with high frequency noises...
Sorry, it's not clear what you mean here. Please describe more exactly what you did, step by step?
It's always when I'm writing "there is no sound". Basically there is no sound, but: if you set PCM to 100% and unmute line-in and set it also to 100% (I'm using gnome-volume-manager), the sound can be heard. This sound is very very quiet and with high frequency noises.
Quoted 8 lines
Quoted 3 lines
The most strange thing is that, as I wrote before, the sound was and disappeard after
Alsa restart...Is the device state restored via alsactl automatically? Usually, udev takes a charge to call "alsactl restore" after module reloading. You can call "alsactl save" before restart, and call "alsactl restore" after restart manually.
I don't know if the device state is restored via alsactl automatically. How can i check it?
Dou you mean that after alsasound restart the mixers states should be set like before restart?
Quoted 9 lines
Quoted 2 lines
Does Alsa have any config files that could be changed during restart? What can be changed during Alsa restart?
The device is set up to be muted per default (depending on the driver implementation, though). You have to adjust it to unmuted state. Calling "alsactl restore" would restore to the last saved state.
This whole thing depends on the distribution you use. I cannot tell the exact detail.
As I wrote in the first mail I'm using Ubuntu 6.06 Dapper Drake with kernel 2.6.17.11 (I had to remove earlier emails, because it would be too long email and it would be hard to read everything, all our mails are archived in the alsa-devel archive of course, on
http://news.gmane.org/gmane.linux.alsa.devel thread posted on 23 Sep 20:08). And what about muted mixers per default... It's strange but every time I fully recompile Alsa (with make clean before recompilation) the default level of PCM (which is set after alsasound restart) is different. Once it's 45%, another time 80%, 60% or 10%... Strange... I think that earlier (with previous versions of Alsa) mixer was muted until I changed it or called alsaconf.
Quoted 1 line
Quoted 1 line
I'll try to make the headphones working... What should I do if I'll do
it? Any
Quoted 3 lines
Quoted 1 line
special things to do?
Has the headphone _ever_ worked? If not, we can do only blind shots.
As I wrote - worked few times.
Quoted 5 lines
Quoted 5 lines
What about looking at datasheet... Well... I don't understand much, I'm not a driver
programmer. I just can think and read and I'm trying to make something knowing almost nothing :)
Quoted 8 lines
Quoted 3 lines
Now I'm looking at datasheet and can only tell what I knew earlier:
PORT-A - SURR-OUT -0x0e- surround, but in my case hp jack (?) [let say it can work]OK, that's good to know.
Quoted 2 lines
PORT-B - MIC1 -
0x0d- mic jack or built-in mic [works] PORT-C - LINE1 -0x0c- line-in jack [propably works, I have nothing to
test it]
Quoted 5 lines
Quoted 1 line
PORT-D - FRONT -
0x0b- front out (built-in speakers) [works]Is it muted automatically when HP is plugged, or it still continues to output sounds? If it keeps sound, we'll need a pin detection (if auto-toggling feature is needed).
The FRONT is muted every time I plug something into hp jack, even if headphones are not working.
Quoted 4 lines
Quoted 2 lines
PORT-E - LINE2 -
0x0f- usually hp, but not in my case, has to be set to0x24(mic-input as I understand) or nothing does work...
0x24is to set INPUT and VREF 80%. Yes, it's a usual setting for mic
input.
Quoted 4 lines
Quoted 2 lines
PORT-F - MIC2 -
0x10- built-in mic or mic jack [works]Hm, what is the difference from port-B?
PORT-B and PORT-F - I suppose that one is mic jack, 2nd is built-in mic (there is built-in mic which is muted, when something is plugged into mic jack).
Quoted 1 line
Takashi
Mariusz
P.S.
I have some problems sending mails to alsa-devel...
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel