Problem recording, using <SiS 7012>
Watanabe Kazuhiro
CQG00620 at nifty.ne.jp
Thu Jun 7 16:03:41 UTC 2007
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 at nifty.ne.jp)
More information about the freebsd-multimedia
mailing list