--- ac97_codec.c Mon Nov 12 15:02:54 2001 +++ ac97_codec-1886.c Mon Jan 14 14:05:06 2002 @@ -87,6 +87,8 @@ static struct ac97_ops null_ops = { NULL, NULL, NULL }; static struct ac97_ops default_ops = { NULL, eapd_control, NULL }; +static struct ac97_ops eapd_init_ops = { eapd_on_control, NULL, NULL }; +static struct ac97_ops eapd_init2_ops = { eapd_off_control, NULL, NULL }; static struct ac97_ops wolfson_ops = { wolfson_init, NULL, NULL }; static struct ac97_ops tritech_ops = { tritech_init, NULL, NULL }; static struct ac97_ops tritech_m_ops = { tritech_maestro_init, NULL, NULL }; @@ -106,6 +108,8 @@ {0x41445348, "Analog Devices AD1881A", &null_ops}, {0x41445360, "Analog Devices AD1885", &default_ops}, {0x41445460, "Analog Devices AD1885", &default_ops}, + {0x41445461, "Analog Devices AD1886", &eapd_init_ops}, +// {0x41445461, "Analog Devices AD1886", &eapd_init2_ops}, {0x414B4D00, "Asahi Kasei AK4540", &null_ops}, {0x414B4D01, "Asahi Kasei AK4542", &null_ops}, {0x414B4D02, "Asahi Kasei AK4543", &null_ops}, @@ -870,7 +874,6 @@ return 0; } - /* * This is basically standard AC97. It should work as a default for * almost all modern codecs. Note that some cards wire EAPD *backwards* @@ -886,6 +889,18 @@ else codec->codec_write(codec, AC97_POWER_CONTROL, codec->codec_read(codec, AC97_POWER_CONTROL)&~0x8000); + return 0; +} + +static int eapd_on_control(struct ac97_codec * codec) +{ + eapd_control(codec,0); + return 0; +} + +static int eapd_off_control(struct ac97_codec * codec) +{ + eapd_control(codec,1); return 0; }