An embodiment of the invention relates to electronic audio systems and automatically configuring audio output amplifiers and output impedance for improved audio performance, such as after determining the input impedance of an audio device connected to the amplifiers through an accessory connector. Other embodiments are also described.
Audio systems such as consumer electronic portable devices including smart phones and digital media players have a headphone or earphone jack through which the portable device can interface with an accessory device, such as a directly powered headset. An audio integrated circuit referred to as an audio codec is used within the portable device, to convert digital audio files and digital audio streams into analog form, which is then driven by an audio power amplifier whose output is coupled to a speaker signal pin or contact of the headphone jack. In addition, the audio codec also includes the capability of converting an audio signal from analog into digital form, where the input analog signal can be obtained from an integrated microphone within the headset that is plugged into the headphone jack. The audio codec is typically equipped with several such audio channels, allowing digital audio to be played back through either the earpiece receiver in the case of a smart phone, a speakerphone, or through the headphone jack to external earphones. It has also been suggested that the earphone jack be used to attach the audio system to a standalone device such as a self-powered speaker, a television, or a home theater audio amplifier/receiver.
Embodiments of the invention sense whether an audio output amplifier of an audio system is connected through an accessory connector to a headphone device or to a self powered audio output device (e.g., “line-in” device), by sensing the signature of an input power signal that powers the amplifier. In some cases, the signature can be sensed by monitoring the amount of current flowing through a passive sense resistor with a known value, which is series-coupled between a power input of a voltage regulator circuit and a power supply node that supplies power or ground to the voltage regulator. In other cases, the signature can be sensed by monitoring an amount of voltage across a load or a parasitic resistance of a sense circuit. Monitoring may be performed while outputting a known test signal having sufficiently high power and an inaudible frequency, from the amplifier, through the accessory connector. An audio integrated circuit (e.g., “codec”) may include a digital-to-analog converter (DAC), the amplifier (e.g., a headphone amplifier having variable gain for setting the volume) with an input coupled to an output of the DAC and an output coupled to the accessory connector, and a voltage regulator having a power input connected to the input power pin and an output that provides power to the amplifier.
The signature of the signal across the sense resistor or detected in the sense circuit can be used to determine the impedance characteristics of the load attached to accessory connector, and hence the type of load. The signature can be processed (e.g., digitally), to determine whether the impedance of the device that is connected to the accessory connector indicates the device is a headphone (e.g., low resistance of a headset speaker) or a self powered audio output device (e.g., higher resistance for the “line-in” input of a home or vehicle entertainment system receiver/amplifier). The signature can be detected by an analog-to-digital converter (ADC) of the codec, whose input is coupled across the sense resistor to read a current signal through the sense resistor.
This setup allows a programmed processor to program the DAC to cause the amplifier to output the known test signal, while simultaneously monitoring the output of the ADC to measuring the resulting current signature across the sense resistor or detected in the sense circuit. The test signal requires enough power drain from the voltage regulator or headphone amplifier, for the processor to determine whether an impedance difference between a line-in input self powered audio output device and a speaker input of a headphone device attached to the connector. The sense resistor or sense circuit need not be directly coupled to the output of the amplifier or any other part of the connector. The measured current across sense resistor or the voltage detected in the sense circuit depends upon how much power the voltage regulator has to output to the audio amplifier, which depends on how much impedance (resistance) is coupled to the audio amplifier output. Therefore, the output impedance of the amplifier can be indirectly measured.
Based on the impedance measured, the programmed processor can then select a line out mode (e.g., for self powered audio output device) or headphone audio output mode of operation mode by selecting a different audio amplifier and output impedance for proper operation of the electronic audio system. Based on detecting the impedance (e.g., higher resistance) for a self powered audio output device, a “line-in” input having a higher capacitive load and a “high” load resistance is expected (e.g., for a typical “line-in” device). Thus, in response to this detection, the programmed processor can select a special lower power “line out” amplifier, and a series isolation resistor in series in the amplifier's output to decouple the output from the typically high capacitive load that is presented by a line-in device.
Alternatively, based on detecting the impedance (e.g., lower resistance) for a headphone device, a headphone input (e.g., speaker to be powered by the headphone amplifier), having a lower capacitive load and a “low” load resistance is expected (e.g., for a typical headphone speaker). Thus, in response to this detection, the programmed processor can select the higher power headphone amplifier (without a series isolation resistor) to drive a lower headphone impedance load (e.g., the speaker). Thus, this setup may provide a proper audio experience for the user, replace large switches to switch in and out the series isolation resistors at the outputs, and replace the making connected audio device impedance measurements at the audio amplifier outputs.
The above summary does not include an exhaustive list of all aspects of the present invention. It is contemplated that the invention includes all systems and methods that can be practiced from all suitable combinations of the various aspects summarized above, as well as those disclosed in the Detailed Description below and particularly pointed out in the claims filed with the application. Such combinations have particular advantages not specifically recited in the above summary.
The embodiments of the invention are illustrated by way of example and not by way of limitation in the figures of the accompanying drawings in which like references indicate similar elements. It should be noted that references to “an” or “one” embodiment of the invention in this disclosure are not necessarily to the same embodiment, and they mean at least one.
Several embodiments of the invention with reference to the appended drawings are now explained. While numerous details are set forth, it is understood that some embodiments of the invention may be practiced without these details. In other instances, well-known circuits, structures, and techniques have not been shown in detail so as not to obscure the understanding of this description.
One difference between line out mode and headphone mode is the different output impedance presented on the audio contact (e.g., signal pin) of the connector 7, to the attached load. Typically, a directly powered earphone presents a substantially lower impedance than the audio amplifier input of a standalone speaker 5 or a television 6. The expected impedance seen by the audio system 1 looking into the accessory cable 4 may be on the order of less than 100 ohms when driving an earphone, while that impedance when driving the input port of a self-powered speaker 5 or television 6 may be on the order of between 1 kilo ohms and 20 kilo ohms. In addition, it has been found that in several instances of line out mode, the audio system 1 is faced with a substantially higher parasitic capacitance, that may be modeled as a shunt capacitance, as compared to the headphone mode. This larger shunt capacitance may cause an integrated power amplifier of an audio codec (which is driving the audio content into the accessory cable 4) to become unstable in line out mode. While it is possible to modify the power amplifier to enable it to drive higher capacitance loads, doing so presents a tradeoff against other design parameters that are relevant, including, in particular, an increase in power which for portable devices is difficult to accept. It can be appreciated that the concepts above regarding television 6 are also applicable for line out devices such as a self-powered speaker, an automobile (or other vehicle), a boat, a computer, and a home theater audio amplifier/receiver (e.g., home audio component).
Before addressing the aspects of how to improve audio performance in both line out and headphone modes, a combined block diagram and circuit schematic of relevant portions of a portable communications device as an example of the audio system 1 is presented in
The various functions of the audio system 1 may be managed by a data processor 8, which in the case of a portable multi-function consumer electronic device may be an applications processor, a central processing unit, or a system on a chip (SoC). The term “data processor” is used generically here to refer to any suitable combination of data processing circuitry. The data processor 8 is programmed by instructions stored in data storage 15, depicted here as applications or modules including a telephony application 23 (to enable voice or video calls), and a media file player application 25 (to enable playback or streaming of digital audio and video files). The data storage 15 may be composed of non-volatile memory such as flash memory or a hard disk drive, in addition to random access memory.
Audio output is achieved through the accessory connector 7, which may be integrated within the housing (not shown) of the audio system 1 together with the hardware components depicted in
The contacts (e.g. pins) of the accessory connector 7 are coupled to audio codec 9. The codec 9 may be an integrated circuit (e.g., “audio IC”) having a digital to analog converter (DAC), an analog to digital converter (ADC), and an audio power amplifier. The audio codec 9 may be a single integrated circuit die that is separately packaged by itself or in combination with other circuitry, as an audio IC package. It has, in this case, at least two analog audio output contacts, which are connected to audio outputs right 29 (for right channel) and left 30 (for left channel) that are driven by their respective power amplifiers to the corresponding signal contacts of the accessory connector 7. As noted herein, single audio channel embodiments are also contemplated. The audio content is driven by the audio codec 9 relative to the ground/reference contact of the connector 7. The audio content that is output by the codec 9 may be produced or routed by the data processor 8 (e.g., while playing a digital audio file under control of the media file player app 25), or the baseband processor 10 which may be decoding and delivering a downlink speech signal during a call. Codec 9 also has several input contacts, including an external microphone line input and, in this case, at least two separate audio input contacts (e.g., also coupled to audio contacts of connector 7). The external microphone line allows the audio codec 9 to receive input audio content from an external device, e.g. speech of a near-end user, through the microphone contact of the accessory connector 7.
Data storage 15 may also have stored therein an audio mode switcher 24 which programs the processor 8 to select an audio output mode of operation, being one of line out mode and headphone mode. In so doing, the audio mode switcher 24 controls or configures codec 9 (e.g., using processor 8; see “CONTROL” from processor 8 to codec 9) in order to determining the impedance of an audio device connected to the amplifiers by sensing the signature of an input power signal to the amplifier. Audio mode switcher 24 may also control or configure codec 9 in order to change or switch between different audio output amplification and output impedance (e.g., for line out or headphone) that is presented at one or more contacts (e.g., signal pins) of the accessory connector 7, such as through audio out lines 29 and 30. These and other aspects of the various embodiments of the invention will be described next.
According to some embodiments, switcher 24 includes a computer program stored in a storage medium. Such a computer program (e.g., program instructions) may be stored in a machine (e.g. computer) readable non-volatile storage medium or memory, such as, a type of disk including floppy disks, optical disks, CD-ROMs, and magnetic-optical disks, read-only memories (ROMs), erasable programmable ROMs (EPROMs), electrically erasable programmable ROMs (EEPROMs), magnetic or optical cards, magnetic disk storage media, optical storage media, flash memory devices, or any type of media suitable for storing electronic instructions. Processor 8 may be coupled to the storage medium 24 to execute the stored instructions. The processor may also be coupled to a volatile memory (e.g., RAM) into which the instructions are loaded from the storage memory (e.g., non-volatile memory) during execution by the processor. The processor and memory(s) may be coupled to control codec 9 as described herein. In some cases, the processor may include controller 45 (e.g., see
Turning now to
Digital audio content that is to be sent out of the codec 9 is converted by DAC 37 into analog format, and then driven by audio power amplifier 33 or 34 (e.g., class AB amplifiers); the power amplifiers have variable gain to yield variable sound volume. The output pins of the audio codec 9 are coupled at least one audio contact of accessory connector 7. In order to switch between different audio output amplification and output impedance (e.g., for line out or headphone) at the signal pin of the accessory connector 7, the codec 9 switches between selecting headphone audio amplifier 33 or line out audio amplifier 34 in accordance with a control signal, under control of controller 45. Thus, codec 9 may be used to “turn” or switch on and off different line out and headphone power amplifiers that contact or are electrically connected through audio output line 29/30 to connector 7. The electrical connection between the line out power amplifier passes through output isolation resistor 36 before passing to the corresponding signal pins of the accessory connector 7 to increase the output impedance. Series-coupled isolation resistor 36, may be a passive resistance element of a know value, which depends on the codec design (e.g., amplifier 34) and an expected input impedance of a line-in device. The electrical connection between the headphone power amplifier may not pass through an output isolation resistor (e.g., a resistor 36), to thereby decrease the output impedance (e.g., as compared the line out impedance). It is considered that in some embodiments, an isolation resistor (e.g., similar in function to resistor 36) could be inline the amplifier output (e.g., line 29 and 30); and a switch, in parallel with this resistor, can be switched in and out to short out the resistor when driving headphone loads. It is also considered that in some embodiments, the isolation resistor (e.g., resistor 36) could be internal to the codec with routing to pins of the codec that connect to lines 29/30. In this case, resistor 36 would be located on or in the codec, and not disposed or located external to codec 9, such as by being a components on or in an IC or die containing circuitry of codec 9. Some embodiments may also include a mode switching mechanism whereby the transitions between selecting audio power amplifier 33 or 34 are gradual and smoothed as to avoid audio artifacts. For example, in the case where isolation resistor 36 is inline with headphone amplifier output and a parallel switch is used to short across them, it is possible to make the switch transition from high impedance (e.g., line our mode, with resistor 36) to very low impedance (headphone mode) gradually, such as by selecting audio power amplifier 33 or 34, and then switching resistor 36 in our out. Changing the output audio amplifiers and impedance in this manner allows the audio system 1 to more accurately and efficiently drive the load that is attached to the accessory connector 7.
Sense resistor 26 is coupled between input power pin 38 of audio codec 9 and power node contact or pin 27 to supply power (e.g., bias) or ground signals to the audio codec. Line 28 is shown as an external line or connection, coupling resistor 26 to input 39 of ADC 35. Line 28 may represent two or more electronic connections, wires or PCB traces attached or coupled to opposite ends of resistor 26 so that ADC 35 can determine the voltage across and/or current flowing through resistor 26.
Analog to digital converter 35 may have input 39 coupled to detect a voltage or current (e.g., a “signature” of an AC signal over time) across sense resistor 26 that is in series with power node 27 (e.g., Vcc main or GND) of voltage regulator circuit 40. ADC 35 and input 39 may also be used to detect a microphone input from a microphone contact of the accessory connector, such as from the external microphone line input (e.g., see description of
Controller 45 (e.g., part of programmed processor 8, and in some cases controlled by switcher 24) is coupled to the digital to analog converter, the voltage regulator circuit and the analog to digital converter. The controller may be configured to process an output of the analog to digital converter 35 to detect a current and/or voltage across the sense resistor 26, and based on that current and/or voltage, to detect the impedance (e.g., resistance) of a device coupled to an output of the headphone or line out amplifier. The device coupled may have a plug inserted into connector 7 and be coupled through output 29 and 30 to the amplifier. In some cases this detection is of an audio device with contacts coupled only to the headphone amplifier.
According to embodiments, the sense resistor, power node, and line 28 may be disposed or located external to codec 9, such as by being components electrically connected to pins or contacts (e.g., which may be represented as part of inputs 38 and 39) of an IC or die containing circuitry of codec 9. Also, according to embodiments, controller 45 and resistor 36 are disposed or located external to codec 9, such as by being components electrically connected to pins or contacts (e.g., at the edge of codec 9 where they exit codec 9) of an IC or die containing circuitry of codec 9. Any one, any combination, or all of these external components may be independent or separate components located on a separate IC (e.g., part of an audio IC package), a separate printed circuit board (PCB), or a PCB upon which codec 9 is mounted, attached and/or electronically coupled. In some cases, sense resistor 26, the power node 27, and line 28 may be passive circuitry, a power node (e.g., pin), and traces located external to (but electrically connected to) the printed circuit board (PCB), chip, die or wafer upon which codec 9 is located.
The arrangement in
It is also considered that in some embodiments, the current sense resistor (e.g., resistor 26) could be internal to the codec with routing to the ADC also internal to the codec. In this case, resistor 26 and line 28 would be located on or in the codec, and not disposed or located external to codec 9, such as by being components formed on or in an IC or die containing circuitry of codec 9.
Additional embodiments of
In some embodiments, line 28, resistor 26 (and optionally input 39 and ADC 35) may be described as a “sense circuit” to determine whether the impedance of a device coupled to the output of the headphone amplifier is the impedance of a headphone device or the impedance of a line out device” (e.g., see
According to embodiments described for
An advantage of the arrangements described herein is that depending on whether a headphone or a “line-in” device is indicated, a different audio amplifier can be selected for proper operation of the electronic audio system or device. The indication may be determined at, and the selection made by controller 45, such as controlled by audio mode switcher 24.
Based on detecting the impedance (e.g., higher resistance) for a self powered audio output device, a “line-in” input having a higher capacitive load and a “high” load resistance is expected (e.g., for a typical “line-in” device). In this case, a special lower power “line out” amplifier (e.g., “line out” amplifier 34) may be selected (rather than a “headphone” amplifier 33) that can more accurately and efficiently drive (e.g., with audio signals) a higher resistance and higher capacitive load than the headphone amplifier. The lower power line out amplifier (rather than a “headphone” amplifier) is able to drive a higher resistance “line-in” input, which requires less output power from the “line out” amplifier (e.g., 34) (e.g., saving battery life) than a “headphone” input which requires more power from the amplifier (e.g., 33) to drive a lower headphone resistance load (e.g., headset speaker).
In addition, based on detecting the higher resistance for the “line-in” input, a higher capacitive load is expected (e.g., for a typical “line-in” device). In this case, the line out amplifier has series isolation resistors (36) in its output that can be used to decouple the output from the typically high capacitive load that is presented by a line-in device. The isolation resistor increases the output impedance and therefore helps isolate the higher capacitance load; this improves robustness of the power amplifier when it is driving the higher capacitance load.
Alternatively, based on detecting the impedance (e.g., lower resistance) for a headphone device, a headphone input (e.g., speaker to be powered by the headphone amplifier), having a lower capacitive load and a “low” load resistance is expected (e.g., for a typical headphone speaker). Thus, in response to this detection, the programmed processor can select (or maintain) the higher power headphone amplifier (without a series isolation resistor) to drive a lower headphone impedance load (e.g., the speaker).
This indication and selection (e.g., by controller 45) also provides a proper audio experience for the user of the headphone or self powered speaker device (e.g., such as using media file player application 25 to enable playback or streaming of digital audio and video files). It also replaces the need for large switches used to switch in and out the series isolation resistors at the outputs of the audio output amplifiers. Finally, it replaces the use of making measurements at the audio amplifier outputs, which effects or provides a power drain at the output of those amplifiers.
The left and right channel outputs of DAC 37A may be coupled to inputs of the left and right headphone and line out amplifiers to provide needed mono, or stereo (e.g., left and right) audio input signal to the headphone and the line out amplifiers, which in turn provide audio signals to left and right audio contacts of accessory connector 7. This setup may be similar to the description for
The left and right output pins of audio codec 9 (e.g., from amplifiers 33L/R and 34L/R) are coupled to a left and right audio contacts (e.g., signal pins) of accessory connector 7. The line out left and right outputs of 34L/R are coupled through series-coupled isolation resistors 36L/R, which may be passive resistance elements similar to resistor 36. Although
Voltage regulator circuit 40 includes low dropout regulator (LDO) 41 coupled between input 38A and charge pump 42. Pump 42 (e.g., based on output of LDO 41) is coupled to power outputs 31A (e.g., +BIAS, such as +VCP Filt) and 31B (e.g., −BIAS, such as −VCP Filt) to provide power (e.g., bias) to the headphone amplifiers positive and negative bias nodes, and to provide power to the line out amplifiers positive and negative bias nodes. Power outputs 31A and 31B have proper output power, characteristics and impedance to drive amplifiers 33L/R and 34L/R to provide appropriate audio output for a headset and for a line out device having a plug inserted into and having contacts in contact with corresponding contacts of connector 7. They also have proper output power, characteristics and impedance to drive a test signal output by amplifiers 33L/R. The test signal may be a known test signal having sufficiently high power to detect the signature of the signal across the sense resistor as described herein, and have an inaudible frequency.
Sense resistor 26A is shown coupled between input power pin 38A of audio codec 9 and Vcc main power node pin 27A to supply main power to the audio codec. Sense resistor 26A that is in series with power node 27A and the main power input of LDO 41. In this example, resistor 26A is a 3 Ohm sense resistor. However, it can be appreciated that a different impedance could be used, such as depending on the level of Vcc main power pin 27A; and input impedance and power demand of power input pin 38A of voltage regulator 40.
Line 28A is shown as two external lines or connections coupling opposite ends of resistor 26A to opposing inputs of analog front end (AFE) 39A which in turn provides output to ADC 35. Each of lines 28 may represent electronic connections, wires and/or PCB traces sufficient to determine the voltage across and/or current flowing through resistor 26 (e.g., a measured voltage across resistor 26A, such as describe for loads of
According to embodiments, controller 45 (in addition to the control lines shown in FIGS. 4 and 5A-C) is also coupled through control signal lines 46 to select between the headphone amplifiers and the line out amplifiers (and resistors 36L/R). Thus, controller 45 may be coupled to the digital to analog converter, the voltage regulator circuit, the analog to digital converter, and control signal lines 46. The controller may process an output of the analog to digital converter 35 to detect a current and/or voltage across the sense resistor 26, to detect the impedance of a device coupled to outputs 29 and 30 the headphone or line out amplifier.
The controller may process a high resistance impedance detection to indicate a line-in device, which is known or predetermined to be associated with a high input capacitance and low input power need (e.g., high resistance). In response, the controller may select line-out amplifiers 34L/R with decoupling resistors 36L/R to drive the “line-in” detected device. This may be done by sending a signal on a first control signal line to switch off amplifiers 33L/R, and sending a signal on a second control signal line to switch on amplifiers 34L/R.
Alternatively, the controller may process a low resistance impedance detection to indicate a headphone device (e.g., speaker), which is known or predetermined to have lower capacitance and require high input power need (e.g., low resistance. In response, the controller may select headphone amplifiers 33L/R (without decoupling resistors 36L/R) to drive the headphone detected device. This may be done by sending a signal on a first control signal line to switch on amplifiers 33L/R, and sending a signal on a second control signal line to switch off amplifiers 34L/R. In some cases, if headphone amplifiers 33L/R are already selected (e.g., powered on), no additional signal on a first control signal line is necessary.
In some embodiments, line 28A, resistor 26A (and optionally AFE 39A and ADC 35) may be described as a “sense circuit” to determine whether the impedance of a device coupled to the output of the headphone amplifier is the impedance of a headphone device or the impedance of a line out device.
According to embodiments, system 1 or device 3 may perform a process which may include a process for embodiments described for
Second, the codec (e.g., codec 9) may be powered up. In some cases, this process may include detecting whether the plug is a three or four region type plug.
Third, the codec will be configured depending on whether the plug detected is a three region or four region plug. For a three region plug, accessory connector 7 will be configured (such as by controller 45 and switches that may include switches of lines 29 and 30 (not shown) to activate three or four contacts or pins of connector 7. Such configuration may include at least one audio output pin or connector. The processes above may occur before the user experiences any audio output either from the headset or from the line out device.
Next, a processes to determine whether a headphone or to a self powered audio output device is connected to the accessory connector may be performed, such as described herein. This determination may be caused by, after or due to detecting the plug has been inappropriately inserted into connector 7. Such a process may be described below with respect to
Process 70 starts with block 71 where, a line out amplifier is disconnected from an accessory connector of an electronic device. Block 71 may include disconnecting one or more (e.g., left and right) line out amplifiers from corresponding contacts of the connector. Such connecting may include turning off the line out amplifiers. In some cases, block 71 is not needed because the line out amplifier is already disconnected from an accessory connector of the electronic device.
At block 72 a headphone amplifier is connected to the accessory connector. Block 72 may include connecting one or more (e.g., left and right) headphone amplifiers to corresponding contacts of the connector. Such connecting may include turning on the headphone amplifiers. In some cases, block 72 is not needed because the headphone amplifier is already connected to an accessory connector of the electronic device. Also, block 72 may include un-muting headphone amplifiers 33 or 33L/R.
In some cases, the order of blocks 71 and 72 can be reversed, or performed simultaneously. Blocks 71 and 72 may be controlled or caused by controller 45 sending one or more signals on one or more control signal lines to the codec to cause the codec to switch on and off amplifiers 33L/R and 34L/R.
At block 73, a known test audio input signal is provided to the headphone amplifier. Block 73 may include providing a tone to the audio contacts of connector 7 that will produce a tone to speakers that is a high frequency that is not audible to humans (e.g., above hearing frequency, such as above 15 kHz, above 20 kHz, or above 22 kHz) but has low enough amplitude not to fold, and to be high enough to provide a signal across sense resistor 26 or 26A (or a load or parasitic resistance of a sense circuit as described herein) to be detected and distinguished by ADC 35 from input 39 or 39A. This known test audio signal may include “playing” 20 milliseconds of a −20 dBFS 21 kHz stereo sine wave with a sampling rate of 48 kHz, and left and right channels in phase with each other. Other appropriate test audio signals may also be used, such as an audio tone that causes a signature of sufficient amplitude to be detectable. In some cases, such a test audio signal includes output from the left and right amplifier of a test tone that is in phase, so that the output provides a heavy enough loading to make the signature visible on the power supply sense resistor (or sense circuits described herein).
Block 73 may presume that a device (e.g., headset or line out device) has a plug appropriately inserted into and in contact with corresponding audio contacts of connector 7. It is also considered that such a plug is inserted into and in contact during block 71 and/or 72.
For example, block 73 may include causing the DAC 37 or 37A to power up and be configured to send a test signal input to amplifiers 33 or 33L/R. Block 73 may be controlled or caused by controller 45 sending a signal to signal the voltage regulator circuit 40 and the digital to analog converter 37 or 37A to cause the headphone amplifier 33 or 33L/R to output a known test signal.
Block 73 may include outputting a known test signal for a period of time including a period of time when the signal across the sense resistor (or a load or parasitic resistance of a sense circuit as described herein) is being detected or monitored in block 74. Such a period of output may include a period of any of 5-10; 10-20; or 20-40 milliseconds. Other appropriate periods of time are also considered.
At block 74, a voltage and/or current signal is detected across a sense resistor that is in series with a power node a voltage regulator circuit that is providing a power signal to the headphone amplifier. Block 74 may also describe detecting a voltage or current in or across a load or parasitic resistance of a sense circuit as described herein. For example, block 74 may include causing the ADC 35 (and possibly AFE 39A) to power up and be configured to read the signal across sense resistor 26 or 26A.
Block 74 may include (e.g., controller 45) recording 10-20 milliseconds on ADC 35 (e.g., a MIC 1) audio input line. Such recording may be similar as using the ADC to detect (e.g., using pins or contacts of input 39 or AFE 39A) a microphone input from a microphone contact of the accessory connector. The recording may be proportional to a “MEDUSA” impedance. Block 75 may include post processing of the recorded 10-20 milliseconds to determine the impedance, such as by converting the signal into the frequency domain using a Fast Fourier Transform or band pass filter. In some cases, block 74 includes detecting (e.g., monitoring, recording and processing) to detect a signature across the sense resistor or circuit, during output of the known test signal described at block 73. For example, detecting during output of a period of a −20 dBFS 21 kHz stereo sine wave signal may include detecting or processing using a sampling rate of 48 kHz across a sense resistor, a load, or a parasitic resistance of a sense circuit as described herein. Other appropriate detecting and processing are also considered.
Block 74 may be controlled or received by controller 45 receiving a signal to indicate a voltage and/or current AC signal detected across a sense resistor (or a load or parasitic resistance of a sense circuit as described herein) using a signal sent to the controller from ACD 35. Block 74 may include monitoring the signal across the sense resistor (or a load or parasitic resistance of a sense circuit as described herein) over a period of time including a period of time when the test signal is being output at block 73. In some cases, this period will be shorter than the period of time when the test signal is being output at block 730. Such a period of monitoring may include a period of any of 5-10; 10-20; or 20-40 milliseconds. Other appropriate periods of time are also considered.
At block 75, the impedance of a device coupled to an output of the headphone amplifier is determined, based on the voltage or current AC signal across the sense resistor or sense circuit. At decision block 76, it is decided whether the determined impedance is that of a headphone device, or that of a line out device?
Blocks 75 and 76 may be controlled by controller 45 comparing the signal received in block 74 from ACD 35 to various thresholds or tables (e.g., see
If the determined impedance is that of a line out device, the process continues to block 77. In some cases, detection of an impedance greater than that for a headphone device may be a detection a line out device. In some cases, block 75 and 76 may include determining if the impedance detected of the device is greater than 3K Ohms. In some cases, detecting an impedance of the device in a threshold between 3000 and 10000 Ohms will identify a line out device. In some cases, this process may include transforming the detection of the ADC into a peak that occurs above the noise level. It may also include identifying the load of a line out device as an impedance of greater than 2000 Ohms. In the line out device case, processing continues to block 77.
If the determined impedance is that of a headphone device, the process continues to block 78. In some cases, detecting an impedance less than that for a line out device may be a detection of a headphone device. In some cases, block 75 and 76 may include determining if the impedance of the device is less than that indicated above for a line out device. In this case, it may be detected that the device is a headphone device. For example, it may be determined that the impedance of the device is less than 3000 Ohms. In some cases, a threshold between 3000 and 10000 Ohms may identify a headphone device. It may also include identifying the load of a headphone device as an impedance of less than or equal to 2000 Ohms. In some cases, detecting a headphone impedance may include detecting an impedance of less than or equal to 1000 Ohms, or 600 Ohms. Other thresholds are also considered. Some thresholds may be based on hardware limitations of the codec. For example, if it is know that the line out amplifier will not clip a full scale excitation signal until the load is less than 1000 Ohms, then the threshold may be set to switch to headphone mode at 750 Ohms. In the headphone device case, processing continues to block 78.
The impedance seen looking out of the audio contacts of connector 7 may be indirectly calculated based on the signature over time of current that is being driven through the sense resistor (or a load or parasitic resistance of a sense circuit as described herein). This may be detected simply using Ohm's law as a ratio of measured voltage over time of the signal across the resistor. Given the characteristics of this current and voltage; and knowing the power required to provide the known signal driven by the headphone amplifier, the impedance driven by that amplifier can be calculated. Thus, thresholds can be determined to identify or detect whether such impedance is the expected impedance for a headphone (e.g., headset speaker) or for a line out device (e.g., “line-in” input for a speaker channel of a self powered audio output device). When comparing the detected current or voltage across the sense resistor or sense circuit to the thresholds above (e.g., when selecting such thresholds), the following factors can be taken into account: the input and output characteristics an conversion of the voltage regulator, the headphone amplifiers, the differential amplifier and the ADC.
For example,
The peaks are shown at frequency FR, which may represent any of the frequencies mentioned herein for a signal signature detected across the sense resistor (or a load or parasitic resistance of a sense circuit as described herein). In some cases this frequency may be above 15 kHz, at 20 kHz or at 21 kHz. For example, this frequency may be determined by experimentation and/or by simulation to be the frequency of a signal having a signature caused by powering the headphone amplifier while it provides the known test signal to a headphone or self powered device having a plug properly inserted in to connector 7.
Threshold TH is shown between the two expected peaks 84 and 85. Threshold TH may represent a value determined to represent any of the impedance thresholds mentioned above. In some cases this frequency may be at 3000 Ohms, 2000 Ohms, or 1000 Ohms. For example, this value may be determined by experimentation and/or by simulation to be an amplitude that corresponds to the resistance thresholds for headphone and line out devices noted herein, for a signal having a signature caused by powering the headphone amplifier while it provides the known test signal to such a device.
According to some embodiments, dedicated hardware may be incorporated into the CODEC which essentially applies a band-pass filter (BPF) around the detection tone (e.g., around frequency FR so as to pass expected peaks 840 and 850), an energy estimator and digital comparator. This may allow detection to be done entirely in the CODEC without needing to bring the CODEC up, initializing the digital interfaces and processing the audio in the micro controller.
At block 77, the output of the headphone amplifier is disconnected from the accessory connector, the output of the line out amplifier is connected to the accessory connector, and then normal line out amplifier audio mode begins. Block 77 may include sending control signals over control signal lines to turn off headphone amplifiers 33L/R and to turn on line out amplifiers 34L/R. Block 77 may include disconnecting one or more (e.g., left and right) line headphone amplifiers from corresponding contacts of the connector. Block 77 may also include connecting one or more (e.g., left and right) line out amplifiers to corresponding contacts of the connector. Block 77, may also end with beginning normal line out amplifier audio mode.
Blocks 76 and 77 may be controlled or caused by controller 45 sending a si a through control signal lines 46 to circuitry of codec 9, and that circuitry turns the amplifiers on and off. Block 77 may also be controlled or caused by controller 45 sending a signal to DAC 37 or 37A to beginning normal line out amplifier audio mode, such as by transmitting audio content to amplifiers 34 or 34L/R.
For example, for blocks 74-77, if the impedance is a high resistance impedance, indicating a line-in device (e.g., self powered speaker device) having a high input capacitance and low input power need, a line-out amplifier may be selected with decoupling resistor to drive the “line-in” detected device.
At block 78, normal headphone amplifier audio mode begins. In some cases, block 78 does not require disconnecting and/or connecting any amplifiers (e.g., does not require any control signals) because the headphone amplifier is already connected to an accessory connector of the electronic device. If not, Block 78 may include blocks 71 and/or 72.
Blocks 76 and 78 may be controlled or caused by controller 45 sending a control signal to codec 9. Block 78 may be controlled or caused by controller 45 sending a signal to DAC 37 or 37A to beginning headphone amplifier audio mode, such as by transmitting audio content to amplifiers 33 or 33L/R.
For example, for blocks 74-76 and 78, if the impedance is a low resistance impedance, indicating a headphone device (e.g., a headphone speaker) having a low input capacitance and high input power need, and a headphone amplifier may be selected without decoupling resistor to drive the headphone detected device.
Although concepts above are described with respect to sending a test signal using amplifiers 33L and 33R while monitoring the signature across the sense resistor or sense circuit, it can be appreciated that in some embodiments, the test signal may be sent by only one of amplifiers 33L and 33R while monitoring the signature across the sense resistor or sense circuit.
It is also noted that some descriptions herein are with respect to the sense resistors being passive resistors; the power nodes being Vcc and GND; the detector being input 39 and/or ADC 35; and the connection from the sense resistor and the detector being line 28; and/or a sense circuit having a measured voltage across a load, or parasitic resistance. However, it can be appreciated that other designs and circuitry for sensing a signature of the power consumed by voltage regulator 40 are contemplated. In some cases different passive circuitry, active circuitry, or a combination thereof can be used to replace these components. For example, a transistor based detector could be used in place of these components.
Furthermore, although some of the concepts above are described with respect to sensing a signal across the sense resistor (or a load or parasitic resistance of a sense circuit as described herein) while the headphone amplifier(s) send a test signal the attached device, it can be appreciated that in other embodiments, the line out amplifiers could be used to provide the test signal instead of the headphone amplifiers. This could apply to embodiments where the test signal and sense resistor (or a load or parasitic resistance of a sense circuit as described herein) are designed to provide a signal across the resistor with a signature sufficient to detect whether the device connected to connector 7 is a headphone or line out type device.
Next, although some concepts above are described with respect to three and four contact jacks/connectors with corresponding plug contacts, they can also be applied to a four contact jack, when a three region plug is inserted (e.g., one contact of the four region connector is not in contact with a plug contact). They can also be applied to a three contact jack, when a three region or four region plug is inserted (e.g., one contact of the four region plug is not in contact with a contact).
It is noted that the embodiments above provide an efficient and effective detection of the input power signal signature. They also provides a fast and automatic detection of the device connected to connector 7 so that the controller can more quickly and accurately determine and switch to the proper headphone or line out amplifier and output line. This reduces user discomfort (e.g., listening to audio silence, pops, and detection signals) and wait time when using the device.
While certain embodiments have been described and shown in the accompanying drawings, it is to be understood that such embodiments are merely illustrative of and not restrictive on the broad invention, and that the invention is not limited to the specific constructions and arrangements shown and described, since various other modifications may occur to those of ordinary skill in the art. For example, although the audio system 1 depicted in the figures may be a portable device, a telephone, a cellular telephone, a smart phone, digital media player, or a tablet computer, the audio system may alternatively have be a different portable device such as a laptop computer, a hand held computer, or even a non-portable device such as a desktop computer or a home entertainment appliance (e.g., digital media receiver, media extender, media streamer, digital media hub, digital media adapter, or digital media renderer). The description is thus to be regarded as illustrative instead of limiting.
Number | Name | Date | Kind |
---|---|---|---|
5642424 | Masaki | Jun 1997 | A |
6069960 | Mizukami et al. | May 2000 | A |
6359987 | Tran et al. | Mar 2002 | B1 |
6812715 | Chiozzi et al. | Nov 2004 | B2 |
7099481 | Baker et al. | Aug 2006 | B2 |
7130184 | Choi | Oct 2006 | B2 |
7697697 | Su et al. | Apr 2010 | B2 |
7764797 | Yamamoto et al. | Jul 2010 | B2 |
7916875 | Kanji | Mar 2011 | B2 |
8670571 | Clemow | Mar 2014 | B2 |
20040080440 | Su et al. | Apr 2004 | A1 |
20040081099 | Patterson et al. | Apr 2004 | A1 |
20050013447 | Crump et al. | Jan 2005 | A1 |
20070057720 | Hand et al. | Mar 2007 | A1 |
20070127742 | Seven | Jun 2007 | A1 |
20080159567 | Lesso et al. | Jul 2008 | A1 |
20080260183 | Hertzberg et al. | Oct 2008 | A1 |
20110128019 | Saito | Jun 2011 | A1 |
20130070930 | Johnson | Mar 2013 | A1 |
Number | Date | Country | |
---|---|---|---|
20140003616 A1 | Jan 2014 | US |