If it looks like he has brown sugar in his ear and smells, my dog had the same issue when he was around 1 years old. It was a food allergy - chicken. Switched to an alternative protein and it hasn't been an issue.
It also could be ear mites, but I've read those are high contagious to other pets, so I imagine it would have spread to other dogs or cats at your place, if you have them and they interact.
Same thing happened to my pup. There my be a thread on here from a fews years back about it. We changed from chicken and rice to non grain and venison blend. I would get some ear wash from the vet to keep around the house.