Date: Tue, 29 Jul 2008 15:22:19 -0700 (PDT) From: DoctorD <doctordimon@gmail.com> To: freebsd-multimedia@freebsd.org Subject: Re: AD1985 microphone input Message-ID: <18722486.post@talk.nabble.com> In-Reply-To: <20080729122112.E064A24673@mail.asahi-net.or.jp> References: <20070510115120.GB1716@ige.unicamp.br> <20070602124938.8F5123E054@mail.asahi-net.or.jp> <20070604140241.GA1474@ige.unicamp.br> <20070605145944.B750E3C23C@mail.asahi-net.or.jp> <20070605163410.GA1496@ige.unicamp.br> <20070606162049.995E53DFA5@mail.asahi-net.or.jp> <20070607160336.CBCBA2D4CF@mail.asahi-net.or.jp> <20070611124008.GA1461@ige.unicamp.br> <20070611161051.EEA7F347C9@mail.asahi-net.or.jp> <20070612160223.2289B3AE18@mail.asahi-net.or.jp> <20070612184114.GB1474@ige.unicamp.br> <20080628145009.B42E35EBED@mail.asahi-net.or.jp> <18678895.post@talk.nabble.com> <20080728160050.2757F517E6@mail.asahi-net.or.jp> <18699708.post@talk.nabble.com> <20080729122112.E064A24673@mail.asahi-net.or.jp>
next in thread | previous in thread | raw e-mail | index | archive | help
Hello!!! Thanx you very much!!!! Its realy works now!!! And Im happy NOW!!!! P.S. Sorry for my English ones again. Watanabe Kazuhiro wrote: > > At Mon, 28 Jul 2008 14:03:40 -0700 (PDT), > DoctorD wrote: >> Hello! >> >> Hmm... after that patch my card cannt playback any sounds (((( >> >> just silence.... >> >> any ideas? =))) > > OK. How about this? > > --- 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-29 13:00:04.000000000 +0900 > @@ -44,6 +44,9 @@ > > void ad198x_patch(struct ac97_info* codec) > { > + /* > + * Swap the aim of the LINE_OUT and SURR_OUT/HP_OUT pins. > + */ > switch (ac97_getsubvendor(codec)) { > case 0x11931043: /* Not for ASUS A9T (probably else too). */ > break; > @@ -69,6 +72,68 @@ > } > } > > +void ad1985_patch(struct ac97_info* codec) > +{ > + /* > + * Swap the aim of the LINE_OUT and SURR_OUT/HP_OUT pins. > + * Disable outputs of the LINE_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) | 0x0420); > + 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 = 2.25V (default) > + * 0x1 = High-Z > + * 0x2 = 3.7V > + * 0x3 = 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 = High-Z (default) > + * 0x1 = 2.25V > + * 0x2 = 0V > + * 0x4 = 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*); > > --- > WATANABE Kazuhiro (CQG00620@nifty.ne.jp) > _______________________________________________ > freebsd-multimedia@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-multimedia > To unsubscribe, send any mail to > "freebsd-multimedia-unsubscribe@freebsd.org" > > -- View this message in context: http://www.nabble.com/Problem-recording%2C-using-%3CSiS-7012%3E-tp10412103p18722486.html Sent from the freebsd-multimedia mailing list archive at Nabble.com.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?18722486.post>