On Thu, Apr 12, 2007 at 02:34:49PM +0200, Takashi Iwai wrote: > At Thu, 12 Apr 2007 13:09:59 +0300, > Dan Aloni wrote: > > > > Hello, > > > > Yesterday I posted this bug in the bugtracker: > > > > https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3013 > > > > I have received no reponse yet. > > > > I'd like to cooperate on solving this. > > Most of such problems are caused by buggy BIOS, as the driver tries > to set up based on BIOS information if the device is unknown. > > Did you try to pass model options for ALC882? > For example, model=3stack or model=6stack. > Also, position_fix option is worth try to fix some playback problems. Okay, so based on the 2.6.21-rc6 codebase: position_fix=1 fixed the clicks. Concerning the speakers - I have found that if I swap the orange and black - it works. Of course, it wouldn't be right to swap them out physically (i.e. black connects to orange socket and orange to black socket), so I made a patch for it. BTW, I have double-checked that everything is wired correctly in my 5.1 system (i.e, Front = Green jack, Rear = Black jack, Center and LFE = Orange jack). NOTE: This patch is *UGLY*. I don't expect you to commit it, but it provides some info on how to detect my board. You guys properly have a better idea on how to implement it. Signed-off-by: Dan Aloni <da-x@xxxxxxxxxxxxx> diff --git a/hda_intel.c b/hda_intel.c index 1672cac..0566147 100644 --- a/hda_intel.c +++ b/hda_intel.c @@ -1520,6 +1520,7 @@ static int azx_dev_free(struct snd_device *device) */ static const struct snd_pci_quirk position_fix_list[] __devinitdata = { SND_PCI_QUIRK(0x1028, 0x01cc, "Dell D820", POS_FIX_NONE), + SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", POS_FIX_POSBUF), {} }; diff --git a/patch_realtek.c b/patch_realtek.c index fba3cb1..4b09c61 100644 --- a/patch_realtek.c +++ b/patch_realtek.c @@ -123,6 +123,7 @@ enum { enum { ALC882_3ST_DIG, ALC882_6ST_DIG, + ALC882_ABIT, ALC882_ARIMA, ALC882_AUTO, ALC885_MACPRO, @@ -3007,7 +3008,7 @@ static void alc880_auto_init_analog_input(struct hda_codec *codec) /* parse the BIOS configuration and set up the alc_spec */ /* return 1 if successful, 0 if the proper config is not found, or a negative error code */ -static int alc880_parse_auto_config(struct hda_codec *codec) +static int alc880_parse_auto_config(struct hda_codec *codec, int abit) { struct alc_spec *spec = codec->spec; int err; @@ -3016,6 +3017,14 @@ static int alc880_parse_auto_config(struct hda_codec *codec) if ((err = snd_hda_parse_pin_def_config(codec, &spec->autocfg, alc880_ignore)) < 0) return err; + + if (abit) { + struct auto_pin_cfg *cfg = &spec->autocfg; + hda_nid_t nid = cfg->line_out_pins[1]; + cfg->line_out_pins[1] = cfg->line_out_pins[2]; + cfg->line_out_pins[2] = nid; + } + if (! spec->autocfg.line_outs) return 0; /* can't find valid BIOS pin config */ @@ -3082,7 +3091,7 @@ static int patch_alc880(struct hda_codec *codec) if (board_config == ALC880_AUTO) { /* automatic parse from the BIOS config */ - err = alc880_parse_auto_config(codec); + err = alc880_parse_auto_config(codec, 0); if (err < 0) { alc_free(codec); return err; @@ -4781,6 +4790,7 @@ static struct snd_kcontrol_new alc882_capture_mixer[] = { static const char *alc882_models[ALC882_MODEL_LAST] = { [ALC882_3ST_DIG] = "3stack-dig", [ALC882_6ST_DIG] = "6stack-dig", + [ALC882_ABIT] = "abit", [ALC882_ARIMA] = "arima", [ALC885_MACPRO] = "macpro", [ALC882_AUTO] = "auto", @@ -4792,6 +4802,7 @@ static struct snd_pci_quirk alc882_cfg_tbl[] = { SND_PCI_QUIRK(0x1462, 0x6668, "MSI", ALC882_6ST_DIG), SND_PCI_QUIRK(0x161f, 0x2054, "Arima W820", ALC882_ARIMA), SND_PCI_QUIRK(0x1043, 0x81d8, "Asus P5WD", ALC882_6ST_DIG), + SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", ALC882_ABIT), {} }; @@ -4907,10 +4918,10 @@ static void alc882_auto_init_analog_input(struct hda_codec *codec) } /* almost identical with ALC880 parser... */ -static int alc882_parse_auto_config(struct hda_codec *codec) +static int alc882_parse_auto_config(struct hda_codec *codec, int abit) { struct alc_spec *spec = codec->spec; - int err = alc880_parse_auto_config(codec); + int err = alc880_parse_auto_config(codec, abit); if (err < 0) return err; @@ -4932,6 +4943,7 @@ static int patch_alc882(struct hda_codec *codec) { struct alc_spec *spec; int err, board_config; + int abit = 0; spec = kzalloc(sizeof(*spec), GFP_KERNEL); if (spec == NULL) @@ -4956,9 +4968,14 @@ static int patch_alc882(struct hda_codec *codec) } } + if (board_config == ALC882_ABIT) { + abit = 1; + board_config = ALC882_AUTO; + } + if (board_config == ALC882_AUTO) { /* automatic parse from the BIOS config */ - err = alc882_parse_auto_config(codec); + err = alc882_parse_auto_config(codec, abit); if (err < 0) { alc_free(codec); return err; @@ -5826,7 +5843,7 @@ static void alc883_auto_init_analog_input(struct hda_codec *codec) static int alc883_parse_auto_config(struct hda_codec *codec) { struct alc_spec *spec = codec->spec; - int err = alc880_parse_auto_config(codec); + int err = alc880_parse_auto_config(codec, 0); if (err < 0) return err; -- Dan Aloni XIV LTD, http://www.xivstorage.com da-x (at) monatomic.org, dan (at) xiv.co.il _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxx http://mailman.alsa-project.org/mailman/listinfo/alsa-devel