Line In support

I’d love to have the option to play back music from a device plugged into the sound cards Line In connector.
I looked into writing this myself, but I’m honestly at a loss just figuring out how to get started writing an extension, having never tackled more than small, stand-alone scripts in Python before.

EDIT: Really, all I’d need for that is a way to run a command line script from a web-interface. It doesn’t have to go through the mpd or show up in a playlist.
Just have a seperate button in the web-interface that says “line in” and when you click it, it pauses the mpd and does some command-line foo (for alsa or pulseaudio) to pipe the line in to the line out.
Click again (or click on something else?) to revert.

http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-plugins/html/gst-plugins-base-plugins-alsasrc.html would be the ideal way to do this. But there isn’t a way to give GStreamer an URI which would make it use that src.

So don’t really see any clean or simple way of adding anything like this to mopidy itself.