# Patent

## Title
Control of audio output of headphone earbuds based on the environment around the headphone earbuds

## Abstract

A headphone earbud may include a sensor to determine characteristics of an environment around the headphone earbud. The sensor may be integrated with the headphone earbud to measure a distance from the headphone earbud to a user's ear drum. This distance may be used to control an audio output of the headphone earbud, such as through an adaptive noise cancellation (ANC) algorithm. Control over the audio output may be performed by an audio integrated circuit (IC) integrated within the headphone earbud or within a mobile device coupled to the headphone earbud.

## Background
FIELD OF THE DISCLOSURE
The instant disclosure relates to mobile devices. More specifically, this disclosure relates to audio output of mobile devices.
BACKGROUND
Mobile devices are carried by a user throughout most or all of a day. During the day, the user may encounter many different environments, each with a different background noise characteristic and other acoustic effects. Mobile devices employ noise cancelling to take into account the environmental changes and improve the user's experience while using the mobile device. However, conventional noise cancellation in mobile devices is restricted to receiving information about an environment around the mobile device. That is, an error microphone may be located on the mobile device and recordings taken from the error microphone are used to cancel noise and improve the quality of audio on a telephone call. The error microphone has a fixed position on the mobile device that restricts information about the environment the error microphone may receive.
Shortcomings mentioned here are only representative and are included simply to highlight that a need exists for improved audio devices, particularly for consumer-level devices. Embodiments described here address certain shortcomings but not necessarily each and every one described here or known in the art.
SUMMARY
Headphones, and in particular headphone earbuds, have become a device paired with cellular phones, media players, and other electronic devices. Sensors may be added to the earbuds to determine characteristics of an environment around the headphone earbud. In one embodiment, the sensors integrated with the headphone earbud may measure a distance from the headphone earbud to a user's ear drum. This distance may be used to control an audio output of the headphone earbud, such as through an adaptive noise cancellation (ANC) algorithm. In other embodiments, other characteristics of an environment around the headphone earbud may be measured, such as whether the headphone earbud is inserted into an ear canal and/or a shape of the ear canal.
Control of the audio output from a headphone earbud based on environmental characteristics surrounding the headphone earbud may extend battery life of the overall mobile system, and/or make the overall listening experience more pleasurable and intuitive to a user. In one embodiment, control over the audio output may be performed by an audio integrated circuit (IC) integrated within the headphone earbud. In another embodiment, control over the audio output may be performed by a mobile device, including an audio IC, coupled to the headphone earbud to receive measurements of the environment from the headphone earbud.
Characteristics of an environment around the headphone earbud may be measured with optoelectronic sensors such as, for example, Infrared (IR) emitters and collectors. These sensors may be used as proximity sensors and/or ambient light detectors. Measurements from the optoelectronic sensors may be used to control audio output of the headphone earbuds, such as, for example, by turning on or off features and/or changing volume settings. Optoelectronic sensors may also be integrated into the headphone earbud to measure a distance from a user's ear drum to the speaker and/or microphones inside a headphone earbud.
In one embodiment, by integrating a small IR optoelectronic sensor into left and right headphone earbuds, a set of headphones may have internal control over specific features, such as single channel earbud playback and volume control. In one embodiment, the optoelectronic sensor may send a signal to the earbud audio system, when an ear bud is removed or dislodged from the ear canal, that can mute or stop playback to that specific earbud, while the other can continue to play. In another embodiment, if the earbud is dislodged, but not completely removed from the ear canal, the optoelectronic sensor can detect an increase in ambient light in the ear canal and send a signal to the audio system to increase the volume to that specific earbud, without any input from the end user.
Beyond volume control over the system, an integrated optoelectronic sensor may be integrated into the headphone earbud to face down the ear canal and used to measure the distance from an earbud reference point to the ear drum. The reference distance may be fed back to the audio system as a technique to set volume settings and/or used to create a more accurate transfer function from the headphone earbud speaker to the ear drum to enhance the audio output and/or improve performance on applications such as adaptive noise cancellation (ANC).
According to one embodiment, an apparatus may include a headphone earbud having a speaker; an emitter; and/or a collector operating with the emitter and configured to measure at least one characteristic of an environment around the headphone earbud, wherein an output of the collector is configured to be coupled to a controller for adjusting an output of the speaker.
In certain embodiments, the emitter includes an optoelectronic emitter, an infrared (IR) emitter, a sonic emitter, and/or a light emitter; the collector includes a corresponding optoelectronic sensor, infrared (IR) sensor, sonic collector, and/or light collector; the controller is configured to perform at least one of analog reflection, digital echo timing, and/or synchronous digital echo timing on the received output of the collector; the controller may be a digital signal processor (DSP); the at least one characteristic may be a distance between the headphone earbud and an ear drum of a user of the headphone earbud; the at least one characteristic may be whether the headphone earbud is inserted in an ear; the controller is configured to reduce the volume of the headphone earbud when the headphone earbud is not inserted in the ear; and/or the collector may operate synchronously with the emitter.
In some embodiments, the apparatus may also include a controller having an audio input node configured to receive an audio signal, a feedback input node coupled to the collector, a processing block coupled to the audio input node and to the feedback input node and configured to modify the audio signal based, at least in part, on at least one characteristic of the environment around the headphone earbud, and/or an audio output node coupled to the speaker and configured to output the modified audio signal; the processing block may be configured to perform adaptive noise cancellation (ANC) based, at least in part, on the at least one characteristic of the environment; and/or the apparatus may also include a microphone and the at least one characteristic may be a distance between the microphone and an ear drum.
According to another embodiment, a method may include transmitting, from a headphone earbud, a signal; receiving, at the headphone earbud, a reflected signal; and/or controlling an audio output of the headphone earbud based, at least in part, on the reflected signal.
In certain embodiments, the emitter may include an optoelectronic emitter, an infrared (IR) emitter, a sonic emitter, and/or a light emitter; the collector may include a corresponding optoelectronic sensor, infrared (IR) sensor, sonic collector, and/or light collector; the step of determining at least one characteristic may include determining a distance between the headphone earbud and an ear drum of a user of the headphone earbud; the step of determining at least one characteristic may include determining whether the headphone earbud is inserted in an ear; the step of controlling the audio output may include performing adaptive noise cancellation (ANC) based, at least in part, on the determined at least one characteristic of the environment.
In some embodiments, the method may also include determining at least one characteristic of an environment around the headphone earbud based, at least in part, on the reflected signal, wherein the step of controlling the audio output comprises controlling the audio output based, at least in part, on the determined at least one characteristic; and/or reducing a volume of the headphone earbud when the headphone earbud is not inserted in the ear.
According to a further embodiment, an apparatus may include a headphone earbud having a speaker; a microphone; an emitter; a collector operating synchronously with the emitter and configured to measure at least one characteristic of an environment around the headphone earbud; and/or a processor coupled to the collector and to the speaker. The processor may be configured to measure a distance from the microphone to an ear drum of a user of the headphone earbud; and/or adjust an output of the speaker based, at least in part, on the measured distance.
In certain embodiments, the digital signal processor (DSP) may be configured to adjust an output of the speaker based, at least in part, on an adaptive noise cancellation (ANC) algorithm; and/or the emitter may include an optoelectronic emitter, an infrared (IR) emitter, a sonic emitter, and/or a light emitter; the collector may include a corresponding optoelectronic sensor, infrared (IR) sensor, sonic collector, and/or light collector.
The foregoing has outlined rather broadly certain features and technical advantages of embodiments of the present invention in order that the detailed description that follows may be better understood. Additional features and advantages will be described hereinafter that form the subject of the claims of the invention. It should be appreciated by those having ordinary skill in the art that the conception and specific embodiment disclosed may be readily utilized as a basis for modifying or designing other structures for carrying out the same or similar purposes. It should also be realized by those having ordinary skill in the art that such equivalent constructions do not depart from the spirit and scope of the invention as set forth in the appended claims. Additional features will be better understood from the following description when considered in connection with the accompanying figures. It is to be expressly understood, however, that each of the figures is provided for the purpose of illustration and description only and is not intended to limit the present invention.



