Nice idea! First I was thinking he will use NE555 to convert the sensor reading to variable frequency and reading that. Generating a signal then reading it back with the same soundcard is neat.
I wonder if a frequency approach might be more accurate than relying on the left/right channel gain accuracy, providing the signal changes on timescales much longer than the wave period. Just generating pulses at some frequency might be the easiest method, which wouldn't rely on frequency measurement or FFTs.