# Patent

## Title
Audio playback apparatus

## Abstract

An audio playback apparatus is disclosed. The audio playback apparatus processes an audio signal and provides at least one output signal to at least one speaker or an earphone connected to a phone-jack. The audio playback apparatus comprises a clock generating module, a processing module, an amplifier module, and a detecting module. The processing module is connected to the clock generating module and processes the audio signal to generate a processed signal according to a clock signal generated by the clock generating module. The amplifier module amplifies the processed signal to generate an output signal. The detecting module detects whether the earphone is plugged in the phone-jack. If the earphone is plugged in the phone-jack, the amplifier module provides the output signal to the earphone. If not, the amplifier module provides the output signal to the speaker.

## Background
BACKGROUND OF THE INVENTION
1. Field of the Invention
The invention relates to an audio playback apparatus and, in particular, to an audio playback system switching between a speaker and an earphone.
2. Description of the Related Art
An audio amplifer is typically implemented with a D-type amplifier. A convnetional AB-type amplifier genereates a linear signal while a D-type amplifier genenrates a pluse width modulation (PWM) signal comprising a audio aignal and a PWM switching signal along with harmonics thereof. When the D-type amplifier operates, an output MOSFET thereof switches to a extremely low impedance state from a extremely high impedance state. Since the D-type amplifier stays in an active region only for a few nano seconds, output power consumption thereof is much lower than an AB-type amplifier. Such effective power amplification and conversion result in lower electrical power consumption and provide more applications such that a D-type amplifier has become a mainstream.
How to let a user selects a speaker or an earphone to play an audio signal processed by a D-type audio amplifier such that there is no intereference between the speaker and the earphone has bocome an important issue of D-type audio amplifier development. Accordingly, it is necessary to provide an audio playback apparatus capable of detecting whether a back-end output module is a speaker or an earphone and switching to the same to play the audio signal.
BRIEF SUMMARY OF THE INVENTION
An embodiment of an audio playback apparatus processes an audio signal and provides at least one output signal to at least one speaker or an earphone connected to a phone-jack. The audio playback apparatus comprises a clock generating module, a processing module, an amplifier module, and a detecting module. The processing module is connected to the clock generating module and processes the audio signal to generate a processed signal according to a clock signal generated by the clock generating module. The amplifier module amplifies the processed signal to generate an output signal. The detecting module detects whether the earphone is plugged in the phone-jack. If the earphone is plugged in the phone-jack, the amplifier module provides the output signal to the earphone. If not, the amplifier module provides the output signal to the speaker.
The invention provides an audio playback apparatus capable of switching between a speaker and an earphone. The audio playback apparatus of the invention significantly improves signal to noise ratio of an earphone.
A detailed description is given in the following embodiments with reference to the accompanying drawings.



BRIEF DESCRIPTION OF THE DRAWINGS
The invention can be more fully understood by reading the subsequent detailed description and examples with references made to the accompanying drawings, wherein:
FIG. 1 is a schematic diagram of an audio playback apparatus according to an embodiment of the invention;
FIG. 2 is a schematic diagram of a detecting module of an audio playback apparatus according to an embodiment of the invention; and
FIG. 3 is a schematic diagram of an audio playback apparatus according to another embodiment of the invention.



