Sounds like my Beagle. Yeast infection in the ears and yeast problems because of the vaccines the damn pound gave him. Thick brown junk (No ear mites, vet looked under the microscope), head shaking and it reeks. If you do go to the vet you should try and get him to a holistic vet.
I haven't used these products but you might find these site interesting..