Problem recording, using <SiS 7012>

View: New views
20 Messages — Rating Filter:   Alert me  
< Prev | 1 - 2 | Next >

Problem recording, using <SiS 7012>

by Ricardo Campos Passanezi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello all.

I cannot get the microphone working under a <SiS 7012>.

My MoBo is a:

Base Board Information
        Manufacturer: ASUSTeK Computer INC.
        Product Name: P5SD2-X


# cat /dev/sndstat
FreeBSD Audio Driver (newpcm)
Installed devices:
pcm0: <SiS 7012> at io 0xb800, 0xb400 irq 18 bufsz 16384 kld snd_ich
(1p/1r/0v channels duplex default)


The output of mixer:

# mixer
Mixer vol      is currently set to  75:75
Mixer pcm      is currently set to  75:75
Mixer speaker  is currently set to  75:75
Mixer line     is currently set to  75:75
Mixer mic      is currently set to  80:80
Mixer cd       is currently set to  75:75
Mixer rec      is currently set to  80:80
Mixer igain    is currently set to   0:0
Mixer ogain    is currently set to  50:50
Mixer line1    is currently set to  75:75
Mixer phin     is currently set to   0:0
Mixer phout    is currently set to   0:0
Recording source: mic

I've search through this mailling archive file but couldn't find
anything.

Am I missing something?

Thanks in advance.

--
Ricardo Campos Passanezi
_______________________________________________
freebsd-multimedia@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-multimedia
To unsubscribe, send any mail to "freebsd-multimedia-unsubscribe@..."

Re: Problem recording, using <SiS 7012>

by Watanabe Kazuhiro :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello.

If you still cannot solve the problem, try to set "igain" to 100
(e.g. mixer igain 100).  This enables additional mic gain for AC97
codecs (typically +20dB boost).

At Thu, 10 May 2007 08:51:20 -0300,
Ricardo Campos Passanezi wrote:

> Hello all.
>
> I cannot get the microphone working under a <SiS 7012>.
>
> My MoBo is a:
>
> Base Board Information
>         Manufacturer: ASUSTeK Computer INC.
>         Product Name: P5SD2-X
>
>
> # cat /dev/sndstat
> FreeBSD Audio Driver (newpcm)
> Installed devices:
> pcm0: <SiS 7012> at io 0xb800, 0xb400 irq 18 bufsz 16384 kld snd_ich
> (1p/1r/0v channels duplex default)
>
>
> The output of mixer:
>
> # mixer
> Mixer vol      is currently set to  75:75
> Mixer pcm      is currently set to  75:75
> Mixer speaker  is currently set to  75:75
> Mixer line     is currently set to  75:75
> Mixer mic      is currently set to  80:80
> Mixer cd       is currently set to  75:75
> Mixer rec      is currently set to  80:80
> Mixer igain    is currently set to   0:0
> Mixer ogain    is currently set to  50:50
> Mixer line1    is currently set to  75:75
> Mixer phin     is currently set to   0:0
> Mixer phout    is currently set to   0:0
> Recording source: mic
>
> I've search through this mailling archive file but couldn't find
> anything.
>
> Am I missing something?
>
> Thanks in advance.
>
> --
> Ricardo Campos Passanezi
---
Watanabe Kazuhiro (CQG00620@...)
_______________________________________________
freebsd-multimedia@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-multimedia
To unsubscribe, send any mail to "freebsd-multimedia-unsubscribe@..."

Re: Problem recording, using <SiS 7012>

by Ricardo Campos Passanezi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sat, Jun 02, 2007 at 09:49:38PM +0900, Watanabe Kazuhiro wrote:
> Hello.
>
> If you still cannot solve the problem, try to set "igain" to 100
> (e.g. mixer igain 100).  This enables additional mic gain for AC97
> codecs (typically +20dB boost).

That didn't work, unfortunatly.

I forgot to telli in my previous post that I was using RELENG_6_2. Now I
have RELENG_6 running.


--
Ricardo Campos Passanezi
_______________________________________________
freebsd-multimedia@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-multimedia
To unsubscribe, send any mail to "freebsd-multimedia-unsubscribe@..."

Re: Problem recording, using <SiS 7012>

by Watanabe Kazuhiro :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

At Mon, 4 Jun 2007 11:02:41 -0300,
Ricardo Campos Passanezi wrote:

> On Sat, Jun 02, 2007 at 09:49:38PM +0900, Watanabe Kazuhiro wrote:
> > Hello.
> >
> > If you still cannot solve the problem, try to set "igain" to 100
> > (e.g. mixer igain 100).  This enables additional mic gain for AC97
> > codecs (typically +20dB boost).
>
> That didn't work, unfortunatly.
>
> I forgot to telli in my previous post that I was using RELENG_6_2. Now I
> have RELENG_6 running.

OK.

Your motherboard (ASUS P5SD2-X) has two microphone inputs.  Which did
you connect the microphone to, the rear panel jack or the internal
pinhead?

Can you try to connect the microphone to the other microphone input?