DETAILED DESCRIPTION OF THE INVENTION
The following description is the best-contemplated mode of carrying out the invention. This description is made for the purpose of illustrating the general principles of the invention and should not be taken in a limiting sense. The scope of the invention is best determined by reference to the appended claims.
FIG. 1 is a schematic diagram of an audio playback apparatus according to an embodiment of the invention. As shown FIG. 1, the embodiments discloses an audio playback apparatus for processing an audio signal SAU, and providing at least one output signal SOUT1 ̃SOUT3 to at least one speaker or an earphone 20 plugged in a phone-jack 22. The audio playback apparatus 10 comprises a clock generating module 12, at least one processing module 14, at least one amplifier module 16 and at least one detecting module 24. The clock generating module 12 generates a clock signal SCLK. At least one processing module 14 is coupled to the clock generating module 12 and performs processing to the audio signal SAU according to the clock signal SCLK to generate at least one processed signal SP. At least one amplifier module 16 is coupled to at least one processing module 14 to amplify at lest one processed signal SP to generate at least one output signal SOUT1 ̃SOUT3. At least one detecting module 24 is coupled to at least one amplifier module 16, at least one speaker 18 and the phone-jack 22 to detect whether an earphone 20 is plugged in the phone-jack 22. If the earphone 20 is plugged in the phone-jack 22, at least one amplifier module 16 provides at least one output signal SOUT2/SOUT3 to the earphone 20. If not, at least one amplifier module 16 provides at least one output signal SOUT1/SOUT2 to the speaker 18.
FIG. 2 is a schematic diagram of a detecting module of an audio playback apparatus according to an embodiment of the invention. As shown in FIG. 2, each of at least one detecting module 24 comprises a voltage source VCC, a first resistor R1, a second resistor R2, and a logic unit 30. The first R1 is coupled to the voltage source VCC. One terminal of the second resistor R2 is coupled to the first resistor R1 and the other terminal of the second resistor R2 is coupled between the phone-jack 22 and a first second amplifier Q2. The logic unit 30 comprises a first input terminal, a second input terminal, and an output terminal. The first input terminal is coupled to the first resistor R1 and the second resistor R2. The second input terminal is coupled to at least one amplifier module 16. The logic unit 30 performs logic computation according to the signals inputted to the first and second input terminals and generates at least one control signal SC accordingly. In one embodiment, the logic unit 30 is an exclusive-or (XOR) gate.
The audio playback apparatus 10 comprises at least one selecting module 26 coupled between at least one speaker 18 and at least one amplifier module 16. The selecting module 26 provides at lest one amplified signal SOUT1 ̃SOUT3 to at least one speaker 18 or the earphone 20 according to at least one control signal SC. In an embodiment, at least one selecting module 26 is a switch.
At least one processing module 14 comprises a first processing module 141 and a second processing module 142. The first processing module 141 performs processing to the audio signal SAU according to the clock signal SCLK to generate a first first processed signal SP11 and a first second processed signal SP112. The second processing module 142 performs processing to the audio signal SAU according to the clock signal SCLK to generate a second processed signal SP2. At least one amplifier module comprises a first amplifier module 161 and a second amplifier module 162. The first amplifier module 161 is coupled to the first processing module 141, at least one speaker 18 and the phone-jack 22 and amplifies the first first processed signal SP11 and the first second processed signal SP112 to generate a first first output signal SOUT1 and a first second output signal SOUT2. The second amplifier module 162 is coupled to the second processing module 142 and the phone-jack 22 and amplifies the second processed signal SP2 to generate a second output signal SOUT2.
In addition, the first amplifier module 161 comprises a first first amplifier Q1 and a first second amplifier Q2. The second amplifier module 162 comprises an amplifier Q3. The first first amplifier Q1 is coupled to the first processing module 141 and at least one speaker 18 to amplify the first first processed signal SP11 to generate the first first output signal SOUT1. The first second amplifier Q2 is coupled to the first processing module 141, at least one speaker 18, and the phone-jack 22 to amplify the first second processed signal SP112 to generate the first first output signal SOUT2. In an embodiment, the first first amplifier Q1 and the first second amplifier Q2 are MOSFETs. The second input terminal of the logic unit 30 is coupled to the first second amplifier Q2 such that input signals inputted to the first and second input terminals are logically computed and a control signal SC is generated accordingly.
At least one selecting module 26 is coupled between the first first amplifier Q1 and at least one speaker 18 to selectively provide the first first output signal SOUT1 to at least one speaker 18. When the selecting module 26 is conductive, the first first amplifier Q1 and the first second amplifier Q2 respectively provide the first first output signal SOUT1 and the first second output signal SOUT2 to at least one speaker 18. When the selecting module 26 is disconnected, the first second amplifier Q1 and the second amplifier Q2 respectively provide the first second output signal SOUT2 and the second output signal SOUT3 to the phone-jack 22.
FIG. 3 is a schematic diagram of an audio playback apparatus according to another embodiment of the invention. As shown FIG. 3, amplifiers Q1 and Q2 of the first amplifier 561 and amplifiers Q4 and Q5 of the third amplifier 561 collectively form a bridge output to push speakers 581 and 582 of different channels. When no signal is inputted, output of the amplifiers Q1, Q2, Q4 and Q5 are identical square waves such that power consumption on loadings of the speakers 181 and 182 is reduced. When the earphone 60 is plugged in the phone-jack 62, detecting circuits 641 and 642 detect and generate control signals SC1 and SC2 such that the selecting modules SW1 and SW2 are disconnected. As a result, the speakers 581 and 582 are disconnected form the amplifiers Q1 and Q4. In the embodiment, the selecting modules SW1 and SW2 are implemented with switches.
When the earphone 60 is plugged in the phone-jack, the audio playback apparatus 50 drives the earphone 60 via the amplifiers Q2 and Q5. Since the earphone 60 is typically 3-wire connected, it cannot be driven by BTL bridge and needs to be driven by single terminal. Thus, the common ground G of the earphone 60 is connected to the amplifier Q3 and a difference between the square waves of the amplifiers Q2 and Q5 and the amplifier Q3 is transmitted to the earphone 60 and converted to audio output.
When the speakers 581 and 582 operate, the amplifier Q3 outputs a square wave of the same frequency as the clock signal SCLK. The output waveform of the square wave is synchronous with the clock signal SCLK and is not influenced by external signals. When the processing module 54 operates, the clock signal SCLK is interfered and clock jitter is generated such that signal to noise ratio of the output signal of the earphone degrades. If the clock signal with clock jitter is added to the common ground G of the earphone 60 via the amplifier Q3, common mode cancellation is accomplished on the loading of the earphone 60. As a result, signal to noise ratio of the earphone 60 is significantly improved.
In embodiments of the invention, the audio playback apparatus is provided with a dual-channel speaker and an earphone. When the earphone is plugged in the phone-jack, the audio playback apparatus switches an audio output interface automatically from the dual-channel speaker to the earphone. Thus, the audio playback apparatus is more user-friendly. In addition, signal to noise ratio of the audio playback apparatus is also significantly improved.
While the invention has been described by way of example and in terms of preferred embodiment, it is to be understood that the invention is not limited thereto. To the contrary, it is intended to cover various modifications and similar arrangements as would be apparent to those skilled in the Art. Therefore, the scope of the appended claims should be accorded the broadest interpretation so as to encompass all such modifications and similar arrangements.

