When you turn on the receiver, you have to select the AVR input associated with the TV audio. if you leave it on the input for the Direct TV box, you will hear Direct TV. The receiver doesn't know that you want to hear the TV audio instead of Direct TV. How could it?
Until you explain how you have things connected, it is hard to help. For audio, I assume you have the Direct TV box connected to one optical input and the TV output connected to the other. You need to select the correct sources on the receiver in order to switch from one to the other. For video, you have the TV, of course, but we don't know how the Direct TV is connected. Is it connected to the receiver or directly to the TV?
At the end of the day, you need to select the correct inputs on the device handling the video and on the device handling the audio. It is clear you are not doing that right now. But, the solution is not clear because you haven't explained how the equipment is connected.