BRIEF DESCRIPTION OF THE DRAWINGS
For a more complete understanding of the disclosed system and methods, reference is now made to the following descriptions taken in conjunction with the accompanying drawings.
FIG. 1 is a cross-section of an ear canal illustrating a headphone earbud having a measurement device according to one embodiment of the disclosure.
FIG. 2 is a block diagram illustrating an optoelectronic device integrated with a headphone earbud according to one embodiment of the disclosure.
FIG. 3 is a flow chart illustrating control of an audio output of a headphone earbud based on measurements from the headphone earbud according to one embodiment of the disclosure.
FIG. 4 is a cross-section of an ear canal illustrating a headphone earbud with an integrated optoelectronic device providing feedback to a mobile device for controlling an output of the headphone earbud according to one embodiment of the disclosure.
FIG. 5 is a flow chart illustrating control of an output of a headphone earbud based on a determination of an environment around the headphone earbud according to one embodiment of the disclosure.
FIG. 6 is a flow chart illustrating control of an output of a headphone earbud with an adaptive noise cancellation (ANC) algorithm using information of an environment around the headphone earbud according to one embodiment of the disclosure.
FIG. 7 is a block diagram illustrating a noise canceling system according to one embodiment of the disclosure.



DETAILED DESCRIPTION
FIG. 1 is a cross-section of an ear canal illustrating a headphone earbud having a measurement device according to one embodiment of the disclosure. A headphone earbud 112 may be inserted into a user's ear canal 102. The headphone earbud 112 may include a speaker transducer 116 for generating sound output in the ear canal 102. The headphone earbud 112 may also include a sensor 114 for measuring a characteristic around the headphone earbud 112 such as, for example, ambient light in the user's ear canal 102. Measurements from the sensor 114 may be relayed to an audio integrated circuit (IC) or ICs 122. The audio IC or ICs 122 may be integrated with the headphone earbud 112 and/or a mobile device or electronic device (not shown) coupled to the headphone earbud 112. Although only one headphone earbud 112 is shown in FIG. 1, additional headphone earbuds may be coupled together to create, for example, stereo sound. Additionally, the headphone earbud 112 may include other components not illustrated in FIG. 1 including, for example, an error microphone for adaptive noise cancellation (ANC).
In one embodiment, the audio IC or ICs 122 may include an audio input node configured to receive an audio signal, such as a music signal from a mobile device. The audio IC or ICs 122 may also include a feedback input node coupled to a collector of the sensor 114. A processing block of the audio IC or ICs 122 may be coupled to the audio input node and to the feedback input node and configured to modify the audio signal based, at least in part, on the at least one characteristic of the environment around the headphone earbud. In one embodiment, the processing block is a digital signal processor (DSP). An audio output node coupled to the speaker transducer 116 and be configured to output the modified audio signal to the speaker transducer 116.
The headphone earbud 112 may also include other components, such as a digital and/or analog microphone for recording sounds in an environment around the headphone earbud 112. Input at the microphone may be input to an adaptive noise cancellation (ANC) algorithm performed by the audio IC or ICs 122. Through adaptive noise cancellation (ANC), the audio IC or ICs 122 may cancel background noise in the environment around the headphone earbud 112. Additionally, a distance between the microphone of the headphone earbud 112 and the user's ear drum may be measured and provided to the audio IC or ICs 122 for input to the adaptive noise cancellation (ANC) algorithm.
FIG. 2 is a block diagram illustrating an optoelectronic device integrated with a headphone earbud according to one embodiment of the disclosure. The headphone earbud 112 may include a sensor 114 having an emitter 202 and a collector 204. The emitter 202 may be, for example, an optoelectronic emitter, an infrared (IR) emitter, a sonic emitter, and/or a light emitter. The collector 204 may be, for example, an optoelectronic sensor, an infrared (IR) sensor, a sonic collector, and/or a light collector.
The emitter 202 and the collector 204 may operate synchronously, such that output generated by the emitter 202 and/or effects generated by the output of the emitter 202 may be measured by the collector 204. For example, the emitter 202 may generate an output signal 206, such as a light signal, which reflects off a surface 210 as reflected signal 208. The reflected signal 208 may be received by the collector 204 and compared with the output signal 206 to measure a characteristic of an environment around the headphone earbud 112. Additionally, the collector 204 may receive an ambient signal 212 within the environment around the headphone earbud 112, such as ambient light around the headphone earbud 112. In one embodiment, the surface 210 may be a user's ear drum and the measured characteristic by the sensor 114 may be a distance between the headphone earbud 112 and the surface 210.
After a characteristic of an environment around the headphone earbud is known, the known characteristic may be used to adjust an audio signal output by the headphone earbud. FIG. 3 is a flow chart illustrating control of an audio output of a headphone earbud based on measurements from the headphone earbud according to one embodiment of the disclosure. A method 300 may include, at block 302, transmitting, from a headphone earbud, a signal. Then, at block 304, a reflected signal of the signal may be received at the headphone earbud. The reflected signal received at block 304 may be processed to determine a characteristic of an environment around the headphone earbud. For example, processing may include performing analog reflection, digital echo timing, and/or synchronous digital echo timing. At block 306, an audio output of the headphone earbud may be controlled based, at least in part, on the reflected signal.
The headphone earbud may output audio from a coupled mobile device or other electronic device. For example, music may be played through the headphone earbuds and sound levels of the music for a headphone earbud adjusted based on an environment around the headphone earbud. FIG. 4 is a cross-section of an ear canal illustrating a headphone earbud with an integrated optoelectronic device providing feedback to a mobile device for controlling an output of the headphone earbud according to one embodiment of the disclosure. The headphone earbud 112 inserted in the ear canal 102 may measure a distance 410 from the headphone earbud 112 to a user's ear drum 402. The distance 410 may be measured by transmitting signal 206 through the emitter 202 and measuring the reflected signal 208 with the collector 204. For example, a time delay between transmission of the signal 206 and reception of the reflected signal 208 may be used to compute the distance 410 based on a known speed of the signal 206 and the reflected signal 208 through the user's ear canal 102. A second headphone earbud 112B may be similarly configured and inserted in the user's other ear canal (not shown) to provide stereo sound output.
The headphone earbud 112 may return information regarding the distance 410 to a mobile device 420 or other electronic device (not shown). The mobile device 420 may then adjust an output of the music to the headphone earbud 112 to compensate for the distance 410. In one embodiment, the distance 410 may be used to determine whether the headphone earbud 112 is inserted into the user's ear canal 102. For example, if the distance 410 is very large or no reflected signal 208 is detected by the collector 204, then the mobile device 420 may determine the headphone earbud 112 is outside of the ear canal 102.
Audio output through a particular headphone earbud may be shut off if the headphone earbud is removed from the user's ear canal. FIG. 5 is a flow chart illustrating control of an output of a headphone earbud based on a determination of an environment around the headphone earbud according to one embodiment of the disclosure. A method 500 begins at block 502 with transmitting, from a headphone earbud, a signal and continues at block 504 with receiving, at the headphone earbud, a reflected signal of the transmitted signal at block 502. At block 506, it is determined whether the headphone earbud is inserted in a user's ear canal, such as by determining a distance between the headphone earbud and the user's ear canal and/or measuring an ambient light signal. These determinations may include computations based, for example, on analog reflection, digital echo timing, and synchronous digital echo timing on the received reflected signal. In one embodiment when the transmitted signal is an infrared (IR) signal, distance determinations may be calculated as described in “Using infrared sensors for distance measurement in mobile robots” by G. Benet et al published at pp. 255-266 of vol. 40 of the Robotics and Autonomous Systems Journal, which is incorporated by reference herein. In another embodiment, LIDAR (e.g., light radar or light-based detection and ranging) may be used to compute distances. Then, at block 508, an audio output of the headphone earbud is controlled based on the determination at block 506 of whether the headphone earbud is inserted in the ear canal.
For example, when the headphone earbud is removed from the ear canal, audio output to the headphone earbud may be turned off. If one of the two headphone earbuds of a stereo set is inserted, then one of the headphone earbuds may be turned on and the other turned off. In another example, the volume of the headphone earbud may be adjusted as the headphone earbud is removed from or inserted into the ear canal. In one embodiment, the volume is decreased as the headphone earbud is removed from the ear canal. In another embodiment, the volume may be increased as the headphone earbud is removed from the ear canal to allow a user to continue to hear the audio output, but then the audio output is switched off after the headphone earbud is completely removed from the ear canal.
Audio output through a headphone earbud may be adjusted with adaptive noise cancellation (ANC) using information about the environment around the headphone earbud. FIG. 6 is a flow chart illustrating control of an output of a headphone earbud with an adaptive noise cancellation (ANC) algorithm using information of an environment around the headphone earbud according to one embodiment of the disclosure. A method 600 begins at block 602 with transmitting, from a headphone earbud, a signal and continues at block 604 with receiving, at the headphone earbud, a reflected signal of the signal transmitted at block 602. Then, at block 606, a distance between the headphone earbud and a user's ear drum may be determined. The distance may be calculated using, for example, analog reflection, digital echo timing, and/or synchronous digital echo timing on the received reflected signal. At block 608, an audio output of the headphone earbud may be controlled based, at least in part, on the distance determined at block 606 through adaptive noise cancellation (ANC).
One embodiment of an adaptive noise cancellation (ANC) system for a mobile device, such as the mobile device 420 of FIG. 4, is shown in FIG. 7. FIG. 7 is a block diagram illustrating a noise canceling system according to one embodiment of the disclosure. A circuit 720 may receive input from the microphones 732, 734, and 736. Analog values from the microphones 732, 734, and 736 may be converted by respective analog-to-digital converters (ADCs) 721A, 721B, and 721C. The ADCs 721A, 721B, and 721C may be part of the noise control system or may be built into the microphones 732, 734, and 736, respectively. In one embodiment, the microphones 732, 734, and 736 are digital microphones, and no ADCs are placed between the digital microphones and the circuit 720.
The ANC circuit 730 may generate an anti-noise signal, which is provided to a combiner 726. The anti-noise signal may be adjusted according to information provided by information signal 742 about an environment around a headphone earbud. For example, the information may include measurements from the collector 204 and/or calculated information, such as the distance 410. In some embodiments, measurements from the collector 204 may be used to determine a distance to the user's ear canal or other characteristics of the environment around the headphone earbud for use in generating an anti-noise signal. The distance may be calculated using, for example, analog reflection, digital echo timing, and/or synchronous digital echo timing on the received reflected signal.
The combiner 726 combines the anti-noise signal from the ANC circuit 730 with sound from the near speech microphone 736, internal audio 754, and audio signals received wirelessly through an antenna 728 and processed by a radio frequency (RF) circuit 752. The internal audio 726 may be, for example, ringtones, audio files, and/or audio portions of video files. Audio signals received through the antenna 728 may be, for example, streamed analog or digital audio signals and/or telephone conversations. The combiner 726 provides a single signal to a digital-to-analog converter (DAC) 723. The DAC 723 converts the digital signal of the combiner 723 to an analog audio signal for amplification by the amplifier 722 and output at the speaker 704.
Additional details regarding ANC may be found in U.S. patent application Ser. No. 13/943,454 filed on Jul. 16, 2013, the contents of which are hereby incorporated by reference.
The audio output control, described above and with reference to FIGS. 3, 5, and 6, of the headphone earbud may be implemented within a mobile device or electronic device coupled to the headphone earbud, such as in an audio integrated circuit (IC). The audio output control may also be implemented within the headphone earbud in an audio IC embedded in the headphone earbud. Whether the audio control is located within the headphone earbud, a mobile device, or an electronic device, the audio control may be implemented in firmware and/or software.
If implemented in firmware and/or software, the functions described above may be stored as one or more instructions or code on a computer-readable medium. Examples include non-transitory computer-readable media encoded with a data structure and computer-readable media encoded with a computer program. Computer-readable media includes physical computer storage media. A storage medium may be any available medium that can be accessed by a computer. By way of example, and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store desired program code in the form of instructions or data structures and that can be accessed by a computer. Disk and disc includes compact discs (CD), laser discs, optical discs, digital versatile discs (DVD), floppy disks and blu-ray discs. Generally, disks reproduce data magnetically, and discs reproduce data optically. Combinations of the above should also be included within the scope of computer-readable media.
In addition to storage on computer readable medium, instructions and/or data may be provided as signals on transmission media included in a communication apparatus. For example, a communication apparatus may include a transceiver having signals indicative of instructions and data. The instructions and data are configured to cause one or more processors to implement the functions outlined in the claims.
Although the present disclosure and certain representative advantages have been described in detail, it should be understood that various changes, substitutions and alterations can be made herein without departing from the spirit and scope of the disclosure as defined by the appended claims. Moreover, the scope of the present application is not intended to be limited to the particular embodiments of the process, machine, manufacture, composition of matter, means, methods and steps described in the specification. As one of ordinary skill in the art will readily appreciate from the present disclosure, processes, machines, manufacture, compositions of matter, means, methods, or steps, presently existing or later to be developed that perform substantially the same function or achieve substantially the same result as the corresponding embodiments described herein may be utilized. Accordingly, the appended claims are intended to include within their scope such processes, machines, manufacture, compositions of matter, means, methods, or steps.

