CN115243161B - Audio output pin multiplexing circuit, device and method - Google Patents

Audio output pin multiplexing circuit, device and method Download PDF

Info

Publication number
CN115243161B
CN115243161B CN202210827134.5A CN202210827134A CN115243161B CN 115243161 B CN115243161 B CN 115243161B CN 202210827134 A CN202210827134 A CN 202210827134A CN 115243161 B CN115243161 B CN 115243161B
Authority
CN
China
Prior art keywords
pwm
signal
pcm
circuit
audio
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210827134.5A
Other languages
Chinese (zh)
Other versions
CN115243161A (en
Inventor
汪亮亮
桑圣锋
任春静
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Frequen Microelectronics Co ltd
Original Assignee
Shanghai Frequen Microelectronics Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Frequen Microelectronics Co ltd filed Critical Shanghai Frequen Microelectronics Co ltd
Priority to CN202210827134.5A priority Critical patent/CN115243161B/en
Publication of CN115243161A publication Critical patent/CN115243161A/en
Application granted granted Critical
Publication of CN115243161B publication Critical patent/CN115243161B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R3/00Circuits for transducers, loudspeakers or microphones
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus

Abstract

The invention discloses an audio output pin multiplexing circuit, an audio output pin multiplexing device and an audio output pin multiplexing method. The input PCM format coded audio signal is converted into the PWM signal through the PWM conversion circuit, the input PCM format coded audio signal is converted into the I2S serial data through the I2S parallel-serial conversion circuit, and then the corresponding signal is selected through the two-way selection circuit and sent to the multiplexing pin, so that the PWM signal or the I2S serial data can be output only through one pin, the technical problem that the I2S interface needs to be modified when the PWM signal or the I2S serial data is transmitted through a single interface in the prior art is solved, the technical effect that PWM audio output and I2S audio output are realized through the single interface on the premise that the I2S interface does not need to be changed is achieved, and the use scene is widened.

Description

Audio output pin multiplexing circuit, device and method
Technical Field
The embodiment of the invention relates to the technical field of audio circuits, in particular to an audio output pin multiplexing circuit, an audio output pin multiplexing device and an audio output pin multiplexing method.
Background
Pulse code modulation (Pulse Code Modulation, PCM), which is a representation of an analog signal converted to a digital signal at a fixed sampling frequency, is a PCM after sampling quantization and a certain data arrangement, and can theoretically transmit mono, bi-channel and multi-channel audio signals, which can be regarded as an original signal of digital audio, and the PCM file has no header information and is all uncompressed audio data after sampling quantization, so that the PCM signal is not easy to transmit, and the PCM signal needs to be converted into PWM signal or serial data of I2S.
An Inter-IC Sound (I2S) bus is a bus standard established by philips corporation for transmitting audio data between digital audio devices, and is dedicated to transmitting data between audio devices, and in the philips corporation' S I2S standard, both hardware interface specifications and formats of digital audio data are specified, by separating data and clock signals, time difference induced distortion is avoided, and the quality of output audio can be effectively improved by collocating with a decoder.
Pulse width modulation (Pulse Width Modulation, PWM), through modulating the width of a series of pulses, equivalent to the voltage waveform needed, because the working principle of the loudspeaker is that through inputting the electric current of different voltages to produce the alternating magnetic field, do the motion perpendicular to the direction of electric current of the voice coil under the effects of permanent magnet and alternating magnetic field, the voice coil drives the vibrating diaphragm to shake and promote the vibration of the air to produce the sound, and PWM signal is the electric current of different voltages too, can produce the sound as the input signal of the loudspeaker, output the audio frequency of lower quality; can also be transmitted in a digital information mode, and is matched with a digital-analog converter (Digital to Analog Converter, DAC) to output high-quality audio.
Because the overall trend of modern industrial design is to reduce the number of external interfaces with the same function, one interface is required to transmit PWM signals or serial data of I2S, when the number of pins of the interface is large, different signals or data can be transmitted through different pins, however, the number of pins of the interface is large, the used cable is thicker, the interface is larger, the design of the product is limited, when the number of the interfaces is insufficient, the I2S interface is also required to be changed, the number of pins in the interface is increased, and the cost is increased.
Disclosure of Invention
The embodiment of the invention provides an audio output pin multiplexing circuit, which realizes the technical effects of PWM audio output and I2S audio output by using a single interface on the premise of not changing an I2S interface.
In a first aspect, an embodiment of the present invention provides an audio output pin multiplexing circuit, including a PCM signal input terminal, a PWM conversion circuit, an I2S parallel-serial conversion circuit, a two-way selection circuit, and a multiplexing pin; one end of the PWM conversion circuit and one end of the I2S parallel-serial conversion circuit are connected with the PCM signal input end, the other ends of the PWM conversion circuit and the I2S parallel-serial conversion circuit are respectively connected with the first input end and the second input end of the two-way selection circuit, and the output ends of the two-way selection circuit are connected with multiplexing pins; wherein, the liquid crystal display device comprises a liquid crystal display device,
the PWM conversion circuit is used for receiving the PCM format coded audio signal from the PCM signal input end, converting the PCM format coded audio signal into PWM format data and sending the PWM format data to the two-way selection circuit;
the I2S parallel-serial conversion circuit is used for receiving the audio signal coded by the PCM format from the PCM signal input end, converting the audio signal into serial data of I2S and then sending the serial data to the two-path selection circuit;
the two-way selection circuit is used for receiving the signals sent by the PWM conversion circuit and sending the signals to the multiplexing pin; or receiving the serial data of the I2S sent by the I2S parallel-serial conversion circuit and sending the serial data to the multiplexing pin.
Preferably, the system further comprises a data buffer; the input end of the data buffer is connected with the PCM signal input end, and the first output end and the second output end of the data buffer are respectively connected with the PWM conversion circuit and the I2S parallel-serial converter; wherein, the liquid crystal display device comprises a liquid crystal display device,
the data buffer is configured to receive the PCM format encoded audio signal sent by the PCM signal input end, and send the PCM format encoded audio signal to the PWM conversion circuit and the I2S parallel-serial conversion circuit at a rate of an audio data playing sampling rate as an output rate.
Preferably, the PWM conversion circuit is further configured to pre-process the PCM format encoded audio signal at a converter, where the pre-process specifically includes:
acquiring the PCM format encoded audio signal, and converting the PCM format encoded audio signal into an unsigned number when the PCM format encoded audio signal is the signed number;
the magnitude of the unsigned number value is adjusted through a multiplier and a shifting operation;
and executing addition operation, and adjusting the direct current offset of the audio data after unsigned number processing.
Preferably, the PWM conversion circuit includes a counter and a PWM converter; the PWM converter is connected with the PCM signal input end and the two-way selection circuit, and the counter is connected with the PWM converter; wherein, the liquid crystal display device comprises a liquid crystal display device,
the counter is used for providing a clock signal for the PWM converter;
the PWM converter is used for obtaining the PCM value after direct current bias adjustment, and according to the clock signal, the PWM converter is kept to be 0 after the preset value is decreased in each clock period until the preset value is smaller than or equal to 0, when the decreased value is larger than 0, the output PWM signal is high level, and when the decreased value is equal to 0, the output PWM signal is low level.
Preferably, the device also comprises a PWM-DAC circuit and a loudspeaker; one end of the PWM-DAC circuit is connected with the multiplexing pin, and the other end of the PWM-DAC circuit is connected with the loudspeaker; wherein, the liquid crystal display device comprises a liquid crystal display device,
the PWM-DAC circuit is used for converting the PWM signal sent by the PWM conversion circuit into a DAC signal and driving the loudspeaker according to the DAC signal;
and the loudspeaker is used for playing corresponding audio when being driven by the DAC signal.
Preferably, a decoder is also included; the decoder is connected with the multiplexing pin and used for decoding the audio signals sent by the I2S parallel-serial converter.
The invention also provides an audio output pin multiplexing device which comprises the audio output pin multiplexing circuit.
Preferably, the audio output device further comprises a PCM audio output device, which is connected to the PCM signal input for providing the PCM audio signal to the audio output pin multiplexing means.
Preferably, the memory further comprises a register; the register is connected with the selection end of the two-way selection circuit, when the register selection signal is a first preset value, the signal sent by the PWM conversion circuit is received and sent to the multiplexing pin, and when the register selection signal is a second preset value, the signal sent by the I2S parallel-serial conversion circuit is received and sent to the multiplexing pin.
The invention also provides an audio output pin multiplexing method, which comprises the following steps:
the PWM conversion circuit receives the PCM format coded audio signal from the PCM signal input end, converts the PCM format coded audio signal into PWM format data and sends the PWM format data to the two-way selection circuit;
the I2S parallel-serial conversion circuit receives the PCM format encoded audio signal from the PCM signal input end, converts the audio signal into I2S and then sends the I2S audio signal to the two-path selection circuit;
the two-way selection circuit receives the signal sent by the PWM conversion circuit and sends the signal to the multiplexing pin; or receiving the serial data of the I2S sent by the I2S parallel-serial conversion circuit and sending the serial data to the multiplexing pin.
According to the invention, the input PCM format coded audio signal is converted into the PWM signal through the PWM conversion circuit, the input PCM format coded audio signal is converted into the I2S serial data through the I2S parallel-serial conversion circuit, and then the corresponding signal is selected and sent to the multiplexing pin through the two-way selection circuit, so that the requirement of the pin number is reduced, the transmission of the PWM signal can depend on the original I2S interface, the technical effects of realizing PWM audio output and I2S audio output by using a single interface under the premise of not changing the I2S interface are achieved, the changes of a product shell and the interface are reduced, the cost is reduced, the number of wires inside a transmission cable is reduced to a certain extent, the problem of interface enlargement possibly caused by changing the interface is avoided, and the reliability is enhanced.
Drawings
FIG. 1 is a functional block diagram of one embodiment of a task automatic configuration circuit of the present invention;
FIG. 2 is a functional block diagram of another embodiment of the task automatic configuration circuit of the present invention;
FIG. 3 is a functional block diagram of another embodiment of the task automatic configuration circuit of the present invention;
FIG. 4 is a flow chart of an embodiment of a task auto-configuration method according to the present invention.
Detailed Description
The invention is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present invention are shown in the drawings.
Fig. 1 is a functional block diagram of an audio output pin multiplexing circuit according to a first embodiment of the present invention, including a PCM signal input terminal, a PWM conversion circuit, an I2S parallel-serial conversion circuit, a two-way selection circuit, and multiplexing pins; one end of the PWM conversion circuit and one end of the I2S parallel-serial conversion circuit are connected with the PCM signal input end, the other end of the PWM conversion circuit and the other end of the I2S parallel-serial conversion circuit are respectively connected with the first input end and the second input end of the two-way selection circuit, and the output end of the two-way selection circuit is connected with the multiplexing pin; wherein, the liquid crystal display device comprises a liquid crystal display device,
the PWM conversion circuit is used for receiving the PCM format encoded audio signal from the PCM signal input end, converting the PCM format encoded audio signal into PWM format data and transmitting the PWM format data to the two-way selection circuit;
the I2S parallel-serial conversion circuit is used for receiving the PCM format encoded audio signal from the PCM signal input end, converting the audio signal into I2S serial data and transmitting the I2S serial data to the two-way selection circuit;
the two-way selection circuit is used for receiving the signals sent by the PWM conversion circuit and sending the signals to the multiplexing pin; or receiving the serial data of the I2S sent by the I2S parallel-serial conversion circuit and sending the serial data to the multiplexing pin.
It is easy to understand that, in general, the PCM format encoded audio signal stores all the audio information that can be recorded, serial data that is converted into I2S is near lossless conversion, audio information is not lost, but when it is converted into PWM format data, audio information will be lost, so that the serial data of I2S is more compared with the audio information stored in PWM format data, when using a high-quality decoder and speaker, the serial data of I2S is better in tone quality after decoding and playing than the PWM format data, but in a scene with low requirement on tone quality, the cost performance of transmitting audio information using PWM format data is higher.
It should be noted that, because of the replicability of the digital signal, the audio signal encoded in PCM format will not disappear due to one conversion, the audio signal encoded in PCM format can be generally converted into PWM format data and I2S serial data respectively, and then transmitted to the corresponding playing device through different interfaces and lines, two separate interfaces or more interfaces with one pin are used to implement the functions of PWM audio output and I2S audio output, when the PWM audio output function is added to the existing device for outputting I2S serial data, the number of pins of the interface needs to be increased or the number of pins of the original interface needs to be changed, which brings about an increase in cost.
It is worth emphasizing that the PWM conversion circuit and the I2S parallel-serial conversion circuit convert the PCM format encoded audio signal into PWM format data and I2S serial data, the input end of the two-way selection circuit is two conversion circuits of the front stage, one of the two conversion circuits is selected to be output to the pin of the rear stage, so that pin multiplexing can be realized, and multiplexing of more pins can be realized only by adding the two-way selection circuit.
According to the technical scheme, the input PCM audio signal is converted into the signal in the PWM format through the PWM conversion circuit, the input PCM audio signal is converted into the serial data of I2S through the I2S parallel-serial conversion circuit, and then the signal in the PWM format or the serial data of I2S are selected to the multiplexing pin through the two-way selection circuit, so that the same pin can be used for outputting the serial data of I2S or the signal in the PWM format, the number of pins required for realizing PWM audio output and I2S audio output is reduced, the technical effect of realizing PWM audio output and I2S audio output through a single interface on the premise that an I2S interface is not required to be changed is achieved, the number of wire cores required for realizing PWM audio output and I2S audio output through the interface is reduced, and the use scene is widened.
Referring to fig. 2, the audio output pin multiplexing circuit provided by the present invention further includes a data buffer; the input end of the data buffer is connected with the PCM signal input end, and the first output end and the second output end of the data buffer are respectively connected with the PWM conversion circuit and the I2S parallel-serial converter; wherein, the liquid crystal display device comprises a liquid crystal display device,
the data buffer is used for receiving the PCM format encoded audio signal sent by the PCM signal input end, and sending the PCM format encoded audio signal to the PWM conversion circuit and the I2S parallel-serial conversion circuit by taking the rate of the audio data playing sampling rate as the output rate.
It is easy to understand that, since the rate of the PCM format encoded audio signal input to the PWM conversion circuit and the I2S parallel-serial conversion circuit may not be consistent with the rate of the playing sampling rate, which may cause the audio to stumble in the playing process, and the original audio effect cannot be restored, and after the data buffer is added, the output rate and the rate of the playing sampling rate may be adjusted to be consistent, so that the playing rate of the audio is consistent with the rate of the playing sampling rate.
The PWM conversion circuit is further configured to pre-process the PCM format encoded audio signal at the converter, where the pre-process specifically includes:
acquiring an audio signal coded by a PCM format, and converting the audio signal coded by the PCM format into an unsigned number when the audio signal coded by the PCM format is the signed number;
the magnitude of the unsigned number value is adjusted through a multiplier and a shifting operation;
and executing addition operation, and adjusting the direct current offset of the audio data after unsigned number processing.
It should be noted that the step of converting the unsigned number and adjusting the magnitude of the unsigned number aims at changing all values into positive values, so that the high level or the low level can be output according to whether the value is larger than 0 in the subsequent processing; the processing process is as follows: all the values are added with the absolute value of the minimum value, the processed original minimum value is 0, the rest values are the absolute values of the original value and the original minimum value, then the size of the unsigned number value is adjusted through a multiplier and a shifting operation, so that the control of the audio playing volume is realized, and then the data after volume adjustment is subjected to one-time addition operation, and the direct current bias of the audio data is adjusted.
Specifically, the PWM conversion circuit includes a counter and a PWM converter; the PWM converter is connected with the PCM signal input end and the two paths of selection circuits, and the counter is connected with the PWM converter; wherein, the liquid crystal display device comprises a liquid crystal display device,
a counter for providing a clock signal to the PWM converter;
and the PWM converter is used for acquiring the PCM value after the direct current offset adjustment, and according to the clock signal, decrementing a preset value in each clock period until the value is smaller than or equal to 0, and keeping the value to be 0, wherein when the value after the decrementing is larger than 0, the output PWM signal is high level, and when the value after the decrementing is equal to 0, the output PWM signal is low level.
It is worth emphasizing that the PCM-PWM data converter realizes parallel-serial conversion of the initial value of the counter to a pre-processed unsigned number PCM of the current sampling period through the counter, the pre-processed unsigned number PCM is positive, in the application, the preset value is set to be 1, under the high-speed clock driving, the counter value is decremented by 1 every clock period until the counter value is kept to be 0 after being decremented to be 0, the counter is initialized by the next PCM data after the next sampling period comes, and the conversion process is repeated; when the counter value is zero, the PWM outputs a low level, and when the counter value is non-zero, the PWM outputs a high level, the larger the PCM value is, the more high-point levels of the PWM outputs are, and the larger the duty ratio of the PWM outputs is.
It is easy to understand that, by the above conversion method, the PCM value can be expressed by the duty ratio of the PWM signal, however, since the preset value is 1 in this application, the PCM value smaller than 1 is regarded as 1 or regarded as 0, and thus the stored audio information is degraded, the degradation of the audio information can be reduced by adjusting the preset value to be a number smaller than 1, but in order to ensure the conversion speed of the PCM to PWM, the conversion time should be longer than the playing speed of the audio, and thus the setting of the preset value needs to take into consideration the performance of the counter.
Referring to fig. 3, the device further comprises a PWM-DAC circuit and a speaker; one end of the PWM-DAC circuit is connected with the multiplexing pin, and the other end of the PWM-DAC circuit is connected with the loudspeaker; wherein, the liquid crystal display device comprises a liquid crystal display device,
the PWM-DAC circuit is used for converting the PWM signal sent by the PWM conversion circuit into a DAC signal and driving the loudspeaker according to the DAC signal;
and the loudspeaker is used for playing corresponding audio when being driven by the DAC signal.
It should be noted that, there are many existing schemes for converting PWM signals into analog signals, in which, most of the existing schemes are to filter alternating current components of PWM signals and then output analog signals with varying amplitude, and different duty ratios of PWM signals can generate different analog signals, namely DAC signals.
It should be emphasized that even if the loss of information is controlled to be within a minimum range during the conversion process of the PCM signal into the PWM signal, after the PWM signal is converted into the DAC signal, the output DAC signal will be different from the audio information of the input PCM signal to a certain extent, so that PWM transmission of audio information is generally only used in scenes with low requirements on sound quality.
Specifically, the method also comprises a decoder; the decoder is connected with the multiplexing pin and used for decoding the audio signal sent by the I2S parallel-serial converter.
It is easy to understand that decoding the serial data of the I2S with a decoder can obtain the complete audio data contained in the PCM signal, and in case of multi-channel, the serial data of the I2S may also contain multi-channel data, however, the cost is relatively high due to the high cost of the decoder and the high number of cores of the transmission cable, and thus the method is generally applied in scenes with high requirements on sound quality.
According to the embodiment, the technical scheme is perfected by disclosing the connection mode of the back-end circuit, the loudspeaker can be driven by an output signal through the PWM-DAC circuit, low-quality audio playing is realized through extremely low cost, high-quality audio playing is realized by decoding I2S serial data through the decoder, the technical effects that PWM audio or I2S audio is output and played through the same pin according to different back-end equipment are achieved, the situation that the audio playing speed is inconsistent with the playing sampling rate is avoided through adding the data buffer, the quality of the output signal is further improved, the design needs are met, and the use scene is expanded.
The invention also provides an audio output pin multiplexing device, which comprises the audio output pin multiplexing circuit.
The audio output pin multiplexing device provided by the embodiment of the invention can execute the audio output pin multiplexing circuit method provided by any embodiment of the invention, has corresponding functional modules and beneficial effects of the execution method, and is not described in detail herein.
Specifically, the device also comprises a PCM audio output device, wherein the PCM audio output device is connected with the PCM signal input end and is used for providing a PCM audio signal for the audio output pin multiplexing device.
It should be noted that, generally, the audio file is output as PCM data after decoding, the sound data in the PCM is not compressed, and the audio format output under the condition of higher sound quality requirement can be data in RAW format, however, because the difference between the audio file and the PCM is very small, the comprehensive cost is much higher, the application range is far less than the wide range of the PCM, and the audio device supporting RAW output can mostly output the audio in PCM format, so the application uses the PCM audio output device as an output source to meet the requirements of compatibility and application range.
Specifically, the method also comprises a register; the register is connected with the selection end of the two-way selection circuit, when the register selection signal is a first preset value, the signal sent by the PWM conversion circuit is received and sent to the multiplexing pin, and when the register selection signal is a second preset value, the signal sent by the I2S parallel-serial conversion circuit is received and sent to the multiplexing pin.
It is easy to understand that the two-way selection circuit judges and selects which signal to send to the multiplexing pin according to the value read by the selection end, in the application, the first preset threshold is 1, the second preset threshold is 0, namely when the value stored in the register is 1, the multiplexing pin outputs PWM modulated audio data, when the value stored in the register is 0, the multiplexing pin outputs I2S format audio data, meanwhile, under the condition that the register and the two-way selection circuit are not used, the multiplexing pin can be controlled to output target audio data in a switch on-off mode, and the register is matched with the two-way selection circuit.
According to the embodiment, the technical scheme is perfected through disclosing the peripheral equipment of the audio output pin multiplexing device, and through a mode that a register is matched with a two-way selection circuit, the output of different audio signals can be realized only by changing the stored numerical value, the threshold of complex control is reduced, the operation difficulty of outputting the different audio signals is reduced, the technical scheme is perfected, the user experience of realizing PWM audio output and I2S audio output by using a single interface is further improved, and the use scene is widened.
Referring to fig. 4, the present invention further provides an audio output pin multiplexing method, where the audio output pin multiplexing method specifically includes:
the PWM conversion circuit receives the PCM format coded audio signal from the PCM signal input end, converts the PCM format coded audio signal into PWM format data and sends the PWM format data to the two-way selection circuit;
the I2S parallel-serial conversion circuit receives the PCM format encoded audio signal from the PCM signal input end, converts the audio signal into I2S and then sends the I2S audio signal to the two-way selection circuit;
the two-way selection circuit receives the signal sent by the PWM conversion circuit and sends the signal to the multiplexing pin; or receiving the serial data of the I2S sent by the I2S parallel-serial conversion circuit and sending the serial data to the multiplexing pin.
Of course, the audio output pin multiplexing method provided by the embodiment of the invention has the corresponding functional modules and beneficial effects of the circuit, and is not described in detail herein.
From the above description of embodiments, it will be clear to a person skilled in the art that the present invention may be implemented by means of software and necessary general purpose hardware, but of course also by means of hardware, although in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, etc., including several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to execute the method of the embodiments of the present invention.
It should be noted that, in the above-mentioned embodiments of the search apparatus, each unit and module included are only divided according to the functional logic, but not limited to the above-mentioned division, as long as the corresponding functions can be implemented; in addition, the specific names of the functional units are also only for distinguishing from each other, and are not used to limit the protection scope of the present invention.
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.

Claims (10)

1. The audio output pin multiplexing circuit is characterized by comprising a PCM signal input end, a PWM conversion circuit, an I2S parallel-serial conversion circuit, a two-way selection circuit and multiplexing pins; one end of the PWM conversion circuit and one end of the I2S parallel-serial conversion circuit are connected with the PCM signal input end, the other ends of the PWM conversion circuit and the I2S parallel-serial conversion circuit are respectively connected with the first input end and the second input end of the two-way selection circuit, and the output ends of the two-way selection circuit are connected with multiplexing pins; wherein, the liquid crystal display device comprises a liquid crystal display device,
the PWM conversion circuit is used for receiving the PCM format coded audio signal from the PCM signal input end, converting the PCM format coded audio signal into PWM format data and sending the PWM format data to the two-way selection circuit;
the I2S parallel-serial conversion circuit is used for receiving the audio signal coded by the PCM format from the PCM signal input end, converting the audio signal into serial data of I2S and then sending the serial data to the two-path selection circuit;
the two-way selection circuit is used for receiving the signals sent by the PWM conversion circuit and sending the signals to the multiplexing pin; or receiving the serial data of the I2S sent by the I2S parallel-serial conversion circuit and sending the serial data to the multiplexing pin.
2. The audio output pin multiplexing circuit of claim 1, further comprising a data buffer; the input end of the data buffer is connected with the PCM signal input end, and the first output end and the second output end of the data buffer are respectively connected with the PWM conversion circuit and the I2S parallel-serial converter; wherein, the liquid crystal display device comprises a liquid crystal display device,
the data buffer is configured to receive the PCM format encoded audio signal sent by the PCM signal input end, and send the PCM format encoded audio signal to the PWM conversion circuit and the I2S parallel-serial conversion circuit at a rate of an audio data playing sampling rate as an output rate.
3. The audio output pin multiplexing circuit of claim 2, wherein the PWM conversion circuit is further configured to pre-process the PCM format encoded audio signal, the pre-processing specifically comprising:
acquiring the PCM format encoded audio signal, and converting the PCM format encoded audio signal into an unsigned number when the PCM format encoded audio signal is the signed number;
the magnitude of the unsigned number value is adjusted through a multiplier and a shifting operation;
and executing addition operation, and adjusting the direct current offset of the audio data after unsigned number processing.
4. The audio output pin multiplexing circuit of claim 3, wherein the PWM conversion circuit comprises a counter and a PWM converter; the PWM converter is connected with the PCM signal input end and the two-way selection circuit, and the counter is connected with the PWM converter; wherein, the liquid crystal display device comprises a liquid crystal display device,
the counter is used for providing a clock signal for the PWM converter;
the PWM converter is used for obtaining the PCM value after direct current bias adjustment, and according to the clock signal, the PWM converter is kept to be 0 after the preset value is decreased in each clock period until the preset value is smaller than or equal to 0, when the decreased value is larger than 0, the output PWM signal is high level, and when the decreased value is equal to 0, the output PWM signal is low level.
5. The audio output pin multiplexing circuit of claim 4, further comprising a PWM-to-DAC circuit and a speaker, wherein the PWM-to-DAC circuit is a digital-to-analog conversion circuit in which the input signal is a PWM signal, and the converted DAC signal is an analog signal; one end of the PWM-DAC circuit is connected with the multiplexing pin, and the other end of the PWM-DAC circuit is connected with the loudspeaker; wherein, the liquid crystal display device comprises a liquid crystal display device,
the PWM-DAC circuit is used for converting the PWM signal sent by the PWM conversion circuit into a DAC signal and driving the loudspeaker according to the DAC signal;
and the loudspeaker is used for playing corresponding audio when being driven by the DAC signal.
6. The audio output pin multiplexing circuit of claim 2, further comprising a decoder; the decoder is connected with the multiplexing pin and used for decoding the audio signals sent by the I2S parallel-serial converter.
7. An audio output pin multiplexing device, characterized in that the audio output pin multiplexing device comprises the audio output pin multiplexing circuit of any of claims 1 to 6.
8. The audio output pin multiplexing device of claim 7, further comprising a PCM audio output device coupled to the PCM signal input for providing a PCM audio signal to the audio output pin multiplexing device.
9. The audio output pin multiplexing device of claim 7, further comprising a register; the register is connected with the selection end of the two-way selection circuit, when the register selection signal is a first preset value, the signal sent by the PWM conversion circuit is received and sent to the multiplexing pin, and when the register selection signal is a second preset value, the signal sent by the I2S parallel-serial conversion circuit is received and sent to the multiplexing pin.
10. An audio output pin multiplexing method, comprising:
the PWM conversion circuit receives the PCM format coded audio signal from the PCM signal input end, converts the PCM format coded audio signal into PWM format data and sends the PWM format data to the two-way selection circuit;
the I2S parallel-serial conversion circuit receives the PCM format encoded audio signal from the PCM signal input end, converts the audio signal into I2S and then sends the I2S audio signal to the two-path selection circuit;
the two-way selection circuit receives the signal sent by the PWM conversion circuit and sends the signal to the multiplexing pin; or receiving the serial data of the I2S sent by the I2S parallel-serial conversion circuit and sending the serial data to the multiplexing pin.
CN202210827134.5A 2022-07-13 2022-07-13 Audio output pin multiplexing circuit, device and method Active CN115243161B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210827134.5A CN115243161B (en) 2022-07-13 2022-07-13 Audio output pin multiplexing circuit, device and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210827134.5A CN115243161B (en) 2022-07-13 2022-07-13 Audio output pin multiplexing circuit, device and method

Publications (2)

Publication Number Publication Date
CN115243161A CN115243161A (en) 2022-10-25
CN115243161B true CN115243161B (en) 2023-06-27

Family

ID=83674253

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210827134.5A Active CN115243161B (en) 2022-07-13 2022-07-13 Audio output pin multiplexing circuit, device and method

Country Status (1)

Country Link
CN (1) CN115243161B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007243608A (en) * 2006-03-08 2007-09-20 Alps Electric Co Ltd Sound output device
CN105955694A (en) * 2012-12-27 2016-09-21 中兴通讯股份有限公司 Method and device for outputting HiFi audio frequency
CN106952650A (en) * 2017-02-28 2017-07-14 大连理工大学 A kind of train voice amplifying unit based on ARM+FPGA frameworks
CN107995561A (en) * 2017-12-28 2018-05-04 重庆德科电子仪表有限公司 Onboard instruments audio control system and control method
CN108649935A (en) * 2018-05-03 2018-10-12 成都黎声科技有限公司 A kind of system and method that digital audio and video signals are directly modulated into PWM waveform
CN208707932U (en) * 2018-08-24 2019-04-05 北京猎户星空科技有限公司 A kind of audio interface conversion circuit, audio collecting system and electronic equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9213761B1 (en) * 2014-06-03 2015-12-15 Freescale Semiconductor, Inc. Electronic systems and methods for integrated, automatic, medium-quality audio

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007243608A (en) * 2006-03-08 2007-09-20 Alps Electric Co Ltd Sound output device
CN105955694A (en) * 2012-12-27 2016-09-21 中兴通讯股份有限公司 Method and device for outputting HiFi audio frequency
CN106952650A (en) * 2017-02-28 2017-07-14 大连理工大学 A kind of train voice amplifying unit based on ARM+FPGA frameworks
CN107995561A (en) * 2017-12-28 2018-05-04 重庆德科电子仪表有限公司 Onboard instruments audio control system and control method
CN108649935A (en) * 2018-05-03 2018-10-12 成都黎声科技有限公司 A kind of system and method that digital audio and video signals are directly modulated into PWM waveform
CN208707932U (en) * 2018-08-24 2019-04-05 北京猎户星空科技有限公司 A kind of audio interface conversion circuit, audio collecting system and electronic equipment

Also Published As

Publication number Publication date
CN115243161A (en) 2022-10-25

Similar Documents

Publication Publication Date Title
US7813824B2 (en) Transmission signal processing device for video signal and multi-channel audio signal, and video and audio reproducing system including the same
US5347587A (en) Speaker driving device
US20030081803A1 (en) Low power, low noise, 3-level, H-bridge output coding for hearing aid applications
JPH07118749B2 (en) Voice / data transmission equipment
JP2006303618A (en) Speaker driving system
US8825497B2 (en) Systems and methods for reducing audio disturbance associated with control messages in a bitstream
CN105681819B (en) Method, device and system for transmitting and receiving signals
CN115243161B (en) Audio output pin multiplexing circuit, device and method
US20040223545A1 (en) Multi-level pulse width modulation in digital system
CN106331952B (en) Total digitalization is without sound card multichannel play system and playback method
US20070064960A1 (en) Apparatus to convert analog signal of array microphone into digital signal and computer system including the same
CN214413006U (en) True wireless stereo earphone
KR100754155B1 (en) A apparatus and method for transmitting optical signal of graphic signal
WO2013062038A1 (en) Digital acoustic system
US20040030561A1 (en) Method and apparatus for digital signal communication between computer-based multi-channel audio controller and surround sound systems
CN107357547B (en) Audio control method, audio control device and audio equipment
US5666431A (en) Volume control for a personal computer internal speaker
WO2010125857A1 (en) Data transmission device and data transmission method
WO2020203330A1 (en) Signal processing device and method, and program
CN213880236U (en) Sound effect conversion device
JPH1152960A (en) Digital acoustic processor
CN217546290U (en) Medical ultrasonic equipment and audio power amplifier system thereof
CN114095828B (en) Audio signal processing method and device, electronic equipment and storage medium
US20230082685A1 (en) Integrated circuitry of speaker
CA2792358C (en) Systems and methods for reducing audio disturbance associated with control messages in a bitstream

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant