Re: AD1986A Data Sheet Available. Could somebody please fix the Sound Driver?

2010-10-06 Thread Siju George
On Wed, Oct 6, 2010 at 10:17 AM, Jacob Meuser jake...@sdf.lonestar.org
wrote:
 On Wed, Oct 06, 2010 at 09:16:01AM +0530, Siju George wrote:


 first, 'line-pnk' is almost certainly the rear mic input, and 'mic'
 is the front mic input.  let's stick with the rear jacks for now.

 so you want this:
 outputs.line-pnk_dir=output  [ none output input input-vr0 input-vr50
 input-vr80 ]

 to get to this:
 record.adc-0:1_source=sel8  [ sel8 cd sel7 mix mix2 ]

 first step, set line-pnk to be a mic input:

 $ mixerctl outputs.line-pnk=input-vr80


I guess you actually meant

$ mixerctl outputs.line-pnk_dir=input-vr80
outputs.line-pnk_dir: output - input-vr80

:-)


 I bet that's what kills it for other OSes.  shame on the BIOS vendor for
 naming it like that and shame on the board vendor for using such a silly
 codec.  anyway ...

 now we want to see what line-pnk can feed into:

 $ mixerctl -v | grep '_source=.*line-pnk'
 inputs.sel6_source=mic  [ mic line-in line-pnk line-pnk mix4 mix5 mix6 mix7
]
 inputs.mix4_source=mic,line-pnk  { mic line-pnk }
 inputs.mix6_source=line-pnk,line-in  { line-pnk line-in }
 inputs.mix7_source=mic,line-pnk,line-in  { mic line-pnk line-in }

 hmm, we're trying to get to
 record.adc-0:1_source=sel8  [ sel8 cd sel7 mix mix2 ]
 but none of sel6, mix4, mix6 or mix7 are choices.  let's see what sel6
 can feed:
 $ mixerctl -v | grep '_source=.*sel6'
 inputs.sel8_source=sel6  [ sel6 mix8 ]
 inputs.mix8_source=sel6  { sel6 }

 aha, we can have line-pnk - sel6 - sel8 - adc-0:1, and that appears
 to be the shortest routing (there are others, but ignore those for now).

 there's only one more thing to change:

 $ mixerctl inputs.sel6_source=line-pnk


Yes at this point things work like a Charm!

Thanks a million :-)
Now I just need to get the webcam also working right :-)

luv ya lots!!!

--Siju



AD1986A Data Sheet Available. Could somebody please fix the Sound Driver?

2010-10-05 Thread Siju George
Hi,

The only machine I own in my house is an old amd64 which has the
following sound card.

VIA VT1708/A that has AD1986A Codec

It gives out sound but does not capture sound from Mic on any OS except Windows.
Since my family wants to voice chat with my brother who has gone
abroad for higher studies I tried contacting the Linux developers to
fix the driver.

http://marc.info/?l=linux-kernelm=126414072830819w=2