If you cannot do that, we have to try to enable both microphone inputs
by the device driver.  I'll make a patch.
---
Watanabe Kazuhiro (CQG00620@...)
_______________________________________________
freebsd-multimedia@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-multimedia
To unsubscribe, send any mail to "freebsd-multimedia-unsubscribe@..."

Re: Problem recording, using <SiS 7012>

by Ricardo Campos Passanezi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Jun 05, 2007 at 11:59:44PM +0900, Watanabe Kazuhiro wrote:

> At Mon, 4 Jun 2007 11:02:41 -0300,
> Ricardo Campos Passanezi wrote:
> > On Sat, Jun 02, 2007 at 09:49:38PM +0900, Watanabe Kazuhiro wrote:
> > > Hello.
> > >
> > > If you still cannot solve the problem, try to set "igain" to 100
> > > (e.g. mixer igain 100).  This enables additional mic gain for AC97
> > > codecs (typically +20dB boost).
> >
> > That didn't work, unfortunatly.
> >
> > I forgot to telli in my previous post that I was using RELENG_6_2. Now I
> > have RELENG_6 running.
>
> OK.
>
> Your motherboard (ASUS P5SD2-X) has two microphone inputs.  Which did
> you connect the microphone to, the rear panel jack or the internal
> pinhead?

To the rear panel.

>
> Can you try to connect the microphone to the other microphone input?
>

No I can't.

> If you cannot do that, we have to try to enable both microphone inputs
> by the device driver.  I'll make a patch.
> ---
> Watanabe Kazuhiro (CQG00620@...)

--
Ricardo Campos Passanezi -  Administrador de Rede
Chave PGP e GPG Pública em: http://www.ige.unicamp.br/~riccp
Instituto de Geociências -  http://www.ige.unicamp.br - UNICAMP
_______________________________________________
freebsd-multimedia@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-multimedia
To unsubscribe, send any mail to "freebsd-multimedia-unsubscribe@..."

Re: Problem recording, using <SiS 7012>

by Watanabe Kazuhiro :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

At Tue, 5 Jun 2007 13:34:10 -0300,
Ricardo Campos Passanezi wrote:

> On Tue, Jun 05, 2007 at 11:59:44PM +0900, Watanabe Kazuhiro wrote:
> > At Mon, 4 Jun 2007 11:02:41 -0300,
> > Ricardo Campos Passanezi wrote:
> > > On Sat, Jun 02, 2007 at 09:49:38PM +0900, Watanabe Kazuhiro wrote:
> > > > Hello.
> > > >
> > > > If you still cannot solve the problem, try to set "igain" to 100
> > > > (e.g. mixer igain 100).  This enables additional mic gain for AC97
> > > > codecs (typically +20dB boost).
> > >
> > > That didn't work, unfortunatly.
> > >
> > > I forgot to telli in my previous post that I was using RELENG_6_2. Now I
> > > have RELENG_6 running.
> >
> > OK.
> >
> > Your motherboard (ASUS P5SD2-X) has two microphone inputs.  Which did
> > you connect the microphone to, the rear panel jack or the internal
> > pinhead?
>
> To the rear panel.
>
> >
> > Can you try to connect the microphone to the other microphone input?
> >
>
> No I can't.
>
> > If you cannot do that, we have to try to enable both microphone inputs
> > by the device driver.  I'll make a patch.
> > ---
> > Watanabe Kazuhiro (CQG00620@...)

It's the first patch.  Try it.

Index: sys/dev/sound/pcm/ac97.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/sound/pcm/ac97.c,v
retrieving revision 1.53.2.5
diff -u -r1.53.2.5 ac97.c
--- sys/dev/sound/pcm/ac97.c 13 May 2007 20:53:39 -0000 1.53.2.5
+++ sys/dev/sound/pcm/ac97.c 6 Jun 2007 15:45:42 -0000
@@ -141,7 +141,7 @@
  { 0x41445372, 0x00, 0, "AD1981A", 0 },
  { 0x41445374, 0x00, 0, "AD1981B", ad1981b_patch },
  { 0x41445375, 0x00, 0, "AD1985", ad198x_patch },
- { 0x41445378, 0x00, 0, "AD1986", ad198x_patch },
+ { 0x41445378, 0x00, 0, "AD1986", ad1986_patch },
  { 0x414b4d00, 0x00, 1, "AK4540", 0 },
  { 0x414b4d01, 0x00, 1, "AK4542", 0 },
  { 0x414b4d02, 0x00, 1, "AK4543", 0 },
Index: sys/dev/sound/pcm/ac97_patch.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/sound/pcm/ac97_patch.c,v
retrieving revision 1.3.2.2
diff -u -r1.3.2.2 ac97_patch.c
--- sys/dev/sound/pcm/ac97_patch.c 26 Apr 2007 08:30:52 -0000 1.3.2.2
+++ sys/dev/sound/pcm/ac97_patch.c 6 Jun 2007 15:47:43 -0000
@@ -43,9 +43,23 @@
 
 void ad198x_patch(struct ac97_info* codec)
 {
+ /*
+ * The mixer outputs drives SURR_OUT and HP_OUT.
+ */
  ac97_wrcd(codec, 0x76, ac97_rdcd(codec, 0x76) | 0x0420);
 }
 
