after reading the trouble shooting follow the instructions for your specific computer to do an SMC reset.
Edit: responded too soon!
That red light is the digital optical signal being sent out! if the SMC reset doesn't fix your issue go to apple immediately. This means that the computer things a MiniToslink is in your machine and shouldn't be on. It could be a sign of a hardware malfunction. if it's brand new, go to apple and they will repair it free of charge.
Walter, thanks for repeating my suggestion. To look in your system to turn off digital encoded output, you go to audio midi setup, and select the system audio and change it to the correct output.
However this is usually automatic and won't stay on unless the hardware is in the socket. Which again brings me back to thinking it's a hardware issue and you should go to apple store immediately.
should look like this:
yeah, and you can only select encoded out if you have the miniToslink in the computer.
Now it is clear. While tring to answer Acr8on and before seeing your answer I also had a look into midi but I was not able to understand. Now it is clear: without a digital harware connected to my Mac I could not find any possible way to select or deselect a digital output. Thanks for your followup: as often happens with Apple software the possible choice is presented only if the hardware is connected or even if the software support the choice.
Therefore your suggestion of a possible harware fairlure was really perfect.