KNOWN ISSUE: [Windows 7 with] 2gb or more RAM

Discussion in 'Bug Reports' started by Temragon, Jul 31, 2009.

  1. Temragon

    Temragon Member

    Joined:
    Sep 11, 2007
    Messages:
    52
    Likes Received:
    1
    Trophy Points:
    8
    KNOWN ISSUE: 2gb or more RAM

    This issue has been solved. Remaining issues are likely buffer issues (See below)



    So we don't get more varied threads here, Russ dug up a old post explaining the problem: http://www.driverheaven.net/general...released-beta-revision-3545b.html#post1168448

    This affects ALL versions of windows.
    XP x86, however, is less likely. It is not guaranteed to happen, but is very likely with more than 2gb of ram.

    Problem:
    "The card's hardware does not recognize addresses above 2 GB (uses a 31 bit (=2GB) DMA mask or something like that), so if Windows happens to create the buffers below that 2 GB barrier than it will work, if not, it will not work."

    Symptoms:
    Scratchy sound
    Clicking/randomness
    No sound at all (Except from inputs, such as Mic)

    Solutions:
    The only known solution is to go down to 2gb.
    (If you only have scratchy - but all there - sound, increase the length of your buffers. KX tray -> settings -> setup buffers)


    Existing threads:
    http://www.driverheaven.net/bug-reports/177813-windows-7-3-gb-ram.html
    http://www.driverheaven.net/bug-reports/185108-no-sound-windows-7-x64-rc1.html
    http://www.driverheaven.net/bug-reports/187717-massive-distortion-stuttering.html
    http://www.driverheaven.net/bug-reports/177630-ct4780-vista-sp1-only-makes-noise.html

    Mentioned in release threads:
    http://www.driverheaven.net/general...er-vista-x64-windows-xp-x64-alpha-3546-a.html
    http://www.driverheaven.net/general...ver-vista-x64-windows-xp-x64-beta-3547-a.html
    http://www.driverheaven.net/general-discussion/187614-3548-released-beta-x86-x64-builds.html

    Mentioned in bug threads:
    http://www.driverheaven.net/bug-reports/182462-x64-3546-bugs-issues.html

    If anyone knows of any more relevant posts I can link to, post them.

    Solutions are what we need, so if you're a programmer, read over Eugene's post and see if you come up with anything.

    If you've found a workaround, please post it for verification (Once you're sure this is the problem you were experiencing)


    Other than that, please keep "Yes, this happens to me too", and other posts out of the thread so that it will be easy for E to review.



    If this could get stickied, it'd be great... Or a Known Issues thread put up.
     
    Last edited: Sep 24, 2009
    Russ likes this.
  2. Russ

    Russ Well-Known Member

    Joined:
    Jan 17, 2005
    Messages:
    5,722
    Likes Received:
    13
    Trophy Points:
    48
    Good post, but it is not Windows 7 specific. As Max said in one of the other threads, it is with any OS (but WinXP x86 is more likely to work, due to the way it handles memory).
     
  3. Temragon

    Temragon Member

    Joined:
    Sep 11, 2007
    Messages:
    52
    Likes Received:
    1
    Trophy Points:
    8
    Indeed, and I forgot I that I omitted Vista and XP when I overwrote what I had as a summary with what you wrote for a problem.

    I gave it the title I did, though, to catch the rushed newbies who only check for things that seem like it is their exact problem. Most of them seem to be using 7, so I put that in with brackets.
    I figured the other people would read it anyway, since they were more likely to try to find a solution first. Especially if it is stickied.
     
  4. LyyNx

    LyyNx New Member

    Joined:
    Feb 18, 2004
    Messages:
    54
    Likes Received:
    0
    Trophy Points:
    0
    just to let you know, win2k3 x86 and 4gb of ram works perfectly with 3545 (too lazy to install the latest just yet) and my audigy 2 plat, haven't noticed any problems in the last month
     
  5. Temragon

    Temragon Member

    Joined:
    Sep 11, 2007
    Messages:
    52
    Likes Received:
    1
    Trophy Points:
    8
    And I have Vista x64 with 8gb, and it works fine. But 7 doesn't, for me.

    Like I said, it's confirmed, but doesn't happen all the time- it seems more or less random where it gets established in memory- See E's post.

    Let's keep it to suggestions or abnormal reports (Say, you get it to work reliably over multiple computers by doing something different)
     
  6. RPGWiZaRD

    RPGWiZaRD New Member

    Joined:
    Dec 29, 2007
    Messages:
    132
    Likes Received:
    1
    Trophy Points:
    0
    Of what I've read by several users it seems Windows 7 is affected the most where you usually get no sound at all and on Vista you get clicks or distortions and tweaking buffer size usually helps.

    I'd be more than happy if Windows 7 would be able to get to Vista-compability so tweaking buffer size would help already and you'd be able to hear sound. :p

    In near future many people will be using 4 - 8GB ram and prefer Windows 7 which looks to be the next "XP", that's why I think this is such a critical bug... I know it certainly scares me from upgrading to an upcoming Intel i7 (Lynnfield) CPU and 4GB ram if this incompability strikes me as well. Buying a new sound card isn't really a solution as I prefer an Audigy card + kX drivers over X-Fi or the new ASUS cards...
     
    Last edited: Aug 1, 2009
  7. Russ

    Russ Well-Known Member

    Joined:
    Jan 17, 2005
    Messages:
    5,722
    Likes Received:
    13
    Trophy Points:
    48
    The only related info that I have seen talks about creating your own DMA-channel object instead of using the one created by NewMasterDmaChannel. The custom IDmaChannel implementation can use IDmaChannel::AllocateBuffer which includes a PhysicalAddressConstraint parameter which can be used to place a constraint on the physical address of the buffer. This sounds like what is needed, but maybe it is more complicated than it sounds (or maybe I am looking in the wrong place)... and I am sure E. must have read the same information, so...
     
  8. Chester01

    Chester01 New Member

    Joined:
    Jan 12, 2004
    Messages:
    492
    Likes Received:
    0
    Trophy Points:
    0
    which buffer is causing the problem? if it is the X-Tram, that can be set to 0 kb, perhaps that would change things... probably a different buffer though? Is there any word on the creative drivers; do they have the issue also?

    EDIT/idea: I am not very familiar with ASIO4ALL, however could we use this program as an intermediary step for machines with >4gb? so for example, asio4all would be the default audio device and that would then be routed (via asio) into the kx drivers...

    EDIT2: after looking further into things, ASIO4ALL does not work that way... it appears to do the 'opposite' of what I wanted to do... If we can find an intermediary 'driver' to accept the WMM audio that could output ASIO to the KX card we would be golden :D
     
    Last edited: Aug 2, 2009
  9. LyyNx

    LyyNx New Member

    Joined:
    Feb 18, 2004
    Messages:
    54
    Likes Received:
    0
    Trophy Points:
    0
    worked fine for me on win7 x64 with 4gb ram
     
  10. Chester01

    Chester01 New Member

    Joined:
    Jan 12, 2004
    Messages:
    492
    Likes Received:
    0
    Trophy Points:
    0
    I cannot believe I am saying this but I may have to use the creative driver till this gets fixed on one of my computers :/ (just died a little inside)
     
  11. SithBoxer

    SithBoxer New Member

    Joined:
    Mar 15, 2008
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    0
    Creative is supposedly making/ made new drivers for W7, if those are out you could try and reverse them and see how creative solved the 2GB problem (somebody that has a non-OEM card that will work with official drivers that is). Even daniel_k was having problems with the SB Lives and the 2GB+ issue on his win7 pack but hes certain creative can fix it.

    Edit: Creative beta drivers for w7 (Sb Live):
    Code:
    http://forums.creative.com/creativelabs/board/message?board.id=soundblaster&thread.id=141688
     
    Last edited: Aug 10, 2009
  12. Chester01

    Chester01 New Member

    Joined:
    Jan 12, 2004
    Messages:
    492
    Likes Received:
    0
    Trophy Points:
    0
    I have been using the creative drivers on my laptop (audigy 2 zs notebook) which had been having issues with direct sound (2 gb of ram, but something to do with direct sound 'erroring' out and making loud screeching sounds); that works just fine with the creative drivers, I need direct sound because I am going to be using RoomEQWizard which usually after running a test causes the beep/screechy sound

    I also am using the creative drivers on my desktop with 5 gb of ram, they work fine.

    Still using kX on my parents computer :) once the other issues are fixed ill definately be going back to kX on my computers...
     
  13. SithBoxer

    SithBoxer New Member

    Joined:
    Mar 15, 2008
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    0
    I only wish i could test the creative drivers out. I have an SB0220 though (Oem SB Live Digital) and any time i have tried official creative drivers i get BSODs.
     
  14. thrillhouse82

    thrillhouse82 New Member

    Joined:
    Aug 13, 2009
    Messages:
    8
    Likes Received:
    2
    Trophy Points:
    0
    Yes, that should be the way to make this work. I also did some research and according to MS's DDK documentation, a driver is allowed to implement its own flavor of IDmaChannel that better suits the device's needs if need be. In other words, you don't _have_ to use IPortWaveCyclic::NewMasterDmaChannel to allocate DMA memory. Instead, you can also provide your own implementation of IDmaChannel and return it to the IPortWaveCyclic object when it calls IMiniportWaveCyclic::NewStream (which would be the place where NewMasterDmaChannel would be called). So to fix this issue, the kx driver would have to implement IDmaChannel and use the mentioned MmAllocateContiguousMemorySpecifyCache in IDmaChannel::AllocateBuffer (and/or in its constructing method) which can be told to only return memory blocks within specific memory boundaries.
     
    Russ likes this.
  15. Eugene Gavrilov

    Eugene Gavrilov kX Project Lead Programmer and Coordinator

    Joined:
    Dec 7, 2002
    Messages:
    3,146
    Likes Received:
    9
    Trophy Points:
    48
    Îòâåò: KNOWN ISSUE: [Windows 7 with] 2gb or more RAM

    The driver does not allocate memory by itself. Whenever the driver's audio stream instance is allocated, its CMiniportWaveOut(in)Stream::Init() function is called.
    This function needs to return PDMACHANNEL pointer to the PortClass driver.
    Microsoft suggest I use Miniport->Port->NewMasterDmaChannel function for allocating PDMACHANNEL. And this function won't allow to specify the boundaries.

    Perhaps I can use IDmaChannel interface directly and allocate it. But it is not clear how. Do you think it is a good idea to do the following?

    * call NewMasterDmaChannel "as is"
    * free the buffer by calling IDmaChannel::FreeBuffer
    * re-allocate the buffer by using IDmaChannel::AllocateBuffer, this time specifying constraints accordingly

    If I'm not mistaken, there is no convenient method of instantiating IDmaChannel in a different way, except for NewMasterDmaChannel.

    Please let me know what do you think.

    E.
     
    peate likes this.
  16. Russ

    Russ Well-Known Member

    Joined:
    Jan 17, 2005
    Messages:
    5,722
    Likes Received:
    13
    Trophy Points:
    48
    Again, I am not a driver developer and do not know much about it, but it seems (from what I have read) that no matter what solution you come up with, it is going to be using some kind of double buffering. If that is the case, how much difference would it be to just treat it as a subordinate device and use NewSlaveDMAChannel and AllocateBuffer instead?
     
  17. Eugene Gavrilov

    Eugene Gavrilov kX Project Lead Programmer and Coordinator

    Joined:
    Dec 7, 2002
    Messages:
    3,146
    Likes Received:
    9
    Trophy Points:
    48
    Îòâåò: KNOWN ISSUE: [Windows 7 with] 2gb or more RAM

    Russ,

    No, if we managed to use the proper AllocateBuffer function, no copying would be necessary. I will check this next week and will release a new version of the driver for testing (I only have 2Gb of RAM, so, cannot verify this solution).

    E.
     
  18. thrillhouse82

    thrillhouse82 New Member

    Joined:
    Aug 13, 2009
    Messages:
    8
    Likes Received:
    2
    Trophy Points:
    0
    First of all, thanks @Eugene for having a look into this issue! :) While I'm not familiar with audio driver development, I do have some experience in the mass storage driver corner of Windows. Therefore, my thoughts could be wrong but I'll share them with you anyways :p

    While that is correct, an audio driver - as far as I understood the DDK docs about this - is not required to use this function to allocate IDmaChannel. This function is merely provided to give driver developers the opportunity to create a stock implementation of IDmaChannel that will work for most of the hardware out there.

    In our case, however, we have stricter DMA memory requirements that are not fulfilled since NewMasterDmaChannel will only return objects that work for hardware that use the full 32 or 64 address lanes. In this case, we are allowed to implement IDmaChannel ourselves by providing a custom object that is returned on IMiniportWaveCyclic::NewStream. This object can use whatever memory function Windows has to create the memory area that fits the silicon's needs.

    Further readings can be found at DMA Channel Objects. There is a paragraph that reads: "Port drivers provide miniport drivers with functions that they can use to create DMA channels. Unless otherwise noted in the description of the port driver, it is not absolutely necessary to use DMA objects allocated from the port driver. The port driver simply requires a pointer to an IDmaChannel interface that supports the methods it needs. Check the documentation for each port driver for a list of the DMA channel methods that the port driver requires."

    The documentation of NewStream (which is the documentation we have to check) only has a list of methods of IDmaChannel that need to be implemented but doesn't state that it needs an IDmaChannel object returned by NewMasterDmaChannel so we should be fine there.

    I also thought about this approach. If the object returned by NewMasterDmaChannel behaves as specified, this should lead to a working driver. However, AllocateBuffer is not in the list of functions needed by IMiniportWaveCyclic::NewStream, so it can happen that it is simply not implemented and returns an error. We have to try this to know if this is the case...

    While this is not the cleanest solution on earth, it wouldn't require double-buffering and is easy to implement and test and will make a lot of users happy if it works :) Imho we should give this approach a try.

    I'm afraid you're right. Besides re-implementing IDmaChannel or freeing-then-reallocating, there seems to be no way of creating an IDmaChannel that immediately fits the card's needs.
     
  19. Russ

    Russ Well-Known Member

    Joined:
    Jan 17, 2005
    Messages:
    5,722
    Likes Received:
    13
    Trophy Points:
    48
    I am probably wrong, but it seems to me as though it works something like the following:

    NewMasterDMAChannel checks to see if the device supports 64 bit addressing.
    If it does support 64 bit addressing then it just creates the buffer to use for DMA.
    If it does not support 64 bit addressing and the system has less than 4 GB RAM, then it acts similarly (nothing special needs to be done).
    However, if the device does not support 64 bit addressing, and the system has more than 4 GB RAM, then it also creates a common buffer (below 4 GB) and uses double buffering.

    If Windows uses double buffering with devices that can do 32 bit PCI addressing (on systems with more than 4 GB RAM), then it seems likely that you would have to do the same with a device that only supports 31 bit PCI addressing... unless you implement your own IDMChannel interface, and thus your own memory handing routines, etc (which as we know, is not so easy without knowing what exactly is supposed to happen in (and the most efficient way to implement) each and every function IDMAChannel needs to support).

    From the way I have seen AllocateBuffer used (in example code used with NewSlaveDMAChannel (which is the only place I have seen it used), etc), it seems that it's purpose may be to create a common buffer (for double buffering), in which case, what you want to do with NewMasterDMAChannel may not work the way you are thinking it will, because it is 2 different buffers.

    i.e.
    By specifying that the device cannot do 64 bit addressing, it seems that (on systems with more than 4 GB RAM) you are going to get an IDMAChannel object that is already using a common buffer (setup for double buffering), and by freeing that buffer, and re-allocating it, all you are going to do is recreate the common buffer (except this time it will be below 2 GB instead of 4 GB). This might work (assuming the IDMAChannel object that you get does implement AllocateBuffer), but I think it will still be using double buffering, and there is some gray area as to what might happen on systems with less then 4 GB RAM (or systems with RAM between 2 GB and 4 GB).

    Again, I am probably wrong, so take it with a grain of salt, but I thought I would mention it just in case.
     
    Last edited: Aug 16, 2009
  20. RPGWiZaRD

    RPGWiZaRD New Member

    Joined:
    Dec 29, 2007
    Messages:
    132
    Likes Received:
    1
    Trophy Points:
    0
    Eugene, do you got a DDR2 system? If so I'd be willing to donate one of my spare RAM kits (I have 3 CellShock 2x1GB DDR2 kits atm and use only 1 of them), a 2x1GB CellShock PC2-6400 4-4-4-12 kit so you could troubleshoot it yourself as well. That's the least I could do if this means I could possibly continue to enjoy my SB Audigy + kX driver in the future.

    Drop me a message if interested.
     
    Last edited: Aug 17, 2009

Share This Page

visited