+void ad1986_patch(struct ac97_info* codec)
+{
+ /*
+ * Enable both MIC1 and MIC2.
+ * XXX must be restricted only for particular models.
+ */
+ ac97_wrcd(codec, 0x7a, ac97_rdcd(codec, 0x7a) | 0x0004);
+
+ ad198x_patch(codec);
+}
+
 void ad1981b_patch(struct ac97_info* codec)
 {
  /*
Index: sys/dev/sound/pcm/ac97_patch.h
===================================================================
RCS file: /home/ncvs/src/sys/dev/sound/pcm/ac97_patch.h,v
retrieving revision 1.3.2.2
diff -u -r1.3.2.2 ac97_patch.h
--- sys/dev/sound/pcm/ac97_patch.h 26 Apr 2007 08:30:52 -0000 1.3.2.2
+++ sys/dev/sound/pcm/ac97_patch.h 6 Jun 2007 15:46:12 -0000
@@ -30,5 +30,6 @@
 void ad1886_patch(struct ac97_info*);
 void ad198x_patch(struct ac97_info*);
 void ad1981b_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@...)
_______________________________________________
freebsd-multimedia@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-multimedia
To unsubscribe, send any mail to "freebsd-multimedia-unsubscribe@..."

Parent Message unknown Re: Problem recording, using <SiS 7012>

by Watanabe Kazuhiro :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

At Wed, 6 Jun 2007 14:21:07 -0300,
Ricardo Campos Passanezi wrote:

> On Thu, Jun 07, 2007 at 01:20:49AM +0900, Watanabe Kazuhiro wrote:
> >
> > It's the first patch.  Try it.
>
> Just to be sure: I've rebuilt th kernel after applying the patches. Is
> this the right path?
>
> Well, after this I've done some tests with xwave and by issuing "cat
> /dev/dsp > test.au" and then "cat test.au >> /dev/dsp".
>
> Neither of them worked...

I've read the ASUS P5SD2-X english manual.  It describes about the
rear audio panel jacks:

 Audio 2, 4, or 6-channel configulation
 -------------------------------------------------------------------------
 Port Headset 4-channel 6-channel
  2-channel
 -------------------------------------------------------------------------
 Light Bule Line In Line In [1] Line in [1]
 Lime Line Out Front Speaker Out Front Speaker Out
 Pink Mic In Mic In Mic In [2]
 -------------------------------------------------------------------------
 (P5SD2-X English Manual E2026 (E2026_P5SD2-X.pdf), p.35)

And there are the manuals those are written in chinese.  I saw those
manuals today, and they have the same table.  I'm not familiar with
chinese, but I just understand that [1]s and [2] are "output".

AD1986A can share line inputs pins and surround outputs pins, and
center/lfe outputs pins and microphone input pins.

So perhaps [1]s are "Surround Out", and [2] is "Center/Subwoofer Out".

I've write a new patch attached below.  Try it.  Note that before
apply this patch, you have to restore the patched files.

> The output of mixer:
>
> # mixer
> Mixer vol      is currently set to  75:75
> Mixer pcm      is currently set to  80:80
> Mixer speaker  is currently set to  75:75
> Mixer line     is currently set to  75:75
> Mixer mic      is currently set to  75:75
> Mixer cd       is currently set to  75:75
> Mixer rec      is currently set to  75:75
> Mixer igain    is currently set to   0:0
> Mixer ogain    is currently set to  50:50
> Mixer line1    is currently set to  75:75
> Mixer phin     is currently set to   0:0
> Mixer phout    is currently set to   0:0
> Recording source: mic
>
>
> Do you need more info?

Will you show me the output of "dmesg | grep pcm" and
"pciconf -lv | grep pcm" ?


Index: sys/dev/sound/pcm/ac97.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/sound/pcm/ac97.c,v
retrieving revision 1.53.2.5
diff -u -r1.53.2.5 ac97.c
--- sys/dev/sound/pcm/ac97.c 13 May 2007 20:53:39 -0000 1.53.2.5
+++ sys/dev/sound/pcm/ac97.c 6 Jun 2007 15:45:42 -0000
@@ -141,7 +141,7 @@
  { 0x41445372, 0x00, 0, "AD1981A", 0 },
  { 0x41445374, 0x00, 0, "AD1981B", ad1981b_patch },
  { 0x41445375, 0x00, 0, "AD1985", ad198x_patch },
- { 0x41445378, 0x00, 0, "AD1986", ad198x_patch },
+ { 0x41445378, 0x00, 0, "AD1986", ad1986_patch },
  { 0x414b4d00, 0x00, 1, "AK4540", 0 },
  { 0x414b4d01, 0x00, 1, "AK4542", 0 },
  { 0x414b4d02, 0x00, 1, "AK4543", 0 },
Index: sys/dev/sound/pcm/ac97_patch.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/sound/pcm/ac97_patch.c,v
retrieving revision 1.3.2.2
diff -u -r1.3.2.2 ac97_patch.c
--- sys/dev/sound/pcm/ac97_patch.c 26 Apr 2007 08:30:52 -0000 1.3.2.2
+++ sys/dev/sound/pcm/ac97_patch.c 7 Jun 2007 12:47:18 -0000
@@ -43,9 +43,30 @@
 
 void ad198x_patch(struct ac97_info* codec)
 {
+ /*
+ * The mixer outputs drives the SURR_OUT and HP_OUT pins.
+ */
  ac97_wrcd(codec, 0x76, ac97_rdcd(codec, 0x76) | 0x0420);
 }
 
