What's the port left to the audio output?
That's the audio in port.


Audio in/optical audio in port
The Audio In port accommodates both digital optical input and analog audio input.
Analog audio line input is accepted through a 3.5mm mini phone jack. The sound input port accepts line-level stereo signals up to 24-bit stereo 44.1-192kHz sampling rate. It also accepts a stereo miniplug-to-RCA cable adapter for connecting stereo equipment to the computer.
Optical audio input is SPDIF format and uses a standard TOSLINK cable with a TOSLINK mini-plug adapter, accepting up to 24-bit stereo and 44.1-96kHz sampling rate.

Source: https://support.apple.com/kb/HT202638