From owner-freebsd-multimedia@FreeBSD.ORG Mon Jul 28 17:18:45 2008 Return-Path: Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B26CD106566C for ; Mon, 28 Jul 2008 17:18:45 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (skuns.zoral.com.ua [91.193.166.194]) by mx1.freebsd.org (Postfix) with ESMTP id 3D2858FC22 for ; Mon, 28 Jul 2008 17:18:44 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id m6SGhXRx062113 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 28 Jul 2008 19:43:33 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.2/8.14.2) with ESMTP id m6SGhWYW001005; Mon, 28 Jul 2008 19:43:32 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.2/8.14.2/Submit) id m6SGhWd5001004; Mon, 28 Jul 2008 19:43:32 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 28 Jul 2008 19:43:32 +0300 From: Kostik Belousov To: WATANABE Kazuhiro Message-ID: <20080728164332.GL97161@deviant.kiev.zoral.com.ua> References: <18678895.post@talk.nabble.com> <20080728160050.2757F517E6@mail.asahi-net.or.jp> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Tw5XVHq4jmAOFG53" Content-Disposition: inline In-Reply-To: <20080728160050.2757F517E6@mail.asahi-net.or.jp> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.93.3, clamav-milter version 0.93.3 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: freebsd-multimedia Subject: Re: AD1985 microphone input (Re: Problem recording, using ) X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jul 2008 17:18:45 -0000 --Tw5XVHq4jmAOFG53 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 29, 2008 at 01:00:49AM +0900, WATANABE Kazuhiro wrote: > Hello. >=20 > Changed the subject. >=20 > At Sun, 27 Jul 2008 11:11:38 -0700 (PDT), > DoctorD wrote: > > Hi! > >=20 > > I have the same problem, but I have a bit different card: > >=20 > > pcm0: port 0xc000-0xc0ff,0xc400-0xc43f mem > > 0xf7dff800-0xf7dff9ff,0xf7dff400-0xf7dff4ff irq 17 at device 31.5 on pc= i0 > > pcm0: [ITHREAD] > > pcm0: > >=20 > > MB: ASUS P4P800 Deluxe > >=20 > > I tried to apply you last patch, but my card didn't work... > > Could you please, create a one more patch for my card. > >=20 > > Thanx. >=20 > Would you apply the patch below? If your ICH audio controller has a > different card ID, change the value of the "case" statement in > ad1985_patch(). To settle the ID, I've referred the following mail: >=20 > http://lists.freebsd.org/pipermail/freebsd-multimedia/2003-October/00049= 7.html >=20 >=20 > --- sys/dev/sound/pcm/ac97.c.releng70 2007-10-30 03:47:47.000000000 +0900 > +++ sys/dev/sound/pcm/ac97.c 2008-07-28 18:29:02.000000000 +0900 > @@ -141,8 +141,8 @@ > { 0x41445370, 0x00, 0, "AD1980", ad198x_patch }, > { 0x41445372, 0x00, 0, "AD1981A", 0 }, > { 0x41445374, 0x00, 0, "AD1981B", ad1981b_patch }, > - { 0x41445375, 0x00, 0, "AD1985", ad198x_patch }, > - { 0x41445378, 0x00, 0, "AD1986", ad198x_patch }, > + { 0x41445375, 0x00, 0, "AD1985", ad1985_patch }, > + { 0x41445378, 0x00, 0, "AD1986", ad1986_patch }, > { 0x414b4d00, 0x00, 1, "AK4540", 0 }, > { 0x414b4d01, 0x00, 1, "AK4542", 0 }, > { 0x414b4d02, 0x00, 1, "AK4543", 0 }, > --- sys/dev/sound/pcm/ac97_patch.c.releng70 2007-10-30 03:47:27.000000000= +0900 > +++ sys/dev/sound/pcm/ac97_patch.c 2008-07-28 21:33:56.000000000 +0900 > @@ -69,6 +69,66 @@ > } > } > =20 > +void ad1985_patch(struct ac97_info* codec) > +{ > + /* > + * Disable outputs of the SURR_OUT and CENTER_OUT/LFE_OUT pins. > + * Select the CENTER_OUT/LFE_OUT pins as the MIC inputs. > + * Enable the stereo microphone mode. > + * > + * Set the voltage of the VREFOUT pin. > + */ > + switch (ac97_getsubvendor(codec)) { > + case 0x80f31043: /* ASUS P4P800 Deluxe (SE) */ > + ac97_wrcd(codec, 0x76, ac97_rdcd(codec, 0x76) | 0x1800); > + ac97_wrcd(codec, 0x74, ac97_rdcd(codec, 0x74) | 0x0200); > + ac97_wrcd(codec, 0x76, ac97_rdcd(codec, 0x76) | 0x0040); > + > + /* > + * 0x0 =3D 2.25V (default) > + * 0x1 =3D High-Z > + * 0x2 =3D 3.7V > + * 0x3 =3D 0V > + */ > + ac97_wrcd(codec, 0x76, (ac97_rdcd(codec, 0x76) & ~0xc) > + | 0x0 << 2); > + break; > + default: > + break; > + } > +} > + > +void ad1986_patch(struct ac97_info* codec) > +{ > + /* > + * Disable outputs of the SURR_OUT and CENTER_OUT/LFE_OUT pins. > + * Select the SURR_OUT pins as the LINE_IN inputs. > + * Select the CENTER_OUT/LFE_OUT pins as the MIC inputs. > + * Enable the stereo microphone mode. > + * > + * Set the voltage of the C/LFE VREF_OUT pin. > + */ > + switch (ac97_getsubvendor(codec)) { > + case 0x818f1043: /* ASUS P5SD2-X (SE) */ > + ac97_wrcd(codec, 0x76, ac97_rdcd(codec, 0x76) | 0x1800); > + ac97_wrcd(codec, 0x76, ac97_rdcd(codec, 0x76) | 0x0004); > + ac97_wrcd(codec, 0x74, ac97_rdcd(codec, 0x74) | 0x0200); > + ac97_wrcd(codec, 0x76, ac97_rdcd(codec, 0x76) | 0x0040); > + > + /* > + * 0x0 =3D High-Z (default) > + * 0x1 =3D 2.25V > + * 0x2 =3D 0V > + * 0x4 =3D 3.70V > + */ > + ac97_wrcd(codec, 0x70, (ac97_rdcd(codec, 0x70) & ~0x1c) > + | 0x1 << 2); > + break; > + default: > + break; > + } > +} > + > void cmi9739_patch(struct ac97_info* codec) > { > /* > --- sys/dev/sound/pcm/ac97_patch.h.releng70 2007-04-19 22:54:22.000000000= +0900 > +++ sys/dev/sound/pcm/ac97_patch.h 2008-07-28 18:29:21.000000000 +0900 > @@ -31,5 +31,7 @@ > void ad1886_patch(struct ac97_info*); > void ad198x_patch(struct ac97_info*); > void ad1981b_patch(struct ac97_info*); > +void ad1985_patch(struct ac97_info*); > +void ad1986_patch(struct ac97_info*); > void cmi9739_patch(struct ac97_info*); > void alc655_patch(struct ac97_info*); >=20 BTW, I use the http://people.freebsd.org/~kib/ad1985/setup_mic_ad1985.cc --Tw5XVHq4jmAOFG53 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkiN9zQACgkQC3+MBN1Mb4hWsQCfYb74Y7/9pdxM3C6//fquhtJA nbEAoIp5oIFOdb/AsS7dP/ndb0JmN+Yi =2cSp -----END PGP SIGNATURE----- --Tw5XVHq4jmAOFG53--