Apple Insider brings word that Apple has filed a patent for:

an ambient sound sensor to the iPhone that would allow the handset to adjust its ringtone volume to its surrounding audio environment, which would ameliorate potentially-disruptive audio outputs.

Sounds nifty! In addition, Apple has also filed for a patent for self-cleansing audio jacks:

An alternative cleansing method would allow the end portion of the adaptor plug to rotate freely through the application of compressed air. This method, Apple said, would force debris from the jack as the adaptor plug is removed and the switches that hold the plug in the jack are closed.

Of course, many of these patents never see the light of day, but we like that Apple is exploring many different alternatives for future iPhone development.