+void ad1986_patch(struct ac97_info* codec)
+{
+ ac97_wrcd(codec, 0x76, ac97_rdcd(codec, 0x76) | 0x0420);
+
+ /*
+ * 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.
+ *
+ * XXX must be restricted only for particular models.
+ */
+ 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);
+}
+
 void ad1981b_patch(struct ac97_info* codec)
 {
  /*
Index: sys/dev/sound/pcm/ac97_patch.h
===================================================================
RCS file: /home/ncvs/src/sys/dev/sound/pcm/ac97_patch.h,v
retrieving revision 1.3.2.2
diff -u -r1.3.2.2 ac97_patch.h
--- sys/dev/sound/pcm/ac97_patch.h 26 Apr 2007 08:30:52 -0000 1.3.2.2
+++ sys/dev/sound/pcm/ac97_patch.h 6 Jun 2007 15:46:12 -0000
@@ -30,5 +30,6 @@
 void ad1886_patch(struct ac97_info*);
 void ad198x_patch(struct ac97_info*);
 void ad1981b_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@...)
_______________________________________________
freebsd-multimedia@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-multimedia
To unsubscribe, send any mail to "freebsd-multimedia-unsubscribe@..."

Re: Problem recording, using <SiS 7012>

by Ricardo Campos Passanezi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, Jun 08, 2007 at 01:03:36AM +0900, Watanabe Kazuhiro wrote:
>
> Will you show me the output of "dmesg | grep pcm" and
> "pciconf -lv | grep pcm" ?

# dmesg | grep pcm
pcm0: <SiS 7012> port 0xb800-0xb8ff,0xb400-0xb47f irq 18 at device 2.7
on pci0
pcm0: <Analog Devices AD1986 AC97 Codec>

# pciconf -lv | grep pcm
pcm0@pci0:2:7:  class=0x040100 card=0x818f1043 chip=0x70121039 rev=0xa0
hdr=0x00

Didn't work again...

--
Ricardo Campos Passanezi
_______________________________________________
freebsd-multimedia@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-multimedia
To unsubscribe, send any mail to "freebsd-multimedia-unsubscribe@..."

Re: Problem recording, using <SiS 7012>

by Watanabe Kazuhiro :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

At Mon, 11 Jun 2007 09:40:08 -0300,
Ricardo Campos Passanezi wrote:

> On Fri, Jun 08, 2007 at 01:03:36AM +0900, Watanabe Kazuhiro wrote:
> >
> > Will you show me the output of "dmesg | grep pcm" and
> > "pciconf -lv | grep pcm" ?
>
> # dmesg | grep pcm
> pcm0: <SiS 7012> port 0xb800-0xb8ff,0xb400-0xb47f irq 18 at device 2.7
> on pci0
> pcm0: <Analog Devices AD1986 AC97 Codec>
>
> # pciconf -lv | grep pcm
> pcm0@pci0:2:7:  class=0x040100 card=0x818f1043 chip=0x70121039 rev=0xa0
> hdr=0x00
>
> Didn't work again...
>
> --
> Ricardo Campos Passanezi

Hmmm... Can you record a sound with the PCM device from analog inputs
other than the microphone input (line, cd, etc.)?

Do "mixer igain 100" have no effect?  Note that the value other than
100 (from 0 to 99) doesn't make sense.
---
Watanabe Kazuhiro (CQG00620@...)
_______________________________________________
freebsd-multimedia@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-multimedia
To unsubscribe, send any mail to "freebsd-multimedia-unsubscribe@..."

Parent Message unknown Re: Problem recording, using <SiS 7012>

by Watanabe Kazuhiro :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

At Mon, 11 Jun 2007 14:17:12 -0300,
Ricardo Campos Passanezi wrote:

> On Tue, Jun 12, 2007 at 01:10:51AM +0900, Watanabe Kazuhiro wrote:
> > At Mon, 11 Jun 2007 09:40:08 -0300,
> > Ricardo Campos Passanezi wrote:
> > > On Fri, Jun 08, 2007 at 01:03:36AM +0900, Watanabe Kazuhiro wrote:
> > > >
> > > > Will you show me the output of "dmesg | grep pcm" and
> > > > "pciconf -lv | grep pcm" ?
> > >
> > > # dmesg | grep pcm
> > > pcm0: <SiS 7012> port 0xb800-0xb8ff,0xb400-0xb47f irq 18 at device 2.7
> > > on pci0
> > > pcm0: <Analog Devices AD1986 AC97 Codec>
> > >
> > > # pciconf -lv | grep pcm
> > > pcm0@pci0:2:7:  class=0x040100 card=0x818f1043 chip=0x70121039 rev=0xa0
> > > hdr=0x00
> > >
> > > Didn't work again...
> > >
> > > --
> > > Ricardo Campos Passanezi
> >
> > Hmmm... Can you record a sound with the PCM device from analog inputs
> > other than the microphone input (line, cd, etc.)?
>
> sorry about my ignorance, but how do i test this?

For example, if you want to record a sound from an audio CD analog
output, try the following commands.  In this procedure we choose
ports/audio/wavplay as a recording and playback software.

$ mixer =rec cd # Select CD as an input source.
$ cdcontrol play # Start playback of the audio CD.
$ wavrec -S -s 44100 -b 16 -t 10 test.wav
                                # Record a sound (from the CD drive).
                                # Duration: 10 secs.
$ cdcontrol stop # Stop the CD.
$ wavplay test.wav # Play the test WAV file.

Of course you have already to connect the analog audio cable from the
CD/DVD drive to the audio CD input pinhead.

> > Do "mixer igain 100" have no effect?  Note that the value other than
> > 100 (from 0 to 99) doesn't make sense.
>
> I'm testing with:
>
> # mixer
> Mixer vol      is currently set to  75:75
> Mixer pcm      is currently set to  80:80
> Mixer speaker  is currently set to  75:75
> Mixer line     is currently set to  75:75
> Mixer mic      is currently set to  75:75
> Mixer cd       is currently set to  75:75
> Mixer rec      is currently set to  75:75
> Mixer igain    is currently set to 100:100
> Mixer ogain    is currently set to   0:0
> Mixer line1    is currently set to  75:75
> Mixer phin     is currently set to   0:0
> Mixer phout    is currently set to   0:0
> Recording source: mic

OK.  These settings may be good.
---
Watanabe Kazuhiro (CQG00620@...)
_______________________________________________
freebsd-multimedia@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-multimedia
To unsubscribe, send any mail to "freebsd-multimedia-unsubscribe@..."

Re: Problem recording, using <SiS 7012>

by Ricardo Campos Passanezi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, Jun 13, 2007 at 01:02:22AM +0900, Watanabe Kazuhiro wrote:
> > > Hmmm... Can you record a sound with the PCM device from analog inputs
> > > other than the microphone input (line, cd, etc.)?

...

>
> For example, if you want to record a sound from an audio CD analog
> output, try the following commands.  In this procedure we choose
> ports/audio/wavplay as a recording and playback software.
>
> $ mixer =rec cd # Select CD as an input source.
> $ cdcontrol play # Start playback of the audio CD.
> $ wavrec -S -s 44100 -b 16 -t 10 test.wav
> # Record a sound (from the CD drive).
> # Duration: 10 secs.
> $ cdcontrol stop # Stop the CD.
> $ wavplay test.wav # Play the test WAV file.
>
> Of course you have already to connect the analog audio cable from the
> CD/DVD drive to the audio CD input pinhead.
>

With:

# mixer
Mixer vol      is currently set to  75:75
Mixer pcm      is currently set to  80:80
Mixer speaker  is currently set to  75:75
Mixer line     is currently set to  75:75
Mixer mic      is currently set to  75:75
Mixer cd       is currently set to  75:75
Mixer rec      is currently set to  75:75
Mixer igain    is currently set to 100:100
Mixer ogain    is currently set to   0:0
Mixer line1    is currently set to  75:75
Mixer phin     is currently set to   0:0
Mixer phout    is currently set to   0:0
Recording source: cd

It worked fine...

--
Ricardo Campos Passanezi -  Administrador de Rede
Chave PGP e GPG Pública em: http://www.ige.unicamp.br/~riccp
Instituto de Geociências -  http://www.ige.unicamp.br - UNICAMP
_______________________________________________
freebsd-multimedia@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-multimedia
To unsubscribe, send any mail to "freebsd-multimedia-unsubscribe@..."

Parent Message unknown Re: Problem recording, using <SiS 7012>

by Watanabe Kazuhiro :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi, again.

Cc'ed to freebsd-multimedia.

At Tue, 24 Jun 2008 14:05:30 -0300,
Ricardo Campos Passanezi wrote:

> On Tue, Jun 12, 2007 at 03:41:14PM -0300, Ricardo Campos Passanezi wrote:
> >On Wed, Jun 13, 2007 at 01:02:22AM +0900, Watanabe Kazuhiro wrote:
> >> > > Hmmm... Can you record a sound with the PCM device from analog inputs
> >> > > other than the microphone input (line, cd, etc.)?
> >
> >...
> >
> >>
> >> For example, if you want to record a sound from an audio CD analog
> >> output, try the following commands.  In this procedure we choose
> >> ports/audio/wavplay as a recording and playback software.
> >>
> >> $ mixer =rec cd # Select CD as an input source.
> >> $ cdcontrol play # Start playback of the audio CD.
> >> $ wavrec -S -s 44100 -b 16 -t 10 test.wav
> >> # Record a sound (from the CD drive).
> >> # Duration: 10 secs.
> >> $ cdcontrol stop # Stop the CD.
> >> $ wavplay test.wav # Play the test WAV file.
> >>
> >> Of course you have already to connect the analog audio cable from the
> >> CD/DVD drive to the audio CD input pinhead.
> >>
> >
> >With:
> >
> ># mixer
> >Mixer vol      is currently set to  75:75
> >Mixer pcm      is currently set to  80:80
> >Mixer speaker  is currently set to  75:75
> >Mixer line     is currently set to  75:75
> >Mixer mic      is currently set to  75:75
> >Mixer cd       is currently set to  75:75
> >Mixer rec      is currently set to  75:75
> >Mixer igain    is currently set to 100:100
> >Mixer ogain    is currently set to   0:0
> >Mixer line1    is currently set to  75:75
> >Mixer phin     is currently set to   0:0
> >Mixer phout    is currently set to   0:0
> >Recording source: cd
> >
> >It worked fine...
>
> Hello Watanabe.
>
> I've done the above and, as you can see in the previous email, it worked
> fine (the recording using 'cd'). When I use 'mic' as recording source
> I've no success.
>
> I'm using 7-STABLE right now.
>
> Can you still help me in this one?
>
> Sorry to bother...

I have searched the web and found the useful page.

 Powering microphones
 http://www.epanorama.net/circuits/microphone_powering.html

The author says "Most lavalier (tie-clip) microphones, consumer video
camera microphones and microphones used with computer soundcards are
electret microphones".

If your microphone is an electret microphone, and its power is
supplied via the mic's signal cable (generally called "plug-in
power"), we have to supply the power to the signal cable.

*****

Be careful to apply this patch.  I believe that the patch is not so
wrong.  But I don't know whether the AD1986A's C/LFE VREFOUT pin is
connected to the microphone jack correctly.  So I cannot expect what
is happen.

--- sys/dev/sound/pcm/ac97.c.releng70 2007-10-30 03:47:47.000000000 +0900
+++ sys/dev/sound/pcm/ac97.c 2008-06-27 21:53:12.000000000 +0900
@@ -142,7 +142,7 @@ static struct ac97_codecid ac97codecid[]
  { 0x41445372, 0x00, 0, "AD1981A", 0 },
  { 0x41445374, 0x00, 0, "AD1981B", ad1981b_patch },
  { 0x41445375, 0x00, 0, "AD1985", ad198x_patch },
- { 0x41445378, 0x00, 0, "AD1986", ad198x_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-06-28 19:12:18.000000000 +0900
@@ -53,6 +53,31 @@ void ad198x_patch(struct ac97_info* code
  }
 }
 
+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);
+
+ /* 0x4 = 2.25V, 0x8 = 0V, 0x10 = 3.70V */
+ ac97_wrcd(codec, 0x70, ac97_rdcd(codec, 0x70) | 0x0004);
+ break;
+ default:
+ break;
+ }
+}
+
 void ad1981b_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-06-27 22:14:43.000000000 +0900
