Open the System Preferences panel -- the icon looks like this:


On this next screen choose the last option item "Input" (on the far right):

Then at the bottom of this screen select the dropdown for "Use audio port for" and select "Sound Input":

Your line in should now work....
Of course, once you're done you'll have to reset this to "Sound Output" again so that you can use speakers or headphones :-)