## Claims

1. An apparatus, comprising:
a headphone earbud, comprising:
a speaker;
an emitter; and
a collector operating with the emitter and configured to measure at least one characteristic of an environment around the headphone earbud,
wherein the at least one characteristic comprises a numerically-valued distance between the headphone earbud and an ear drum of a user of the headphone earbud,
wherein an output of the collector is configured to be coupled to a controller for adjusting an output of the speaker,
wherein the numerically-valued distance is calculated based, at least in part, on a time delay between transmission of an initial signal from the emitter and receipt at the collector of a reflected signal comprising the initial signal reflected from the ear drum, and
wherein the controller is configured to perform adaptive noise cancellation (ANC) by adjusting a transfer function from the headphone earbud to the ear drum based, at least in part, on the numerically-valued distance.

2. The apparatus of claim 1, wherein the emitter comprises at least one of an optoelectronic emitter, an infrared (IR) emitter, a sonic emitter, and a light emitter and the collector comprises a corresponding at least one of an optoelectronic sensor, an infrared (IR) sensor, a sonic collector, and a light collector.

3. The apparatus of claim 1, wherein the controller is configured to perform at least one of analog reflection, digital echo timing, and synchronous digital echo timing on the received output of the collector.

4. The apparatus of claim 1, wherein the headphone earbud further comprises the controller, and wherein the controller comprises:
an audio input node configured to receive an audio signal;
a feedback input node coupled to the collector;
a processing block coupled to the audio input node and to the feedback input node and configured to modify the audio signal based, at least in part, on the at least one characteristic of the environment around the headphone earbud to generate a modified audio signal; and
an audio output node coupled to the speaker and configured to output the modified audio signal.