@@ -31,5 +31,6 @@ typedef void (*ac97_patch)(struct ac97_i
 void ad1886_patch(struct ac97_info*);
 void ad198x_patch(struct ac97_info*);
 void ad1981b_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@...)
_______________________________________________
freebsd-multimedia@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-multimedia
To unsubscribe, send any mail to "freebsd-multimedia-unsubscribe@..."

Re: Problem recording, using <SiS 7012>

by Ricardo Campos Passanezi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sat, Jun 28, 2008 at 11:50:07PM +0900, WATANABE Kazuhiro wrote:
>Hi, again.
>
>Cc'ed to freebsd-multimedia.
>

Ok. I've forgotten to send to the list, thanks.


I've applied the patch and the mic is working now. Thanks.

--
Ricardo Campos Passanezi
_______________________________________________
freebsd-multimedia@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-multimedia
To unsubscribe, send any mail to "freebsd-multimedia-unsubscribe@..."

Re: Problem recording, using <SiS 7012>

by DoctorD :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi!

I have the same problem, but I have a bit different card:

pcm0: <Intel ICH5 (82801EB)> port 0xc000-0xc0ff,0xc400-0xc43f mem 0xf7dff800-0xf7dff9ff,0xf7dff400-0xf7dff4ff irq 17 at device 31.5 on pci0
pcm0: [ITHREAD]
pcm0: <Analog Devices AD1985 AC97 Codec>

