The Optical connection on the D1 takes priority, so when the D1 receives an optical signal it will switch to this automatically.  Some devices will deactivate their optical out when no audio is playing. Others will leave it active and send an empty signal when no audio is playing, meaning depending on how the optical output on that source acts you may have to shut the source off. You can use something like an optical switcher so that you can toggle between the optical source and the USB input.