Yamaha posts their IR commands but you will have to do some translation. There is no command set for thte RX-V520 but here is for the -V420 and -V530 and most Yamaha commands are the same.
[Link: yamaha.com]Once you select the model number you will see a pdf listing. As an example for the -V530 model,the custom code 7A (that is decimal 122 and is the Audio_0176 setup code). So any command here (or any other model with custom code 7A) will work with that setup code,*if* your particular model recognizes that specific command.
Then look at the "data code" column. That is the command in hex that known as OBC when converted to decimal. My first guess for the command that you want is Dolby Digital/DTS Toggle = 90 hex.
To convert hex to decimal, pen in any Windows machine, Start|Programs|Accessories|Calculator then select View|Scientific hit the radio button for Hex, enter 90 then hit the radio button for Dec which is 144 that is the OBC.
Then go to
[Link: hifi-remote.com] a cross reference between OBC and EFC for the NEC protocol which is what Yamaha uses.
The first number is OBC the number to the right in bold is EFC=Advanced codes=231.
So with that methodology you can go through the Yamaha receiver commands for the various receiver models and try any commands that look promising from any with the 7A custom code.
-Jon