MB: ASUS P4P800 Deluxe

I tried to apply you last patch, but my card didn't work...
Could you please, create a one more patch for my card.

Thanx.

P.S. Sorry for my English.

Watanabe Kazuhiro wrote:
Hi, again.

Cc'ed to freebsd-multimedia.

At Tue, 24 Jun 2008 14:05:30 -0300,
Ricardo Campos Passanezi wrote:
> On Tue, Jun 12, 2007 at 03:41:14PM -0300, Ricardo Campos Passanezi wrote:
> >On Wed, Jun 13, 2007 at 01:02:22AM +0900, Watanabe Kazuhiro wrote:
> >> > > Hmmm... Can you record a sound with the PCM device from analog inputs
> >> > > other than the microphone input (line, cd, etc.)?
> >
> >...
> >
> >>
> >> For example, if you want to record a sound from an audio CD analog
> >> output, try the following commands.  In this procedure we choose
> >> ports/audio/wavplay as a recording and playback software.
> >>
> >> $ mixer =rec cd # Select CD as an input source.
> >> $ cdcontrol play # Start playback of the audio CD.
> >> $ wavrec -S -s 44100 -b 16 -t 10 test.wav
> >> # Record a sound (from the CD drive).
> >> # Duration: 10 secs.
> >> $ cdcontrol stop # Stop the CD.
> >> $ wavplay test.wav # Play the test WAV file.
> >>
> >> Of course you have already to connect the analog audio cable from the
> >> CD/DVD drive to the audio CD input pinhead.
> >>
> >
> >With:
> >
> ># mixer
> >Mixer vol      is currently set to  75:75
> >Mixer pcm      is currently set to  80:80
> >Mixer speaker  is currently set to  75:75
> >Mixer line     is currently set to  75:75
> >Mixer mic      is currently set to  75:75
> >Mixer cd       is currently set to  75:75
> >Mixer rec      is currently set to  75:75
> >Mixer igain    is currently set to 100:100
> >Mixer ogain    is currently set to   0:0
> >Mixer line1    is currently set to  75:75
> >Mixer phin     is currently set to   0:0
> >Mixer phout    is currently set to   0:0
> >Recording source: cd
> >
> >It worked fine...
>
> Hello Watanabe.
>
> I've done the above and, as you can see in the previous email, it worked
> fine (the recording using 'cd'). When I use 'mic' as recording source
> I've no success.
>
> I'm using 7-STABLE right now.
>
> Can you still help me in this one?
>
> Sorry to bother...

