The symptoms are not revealing which it is. Try the usual remove the optical cable and give the port the shortest possible air puff with canned air. Then try it with an analog connection.