The earliest mention of deafness and otology can be found in the Ebers Papyrus (1550 BC), a list of medical remedies and spells against common ailments. The Ancient Egyptians of the era treated various ear diseases, including the "Ear-that-Hears-Badly", by injecting olive oil, red lead, ant eggs, bat wings and goat urine into the ears1.
In general, the Ancient Egyptians were tolerant of people with disabilities, a quote from the Instruction of Amenemopet stands out2:
Beware of robbing a wretch or attacking a cripple.
Do not laugh at a blind man, nor tease a dwarf, nor cause hardship for the lame.
Don't tease a man who is in the hand of the god (i.e. ill or insane)
In contrast, the Ancient Greeks aren't thought of as being particularly tolerant towards people with disabilities. They were a far more militaristic society than the generally peaceful Egyptians, and ascribed great importance to physical prowess. When it comes to deafness and muteness, matters were extremely complicated. The Greeks considered their language to be perfect and anyone who couldn't speak it, including deaf and mute people, barbarians.
That said, the actual behaviour of the Greeks towards the deaf is a matter of debate. Most quotes, including Aristotle's, use the word "ἐνεος" (or various forms of) that translates to "speechless" to refer to the deaf. The prevalent opinion among historians is that "ἐνεος" had a double meaning and may have often been used pejoratively, thus most English translations favour "dumb" instead of "speechless" when translating "ἐνεος". Raymond Hull challenges that notion in Aural Rehabilitation: Serving Children & Adults, and posits3 that what eventually became the main interpretation of Aristotle's statements on the matter may very well be a misinterpretation stemming from the dual meaning of "ἐνεος".
In any case, Aristotle's philosophy on deafness is summarized in the following quotes:
Moving on, the earliest mention of sign language in history comes from Cratylus, one of the more interesting Socratic dialogues. The dialogue's main theme is the relation between language and reality and it's part of the Theory of Forms corpus. In it, Socrates poses the following question (Plat. Crat. 422d & Plat. Crat. 422e):
Socrates
Well, then, how can the earliest names, which are not as yet based upon any others, make clear to us the nature of things, so far as that is possible, which they must do if they are to be names at all? Answer me this question: If we had no voice or tongue, and wished to make things clear to one another, should we not try, as dumb people actually do, to make signs with our hands and head and person generally?
Hermogenes
Yes. What other method is there, Socrates?
Socrates
If we wished to designate that which is above and is light, we should, I fancy, raise our hand towards heaven in imitation of the nature of the thing in question; but if the things to be designated were below or heavy, we should extend our hands towards the ground; and if we wished to mention a galloping horse or any other animal, we should, of course, make our bodily attitudes as much like theirs as possible.
Hermogenes
I think you are quite right; there is no other way.
A distinction between deafness and muteness can be found in Theaetetus, where while discussing the capacity to learn, Socrates tells us that anyone can show what they think, except if they are speechless or deaf from birth (Plat. Theaet. 206d & Plat. Theaet. 206e):
Socrates
The first would be making one's own thought clear through speech by means of verbs and nouns, imaging the opinion in the stream that flows through the lips, as in a mirror or water. Do you not think the rational explanation is something of that sort?
Theaetetus
Yes, I do. At any rate, we say that he who does that speaks or explains.
Socrates
Well, that is a thing that anyone can do sooner or later; he can show what he thinks about anything, unless he is deaf or dumb from the first; and so all who have any right opinion will be found to have it with the addition of rational explanation, and there will henceforth be no possibility of right opinion apart from knowledge.
The original text uses "ἐνεὸς" and "κωφὸς" (=deaf), the same words Aristotle used in On Sense and the Sensible, suggesting both Plato and Aristotle distinguished between muteness and deafness. A more accurate translation of the above quote would be:
unless he is speechless or deaf from birth
The fact that Plato refers specifically to "deaf from birth" suggests that he considers muteness to be the more serious issue, which is consistent with the Greek belief for the perfection of their language.
1 You can find more details in Chapter XVII: Diseases of the Ear, Nose and Mouth (page 107) of Cyril P. Bryan's translation of the papyrus - pdf version.
2 Miriam Lichtheim, Ancient Egyptian Literature, The University of California Press.
3 Page 6.