I have searched the web and found the useful page.

 Powering microphones
 http://www.epanorama.net/circuits/microphone_powering.html

The author says "Most lavalier (tie-clip) microphones, consumer video
camera microphones and microphones used with computer soundcards are
electret microphones".

If your microphone is an electret microphone, and its power is
supplied via the mic's signal cable (generally called "plug-in
power"), we have to supply the power to the signal cable.

*****

Be careful to apply this patch.  I believe that the patch is not so
wrong.  But I don't know whether the AD1986A's C/LFE VREFOUT pin is
connected to the microphone jack correctly.  So I cannot expect what
is happen.

--- sys/dev/sound/pcm/ac97.c.releng70 2007-10-30 03:47:47.000000000 +0900
+++ sys/dev/sound/pcm/ac97.c 2008-06-27 21:53:12.000000000 +0900
@@ -142,7 +142,7 @@ static struct ac97_codecid ac97codecid[]
  { 0x41445372, 0x00, 0, "AD1981A", 0 },
  { 0x41445374, 0x00, 0, "AD1981B", ad1981b_patch },
  { 0x41445375, 0x00, 0, "AD1985", ad198x_patch },
- { 0x41445378, 0x00, 0, "AD1986", ad198x_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-06-28 19:12:18.000000000 +0900
@@ -53,6 +53,31 @@ void ad198x_patch(struct ac97_info* code
  }
 }
 
+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);
+
+ /* 0x4 = 2.25V, 0x8 = 0V, 0x10 = 3.70V */
+ ac97_wrcd(codec, 0x70, ac97_rdcd(codec, 0x70) | 0x0004);
+ break;
+ default:
+ break;
+ }
+}
+
 void ad1981b_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-06-27 22:14:43.000000000 +0900
@@ -31,5 +31,6 @@ typedef void (*ac97_patch)(struct ac97_i
 void ad1886_patch(struct ac97_info*);
 void ad198x_patch(struct ac97_info*);
 void ad1981b_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"

AD1985 microphone input (Re: Problem recording, using <SiS 7012>)

by Watanabe Kazuhiro :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello.

Changed the subject.

At Sun, 27 Jul 2008 11:11:38 -0700 (PDT),
DoctorD wrote:

> Hi!
>
> I have the same problem, but I have a bit different card:
>
> pcm0: <Intel ICH5 (82801EB)> port 0xc000-0xc0ff,0xc400-0xc43f mem
> 0xf7dff800-0xf7dff9ff,0xf7dff400-0xf7dff4ff irq 17 at device 31.5 on pci0
> pcm0: [ITHREAD]
> pcm0: <Analog Devices AD1985 AC97 Codec>
>
> MB: ASUS P4P800 Deluxe
>
> I tried to apply you last patch, but my card didn't work...
> Could you please, create a one more patch for my card.
>
> Thanx.

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:

 http://lists.freebsd.org/pipermail/freebsd-multimedia/2003-October/000497.html


--- 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 @@
  }
 }
 
+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 = 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@...)
_______________________________________________
freebsd-multimedia@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-multimedia
To unsubscribe, send any mail to "freebsd-multimedia-unsubscribe@..."

Re: AD1985 microphone input (Re: Problem recording, using <SiS 7012>)

by Kostik Belousov :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Jul 29, 2008 at 01:00:49AM +0900, WATANABE Kazuhiro wrote:

