That seems to be the command check part of code (
command code compared to 8-bit logical inverse of the command ):
if(((IR_CODE_REC.IR_CODE_8.IR_DATA_CODE|IR_CODE_REC.IR_CODE_8.IR_DATA_CODE_F)
==0XFF)&&
((IR_CODE_REC.IR_CODE_8.IR_DATA_CODE&IR_CODE_REC.IR_CODE_8.IR_DATA_CODE_F)
==0X00))
{
IR_Decode_Stage = REPEAT_TEST;
IR_CODE_REC
.IR_OK = 1; //½âÂëÕýÈ·
}
And according to the provided IR.h.txt file, first two bytes of frame shall correspond to:
#define
RC_20_USER_CODE 0X8877
0x8877 is 1000 1000 0111 0111 binary, so again, destination/reverse of the destination.
Shall be a basic NEC protocol, from timings to frames contents.
Main point to double check are the commands, to send the correct ones to the DAC. Like such (to be confirmed, code contains some variants):
#define RC_1X_IR_HEADPHONE 0X04
#define RC_1X_IR_LINEOUT 0X40
#define RC_1X_IR_INPUT_L 0X47
#define RC_1X_IR_INPUT_R 0X15
#define RC_1X_IR_VOL_INC 0X46
#define RC_1X_IR_VOL_DEC 0X16
#define RC_1X_IR_MUTE 0X06
#define RC_1X_IR_POWER 0X18
#define RC_1X_IR_HEADPHONE_LINEOUT 0X55
#define RC_1X_IR_A 0X10
#define RC_1X_IR_DIS 0X14
#define RC_1X_IR_FIR 0X54
#define RC_1X_IR_IIR 0X50
Edit: codes list should be correct, see source codes at previous posts here, plus:
https://github.com/irplus-remote/irplus-codes.github.io/issues/379
Required, by the NEC protocol,
frames repetitions, for confirmation (and to deal with lossed or altered frames), an amount to be checked also, I didn't have a look at that part inside Topping's code:
IR_Decode_Stage =
REPEAT_TEST;
I would now build some frames and send 3 to 5 to the DAC to see what happens... Or with any universal command, test some frames using those informations and NEC frames.
PS1: I first had a look inside the remote controller for some hints. But there, we won't learn more, don't destroy yours, it is based on AD009-08, an OPT (One Time Programable) microcontroller (the attachment).
PS2: and that is probably a path to investigate for a very cheap alternate DIY device to control a Topping DAC, like a remote volume/mute button:
https://forum.arduino.cc/t/lightweight-arduino-ir-library-for-nec-remote-control-devices/595247
https://gist.github.com/EEVblog/6206934