CN117979208A - Electronic device and control method for reducing audio delay - Google Patents
Electronic device and control method for reducing audio delay Download PDFInfo
- Publication number
- CN117979208A CN117979208A CN202311792825.7A CN202311792825A CN117979208A CN 117979208 A CN117979208 A CN 117979208A CN 202311792825 A CN202311792825 A CN 202311792825A CN 117979208 A CN117979208 A CN 117979208A
- Authority
- CN
- China
- Prior art keywords
- audio
- audio data
- input
- interface
- controlling
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 46
- 238000012545 processing Methods 0.000 claims abstract description 36
- 238000004891 communication Methods 0.000 claims abstract description 25
- 230000006870 function Effects 0.000 claims description 21
- 230000005236 sound signal Effects 0.000 description 43
- 238000010586 diagram Methods 0.000 description 10
- 230000003993 interaction Effects 0.000 description 10
- 230000008569 process Effects 0.000 description 10
- 230000005540 biological transmission Effects 0.000 description 9
- 238000005516 engineering process Methods 0.000 description 7
- 238000001514 detection method Methods 0.000 description 5
- 238000006243 chemical reaction Methods 0.000 description 4
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 239000002131 composite material Substances 0.000 description 2
- 238000004590 computer program Methods 0.000 description 2
- 230000003139 buffering effect Effects 0.000 description 1
- 230000003111 delayed effect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04R—LOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
- H04R3/00—Circuits for transducers, loudspeakers or microphones
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04R—LOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
- H04R2410/00—Microphones
- H04R2410/01—Noise reduction using microphones having different directional characteristics
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04R—LOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
- H04R2420/00—Details of connection covered by H04R, not provided for in its groups
- H04R2420/03—Connection circuits to selectively connect loudspeakers or headphones to amplifiers
Landscapes
- Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Acoustics & Sound (AREA)
- Signal Processing (AREA)
- Circuit For Audible Band Transducer (AREA)
Abstract
The application provides an electronic device and a control method for reducing audio delay, which mainly relate to the technical field of computers, and the electronic device comprises: the speaker is configured to: playing the target audio data; a processor configured to: the method comprises the steps that a control line input interface obtains first audio data, and the first audio data are sent by an external audio acquisition device which establishes communication connection with electronic equipment; controlling the first audio data to be directly transmitted to an output buffer area through a DMA unit without passing through a sound card; controlling a multimedia interface to acquire second audio data; controlling the second audio data to be transmitted to an output buffer area through the sound card; controlling the first audio data and the second audio data to carry out audio mixing processing in an output buffer area to obtain target audio data; the target audio data is transmitted to the speaker. The delay between the SOC and the loudspeaker is reduced, so that no matter how close the person is to the display device, the speaking speed is high, and the delay is not felt.
Description
Technical Field
The embodiment of the application relates to the technical field of audio data processing. And more particularly, to an electronic apparatus and a control method for reducing audio delay.
Background
An infrared wireless Microphone (MIC) is selected in some display devices (for example, a television), and an infrared MIC receiving module is added in the display devices. The infrared MIC receiving module converts the audio signal sent by the infrared MIC into a common analog sound signal to be sent to the display equipment, and simultaneously informs a System On Chip (SOC) whether the infrared MIC receiving module is opened or not through a general purpose input output interface (general purpose input output, GPIO).
In the related art, an infrared MIC audio signal enters into an SOC process, needs to pass through a mixer and a sound card processor in sequence, and then enters into an SOC to a speaker, and the whole process is delayed by 40ms.
When a person is approaching the display device, speaking quickly, a delay is felt slightly.
Disclosure of Invention
The exemplary embodiment of the application provides an electronic device and a control method for reducing audio delay, which reduce the delay between an SOC and a loudspeaker of audio data, so that no matter how close a person is to the display device, the speaking speed is high, and the delay is not felt.
The technical scheme provided by the embodiment of the application is as follows:
In a first aspect, an embodiment of the present application provides an electronic device, including: a speaker and a processor, the processor comprising: the system comprises a multimedia interface, a line input interface, a sound card, a Direct Memory Access (DMA) unit and an output buffer area; a speaker configured to: playing the target audio data; a processor configured to: the method comprises the steps that a control line input interface obtains first audio data, and the first audio data are sent by an external audio acquisition device which establishes communication connection with electronic equipment; controlling the first audio data to be directly transmitted to an output buffer area through a DMA unit without passing through a sound card; controlling a multimedia interface to acquire second audio data; controlling the second audio data to be transmitted to an output buffer area through the sound card; controlling the first audio data and the second audio data to carry out audio mixing processing in an output buffer area to obtain target audio data; the target audio data is transmitted to the speaker.
In a second aspect, an embodiment of the present application provides a control method for reducing audio delay, where the method is applied to an electronic device, and the electronic device includes: a speaker and a processor, the processor comprising: the system comprises a multimedia interface, a line input interface, a sound card, a Direct Memory Access (DMA) unit and an output buffer area; the method comprises the following steps: the method comprises the steps that a control line input interface obtains first audio data, and the first audio data are sent by an external audio acquisition device which establishes communication connection with electronic equipment; controlling the first audio data to be directly transmitted to an output buffer area through a DMA unit without passing through a sound card; controlling a multimedia interface to acquire second audio data; controlling the second audio data to be transmitted to an output buffer area through the sound card; controlling the first audio data and the second audio data to carry out audio mixing processing in an output buffer area to obtain target audio data; the target audio data is transmitted to a speaker, which is used to play the target audio data.
In a third aspect, embodiments of the present application provide a computer-readable storage medium, on which a computer program is stored, which when executed by a computing device, causes the computing device to implement the control method for reducing audio delay provided by any one of the embodiments of the first or second aspects.
In a fourth aspect, embodiments of the present application provide a computer program product, which when run on a computer causes the computer to implement the control method for reducing audio delay provided by any one of the embodiments of the first or second aspects.
As can be seen from the above technical solutions, the embodiments of the present application provide an electronic device and a control method for reducing audio delay, where the electronic device includes: a speaker and a processor, the processor comprising: the system comprises a multimedia interface, a line input interface, a sound card, a Direct Memory Access (DMA) unit and an output buffer area; a speaker configured to: playing the target audio data; a processor configured to: the method comprises the steps that a control line input interface obtains first audio data, and the first audio data are sent by an external audio acquisition device which establishes communication connection with electronic equipment; controlling the first audio data to be directly transmitted to an output buffer area through a DMA unit without passing through a sound card; controlling a multimedia interface to acquire second audio data; controlling the second audio data to be transmitted to an output buffer area through the sound card; controlling the first audio data and the second audio data to carry out audio mixing processing in an output buffer area to obtain target audio data; the target audio data is transmitted to the speaker. Because the first audio data transmitted from the external audio acquisition equipment is not transmitted to the output buffer zone through the original audio mixer and the sound card processor, the DMA technology is high in transmission efficiency and quick in transmission time, and therefore the delay between the SOC and the loudspeaker of the first audio data is reduced, and the delay is not felt no matter how close the person is to the display equipment and the speaking speed is high.
Drawings
In order to more clearly illustrate the embodiments of the present application or the implementation of the related art, the drawings that are required for the embodiments or the related art description will be briefly described, and it is apparent that the drawings in the following description are some embodiments of the present application and that other drawings may be obtained according to these drawings for a person having ordinary skill in the art.
Fig. 1 is a hardware configuration diagram of audio processing in an electronic device according to an embodiment of the present application;
fig. 2 is a hardware configuration diagram of an SOC internal processing audio data provided in the related art;
Fig. 3 is a scene structure diagram of a control method for reducing audio delay according to an embodiment of the present application;
Fig. 4 is a schematic structural diagram of a control device for reducing audio delay according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
fig. 6 is a flowchart of a control method for reducing audio delay according to an embodiment of the present application;
FIG. 7 is a hardware block diagram of an SOC internally processing audio data according to an embodiment of the present application;
Fig. 8 is a schematic flow chart of a processing of first audio data according to an embodiment of the present application;
fig. 9 is a flowchart illustrating another processing of first audio data according to an embodiment of the present application;
Fig. 10 is a schematic flow chart of a second audio data processing according to an embodiment of the present application;
FIG. 11 is a flowchart illustrating another control method for reducing audio delay according to an embodiment of the present application;
fig. 12 is a flowchart of another control method for reducing audio delay according to an embodiment of the present application.
Detailed Description
For the purposes of making the objects and embodiments of the present application more apparent, an exemplary embodiment of the present application will be described in detail below with reference to the accompanying drawings in which exemplary embodiments of the present application are illustrated, it being apparent that the exemplary embodiments described are only some, but not all, of the embodiments of the present application.
It should be noted that the brief description of the terminology in the present application is for the purpose of facilitating understanding of the embodiments described below only and is not intended to limit the embodiments of the present application. Unless otherwise indicated, these terms should be construed in their ordinary and customary meaning.
The terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a product or apparatus that comprises a list of elements is not necessarily limited to all elements explicitly listed, but may include other elements not expressly listed or inherent to such product or apparatus.
An infrared wireless Microphone (MIC) is selected in some display devices (for example, a television), and an infrared MIC receiving module is added in the display devices. The infrared MIC receiving module converts the audio signal sent by the infrared MIC into a common analog sound signal to be sent to the display equipment, and simultaneously informs a System On Chip (SOC) whether the infrared MIC receiving module is opened or not through a general purpose input output interface (general purpose input output, GPIO).
The microphone used by the user is a microphone, after the SOC receives the first audio signal sent by the infrared microphone, the first audio signal and the second audio signal of the current channel (such as high-definition multimedia (high definition multimedia interface, HDMI) or multimedia) are subjected to audio mixing processing, and the audio signal is played at a loudspeaker of the electronic equipment.
FIG. 1 is a hardware configuration diagram of audio processing in an electronic device according to an embodiment of the present application; as shown in fig. 1, in the hardware configuration diagram, the infrared receiving box, the infrared receiving module, the HDMI channel, the SOC chip and the speaker are all disposed in the electronic device, and the microphone is an infrared microphone and is connected with the electronic device through infrared laser. After sound signals generated by a user are collected by the microphone, the sound signals are transmitted to an infrared receiving box through infrared laser connection, the infrared receiving box transmits the received sound signals to an infrared audio receiving module, the infrared audio receiving module informs the SOC through GPIO, and the sound signals transmitted by the microphone are received, so that the SOC opens the infrared audio receiving module. The infrared audio receiving module converts the analog sound signal into a general analog sound signal (Line in). The HDMI channel sends second audio data to the SOC; the SOC mixes the first audio data and the second audio data to obtain third audio data, and sends the third audio data to the loudspeaker so that the loudspeaker can play the third audio data.
FIG. 2 is a flow chart of processing audio data within an SOC according to an embodiment of the present application; as shown in fig. 2, the Audio Input (Audio Input) buffer is turned off by default. If the Audio signal is Input, the Audio Input buffer is applied first. And then applies for use according to the type of the input audio source (audio source), such as hdmi or ADC.
The main channel application uses Audio Input, the Input Audio signal source is selected as HDMI or multimedia, and then a main track (MASTER TRACK) is created; the infrared MIC also applies for the use of Audio Input, the Input Audio signal source being an ADC; a secondary track (SLAVE TRACK) is created. Audio signals on the main track and the auxiliary track are mixed by a mixer to obtain third audio data, and the third audio data is sent to a Sound Card (Sound Card) for processing. The method comprises the steps that a common analog audio signal received by a Line In interface enters SOC (system on chip) processing, and main track audio and auxiliary track audio are subjected to audio mixing processing In a mixer to obtain audio after audio mixing; the audio after mixing is sequentially transmitted to a loudspeaker after being transmitted to an output buffer (output buffer) through an automatic volume controller (Auto Volume Control, AVC) in a sound card processor, a Dolby panoramic sound module (Dolby Atmos), a graphic equalizer (graphic equalizer, GEQ), a balancer (balance), a multi-controller and a convolution processor (volume), so that the loudspeaker plays a third audio signal after mixing.
In the above processing flow, the delay time from the first audio data to the SOC to the speaker is 40ms. When a person is approaching a television, speaking quickly, a delay is felt slightly. In one exemplary application scenario, for example: education live broadcasting scenes, conference scenes and the like, when one user speaks by using an infrared microphone, the user speaking can be caused to speak due to the existence of the audio delay, and meanwhile, the user can hear the content which was spoken before 40ms from a loudspeaker of the electronic equipment, so that voice signals are mixed, and the user experience is poor.
In order to solve the above technical problems, the embodiments of the present application provide an electronic device and a control method for reducing audio delay, and the technical solutions of the present application are described in detail below with reference to the drawings and the embodiments.
Fig. 3 is a schematic diagram of an operation scenario between an electronic device and a control device in an embodiment. As shown in fig. 3, a user may operate the electronic device 200 through the smart device 300 or the control apparatus 100.
In some embodiments, the control device 100 may be a remote controller, and the communication between the remote controller and the electronic device includes infrared protocol communication or bluetooth protocol communication, and other short-range communication modes, and the electronic device 200 is controlled by a wireless or wired mode. The user may control the electronic device 200 by inputting user instructions through keys on a remote control, voice input, control panel input, etc.
In some embodiments, the smart device 300 (e.g., mobile terminal, tablet, computer, notebook, etc.) may also be used to control the electronic device 200. For example, the electronic device 200 is controlled using an application running on a smart device.
In some embodiments, the electronic device may not receive instructions using the smart device or control device described above, but rather receive control of the user by touch or gesture, or the like.
In some embodiments, the electronic device 200 may further perform control in a manner other than the control apparatus 100 and the smart device 300, for example, the module configured inside the electronic device 200 for obtaining the voice command may directly receive the voice command control of the user, or the voice command control of the user may also be received through a voice control device set outside the electronic device 200.
In some embodiments, the electronic device 200 is also in data communication with a server 400. Electronic device 200 may be permitted to communicate over a Local Area Network (LAN), a Wireless Local Area Network (WLAN), and other networks. The server 400 may provide various content and interactions to the electronic device 200. The server 400 may be a cluster, or may be multiple clusters, and may include one or more types of servers.
Fig. 4 exemplarily shows a block diagram of a configuration of the control apparatus 100 in accordance with an exemplary embodiment. As shown in fig. 5, the control device 100 includes a controller 110, a communication interface 130, a user input/output interface 140, a memory, and a power supply. The control device 100 may receive an input operation instruction from a user, and convert the operation instruction into an instruction recognizable and responsive to the electronic apparatus 200, and may perform an interaction between the user and the electronic apparatus 200.
As shown in fig. 5, the electronic apparatus 200 includes at least one of a modem 210, a communicator 220, a detector 230, an external device interface 240, a controller 250, a display 260, an audio output interface 270, a memory, a power supply, and a user interface.
In some embodiments the controller includes a processor, a video processor, an audio processor, a graphics processor, RAM, ROM, a first interface for input/output to an nth interface.
The display 260 includes a display screen component for presenting a picture, and a driving component for driving an image display, a component for receiving an image signal from the controller output, displaying video content, image content, and a menu manipulation interface, and a user manipulation UI interface.
The display 260 may be a liquid crystal display, an OLED display, a projection device, or a projection screen.
The communicator 220 is a component for communicating with external devices or servers according to various communication protocol types. For example: the communicator may include at least one of a Wifi module, a bluetooth module, a wired ethernet module, or other network communication protocol chip or a near field communication protocol chip, and an infrared receiver. The electronic apparatus 200 may establish transmission and reception of control signals and data signals with the external control apparatus 100 or the server 400 through the communicator 220.
A user interface, which may be used to receive control signals from the control device 100 (e.g., an infrared remote control, etc.).
The detector 230 is used to collect signals of the external environment or interaction with the outside. For example, detector 230 includes a light receiver, a sensor for capturing the intensity of ambient light; either the detector 230 comprises an image collector, such as a camera, which may be used to collect external environmental scenes, user attributes or user interaction gestures, or the detector 230 comprises a sound collector, such as a microphone or the like, for receiving external sounds.
The external device interface 240 may include, but is not limited to, the following: high Definition Multimedia Interface (HDMI), analog or data high definition component input interface (component), composite video input interface (CVBS), USB input interface (USB), RGB port, or the like. The input/output interface may be a composite input/output interface formed by a plurality of interfaces.
The modem 210 receives broadcast television signals through a wired or wireless reception manner, and demodulates audio and video signals, such as EPG data signals, from a plurality of wireless or wired broadcast television signals.
In some embodiments, the controller 250 and the modem 210 may be located in separate devices, i.e., the modem 210 may also be located in an external device to the main device in which the controller 250 is located, such as an external set-top box or the like.
The controller 250 controls the operation of the electronic device and responds to the user's operations by various software control programs stored on the memory. The controller 250 controls the overall operation of the electronic device 200. For example: in response to receiving a user command to select a UI object to be displayed on the display 260, the controller 250 may perform an operation related to the object selected by the user command.
In some embodiments the controller includes at least one of a central processing unit (Central Processing Unit, CPU), a video processor, an audio processor, a graphics processor (Graphics Processing Unit, GPU), RAM Random Access Memory, RAM), ROM (Read-Only Memory, ROM), first to nth interfaces for input/output, a communication Bus (Bus), and the like.
The user may input a user command through a Graphical User Interface (GUI) displayed on the display 260, and the user input interface receives the user input command through the Graphical User Interface (GUI). Or the user may input the user command by inputting a specific sound or gesture, the user input interface recognizes the sound or gesture through the sensor, and receives the user input command.
A "user interface" is a media interface for interaction and exchange of information between an application or operating system and a user, which enables conversion between an internal form of information and a user-acceptable form. A commonly used presentation form of a user interface is a graphical user interface (Graphic User Interface, GUI), which refers to a graphically displayed user interface that is related to computer operations. It may be an interface element such as an icon, a window, a control, etc. displayed in a display screen of the electronic device, where the control may include a visual interface element such as an icon, a button, a menu, a tab, a text box, a dialog box, a status bar, a navigation bar, a Widget, etc.
The embodiment of the application provides electronic equipment, which comprises: a speaker and a processor, the processor comprising: the system comprises a multimedia interface, a line input interface, a sound card, a Direct Memory Access (DMA) unit and an output buffer area; a speaker configured to: playing the target audio data; a processor configured to: the method comprises the steps that a control line input interface obtains first audio data, and the first audio data are sent by an external audio acquisition device which establishes communication connection with electronic equipment; controlling the first audio data to be directly transmitted to an output buffer area through a DMA unit without passing through a sound card; controlling a multimedia interface to acquire second audio data; controlling the second audio data to be transmitted to an output buffer area through the sound card; controlling the first audio data and the second audio data to carry out audio mixing processing in an output buffer area to obtain target audio data; the target audio data is transmitted to the speaker.
In one possible implementation, the processor further includes: a mixer; a processor configured to: controlling the first audio data to be directly transmitted to an output buffer area through a DMA unit without passing through a mixer and a sound card; after the second audio data is controlled to pass through the mixer, the second audio data is transmitted to the output buffer area through the sound card.
In one possible implementation, the processor is configured to: creating an audio input buffer when the first audio data and/or the second audio data are detected to be input into the electronic device; after the control line input interface acquires the first audio data, the first audio data is cached in an audio input cache area; reading first audio data from the audio input buffer area, and controlling the first audio data to be directly transmitted to the output buffer area through the DMA unit without passing through the sound card; after the multimedia interface is controlled to acquire second audio data, the second audio data are cached in an audio input cache area; and reading the second audio data from the audio input buffer area and controlling the second audio data to be transmitted to the output buffer area through the sound card.
In one possible implementation, the processor is configured to: if the audio acquisition equipment is detected to establish communication connection with the electronic equipment, applying for using the audio input buffer area; creating a line input interface in the audio input buffer; creating a first audio track in an audio input buffer; establishing a relation between a line input interface and a first audio track; bearing the first audio data on a first audio track; starting a DMA function; the first audio data carried on the first audio track is read from the audio input buffer, and is controlled to be directly transmitted to the output buffer through the DMA unit without passing through the sound card.
In one possible implementation, the processor is configured to: if the audio acquisition device is detected to be disconnected from the electronic device, disconnecting the line input interface from the first audio track; releasing the first audio track and the line input interface; the DMA function is turned off.
In one possible implementation, the processor is configured to: after the DMA function is closed, if the multimedia interface is continuously provided with the second audio data input, controlling the second audio data to be transmitted to an output buffer area through the sound card; the control output buffer transmits the second audio data as target audio data to the speaker.
In one possible implementation, the processor is configured to: applying for use of an audio input buffer; creating a multimedia interface in the audio input buffer; creating a second audio track in the audio input buffer; connecting the multimedia interface with the second audio track; bearing second audio data received by the multimedia interface on a second audio track; and reading the second audio data carried on the second audio track from the audio input buffer, and controlling the second audio data to be transmitted to the output buffer through the sound card.
In one possible implementation, the processor is configured to: switching the multimedia interface from having the second audio data input to not having the second audio data input, disconnecting the connection between the line input interface and the first audio track in case the line input interface continues to have the first audio data input; releasing the first audio track and the line input interface; closing the DMA function; releasing the second audio track and the multimedia interface; releasing the audio input buffer; recreating a new audio input buffer; creating a line input interface and a first audio track in a new audio input buffer; establishing a relation between a line input interface and a first audio track; carrying first audio data stored in resources corresponding to the line input interface on a first audio track; starting a DMA function; reading first audio data carried on a first audio track from an audio input buffer area, and controlling the first audio data to be directly transmitted to an output buffer area through a DMA unit without passing through a sound card; the control output buffer sends the first audio data as target audio data to the speaker.
In one possible implementation, the processor is configured to: switching the line input interface from having the first audio data input to not having the first audio data input, and disconnecting the line input interface from the first audio track in the case that the multimedia interface continues to have the second audio data input; releasing the first audio track and the line input interface; closing the DMA function; releasing the second audio track and the multimedia interface; releasing the audio input buffer; recreating a new audio input buffer; creating a multimedia interface and a second audio track in the new audio input buffer; establishing a relationship between the multimedia interface and the second audio track; bearing second audio data received by the multimedia interface on a second audio track; reading second audio data carried on a second audio track from the audio input buffer area, and controlling the second audio data to be transmitted to the output buffer area through the sound card; the control output buffer transmits the second audio data as target audio data to the speaker.
An embodiment of the present application provides a control method for reducing audio delay, and fig. 6 is a schematic flow chart of the control method for reducing audio delay provided by the embodiment of the present application; the control method for reducing audio delay is mainly used in the electronic device provided in the above embodiment, as shown in fig. 6, and mainly includes steps S101-S106.
S101, a control line input interface acquires first audio data, and the first audio data is sent by an external audio acquisition device which establishes communication connection with electronic equipment.
The audio acquisition device can be an audio acquisition device externally connected with the electronic device, and the communication connection can be wired connection or wireless connection. The wireless connection may be any one or more of bluetooth, wifi, infrared laser. The embodiments of the present application are not particularly limited. In the following embodiments, the audio collecting device is an infrared microphone that establishes an infrared connection with the electronic device, and optionally, the infrared microphone is a public address microphone.
As shown in fig. 1, after the infrared microphone collects the sound signal sent by the user, the sound signal is transmitted to the infrared receiving box through the infrared connection, the infrared receiving box transmits the received sound signal to the infrared audio receiving module, the infrared audio receiving module informs the SOC through the GPIO, and receives the sound signal transmitted by the microphone, so that the SOC opens the infrared audio receiving module. The infrared audio receiving module converts an analog sound signal into a normal analog sound signal, in other words, the infrared audio receiving module inputs the analog sound signal to a Line input (Line in) interface.
As shown in fig. 7, after receiving the analog sound signal, the Line in interface transmits an analog sound signal, which is a normal analog Audio signal, to an Audio analog-to-digital conversion module (Audio ADC), and the Audio analog-to-digital conversion module performs analog-to-digital conversion on the normal analog Audio signal to obtain first Audio data. Wherein the first audio data refers to a sound signal input by an infrared microphone represented in digital form.
S102, controlling the first audio data to be directly transmitted to an output buffer area through the DMA unit without passing through the sound card.
The DMA technology is an important technology for fast data exchange in a digital signal processor (DIGITAL SIGNAL Process, DSP), has background batch data transmission capability independent of a CPU, and can meet the high-speed data transmission requirement in real-time data processing.
As shown in fig. 7, the DMA data interaction module is utilized to directly transfer the first audio data to an output buffer (output buffer). Specifically, after the DMA data interaction module is controlled to directly read the first audio data from the audio input buffer zone, the first audio data is directly transmitted to the output buffer zone through the DMA data interaction module, the first audio data does not pass through the sound card output buffer zone any more, the transmission efficiency of the DMA technology is high, the transmission time is quick, and therefore the time delay between the SOC of the audio data and the loudspeaker is reduced, and no matter how close the person is to the display device, the speaking speed is high, and the time delay is not felt.
Further, the first audio data is controlled to be directly transferred to the output buffer area through the DMA unit without passing through the mixer and the sound card.
As shown in fig. 7, after the DMA data interaction module is controlled to directly read the first audio data from the audio input buffer, the first audio data is directly transmitted to the output buffer through the DMA data interaction module, and the first audio data is not transmitted to the output buffer through the mixer and the sound card, so that the delay of the first audio data in the SOC chip can be further reduced.
S103, controlling the multimedia interface to acquire second audio data.
The multimedia interface refers to an interface for acquiring multimedia resources, where the multimedia resources may include audio or audio and video, and in the embodiment of the present application, only the audio resources transmitted by the multimedia interface are processed, and the processing manner of the video resources received by the multimedia interface is not limited in detail.
The multimedia interface may be a high-definition multimedia interface (High Definition Multimedia Interface, HDMI) and/or an MM interface, as shown in fig. 7, where the HDMI interface transmits an audio resource to the HDMI receiving (HDMI RECEIVE) module, and the HDMI RECEIVE module receives the audio resource transmitted by the HDMI interface, and then transmits the audio resource to an audio resource decoder (decoder), where the audio resource decoder decodes the audio resource to obtain the first audio data. The MM interface transmits the audio resource to a demultiplexer (Demux), the Demux receives the audio resource transmitted by the MM interface, and then transmits the audio resource to an audio resource decoder (decoder), and the audio resource decoder decodes the audio resource to obtain first audio data.
If only one of the HDMI interface and the MM interface receives the audio resource, the audio resource received by the interface receiving the audio resource is converted and then used as second audio data. For example: and the HDMI receives the audio resource, and if the MM interface does not receive the audio resource, the audio resource received by the HDMI is converted and then used as second audio data. And the following steps: and the MM interface receives the audio resources, and the HDMI interface does not receive the audio resources, so that the audio resources received by the MM interface are converted and then used as second audio data.
If both the HDMI interface and the MM interface receive audio resources, one of the two second audio data is selected as final second audio data through a resource selector (source celect) shown in FIG. 7.
If the HDMI interface and the MM interface both receive audio resources, the audio resources are transmitted from the two second audio data to the mixer through the resource selector (source celect) shown in fig. 7, and the mixer is controlled to mix the two second audio data, and then the mixed audio data is used as final second audio data.
S104, controlling the second audio data to be transmitted to the output buffer area through the sound card.
Sound cards (Sound cards), also called audio cards, are the most basic component of a computer multimedia system, and are hardware for implementing Sound wave/digital signal interconversion. The basic function of the sound card is to convert the original sound signals from a microphone, a magnetic tape, a compact disk and output the converted signals to acoustic devices such as headphones, speakers, a loudspeaker, a recorder and the like. The Sound Card is a Sound Card device that processes Sound data coming in from the front end mixer, such as Sound effects, volume, silence, etc.
Further, the second audio data is controlled to pass through the mixer and then transmitted to the output buffer area through the sound card.
As shown in fig. 7, the sound card processor includes an automatic volume controller (Auto Volume Control, AVC), dolby panoramic sound module (Dolby atm), graphic equalizer (graphic equalizer, GEQ), equalizer (balance), mute controller, convolution processor (volume), and the like.
In the embodiment of the application, the second audio data acquired through the multimedia interface is still transmitted to the output buffer area through the original sound card processor.
S105, controlling the first audio data and the second audio data to carry out audio mixing processing in the output buffer area to obtain target audio data.
After the steps S101 to S104, the first audio data collected by the external audio collection device and the second audio data received by the multimedia interface are both in the output buffer. The mixing process refers to integrating audio data from multiple sources into a stereo or mono track. In the embodiment of the application, a specific method for the audio mixing processing is not limited.
And mixing the first audio data and the second audio data in the output buffer area to obtain target audio data.
And S106, transmitting the target audio data to a loudspeaker, wherein the loudspeaker is used for playing the target audio data.
As shown in fig. 7, the target audio data output from the output buffer area sequentially passes through an integrated circuit built-in audio bus (I2S), and is transmitted to a speaker after being amplified by the digital power amplifier module. The speaker plays the target audio data so that the user can hear the sound.
The embodiment of the application provides a control method for reducing audio delay, which comprises the following steps: the method comprises the steps that a control line input interface obtains first audio data, and the first audio data are sent by an external audio acquisition device which establishes communication connection with electronic equipment; controlling the first audio data to be directly transmitted to an output buffer area through a DMA unit without passing through a sound card; controlling a multimedia interface to acquire second audio data; controlling the second audio data to be transmitted to an output buffer area through the sound card; controlling the first audio data and the second audio data to carry out audio mixing processing in an output buffer area to obtain target audio data; the target audio data is transmitted to a speaker, which is used to play the target audio data. Because the first audio data transmitted from the external audio acquisition equipment is not transmitted to the output buffer zone through the original audio mixer and the sound card processor, the DMA technology is high in transmission efficiency and quick in transmission time, and therefore the delay between the SOC and the loudspeaker of the audio data is reduced, and the delay is not felt no matter how close the person is to the display equipment and the speaking speed is high.
The whole flow of the method for controlling audio delay in the above embodiment is described, and in the process of controlling audio delay, the use of the internal resource of the soc chip is involved.
It should be noted that, both application and release of the memory resource need to be implemented in the audio input buffer, so when the first audio data and/or the second audio data are detected to be input into the electronic device, the audio input buffer is created; after the control line input interface acquires the first audio data, the first audio data is cached in an audio input cache area; reading first audio data from the audio input buffer area, and controlling the first audio data to be directly transmitted to the output buffer area through the DMA unit without passing through the sound card; after the multimedia interface is controlled to acquire second audio data, the second audio data are cached in an audio input cache area; and reading the second audio data from the audio input buffer area and controlling the second audio data to be transmitted to the output buffer area through the sound card.
The detection of the audio data input to the electronic device may be the detection of an input of an infrared MIC sound signal or the detection of the multimedia interface being input by the second audio data. In other words, an input of an external red MIC sound signal is detected, or the multimedia interface is detected as being input by the second audio data, creating an audio input buffer.
The audio input buffer is applied for use according to an input audio resource (audio source) type, such as HDMI or ADC.
Specifically, when the multimedia interface inputs the second audio data, the input audio signal source is selected as HDMI or multimedia, and at the moment, an audio input buffer area is applied for use, and the second audio data is cached in the audio input buffer area; and reading the second audio data from the audio input buffer area and controlling the second audio data to be transmitted to the output buffer area through the sound card of the sound mixer.
When the external red MIC inputs first audio data, an input audio signal source is selected as an ADC, and an audio input buffer area is applied for buffering the first audio data in the audio input buffer area; and reading the first audio data from the audio input buffer area, and controlling the first audio data to be directly transmitted to the output buffer area through the DMA unit without passing through the sound card.
The embodiment of the application provides a use condition of resources when first audio data are processed inside a soc chip. As shown in fig. 8, the flow of the processing of the first audio data mainly includes the steps of:
s201, if the audio acquisition device is detected to establish communication connection with the electronic device, applying for using an audio input buffer area, and creating a line input interface in the audio input buffer area.
After the electronic equipment is started, an infrared MIC detection thread is established, and whether the electronic equipment is accessed by the infrared MIC is polled; and if the infrared MIC is switched from the disconnection state to the access of the electronic equipment, determining that the audio acquisition equipment and the electronic equipment are in communication connection.
Further, it is determined whether an Audio Input (Audio Input) class has been created, if a Audio Inpu class has been created, a line Input interface is directly created in the Audio Input class, if the Audio Input class has not been created, the Audio Input class is first applied to be created, and after the Audio Input class is successfully created, a line Input interface (line in) is created in a Audio Inpu class for receiving first Audio data sent by an Audio acquisition device.
S202, creating a first audio track in an audio input buffer.
Tracks refer to parallel "tracks" in an audio processor. Each track defines properties of the track, such as the timbre, timbre library, channel number, input/output port, volume, etc. of the track. For carrying audio related information. The first audio track refers to an audio track for carrying first audio data.
And creating a first audio track according to the audio track configuration file existing in the SOC chip, wherein the first audio track is a low-delay audio track.
S203, establishing a relation between the line input interface and the first audio track.
S204, bearing the first audio data received by the line input interface on the first audio track.
The line input interface is coupled to the first audio track such that the first audio data received by the line input interface may be imported onto the first audio track.
S205, starting a DMA function.
The audio acquisition device does not transmit the first audio data, i.e. when the line input interface does not receive the line first audio data, the DMA function is in a closed state, i.e. other data content is not transmitted using the DMA technology.
S206, reading the first audio data carried on the first audio track from the audio input buffer area, and controlling the first audio data to be directly transmitted to the output buffer area through the DMA unit without passing through the sound card.
And sending the first audio data in the first audio track (namely the low-delay audio track) to an output buffer area of the SOC chip through DMA, completing audio mixing with the second audio data in the front sound card in the output buffer area, obtaining mixed target audio data, and transmitting the target audio data to a loudspeaker.
Further, if the second audio data is not transferred to the output buffer in the front sound card, the first audio data in the output buffer is transferred to the speaker as target audio data.
The embodiment of the application provides a resource release condition when first audio data are processed in a soc chip. As shown in fig. 9, the flow of the processing of the first audio data mainly includes the steps of:
And S301, if the fact that the audio acquisition device is disconnected from the electronic device is detected, disconnecting the connection between the line input interface and the first audio track.
After the electronic equipment is started, an infrared MIC detection thread is established, and whether the electronic equipment is accessed by the infrared MIC is polled; if the infrared MIC is switched from the access electronic device to the disconnection state, or the infrared MIC is not accessed to the electronic device, determining that the audio acquisition device is detected to be disconnected from the communication with the electronic device.
And after the infrared MIC is switched from the access electronic equipment to the disconnection state, or the infrared MIC is not accessed to the electronic equipment, disconnecting the connection between the line input interface and the first audio track.
S302, releasing the first audio track and the line input interface.
Releasing the first track may be understood as destroying the already created first track, releasing the line-in interface may be understood as destroying the already created line-in interface. In other words, the memory resources occupied by the first audio track and the line input interface are released and recovered, so that the effective utilization and release of the memory resources are realized, and the utilization rate of the memory resources is improved.
S303, closing the DMA function.
The DMA function is turned off, i.e. the first audio data is transferred without using DMA technology.
And S304, after the DMA function is closed, if the multimedia interface is continuously provided with the second audio data input, controlling the second audio data to be transmitted to the output buffer area through the sound card.
And S305, controlling the output buffer area to send the second audio data to the loudspeaker as target audio data.
Since the infrared MIC is switched from the access electronic device to the disconnection state, or the infrared MIC is never accessed to the electronic device, it means that the infrared MIC no longer inputs sound signals, and if the second audio data is normally transmitted from the sound card to the output buffer at this time, the second audio data in the output buffer is transmitted as target audio data to the speaker.
Because the infrared MIC is switched from the access electronic equipment to the disconnection state, or the infrared MIC is never accessed to the electronic equipment, the infrared MIC is not input with sound signals any more, and if the second audio data are not transmitted to the output buffer zone in the sound card, the SOC chip is not used for processing the audio data.
Fig. 10 is a schematic flow chart of a second audio data processing according to an embodiment of the present application; as shown in fig. 10, the flow of the processing of the second audio data mainly includes the steps of:
s401, applying for using an audio input buffer area, and creating a multimedia interface in the audio input buffer area; a second audio track is created in the audio input buffer.
After the electronic device receives the sound signal, the Audio Input class is applied to be created, and after the Audio Input class is successfully created, a second Audio track is created in the Audio Inpu class, wherein the second Audio track is used for carrying second Audio data. And creating a second audio track according to the audio track configuration file existing in the SOC chip, wherein the second audio track is the main audio track.
S402, connecting the multimedia interface with the second audio track.
S403, bearing the second audio data received by the multimedia interface on a second audio track.
The multimedia interface is coupled to the second audio track such that the second audio data received by the multimedia interface may be imported onto the second audio track.
S404, reading the second audio data carried on the second audio track from the audio input buffer area, and controlling the second audio data to be transmitted to the output buffer area through the sound card.
If the infrared MIC has the input first audio signal, the first audio data and the second audio data output buffer zone are mixed in the output buffer zone to obtain target audio data, and the target audio data are transmitted to a loudspeaker.
If the infrared MIC does not input the first audio signal, the output buffer is controlled to transmit the second audio data as target audio data to the speaker.
In the process of processing the second audio data, the use condition of the memory resource is described in S401-S404, and in the process of processing the second audio data, the release condition of the memory resource is described in steps S405-S406.
S405, switching from the second audio data input to the second audio data input at the multimedia interface, and disconnecting the multimedia interface from the second audio track.
After the multimedia interface is switched from audio data to audio data, the multimedia interface is indicated to have no audio data input any more, and the audio data is not required to be processed, so that the multimedia interface and the second audio track are disconnected.
S406, releasing the second audio track and the multimedia interface.
Releasing the second track may be understood as destroying the already created second track. In other words, the memory resources occupied by the second audio track are released and recovered, so that the effective utilization and release of the memory resources are realized, and the utilization rate of the memory resources is improved. Releasing the multimedia interface can be understood as destroying the created multimedia interface, further improving the utilization of the memory resources.
When the first audio data is not input by the infrared MIC and the second audio data is not input by the multimedia interface, the audio input buffer is released after the resource release flow shown in fig. 9 and the resource release flow executed in S405-S406 in fig. 10 are executed, so as to further release the memory resource and further improve the utilization rate of the memory resource.
On the basis of the above embodiment, the Audio Input of the line Input interface and the Audio Input of the multimedia interface are turned off, and the created Audio Input resource needs to be released, and the Audio Input of the line Input interface and the Audio Input of the multimedia interface are turned off. If the infrared MIC is used next, then the Audio Input resource needs to be reapplied for establishment, and then the Audio Input of LineIn is applied for use.
As shown in fig. 11, another control method for reducing audio delay according to the embodiment of the present application mainly includes the following procedures.
S501, when the multimedia interface is switched from the second audio data input to the second audio data input, and the line input interface continuously has the first audio data input, the connection between the line input interface and the first audio track is disconnected.
In the case where the second audio data inputted by the multimedia interface is switched from the presence to the absence, but the infrared MIC continuously inputs the first audio data, it is necessary to release all of the related resources of the first audio data and the related resources of the second audio data.
S502, releasing the first audio track and the line input interface.
S503, turning off the DMA function.
The execution flow of S501-S503 provided in the embodiment of the present application is the same as that of S301-S303 provided in the above embodiment, and specific reference may be made to the description in the above example, which is not repeated in the embodiment of the present application.
S504, releasing the second audio track and the multimedia interface.
In the embodiment of the application, the multimedia interface is disconnected from the second audio track, and the second audio track is released
The execution flow of S504 provided in the embodiment of the present application is the same as that of S405 to S406 provided in the above embodiment, and specific reference may be made to the description in the above example, which is not repeated.
S505, releasing the audio input buffer.
After the execution of S501-S503 finishes releasing the relevant resources of the first audio data, and the execution of S504 finishes releasing the relevant resources of the second audio data, the audio input buffer is released.
S506, a new audio input buffer is recreated.
After the audio input buffer is released, since the infrared MIC continues to input the first audio data, memory resources are also required to process the first audio data, and thus a new audio input buffer needs to be re-created.
S507, creating a line input interface and a first audio track in the new audio input buffer.
S508, establishing a relation between the line input interface and the first audio track.
S509, bearing first audio data stored in resources corresponding to the line input interface on a first audio track.
S510, starting a DMA function.
S511, reading first audio data carried on the first audio track from the audio input buffer area, and controlling the first audio data to be directly transmitted to the output buffer area through the DMA unit without passing through the sound card;
The execution flow of S507-S511 provided in the embodiment of the present application is the same as that of S201-S306 provided in the above embodiment, and specific reference may be made to the description in the above example, which is not repeated.
And S512, controlling the output buffer zone to send the first audio data to the loudspeaker as target audio data.
In the case that the second audio data input by the multimedia interface is switched from the presence to the absence, but the first audio data is continuously input by the infrared MIC, the output buffer zone sends the first audio data as target audio data to the loudspeaker, and the loudspeaker plays the first audio data.
On the basis of the above embodiment, the Audio Input of the line Input interface and the Audio Input of the multimedia interface are turned off, and the created Audio Input resource needs to be released. If the line Input interface is turned off, but the multimedia interface is used next, the Audio Input resource needs to be reapplied and the Audio Input using the multimedia interface is reapplied. As shown in fig. 12, another control method for reducing audio delay according to the embodiment of the present application mainly includes the following procedures.
S601, switching the line input interface from the first audio data input to the first audio data input, and disconnecting the line input interface from the first audio track when the multimedia interface continues to have the second audio data input.
In the case where the first audio data inputted by the infrared MIC is switched from the presence to the absence, but the multimedia interface continuously inputs the first audio data, it is necessary to release all of the related resources of the first audio data and the related resources of the second audio data.
S602, releasing the first audio track and the line input interface.
S603, turning off the DMA function.
S604, releasing the second audio track and the multimedia interface.
S605, releasing the audio input buffer.
The execution flow of S602 to S605 provided in the embodiment of the present application is the same as that of S502 to S505 provided in the above embodiment, and specific reference may be made to the description in the above example, and the embodiment of the present application is not repeated.
S606, recreating a new audio input buffer.
After releasing the audio input buffer, a new audio input buffer needs to be re-created because the multimedia interface continues to input the second audio data and memory resources are needed to process the second audio data.
S607, creating a multimedia interface and a second audio track in the new audio input buffer.
S608, establishing a relationship between the multimedia interface and the second audio track.
S609, the second audio data received by the multimedia interface is carried on the second audio track.
S610, reading the second audio data carried on the second audio track from the audio input buffer, and controlling the second audio data to be transmitted to the output buffer through the sound card.
The execution flow of S607-S611 provided in the embodiment of the present application is the same as that of S401-S405 provided in the above embodiment, and specific reference may be made to the description in the above example, which is not repeated.
S611, controlling the output buffer to send the second audio data as target audio data to the speaker.
And under the condition that the first audio data input by the infrared MIC is switched from the presence to the absence, but the multimedia interface continuously inputs the first audio data, the output buffer zone is controlled to send the second audio data as target audio data to the loudspeaker, and the loudspeaker plays the first audio data.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the application.
The foregoing description, for purposes of explanation, has been presented in conjunction with specific embodiments. The illustrative discussions above are not intended to be exhaustive or to limit the embodiments to the precise forms disclosed above. Many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles and the practical application, to thereby enable others skilled in the art to best utilize the embodiments and various embodiments with various modifications as are suited to the particular use contemplated.
Claims (10)
1. An electronic device, the electronic device comprising: a speaker and a processor, the processor comprising: the system comprises a multimedia interface, a line input interface, a sound card, a Direct Memory Access (DMA) unit and an output buffer area;
A speaker configured to: playing the target audio data;
A processor configured to: controlling the line input interface to acquire first audio data, wherein the first audio data is transmitted by an external audio acquisition device which establishes communication connection with the electronic device;
controlling the first audio data to be directly transmitted to an output buffer area through the DMA unit without passing through a sound card;
controlling the multimedia interface to acquire second audio data;
Controlling the second audio data to be transmitted to an output buffer area through the sound card;
Controlling the first audio data and the second audio data to carry out audio mixing processing in the output buffer area to obtain target audio data;
the target audio data is transmitted to the speaker.
2. The electronic device of claim 1, wherein the processor further comprises: a mixer;
a processor configured to: controlling the first audio data to be directly transmitted to an output buffer area through the DMA unit without passing through a mixer and a sound card;
And after the second audio data is controlled to pass through the mixer, the second audio data is transmitted to an output buffer area through the sound card.
3. The electronic device of claim 1, wherein the processor is configured to:
Creating an audio input buffer when the first audio data and/or the second audio data are detected to be input into the electronic device;
after the line input interface is controlled to acquire first audio data, the first audio data are cached in the audio input cache area;
Reading first audio data from the audio input buffer area, and controlling the first audio data to be directly transmitted to an output buffer area through the DMA unit without passing through a sound card;
after the multimedia interface is controlled to acquire second audio data, the second audio data are cached in the audio input cache area;
and reading the second audio data from the audio input buffer area and controlling the second audio data to be transmitted to an output buffer area through the sound card.
4. The electronic device of claim 3, wherein the processor is configured to:
If the audio acquisition equipment is detected to establish communication connection with the electronic equipment, applying for using the audio input buffer area;
creating a line input interface in the audio input buffer;
creating a first audio track in the audio input buffer;
establishing a relationship between the line input interface and the first audio track;
Bearing first audio data received by the line input interface on the first audio track;
Starting a DMA function;
and reading the first audio data carried on the first audio track from the audio input buffer area, and controlling the first audio data to be directly transmitted to the output buffer area through the DMA unit without passing through a sound card.
5. The electronic device of claim 4, wherein the processor is configured to:
If the audio acquisition device is detected to be disconnected from the electronic device, disconnecting the line input interface from the first audio track;
releasing the first audio track and the line-in interface;
The DMA function is turned off.
6. The electronic device of claim 5, wherein the processor is configured to:
after closing the DMA function, if the multimedia interface is continuously provided with the second audio data input, controlling the second audio data to be transmitted to an output buffer area through the sound card;
And controlling the output buffer to send the second audio data to the loudspeaker as target audio data.
7. The electronic device of claim 3, wherein the processor is configured to:
Applying for use of the audio input buffer;
creating a multimedia interface in the audio input buffer;
Creating a second audio track in the audio input buffer;
connecting the multimedia interface with the second audio track;
bearing second audio data received by the multimedia interface on the second audio track;
And reading second audio data carried on the second audio track from the audio input buffer area, and controlling the second audio data to be transmitted to an output buffer area through the sound card.
8. The electronic device of claim 7, wherein the processor is configured to:
disconnecting a connection between a line input interface and a first audio track in case the multimedia interface switches from having the second audio data input to not having the second audio data input, the line input interface continuing to have the first audio data input;
releasing the first audio track and the line-in interface;
Closing the DMA function;
Releasing the second audio track and the multimedia interface;
Releasing the audio input buffer;
Recreating a new audio input buffer;
creating the line input interface and the first audio track in the new audio input buffer;
establishing a relationship between the line input interface and the first audio track;
carrying the first audio data stored in the resources corresponding to the line input interface on the first audio track;
Starting a DMA function;
reading first audio data carried on the first audio track from the audio input buffer area, and controlling the first audio data to be directly transmitted to an output buffer area through the DMA unit without passing through a sound card;
the output buffer is controlled to send the first audio data as target audio data to the speaker.
9. The electronic device of claim 6, wherein the processor is configured to:
Disconnecting the connection between the line input interface and the first audio track when the line input interface is switched from having the first audio data input to not having the first audio data input and the multimedia interface is continuously having the second audio data input;
releasing the first audio track and the line-in interface;
Closing the DMA function;
Releasing the second audio track and the multimedia interface;
Releasing the audio input buffer;
Recreating a new audio input buffer;
creating the multimedia interface and the second audio track in the new audio input buffer;
establishing a relationship between the multimedia interface and the second audio track;
bearing second audio data received by the multimedia interface on the second audio track;
Reading second audio data carried on the second audio track from the audio input buffer, and controlling the second audio data to be transmitted to an output buffer through the sound card;
And controlling the output buffer to send the second audio data to the loudspeaker as target audio data.
10. A control method for reducing audio delay, wherein the method is applied to an electronic device, and the electronic device comprises: a speaker and a processor, the processor comprising: the system comprises a multimedia interface, a line input interface, a sound card, a Direct Memory Access (DMA) unit and an output buffer area; the method comprises the following steps:
Controlling the line input interface to acquire first audio data, wherein the first audio data is transmitted by an external audio acquisition device which establishes communication connection with the electronic device;
controlling the first audio data to be directly transmitted to an output buffer area through the DMA unit without passing through a sound card;
controlling the multimedia interface to acquire second audio data;
Controlling the second audio data to be transmitted to an output buffer area through the sound card;
Controlling the first audio data and the second audio data to carry out audio mixing processing in the output buffer area to obtain target audio data;
transmitting the target audio data to the loudspeaker, wherein the loudspeaker is used for playing the target audio data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311792825.7A CN117979208A (en) | 2023-12-25 | 2023-12-25 | Electronic device and control method for reducing audio delay |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311792825.7A CN117979208A (en) | 2023-12-25 | 2023-12-25 | Electronic device and control method for reducing audio delay |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117979208A true CN117979208A (en) | 2024-05-03 |
Family
ID=90860558
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311792825.7A Pending CN117979208A (en) | 2023-12-25 | 2023-12-25 | Electronic device and control method for reducing audio delay |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117979208A (en) |
-
2023
- 2023-12-25 CN CN202311792825.7A patent/CN117979208A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9871992B2 (en) | Content output apparatus, mobile apparatus, and controlling methods thereof | |
US8875191B2 (en) | Device for reproducing content and method thereof | |
CN102883214A (en) | Multi-terminal mutual-transmission and mutual-control method and smart television terminal | |
CN113794928B (en) | Audio playing method and display device | |
CN104301657B (en) | A kind of video conference terminal and its secondary flow data cut-in method | |
US11451593B2 (en) | Persistent co-presence group videoconferencing system | |
CN109753259B (en) | Screen projection system and control method | |
CN112313971A (en) | Information processing apparatus, information processing method, and information processing system | |
CN102202206B (en) | Communication equipment | |
US10142576B2 (en) | Control device, sound switching method of control device, and program | |
US20050289613A1 (en) | Control architecture for audio/video (A/V) systems | |
WO2022078065A1 (en) | Display device resource playing method and display device | |
CN115278332A (en) | Display device, playing device and data transmission method | |
WO2024198924A1 (en) | Display device, display system, and audio broadcasting method | |
CN117979208A (en) | Electronic device and control method for reducing audio delay | |
CN114615536B (en) | Display device and sound effect processing method | |
CN115359788A (en) | Display device and far-field voice recognition method | |
CN114615529A (en) | Display device, external device and audio playing method | |
CN112104649A (en) | Multimedia interaction method and device, electronic equipment, server and storage medium | |
KR101067952B1 (en) | Managing System for less traffic in video communication and Method thereof | |
JP2003339034A (en) | Network conference system, network conference method, and network conference program | |
CN220191033U (en) | Headset interface circuit for large-screen display device and large-screen display device | |
EP4418647A1 (en) | Video and audio streaming transmission system | |
CN113129915B (en) | Audio sharing method, device, equipment, storage medium and program product | |
CN114765695B (en) | Live broadcast data processing method, device, equipment and medium |
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 |