It is possible that your little piggy has more than one problem going on.
Sometime symptoms of parasites or fungal infections seem to come out of no where, but have actually been there for quite a while. The guinea pigs immune system would keep it under control, but, during times of stress, or if the guinea pig is immature, the symptoms can arise.
I would be concerned about a couple of things. Mange mites are a very common parasite that guinea pigs get on their skin. They do cause intense itching, and if left untreated, could ultimately cause death.
Another parasite that is common in guinea pigs is ear mites. Ear mites will cause the guinea pig to have ear discharge and will usually cause scratching.
Fungal infections such as ringworm can cause a flaky, crusting appearance anywhere on the body including the ear flaps.
Lastly, some guinea pigs are prone to excessive wax build-up, but this is usually seen inside the ear.
I would suggest that you find a vet that has experience in treating guinea pigs to address this problem. If any of the above conditions are present, medications will have to be administered. Do not try to clean the inner ear on your own without first being shown how to by the vet as you can cause damage to the ear. Fungal infections can be transmitted to humans or other pets as some mites can as well.
Best of luck to you and your little piggy. Don't forget that you need to find a vet that specializes in guinea pigs.