> Hello.
>
> Changed the subject.
>
> At Sun, 27 Jul 2008 11:11:38 -0700 (PDT),
> DoctorD wrote:
> > Hi!
> >
> > I have the same problem, but I have a bit different card:
> >
> > pcm0: <Intel ICH5 (82801EB)> port 0xc000-0xc0ff,0xc400-0xc43f mem
> > 0xf7dff800-0xf7dff9ff,0xf7dff400-0xf7dff4ff irq 17 at device 31.5 on pci0
> > pcm0: [ITHREAD]
> > pcm0: <Analog Devices AD1985 AC97 Codec>
> >
> > MB: ASUS P4P800 Deluxe
> >
> > I tried to apply you last patch, but my card didn't work...
> > Could you please, create a one more patch for my card.
> >
> > Thanx.
>
> 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:
>
>  http://lists.freebsd.org/pipermail/freebsd-multimedia/2003-October/000497.html
>
>
> --- 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 @@
>   }
>  }
>  
> +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 = 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*);
>
BTW, I use the http://people.freebsd.org/~kib/ad1985/setup_mic_ad1985.cc


attachment0 (202 bytes) Download Attachment

Re: AD1985 microphone input (Re: Problem recording, using <SiS 7012>)

by DoctorD :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello!

Hmm... after that patch my card cannt playback any sounds ((((

just silence....

any ideas? =)))


Watanabe Kazuhiro wrote:
Hello.

Changed the subject.

At Sun, 27 Jul 2008 11:11:38 -0700 (PDT),
DoctorD wrote:
> Hi!
>
> I have the same problem, but I have a bit different card:
>
> pcm0: <Intel ICH5 (82801EB)> port 0xc000-0xc0ff,0xc400-0xc43f mem
> 0xf7dff800-0xf7dff9ff,0xf7dff400-0xf7dff4ff irq 17 at device 31.5 on pci0
> pcm0: [ITHREAD]
> pcm0: <Analog Devices AD1985 AC97 Codec>
>
> MB: ASUS P4P800 Deluxe
>
> I tried to apply you last patch, but my card didn't work...
> Could you please, create a one more patch for my card.
>
> Thanx.

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:

 http://lists.freebsd.org/pipermail/freebsd-multimedia/2003-October/000497.html


--- 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 @@
  }
 }
 
+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 = 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"

Re: AD1985 microphone input

by Watanabe Kazuhiro :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@...)
_______________________________________________
freebsd-multimedia@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-multimedia
To unsubscribe, send any mail to "freebsd-multimedia-unsubscribe@..."

Re: AD1985 microphone input

by Watanabe Kazuhiro :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi.

At Mon, 28 Jul 2008 19:43:32 +0300,
Kostik Belousov wrote:

> > At Sun, 27 Jul 2008 11:11:38 -0700 (PDT),
> > DoctorD wrote:
> > > Hi!
> > >
> > > I have the same problem, but I have a bit different card:
> > >
> > > pcm0: <Intel ICH5 (82801EB)> port 0xc000-0xc0ff,0xc400-0xc43f mem
> > > 0xf7dff800-0xf7dff9ff,0xf7dff400-0xf7dff4ff irq 17 at device 31.5 on pci0
> > > pcm0: [ITHREAD]
> > > pcm0: <Analog Devices AD1985 AC97 Codec>
> > >
> > > MB: ASUS P4P800 Deluxe
> > >
> > > I tried to apply you last patch, but my card didn't work...
> > > Could you please, create a one more patch for my card.
> > >
> > > Thanx.
> >
> > 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:

(snip)

> BTW, I use the http://people.freebsd.org/~kib/ad1985/setup_mic_ad1985.cc

Wow... It's a useful program.  To customize the source, we can change
various behavior of the sound chip "on the fly".
---
WATANABE Kazuhiro (CQG00620@...)
_______________________________________________
freebsd-multimedia@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-multimedia
To unsubscribe, send any mail to "freebsd-multimedia-unsubscribe@..."

Re: AD1985 microphone input (Re: Problem recording, using <SiS 7012>)

by DoctorD :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello!

Can you tell me how to compile this src, Im dont familiar with C. (((

Thanx!

Kostik Belousov wrote:
On Tue, Jul 29, 2008 at 01:00:49AM +0900, WATANABE Kazuhiro wrote:
> Hello.
>
> Changed the subject.
>
> At Sun, 27 Jul 2008 11:11:38 -0700 (PDT),
> DoctorD wrote:
> > Hi!
> >
> > I have the same problem, but I have a bit different card:
> >
> > pcm0: <Intel ICH5 (82801EB)> port 0xc000-0xc0ff,0xc400-0xc43f mem
> > 0xf7dff800-0xf7dff9ff,0xf7dff400-0xf7dff4ff irq 17 at device 31.5 on pci0
> > pcm0: [ITHREAD]
> > pcm0: <Analog Devices AD1985 AC97 Codec>
> >
> > MB: ASUS P4P800 Deluxe
> >
> > I tried to apply you last patch, but my card didn't work...
> > Could you please, create a one more patch for my card.
> >
> > Thanx.
>
> 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:
>
>  http://lists.freebsd.org/pipermail/freebsd-multimedia/2003-October/000497.html
>
>
> --- 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 @@
>   }
>  }
>  
> +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 = 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*);
>

BTW, I use the http://people.freebsd.org/~kib/ad1985/setup_mic_ad1985.cc

 
< Prev | 1 - 2 | Next >