--- alsa-kernel/pci/hda/patch_realtek.c.orig 2006-03-12 18:19:50.000000000 +0200 +++ alsa-kernel/pci/hda/patch_realtek.c 2006-03-21 21:11:29.000000000 +0200 @@ -2738,16 +2738,14 @@ }, }; -/* Acer TravelMate(/Extensa/Aspire) notebooks have similar configutation to - * the Fujitsu S702x, but jacks are marked differently. We won't allow - * retasking the Headphone jack, so it won't be available here. +/* Capture sources suitable for Acer TravelMate 4060, Aspire 1640 and similar + * laptops. */ static struct hda_input_mux alc260_acer_capture_source = { - .num_items = 3, + .num_items = 2, .items = { { "Mic", 0x0 }, { "Line", 0x2 }, - { "CD", 0x4 }, }, }; @@ -2830,16 +2828,18 @@ static struct snd_kcontrol_new alc260_acer_mixer[] = { HDA_CODEC_VOLUME("Master Playback Volume", 0x08, 0x0, HDA_OUTPUT), HDA_BIND_MUTE("Master Playback Switch", 0x08, 2, HDA_INPUT), - HDA_CODEC_VOLUME("CD Playback Volume", 0x07, 0x04, HDA_INPUT), - HDA_CODEC_MUTE("CD Playback Switch", 0x07, 0x04, HDA_INPUT), HDA_CODEC_VOLUME("Mic Playback Volume", 0x07, 0x0, HDA_INPUT), HDA_CODEC_MUTE("Mic Playback Switch", 0x07, 0x0, HDA_INPUT), - ALC_PIN_MODE("Mic Jack Mode", 0x12, ALC_PIN_DIR_IN), + /* Mic jack works as output too, actually, but it only outputs both stereo + * channels mixed to left channel then. Furthermore, the same pin is + * connected to the internal microphone. So, let's forget it. + */ HDA_CODEC_VOLUME("Line Playback Volume", 0x07, 0x02, HDA_INPUT), HDA_CODEC_MUTE("Line Playback Switch", 0x07, 0x02, HDA_INPUT), + /* Line jack doesn't actually preamplify the mic even if set to one of the + * Mic modes. However, it doesn't seem like these can be disabled ATM. + */ ALC_PIN_MODE("Line Jack Mode", 0x14, ALC_PIN_DIR_INOUT), - HDA_CODEC_VOLUME("Beep Playback Volume", 0x07, 0x05, HDA_INPUT), - HDA_CODEC_MUTE("Beep Playback Switch", 0x07, 0x05, HDA_INPUT), { } /* end */ }; @@ -3128,18 +3128,18 @@ * similar laptops (adapted from Fujitsu init verbs). */ static struct hda_verb alc260_acer_init_verbs[] = { - /* On TravelMate laptops, GPIO 0 enables the internal speaker and - * the headphone jack. Turn this on and rely on the standard mute - * methods whenever the user wants to turn these outputs off. + /* On TravelMate 4060, Aspire 1640 and similar laptops, GPIO 0 enables the + * internal speaker and the headphone jack. Turn this on and rely on the + * standard mute methods whenever the user wants to turn these outputs off. */ {0x01, AC_VERB_SET_GPIO_MASK, 0x01}, {0x01, AC_VERB_SET_GPIO_DIRECTION, 0x01}, {0x01, AC_VERB_SET_GPIO_DATA, 0x01}, - /* Internal speaker/Headphone jack is connected to Line-out pin */ + /* Internal speaker and Headphone jack are connected to line-out pin */ {0x0f, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, - /* Internal microphone/Mic jack is connected to Mic1 pin */ + /* Internal microphone and Mic jack are connected to mic1 pin */ {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF50}, - /* Line In jack is connected to Line1 pin */ + /* Line In jack is connected to line1 pin */ {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, /* Ensure all other unused pins are disabled and muted. */ {0x10, AC_VERB_SET_PIN_WIDGET_CONTROL, 0}, @@ -3154,7 +3154,7 @@ {0x03, AC_VERB_SET_DIGI_CONVERT_1, 0}, {0x06, AC_VERB_SET_DIGI_CONVERT_1, 0}, - /* Ensure Mic1 and Line1 pin widgets take input from the OUT1 sum + /* Ensure mic1 and line1 pin widgets take input from the OUT1 sum * bus when acting as outputs. */ {0x0b, AC_VERB_SET_CONNECT_SEL, 0}, @@ -3173,10 +3173,10 @@ /* Unmute Line-out pin widget amp left and right (no equiv mixer ctrl) */ {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, - /* Unmute Mic1 and Line1 pin widget input buffers since they start as + /* Unmute mic1 and line1 pin widget input buffers since they start as * inputs. If the pin mode is changed by the user the pin mode control * will take care of enabling the pin's input/output buffers as needed. - * Therefore there's no need to enable the input buffer at this + * Therefore there's no need to enable the output buffer at this * stage. */ {0x12, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, @@ -3184,13 +3184,14 @@ /* Mute capture amp left and right */ {0x04, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, - /* Set ADC connection select to match default mixer setting - mic + /* Set ADC connection select to match default mixer setting - Mic * (on mic1 pin) */ {0x04, AC_VERB_SET_CONNECT_SEL, 0x00}, /* Do similar with the second ADC: mute capture input amp and - * set ADC connection to line (on line1 pin) + * set ADC connection to Line (on line1 pin) + * FIXME: the connection is still set to Mic for some reason */ {0x05, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, {0x05, AC_VERB_SET_CONNECT_SEL, 0x02},