I have not the slightest doubt that Ledger knew that mixing them would get him high(er). He probably also knew doing so was dangerous and potentially fatal and chose to take the risk What he might not have known, however, is how having a compromised respiratory system might contribute to the danger, although he'd have to be pretty dumb (or feverish or jonesing too hard) not to figure that out. What I don't believe for a second is that this was a tragic case of someone not understanding that some or all the drugs in his possession might interact badly if taken together.
Don't get me wrong--I think it's too bad he died. But knowing how much he had in his system casts his death in a different light.