I am 100% sure from my own experience that if they are small, white and fly, they are knats. Yes they do come from the substrate or any near by plants. They like soil and wood so if you are using something like cypress mulch that would be likely where they came from. That also explains why changing the substrate didn't help. The PAM will kill them off for sure (provent-a-mite) or you can bake or microwave your substrate. Changing to newspaper is also a great idea. I got the same thing with cypress mulch and I just baked it for a bit, just be sure to keep a close eye on the oven if that is what you chose to do. If you microwave it, put it in a bowl, spray it damp with water and put it in there for 2 minutes or until it is quite hot to the touch. If you chose the oven, 15 minutes at 200 degrees should do it. This is what I have done in the past so this is just my own opinion.