There are alot of reasons a dog could be showing signs of deafness. One of the first things needed is to make sure that the dog is suffering from deafness, and your vet would need to do that. That would involve cleaning, and giving the ears a full exam to make sure they were not infected or impacted. That could contribute to your dog having major trouble hearing. Please don't try to clean your dogs ears yourself, it is a very delicate and sentive area! Much damage can be done if handled imporperly, and you need them checked for infection. If no signs of trouble are in the ear. Then your vet can test his hearing to make sure that he is indeed deaf. That is a simple test.
Also, age is a major factor in all your dogs abilities, and hearing is near the top of that list. Depending on the dog's age, this might just be another step along the road of your lives together. I start teaching all my dogs, and believe it or not cats too, a bit of sign commands I've made up over the years, when they have learned the word commands and have a good grasp and understanding of what is expected of them. I have raised, and gone through the life cycle of enough to have learned that the body begins to fails, but not their heart, or desire to please. So, I try to make the transion as easy as possible and the use of the hand signals is one of those simple things. They get used to seeing the signals with the words and eventually don't need the words to back up the signals. It takes a little work, but it is well worth the effort.
The only other thing I know of for certain (it happened to one of mine). Is that if you give Buffered Aspirin on a long term bases, recommended by your vet only. That this can be a side effect of the long term use, not short term. But, my vet explained that with the long term use, some dogs are effected this way and others are not. But that it can happen. So, that is something to be considered and discussed with your vet., if they recommened long term Buffered Aspirin for your Dog. There are probably other factors, but these are the ones I have direct experience with.