anyone still trying to reverse engineer?

2002-06-15
2003-03-06
  • Derek Foreman
    Derek Foreman
    2002-06-15

    I've hacked up some code that prints every mmio access the driver makes to the chip, is that useful to anyone?

    it's a lot of data, you have to enlarge your kernel message ring buffer to catch them all.

    it ignores ac97 codec access, but we know exactly how that chip works

     
    • Manuel Jander
      Manuel Jander
      2002-11-02

      It would help a lot!

      Could you upload a patch or somewhat similar ?

      Thanks

       
    • Jeff Muizelaar
      Jeff Muizelaar
      2002-11-03

      Also you can check the information we have on the openvortex project on savannah. We have a c/asm driver for the au8830 as well as some documentation for all of the chips as well.

      -Jeff

       

    • Anonymous
      2002-11-04

      Hi Vizard,

      I just tried the vortex2 driver (checked out of openvortex CVS), but I get no sound playback.  I tried xmms and play on some mp3s and some .wav files I had lying around.  None of them seemed to work.  The xmixer seemed to work, because I could hear a bit of a crackle when I changed the volume.  I got the redhat sound card detection sample sound to play okay, although lots of buffer underruns made the sound very choppy.  The volume control can go sky-high if you're not careful too.. Luckily my speakers are ancient and I'm not too concerned about them. :)

      Red hat 8.0 2.4.18-17.8.0 kernel.  The old binary module driver is skips constantly on my system under RH8, although it mostly worked okay under RH 7.3.  I have Nvidia GForce 1 card, but am using stock XFree86 drivers from RH8.  Asus P3B motherboard.

      I got lots of anger buffer overrun messages with xmms.  With play of some sample files I get buffer underruns.  Here are some messages from dmesg

      With red hat sound card detector sample sound:

      vortex2: allocated 32768 (order = 3) bytes at ce7a0000
      Open successfull!!
      vortex2: buffer underrun
      vortex2: starting dac
      vortex2: buffer underrun
      releasing...
      Setting timer..
      vortex2: allocated 32768 (order = 3) bytes at cb558000
      Open successfull!!
      vortex2: buffer underrun
      vortex2: starting dac
      vortex2: buffer underrun
      vortex2: buffer underrun
      releasing...
      Setting timer..
      vortex2: allocated 32768 (order = 3) bytes at ce688000
      Open successfull!!
      vortex2: buffer underrun
      vortex2: starting dac
      vortex2: buffer underrun
      vortex2: buffer underrun
      vortex2: buffer underrun
      releasing...
      Setting timer..
      vortex2: allocated 32768 (order = 3) bytes at caee0000
      Open successfull!!
      vortex2: buffer underrun
      vortex2: starting dac
      vortex2: buffer underrun
      vortex2: buffer underrun
      vortex2: buffer underrun
      vortex2: buffer underrun
      vortex2: buffer underrun
      vortex2: buffer underrun
      vortex2: buffer underrun
      releasing...
      Setting timer..
      vortex2: allocated 32768 (order = 3) bytes at cae88000
      Open successfull!!
      vortex2: buffer underrun
      vortex2: starting dac
      vortex2: buffer underrun
      vortex2: buffer underrun
      vortex2: buffer underrun
      vortex2: buffer underrun
      vortex2: buffer underrun
      vortex2: buffer underrun
      vortex2: buffer underrun
      releasing...

      With play:

      vortex2: InitModule
      vortex2: Init vortex_probe
      vortex2: dev-address=0xd5800000
      PCI: Found IRQ 10 for device 00:0b.0
      found chip, vendor id 0x12eb device id 0x0002 revision 0x00
      mastering done
      ac97_codec: AC97  codec, id: 0x8384:0x7608 (SigmaTel STAC9708)
      Codec foundiniting fifo
      vortex2: fifo addr:-address=0x0001617c
      vortex2: fifo addr:-address=0x00016178
      vortex2: fifo addr:-address=0x00016174
      vortex2: fifo addr:-address=0x00016170
      vortex2: fifo addr:-address=0x0001616c
      vortex2: fifo addr:-address=0x00016168
      vortex2: fifo addr:-address=0x00016164
      vortex2: fifo addr:-address=0x00016160
      vortex2: fifo addr:-address=0x0001615c
      vortex2: fifo addr:-address=0x00016158
      vortex2: fifo addr:-address=0x00016154
      vortex2: fifo addr:-address=0x00016150
      vortex2: fifo addr:-address=0x0001614c
      vortex2: fifo addr:-address=0x00016148
      vortex2: fifo addr:-address=0x00016144
      vortex2: fifo addr:-address=0x00016140
      vortex2: fifo addr:-address=0x0001613c
      vortex2: fifo addr:-address=0x00016138
      vortex2: fifo addr:-address=0x00016134
      vortex2: fifo addr:-address=0x00016130
      vortex2: fifo addr:-address=0x0001612c
      vortex2: fifo addr:-address=0x00016128
      vortex2: fifo addr:-address=0x00016124
      vortex2: fifo addr:-address=0x00016120
      vortex2: fifo addr:-address=0x0001611c
      vortex2: fifo addr:-address=0x00016118
      vortex2: fifo addr:-address=0x00016114
      vortex2: fifo addr:-address=0x00016110
      vortex2: fifo addr:-address=0x0001610c
      vortex2: fifo addr:-address=0x00016108
      vortex2: fifo addr:-address=0x00016104
      vortex2: fifo addr:-address=0x00016100
      adding new route at 17
      route_start:88
      route_cur:88
      Success
      Setting timer..
      vortex2: allocated 32768 (order = 3) bytes at d26b8000
      Open successfull!!
      vortex2: buffer underrun
      vortex2: starting dac
      releasing...
      Setting timer..
      vortex2: allocated 32768 (order = 3) bytes at d26b8000
      Open successfull!!
      vortex2: starting dac
      releasing...

       
      • Jeff Muizelaar
        Jeff Muizelaar
        2002-11-04

        That is a little worse then it should be. XMMS does work for me, but sometimes I have to fiddle with the mixer a bit before hand.
        The buffer size is only 4k currently so buffer underruns happen pretty easily. It sounds like there might be some pci bus latency issues on your machine. You can try and fiddle with that to see if you can get any improvement.

        The driver is still meant mostly for development purposes right now, so don't expect too much success with it.

        -Jeff

         
    • Manuel Jander
      Manuel Jander
      2002-11-04

      I'm also hacking on the savannah code, but with less success. I have a AU8820 (Vortex 1) and i'm still in the decompiling process. The provided tools (generate and genheader) are of very great help.
      I hope to get it compilable soon. Anyone else with a Vortex 1? I'm feeling quite lonely with my Vortex 1 :(

      But i wont give up !

      Bye.

       
    • Manuel (mjander)

      You said " Anyone else with a Vortex 1? I'm feeling quite lonely with my Vortex 1 :(  " 

        I've got an Vortex 1 that worked fine with the AU8820 driver I donwloaded from this project. That was when I had RH 7.1 and RH 7.3. Recently after I upgraded to RH 8.0 it stop working.
        My professional expertise is on hardware design (VHDL, FPGA , ASICs etc ). I know quite a bit of C but I don't consider myself a software engineer. I downloaded info from the web about reverse engineering, but I think still I have to learn a lot in order to be successful at reverse engineering.   However If I can do something to help get this driver to work with gcc 3.X I am able and willing to help.

        The only that I've figure out so far it is that the file asp20.o has to be recompiled with gcc 3.X. Can someone comment why this piece of software compiled with gcc 2.9.X and older doesn't work with a kernel compiled with gcc 3.X ?

        Thanks

      Alex

       

      • Anonymous
        2003-02-08

        I've found that you can get rid of the gcc2/3-mismatch warning by running
        strip -N gcc2_compiled\.
        on the asp20.o file.  I got tired of seeing the warning and decided to read through the insmod source to figure out how to fool it.

        The "tainted kernel" warning can be removed by adding the following to au_vortex.c (logical place for it would be around the "MODULE_AUTHOR" line):
        MOD_LICENSE("GPL");

        However, since we don't have the original source for asp10.o, asp20.o, and asp30.o, I don't see how this driver can have a GPL license.  My understanding of the GPL is that it does not allow linking GPL code with non-GPL code.  Linking a GPL module with a non-GPL module requires releasing both modules under the GPL unless an exception is explicitly granted by the copyright owner.

        The presence of the GPL license at the beggining of each of the source files suggests that it is GPL-licensed.

        Chris

         
    • Manuel Jander
      Manuel Jander
      2003-02-09

      Hi,

      I put together some technical data about the Aural chips. Many thinks aren't necesarily 100% correct, but any corrections are gladly welcome.

      Take a look at
      http://savannah.nongnu.org/cgi-bin/viewcvs/\*checkout*/openvortex/aureal-2.x-pre/au8820-driver/doc/techpaper.html?rev=1.1

      By the way, reverse engineering is in a somewhat advanced stage. All the code has been succesfully disassembled (thanks to Kester Maddock). The most important functions are already translated into C, but there are still some fundamental bugs (SRC and mixer code doesnt work yet). Anyone interested to help, take a look at:
      http://savannah.nongnu.org/projects/openvortex

      Compiling the driver for Gcc 3.x is trivial. That isnt the reason why we bother reverse engineering. The binary driver is very badly designed, causing lockups, very long time system blocking (audio skips), and very bad OSS fragment handling. And there is no ALSA driver either. Thats the real reason why we are into reverse engineering. Another mather is  the real time effect processing capability of the vortex architecture, which isnt exploited in any way by the actual driver.

      Best Regards.

      mjander

       
    • Daniel Lindell
      Daniel Lindell
      2003-03-05

      I've got some documentation on the 8820/8830 showing dataflow in the vortex chip between the different components like AC97 controller, Sample rate converter, wavetable synthesizer, EQ, A3D and so on, showing the diffent busses and the amout of data in and out to each part. Tell me if you're in need of them and i'll upload them.

       
      • Jeff Muizelaar
        Jeff Muizelaar
        2003-03-06

        That information sounds like it would be very helpful. Please upload.

        -Jeff