## Claims

1. An audio playback apparatus processing an audio signal, providing an output signal to a speaker or an earphone connected to a phone-jack, and comprising:
a clock generating module generating a clock signal;
a processing module coupled to the clock generating module, processing the audio signal to generate a processed signal according to a clock signal generated by the clock generating module;
an amplifier module coupled to the processing module and amplifying the processed signal to generate an output signal;
a detecting module coupled to the amplifier module, the speaker, and the phone-jack to detect whether the earphone is plugged in the phone-jack;
wherein if the earphone is plugged in the phone-jack, the amplifier module provides the output signal to the earphone, and if not, the amplifier module provides the output signal to the speaker; and
wherein the detecting module comprises a voltage source, a first resistor coupled to the voltage source, a second resistor coupled to the first resistor and the phone-jack, and a logic unit comprising a first input terminal, a second input terminal and an output terminal, wherein the first input terminal is coupled to the first and second resistors, the second input terminal is coupled to the amplifier module, and the logic unit performs logic computation according to input signals from the first and second input terminals and generates a control signal at the output terminal based on the logic computation.

2. The audio playback apparatus as claimed in claim 1, wherein the logic unit is an exclusive-or (XOR) gate.

3. The audio playback apparatus as claimed in claim 1, further comprises a selecting module coupled between the speaker and the amplifier module to provide an amplified signal to the speaker or the earphone according to the control signal.

4. The audio playback apparatus as claimed in claim 3, wherein the selecting module is a switch.

5. The audio playback apparatus as claimed in claim 1, wherein the processing module comprises a first processing module processing the audio signal according to the clock signal and generating first and second processed signals and a second processing module processing the audio signal according to the clock signal and generating a second processed signal.

6. The audio playback apparatus as claimed in claim 5, wherein the amplifier module comprises a first amplifier module coupled to the first processing module, the speaker and the phone-jack such that the first and second processed signals are amplified and first first and first second output signals are generated correspondingly, and a second amplifier module coupled to the second processing module and the phone-jack to generated a second output signal.

7. The audio playback apparatus as claimed in claim 6, wherein the first amplifier module comprises a first first amplifier coupled to the first processing module and the speaker such that the first processed signal is amplified to generate the first first output signal, and a second amplifier coupled to the first processing module, the speaker and the phone-jack such that the first second processed signal is amplified to generate the first second output signal.

8. The audio playback apparatus as claimed in claim 7, wherein the second terminal of the logic unit is coupled to the first second amplifier such that the input signals inputted to the first and second input terminals are logically computed and a control signal is generated accordingly.

9. The audio playback apparatus as claimed in claim 8, wherein the selecting module is coupled between the first first amplifier and the speaker and selectively provides the first first output signal to the speaker according to the control signal.

10. The audio playback apparatus as claimed in claim 9, wherein the first first amplifier and the first second amplifier respectively provides the first first output signal and the first second output signal to the speaker when the selecting module is conductive.

11. The audio playback apparatus as claimed in claim 10, wherein the first first amplifier and the first second amplifier respectively provides the first first output signal and the first second output signal to the phone-jack when the selecting module is disconnected.

12. The audio playback apparatus as claimed in claim 11, wherein the first first amplifier and the first second amplifier are MOSFETs.