5. The apparatus of claim 4, wherein the controller comprises a digital signal processor (DSP).

6. The apparatus of claim 4, wherein the processing block is configured to perform adaptive noise cancellation (ANC) based, at least in part, on the at least one characteristic of the environment.

7. The apparatus of claim 1, wherein the headphone earbud further comprises a microphone, and wherein the at least one characteristic further comprises a distance between the microphone and the ear drum.

8. The apparatus of claim 1, wherein the at least one characteristic further comprises whether the headphone earbud is inserted in an ear, wherein the headphone earbud is determined to be not inserted in the ear when the numerically-valued distance is less than a threshold value.

9. The apparatus of claim 8, wherein the controller is configured to reduce the volume of the headphone earbud when the headphone earbud is determined to be not inserted in the ear.

10. The apparatus of claim 1, wherein the collector operates synchronously with the emitter.

11. The apparatus of claim 1, wherein the controller is further configured to:
detect, based on an output of the collector, that the headphone earbud is at least partially dislodged from the ear and, in response, increase a volume to the headphone earbud; and
detect, based on the output of the collector, that the headphone earbud is removed from the ear and, in response, mute the headphone earbud.

12. A method, comprising:
transmitting, from a headphone earbud, a signal;
receiving, at the headphone earbud, a reflected signal;
determining at least one characteristic of an environment around the headphone earbud based, at least in part, on the reflected signal, wherein the step of determining the at least one characteristic comprises determining a numerically-valued distance between the headphone earbud and an ear drum of a user of the headphone earbud; and
controlling an audio output of the headphone earbud based, at least in part, on the determined at least one characteristic,
wherein the numerically-valued distance is determined based, at least in part, on a time delay between transmission of the signal and receipt of the reflected signal reflected from the ear drum corresponding to the signal,
and wherein the step of controlling the audio output comprises performing adaptive noise cancellation (ANC) by adjusting a transfer function from the headphone earbud to the ear drum based, at least in part, on the numerically-valued distance.

