Today, the U.S. Patent and Trademark Office has approved an Apple patent that enables the utilization of various phone sensors to automatically adjust the output volume and turn on the device's other speakers. Sensors used could include a front-facing infrared sensor (which is already available on most phones to turn the display on when it's away from your face), passive light sensors, and even cameras. The requirement is that with whichever sensor is used, it must have the ability to detect distance.
All-around, this seems to be a rather sensible patent. I envision being able to one moment have the phone next to my face as usual, then be able to place it on a table and have it automatically adjust to speakerphone mode (it's a little frustrating to fiddle with on-screen buttons when you're actively engaged in a call). Or, if you happen to be running and talking on your phone, where it may constantly be swaying from your face, it could increase its volume automatically without you having to stop to do it.
Last fall, Microsoft was also issued an interesting patent, although which is cooler - Apple's here or Microsoft's there - is up to you. What I am sure of, is that Microsoft's was much more humorous: it enables the user to "whack" their phone in order to shut its ringer off (perfect for when standing in line at the supermarket). So far, no phones have been released with Microsoft's OS that have enabled the feature, although it's still a possibility for the future.