Correct!
If you have a digital output (toslink cable) connected, then you can't adjust the output volume. You would adjust the volume on your output device.
If you don't ever use an optical audio out, then look inside the output port on your MacBook Pro. Do you see the red light inside?
That will usually reset (unstick) by inserting your headphones, or whatever you use, then remove. Do that a coupe of times. If you do have a toslink cable, then that's ideal to try the hardware reset on that port. If you can get the red light to go out, then you should be back to normal.