13. The method of claim 12, wherein the step of transmitting the signal comprises transmitting at least one of an optoelectronic signal, an infrared (IR) signal, a sonic signal, and a light signal.

14. The method of claim 12, wherein the step of determining at least one characteristic comprises determining whether the headphone earbud is inserted in an ear, wherein the headphone earbud is determined to be not inserted in the ear when the numerically-valued distance is less than a threshold value.

15. The method of claim 14, further comprising reducing a volume of the headphone earbud when the headphone earbud is determined to be not inserted in the ear.

16. The method of claim 12, further comprising:
detecting, based on the at least one characteristic of an environment, that the headphone earbud is at least partially dislodged from the ear and, in response, increasing a volume to the headphone earbud; and
detecting, based on the at least one characteristic of an environment, that the headphone earbud is removed from the ear and, in response, muting the headphone earbud.

17. An apparatus, comprising:
a headphone earbud, comprising:
a speaker;
a microphone;
an emitter;
a collector operating synchronously with the emitter and configured to measure at least one characteristic of an environment around the headphone earbud;
a processor coupled to the collector and to the speaker and configured to:
measure a numerically-valued distance from the microphone to an ear drum of a user of the headphone earbud based on a signal received from the collector;
measure the numerically-valued distance based, at least in part, on a time delay between transmission of an initial signal from the emitter and a reflected signal reflected from the ear drum of the initial signal; and
perform adaptive noise cancellation (ANC) to adjust the output of the speaker by adjusting a transfer function from the headphone earbud to the ear drum based, at least in part, on the numerically-valued distance.

18. The apparatus of claim 17, wherein the emitter comprises at least one of an optoelectronic, an infrared (IR) emitter, a sonic emitter, and a light emitter and the collector comprises a corresponding at least one of an optoelectronic sensor, an infrared (IR) sensor, a sonic collector, and a light collector.

19. The apparatus of claim 17, wherein the emitter comprises an infrared (IR) emitter and the collector comprises an infrared (IR) collector.

20. The apparatus of claim 17, wherein the processor is further configured to:
detect, based on an output of the collector, that the headphone earbud is at least partially dislodged from the ear and, in response, increase a volume to the headphone earbud; and
detect, based on the output of the collector, that the headphone earbud is removed from the ear and, in response, mute the headphone earbud.