I was re directed to a VIA developer who told me that she does not
have the Data Sheet to fix the problem :-(

https://bbs.archlinux.org/viewtopic.php?pid=699431#p699431

I got the Data Sheet from

http://www.analog.com/static/imported-files/data_sheets/AD1986A.pdf

and Contacted the VIA developer and the Linux Kernel Developer who
re-directd me there again but there was no response :-(

Since I have now figured out how to use Voice Chat on OpenBSD it would
be great if some body who has time look into this and fix this issue
:-)

Thanks

--Siju

The Details of my System are as follows

$ dmesg
OpenBSD 4.7 (GENERIC) #112: Wed Mar 17 20:43:49 MDT 2010
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC
real mem = 468385792 (446MB)
avail mem = 443437056 (422MB)
RTC BIOS diagnostic error 36config_unit,memory_size,invalid_time
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.3 @ 0xf0730 (54 entries)
bios0: vendor American Megatrends Inc. version 080012 date 06/19/2006
bios0: ASUSTeK Computer INC. A8V-VM
acpi0 at bios0: rev 0
acpi0: tables DSDT FACP APIC MCFG OEMB
acpi0: wakeup devices PCI0(S4) PS2K(S4) PS2M(S4) UAR2(S4) USB1(S4)
USB2(S4) USB3(S4) USB4(S4) ILAN(S4) PCI1(S4) PCI2(S4) SLPB(S4)
PWRB(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: AMD Athlon(tm) 64 Processor 3500+, 2200.49 MHz
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SSE3,NXE,MMXX,FFXSR,LONG,3DNOW2,3DNOW
cpu0: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB
64b/line 16-way L2 cache
cpu0: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative
cpu0: DTLB 32 4KB entries fully associative, 8 4MB entries fully associative
cpu0: AMD erratum 89 present, BIOS upgrade may be required
cpu0: apic clock running at 200MHz
ioapic0 at mainbus0: apid 1 pa 0xfec0, version 3, 24 pins
ioapic1 at mainbus0: apid 2 pa 0xfecc, version 3, 24 pins
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (P0P1)
acpiprt2 at acpi0: bus -1 (NBPG)
acpiprt3 at acpi0: bus -1 (NBP0)
acpiprt4 at acpi0: bus 4 (P0P7)
acpiprt5 at acpi0: bus 5 (P0PA)
acpicpu0 at acpi0: C3, C2
aibs0 at acpi0
acpibtn0 at acpi0: SLPB
acpibtn1 at acpi0: PWRB
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 VIA K8M890 Host rev 0x00
agp at pchb0 not configured
pchb1 at pci0 dev 0 function 1 VIA K8M890 Host rev 0x00
pchb2 at pci0 dev 0 function 2 VIA K8M890 Host rev 0x00
pchb3 at pci0 dev 0 function 3 VIA K8M890 Host rev 0x00
pchb4 at pci0 dev 0 function 4 VIA K8M890 Host rev 0x00
VIA K8M890 IOAPIC rev 0x00 at pci0 dev 0 function 5 not configured
pchb5 at pci0 dev 0 function 6 VIA K8M890 Host rev 0x00
pchb6 at pci0 dev 0 function 7 VIA K8M890 Host rev 0x00
ppb0 at pci0 dev 1 function 0 VIA K8HTB AGP rev 0x00
pci1 at ppb0 bus 1
vga1 at pci1 dev 0 function 0 VIA DeltaChrome Video rev 0x01
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
pciide0 at pci0 dev 15 function 0 VIA VT8251 SATA rev 0x00: DMA
pciide0: using apic 1 int 21 (irq 5) for native-PCI interrupt
pciide1 at pci0 dev 15 function 1 VIA VT82C571 IDE rev 0x07: DMA,
channel 0 configured to compatibility, channel 1 configured to
compatibility
wd0 at pciide1 channel 0 drive 0: ST340014A
wd0: 16-sector PIO, LBA48, 38166MB, 78165360 sectors
wd0(pciide1:0:0): using PIO mode 4, DMA mode 2
atapiscsi0 at pciide1 channel 1 drive 1
scsibus0 at atapiscsi0: 2 targets
cd0 at scsibus0 targ 0 lun 0: Optiarc, DVD RW AD-7190A, 1.02 ATAPI
5/cdrom removable
cd0(pciide1:1:1): using PIO mode 4, DMA mode 2
uhci0 at pci0 dev 16 function 0 VIA VT83C572 USB rev 0x90: apic 1
int 20 (irq 11)
uhci1 at pci0 dev 16 function 1 VIA VT83C572 USB rev 0x90: apic 1
int 22 (irq 4)
uhci2 at pci0 dev 16 function 2 VIA VT83C572 USB rev 0x90: apic 1
int 21 (irq 5)
uhci3 at pci0 dev 16 function 3 VIA VT83C572 USB rev 0x90: apic 1
int 23 (irq 5)
ehci0 at pci0 dev 16 function 4 VIA VT6202 USB rev 0x90: apic 1 int 22 (irq 4)
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 VIA EHCI root hub rev 2.00/1.00 addr 1
viapm0 at pci0 dev 17 function 0 VIA VT8251 ISA rev 0x00
iic0 at viapm0
spdmem0 at iic0 addr 0x51: 512MB DDR SDRAM non-parity PC3200CL3.0
pchb7 at pci0 dev 17 function 7 VIA VT8251 VLINK rev 0x00
vr0 at pci0 dev 18 function 0 VIA RhineII-2 rev 0x7c: apic 1 int 23
(irq 11), address 00:11:d8:01:23:45
rlphy0 at vr0 phy 1: RTL8201L 10/100 PHY, rev. 1
ppb1 at pci0 dev 19 function 0 VIA VT8251 PCIE rev 0x00

Re: AD1986A Data Sheet Available. Could somebody please fix the Sound Driver?

2010-10-05 Thread Jacob Meuser
On Wed, Oct 06, 2010 at 09:16:01AM +0530, Siju George wrote:

 $ mixerctl -av
 outputs.dig-dac-0:1_sou=hdaudio  [ hdaudio adc-0:1 ]
 inputs.dac-0:1_mute=off  [ off on ]
 inputs.dac-0:1=248,248
 inputs.dac-2:3_mute=off  [ off on ]
 inputs.dac-2:3=248,248
 inputs.dac-4:5_mute=off  [ off on ]
 inputs.dac-4:5=248,248
 inputs.mix_source=dac-0:1,mix3,sel8,cd,sel7  { dac-0:1 mix3 sel8 cd sel7 }
 inputs.mix2_source=mix  { mix }
 outputs.mix3_mute=off  [ off on ]
 inputs.mix3_source=dac-2:3,dac-4:5  { dac-2:3 dac-4:5 }
 inputs.hp_source=mix  [ mix dac-2:3 dac-4:5 ]
 inputs.line-grn_source=mix  [ mix dac-2:3 ]
 inputs.line-blu_source=dac-2:3  [ dac-2:3 mix ]
 inputs.line-pnk_source=dac-4:5  [ dac-4:5 mix2 ]
 inputs.sel6_source=mic  [ mic line-in line-pnk line-pnk mix4 mix5 mix6 mix7 ]
 outputs.sel6=255,255
 inputs.sel7_source=line-in  [ line-in line-blu mic ]
 inputs.sel8_source=sel6  [ sel6 mix8 ]
 record.adc-0:1_source=sel8  [ sel8 cd sel7 mix mix2 ]
 record.adc-0:1_mute=off  [ off on ]
 record.adc-0:1=255,255
 inputs.sel8_mute=off  [ off on ]
 inputs.sel8=248,248
 inputs.cd_mute=off  [ off on ]
 inputs.cd=248,248
 inputs.sel7_mute=off  [ off on ]
 inputs.sel7=248,248
 outputs.hp_mute=off  [ off on ]
 outputs.hp=248,248
 outputs.hp_boost=off  [ off on ]
 outputs.line-grn_mute=off  [ off on ]
 outputs.line-grn=248,248
 outputs.line-grn_boost=off  [ off on ]
 outputs.line-grn_eapd=on  [ off on ]
 outputs.line-blu_mute=off  [ off on ]
 outputs.line-blu=248,248
 outputs.line-blu_dir=output  [ none output input ]
 outputs.line-pnk_mute=off  [ off on ]
 outputs.line-pnk=248,248
 outputs.line-pnk_dir=output  [ none output input input-vr0 input-vr50
 input-vr80 ]
 outputs.mic_dir=input-vr80  [ none input input-vr0 input-vr50 input-vr80 ]
 outputs.line-in_dir=input  [ none input input-vr0 input-vr50 input-vr80 ]
 outputs.SPDIF_source=dig-dac-0:1  [ dig-dac-0:1 ]
 inputs.mix4_source=mic,line-pnk  { mic line-pnk }
 inputs.mix5_source=mic,line-in  { mic line-in }
 inputs.mix6_source=line-pnk,line-in  { line-pnk line-in }
 inputs.mix7_source=mic,line-pnk,line-in  { mic line-pnk line-in }
 inputs.mix8_source=sel6  { sel6 }
 outputs.hp_sense=unplugged  [ unplugged plugged ]
 outputs.line-grn_sense=plugged  [ unplugged plugged ]
 outputs.line-blu_sense=plugged  [ unplugged plugged ]
 outputs.line-pnk_sense=unplugged  [ unplugged plugged ]
 outputs.mic_sense=unplugged  [ unplugged plugged ]
 outputs.line-in_sense=unplugged  [ unplugged plugged ]
 outputs.master=255,255
 outputs.master.mute=off  [ off on ]
 outputs.master.slaves=dac-0:1,hp,line-grn  { dac-0:1 dac-2:3 dac-4:5
 mix3 sel6 sel8 cd sel7 hp line-grn line-blu line-pnk }
 record.volume=255,255
 record.volume.mute=off  [ off on ]
 record.volume.slaves=adc-0:1  { adc-0:1 }
 outputs.mode=analog  [ analog digital ]
 $

first, 'line-pnk' is almost certainly the rear mic input, and 'mic'
is the front mic input.  let's stick with the rear jacks for now.

so you want this:
 outputs.line-pnk_dir=output  [ none output input input-vr0 input-vr50
 input-vr80 ]

to get to this:
 record.adc-0:1_source=sel8  [ sel8 cd sel7 mix mix2 ]

first step, set line-pnk to be a mic input:

$ mixerctl outputs.line-pnk=input-vr80

I bet that's what kills it for other OSes.  shame on the BIOS vendor for
naming it like that and shame on the board vendor for using such a silly
codec.  anyway ...

now we want to see what line-pnk can feed into:

$ mixerctl -v | grep '_source=.*line-pnk'
inputs.sel6_source=mic  [ mic line-in line-pnk line-pnk mix4 mix5 mix6 mix7 ]
inputs.mix4_source=mic,line-pnk  { mic line-pnk }
inputs.mix6_source=line-pnk,line-in  { line-pnk line-in }
inputs.mix7_source=mic,line-pnk,line-in  { mic line-pnk line-in }

hmm, we're trying to get to
 record.adc-0:1_source=sel8  [ sel8 cd sel7 mix mix2 ]
but none of sel6, mix4, mix6 or mix7 are choices.  let's see what sel6
can feed:
$ mixerctl -v | grep '_source=.*sel6'
inputs.sel8_source=sel6  [ sel6 mix8 ]
inputs.mix8_source=sel6  { sel6 }

aha, we can have line-pnk - sel6 - sel8 - adc-0:1, and that appears
to be the shortest routing (there are others, but ignore those for now).

there's only one more thing to change:

$ mixerctl inputs.sel6_source=line-pnk

now, it's strange there are two line-pnk choices for sel6_source.
that's really a bug in azalia(4).  oh well.  most likely, one is the
jack itself and one is an amp.  it's hard to tell, even with a
datasheet, what's really going on, as nodes can be labeled by the BIOS.
I'm guessing you don't have the code to the BIOS.  you could build a
kernel with AZALIA_DEBUG defined and get a better picture.

anyway, I think that's all you should have to do to record from the rear
mic jack:

$ mixerctl outputs.line-pnk_dir=input-vr80
$ mixerctl inputs.sel6_source=line-pnk
$ mixerctl inputs.sel8_source=sel6
$ mixerctl record.adc-0:1_source=sel8

alternatively, to get around the double line-pnk choice in sel6, route
through mix4 instead:

$ mixerctl outputs.line-pnk_dir=input-vr80
$ mixerctl