home *** CD-ROM | disk | FTP | other *** search
/ BURKS 2 / BURKS_AUG97.ISO / BURKS / LINUX / HOWTO / mini / gravis.txt < prev    next >
Text File  |  1997-07-07  |  5KB  |  158 lines

  1.  
  2.       The ULTRASOUND Plug 'n' Play MINI howto 0.01
  3.  
  4.  
  5. 1. Introduction
  6.    ------------
  7.  
  8. As a fan of the gravis sound cards since a long time, I was
  9. really happy to finally see something really new coming
  10. from gravis. I had planned to buy the new ultrasound since
  11. a long time, and I bought it with one meg of RAM as soon as
  12. at was available here in France.
  13.  
  14. I installed it, and ho joy it was detected by my plug and play
  15. bios, and even by windows95 (sorry no silly jokes on marketing95
  16. today). So I thinked the card would work anywhere ...
  17.  
  18. Then I launched linux, I had no problem, the card was detected
  19. as a gus rev 3.4, which seemed to be fine, but it wasn't ...
  20.  
  21. Sometime later I tried quake, and didn't get any sound. Then
  22. I read the manual of the game, and saw that it was using
  23. some DMA thingies the standart gus coudn't afford ...
  24.  
  25. I thinked it was not cool for me, having such a damn good card
  26. and could'nt have sound with such a great (the dos version needs
  27. the sound blaster emulation, and I even prefer no sound than that)
  28.  
  29. So What now ? should I wait till May for a gus PnP driver ?
  30. shall I buy a sound blaster (bahhhhh) ? what will be in the next
  31. episode of the x-files ?
  32.  
  33. 2. GUS MAX ?
  34.    ---------
  35.  
  36. Then I went back to dos, and played a little bit with the iwinit
  37. program. I looked at what the program said when I used verbose
  38. mode and saw something like CODEC adress 32c ...
  39.  
  40. What ? the gus PnP has a CS4231/CS1848 Codec like the gus MAX ???
  41.  
  42. Then I looked at my backup tapes for the last gravis drivers, took
  43. ultrinit 2.31 from it, and typed :
  44. >set ultrasnd=220,6,5,5,5
  45. >set ultra16=32c,0,0,1,0
  46. >set ultradir=c:\ultrapnp
  47. >ultrinit
  48.  
  49. and guess what : Ultrasound MAX detected !!!
  50.  
  51. waow cool !, I thinked then I only have to put this before loading
  52. linux and I'll get gus MAX support, and finally get that f*****g quake
  53. to work this sound !
  54.  
  55. It wasn't so easy 8(
  56.  
  57.  
  58. 3. Driver hacking
  59.    --------------
  60.  
  61. I'm not a good programmer, but I know enough on C to look through a driver
  62. and see what happens (especially when it's good commented)
  63.  
  64. I looked at the file gus_card.c, but didn't find anything interesting.
  65. Then looked at gus_wave.c, and saw this :
  66.          * Value 255 means pre-3.7 which don't have mixer.
  67.          * Values 5 thru 9 mean v3.7 which has a ICS2101 mixer.
  68.          * 10 and above is GUS MAX which has the CS4231 codec/mixer.
  69.  
  70. Cool, I just have to force the value to 10, and it will work ...
  71. No !
  72.  
  73. doing this will make the kernel think you got a gus MAX, but it won't
  74. detect the codec chip !
  75.  
  76. I so had to force the codec detection too ...
  77.  
  78. That was no so easy to find what to do, but I finally discovered
  79. what to do :
  80. In the file gus_wave.c, there was a line :
  81. if (ad1848_detect (gus_base + 0x10c, NULL, hw_config->osp))
  82.  
  83. which meaned the kernel was trying to autodetect the AD1848 chip,
  84. I thinked it couldn't detect with the gus PnP, and I was right !
  85. I simply changed the line to :
  86. if (!(ad1848_detect (gus_base + 0x10c, NULL, hw_config->osp)))
  87.  
  88. recompiled the kernel, and ho joy, quake worked like a charm !!!
  89.  
  90. by the way there is there is a flag gus_pnp_flag in gus_card.c, but
  91. I didn't see any difference with it enabled or disabled 8( (perhaps
  92. I did something wrong)
  93.  
  94. 4. So what shall we do exactly ?
  95.    -----------------------------
  96.  
  97. Don't forget that this won't work if you haven't ram
  98. on your gus ...
  99. First of all don't use lilo anymore, as you need to initialise
  100. the gus PnP before starting linux ... (do a fdisk /mbr under dos, see
  101. other how-to's for more details on this)
  102.  
  103. In your autoexec.bat, put :
  104. set interwave=c:\ultrapnp\iw.ini
  105. c:\ultrapnp\iwinit
  106. set ultrasnd=220,6,5,5,5 (or whatever you want or need)
  107. set ultra16=32c,0,0,1,0
  108. set ultradir=c:\ultrapnp
  109. c:\ultrapnp\ultrinit
  110.  
  111. you can find ultrinit in the file gus00045.zip, on any gravis
  112. site ...
  113.  
  114. Under linux, open the file gus_wave.c, in /usr/src/linux/drivers/sound
  115. (or anywhere else)
  116. Find the line :
  117. if (val == 255 || val < 5) (line 3049 in 3.5b7)
  118. and the line before add
  119. val=10;
  120.  
  121. Then find the line
  122. if (ad1848_detect (gus_base + 0x10c, NULL, hw_config->osp)) (line 3085)
  123. and change it to
  124. if (!(ad1848_detect (gus_base + 0x10c, NULL, hw_config->osp)))
  125.  
  126. recompile the kernel with gus and gus max support
  127. For my configuration that is :
  128. BASE = 220
  129. IRQ = 5
  130. DMA1 = 6
  131. DMA2 = 5
  132. DMABUF = 65536
  133.  
  134. Enjoy the sound !
  135.  
  136.  
  137. 5. Credits
  138.    -------
  139.  
  140. I used the 1.3.75 kernel for patching, but it should be ok for any 1.3.70
  141. and more kernel (please write me if any problem)
  142.  
  143. This mini HOWTO is written by J-F MAMMET
  144. e-mail : mammet@diva.univ-mlv.fr
  145. www    : http://diva.univ-mlv.fr/~mammet/
  146. you can get the latest version of this document from my web page
  147. at http://diva.univ-mlv.fr/~mammet/linux.html (to come soon)
  148.  
  149. I don't take any responsability if you lose informations or whatever
  150. bad can happen (even crashing win95)
  151.  
  152. If you see some spelling mistakes (or even technical mistakes 8-p) ,
  153. feel free to write me, I am just a poor frenchy lost in an english
  154. world, trying to speak an understandable langage.
  155.  
  156. 27 March of 1996
  157.  
  158.