Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!munnari.oz.au!csc.anu.oz.au!csis!rackland From: rackland@csis.dit.csiro.au (Ross Ackland) Newsgroups: sci.electronics Subject: Re: Audio from a VGA card Message-ID: <1990Nov14.222052.7915@csis.dit.csiro.au> Date: 14 Nov 90 22:20:52 GMT Organization: CSIRO Div of Inf Tech Lines: 47 Had an interesting reply to my original suggestion of generating audio using the video DAC's on a VGA card. Here it is in a slightly edited form: >Your idea is not bad at all. I thought of doing the same thing with one of >HP's hi-res video cards awhile back. The biggest problem to overcome is the >horizontal and vertical blanking intervals. You will have to program the >VGA timing registers so as to generate NO interval at all, lest you get >a bad 60 Hz buzz and such. I'm not sure if it can be done, but its worth a >try. Also, you should capacitively couple the signal into your amp. Use about >1000uf cap, positive side connected to VGA. I recommend testing on a cheap >amp before you try your home stereo. Finally, be sure to DISCONNECT or >TURN OFF your monitor when you enable the program. You can very easily >damage many monitors with out-of-spec timing. You can try a sine wave at >first to test it out. The VGA dot clock is about 25 MHz (I think), so >each pixel represents a 40 ns sample of sound. You will need to use mode 0x13 >(320x200x256) to get 8 bits per pixel/sample. Unfortunately, in this mode, >scan lines are doubled and pixel rates are halved. This results in only >80ns * 320 *200 = 2.5 milliseconds of sound in one frame. Thus, not only >will you signals have to be periodic on a scan-line basis, but also on a >frame basis (the ends of scan lines must approach each other in value, as >well as the top and bottom of the frame). > >Due to the limited amount of sound per per frame, and the >inability to update the frame in 2.5 ms, I scrapped the effort and never >built anything. > >Also note that VGA RAMDACS only give you 6 bits per gun, which is >really a shame. > >Finally, it is worthy of note that the original MacIntosh used >a similar scheme to get sound and floppy motor drive signals. >However, they only used one word of data per scanline (at the >end of each line) and gated that word to the sound DACs instead >of the video DACs at the right moment. Because the video ram >memory fetch still ran even during the blanking intervals, these >did not affect the sound quality at all. They still had the >requirement that the last scanline sound data approach the >first scanline sound data in value if you expect to avoid >pops in the sound due to discontinuties. Of course these pops >would occur at a 60 Hz rate, and thus your filter might help >with those too. > >Jim Christy >HP Labs >jchristy@hplren2.hpl.hp.com