yamaha code 30176 is from the early 90's.
Try resetting the remote:
1. press and hold MUTE & SELECT, wait for two blinks, release
2. enter 9 8 1
Now reenter the tv code:
1. tv
2. press and hold MUTE & SELECT, wait for two blinks, release
3. enter 1 0 1 6 6
Try the volume should control the tv, right?
Enter the yamaha code:
1. av1 or av2
2. press and hold MUTE & SELECT, wait for two blinks, release
3. enter 3 0 1 7 6
Volume should still control the tv in the av1 or av2 device, now try unlocking tv volume:
1. av1 or av2
2. press and hold MUTE & SELECT, wait for two blinks, release
3. enter 9 9 3
4. press SELECT, the button in the middle of the cursor pad.
Now if you have to, reprogram the directv device for RF, or an alternate IR codeset from 00002-00008.