[go: up one dir, main page]

WO2017054378A1 - Procédé, appareil et système de traitement de données audio - Google Patents

Procédé, appareil et système de traitement de données audio Download PDF

Info

Publication number
WO2017054378A1
WO2017054378A1 PCT/CN2016/072032 CN2016072032W WO2017054378A1 WO 2017054378 A1 WO2017054378 A1 WO 2017054378A1 CN 2016072032 W CN2016072032 W CN 2016072032W WO 2017054378 A1 WO2017054378 A1 WO 2017054378A1
Authority
WO
WIPO (PCT)
Prior art keywords
audio data
node
played
queue
buffer
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.)
Ceased
Application number
PCT/CN2016/072032
Other languages
English (en)
Chinese (zh)
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.)
Hisense Electric Co Ltd
Original Assignee
Hisense Electric 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 Hisense Electric Co Ltd filed Critical Hisense Electric Co Ltd
Publication of WO2017054378A1 publication Critical patent/WO2017054378A1/fr
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/439Processing of audio elementary streams
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/443OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB

Definitions

  • the present invention relates to the field of information processing technologies, and in particular, to a method, an apparatus, and a system for processing audio data.
  • the captured audio data is stored in a ring buffer manner in the prior art, and then the captured audio data is played.
  • a ring buffer is used to store audio data for storage
  • the write pointer reaches the tail address of the ring buffer, it immediately returns to the start address to continue capturing.
  • the unread audio data is covered by the newly captured data, and further The problem that caused the sound to spread.
  • each captured audio number is copied to another memory space (or a memory pool), and the audio data on the copied memory space is read and played.
  • the solution using the memory pool also introduces a series of other problems: a memory space needs to be opened for storing or backing up data separately, and frequent memory copying actions are also to some extent.
  • the system performance is reduced, the operation process is complicated, and the maintenance of each data in the newly opened memory space increases the complexity of the system design and is not easy to maintain.
  • Embodiments of the present invention provide a method, an apparatus, and a system for processing audio data. It is used to avoid the problem that the audio data to be played will not be overwritten while setting the memory pool.
  • an embodiment of the present invention provides a method for processing audio data, including:
  • the information control node to be configured of the unit data is unloaded from the first queue, and the unloaded information control node to be configured is configured, and the configured information control node includes the audio data to be played.
  • Attribute information the first queue includes at least one information control node to be configured;
  • Linking the configured information control node to the second queue and the third queue, the second queue and the third queue are both used to manage the configured information control node;
  • the attribute information of the to-be-played audio data in the node is controlled according to the unconfigured configured information, and the corresponding audio data to be played is read;
  • the offloaded configured information control node is linked to a fourth queue for managing an information control node that has played audio data.
  • an apparatus for processing audio data including:
  • a node unloading unit configured to: when the triggering instruction is received, uninstall the information control node of the unit data to be configured from the first queue, and configure the unconfigured information control node to be configured, and the configured information control node Attribute information including audio data to be played, the first queue includes at least one information control node to be configured;
  • a node linking unit configured to link the configured information control node to the second queue and the third queue, where the second queue and the third queue are both used to manage the configured information control node;
  • the node unloading unit is configured to uninstall the configured information control node of the unit data from the third queue;
  • a reading unit configured to control attribute information of the to-be-played audio data in the node according to the unconfigured configured information, and read corresponding audio data to be played;
  • the node linking unit is further configured to link the uninstalled configured information control node to a fourth queue, where the fourth queue is used to manage information of played audio data. Control node.
  • an embodiment of the present invention provides a processing system for audio data, including:
  • An input module configured to receive audio data input by multiple television channels
  • a path switching module for switching different television channels
  • An audio capture module for capturing audio data of different paths
  • the control reading module includes:
  • a node unloading unit configured to: when the triggering instruction is received, uninstall the information control node of the unit data to be configured from the first queue, and configure the unconfigured information control node to be configured, and the configured information control node Attribute information including audio data to be played, the first queue includes at least one information control node to be configured;
  • a node linking unit configured to link the configured information control node to the second queue and the third queue, where the second queue and the third queue are both used to manage the configured information control node;
  • the node unloading unit is configured to uninstall the configured information control node of the unit data from the third queue;
  • a reading unit configured to control attribute information of the to-be-played audio data in the node according to the unconfigured configured information, and read corresponding audio data to be played;
  • the node linking unit is further configured to link the uninstalled configured information control node to a fourth queue, where the fourth queue is used to manage an information control node that has played audio data;
  • the system further includes an audio post-processing module for performing preset sound processing on the audio data read by the reading unit;
  • an audio playing module configured to play audio data processed by the audio post-processing module.
  • An embodiment of the present invention provides a method, an apparatus, and a system for processing audio data.
  • a first queue for managing an information control node to be configured when the threshold interrupt is triggered, the unit data is unloaded from the first queue.
  • the information control node to be configured controls the unloaded information to be configured according to the audio data to be played captured when the threshold is interrupted.
  • the node is configured to link the configured information control node to the second queue and the third queue for managing the configured information control node, and when the third queue is not empty, the unit data is unloaded from the third queue.
  • the configured information control node controls the attribute information of the audio data to be played in the node according to the unconfigured configured information, plays the corresponding audio data to be played, and links the uninstalled configured information control node to the managed audio data.
  • the fourth queue of the information control node Through the form of the queue, the attribute information of the played audio data can be configured in real time, and the audio data to be played and the played audio data are separately managed, and at the same time, the node is controlled according to the configured information, and the corresponding audio data to be played is read. There is no need to copy the audio data to be played to another memory space as in the prior art, and read the problem caused by the audio data to be played on the copied memory space.
  • the audio data to be broadcasted is not covered, the development and use of the memory space used for backup is omitted, and the influence of frequent memory copy on system performance is eliminated, and the effect is eliminated.
  • the memory alignment action simplifies the operation process, circumvents the complexity of the memory pool implementation, management, and maintenance, and simplifies the design.
  • the embodiment of the present invention avoids setting the memory pool while preventing the audio data to be played from being overwritten. .
  • FIG. 1 is a schematic flowchart 1 of a method for processing audio data according to an embodiment of the present invention
  • FIG. 2 is a schematic flowchart 2 of a method for processing audio data according to an embodiment of the present invention
  • FIG. 3 is a schematic flowchart 3 of a method for processing audio data according to an embodiment of the present disclosure
  • FIG. 4 is a schematic diagram of a first buffer corresponding to WDMA according to an embodiment of the present invention.
  • FIG. 5 is a schematic diagram 1 of audio data between a read pointer and a write pointer in a first buffer according to an embodiment of the present invention
  • FIG. 6 is a schematic diagram 2 of audio data between a read pointer and a write pointer in a first buffer according to an embodiment of the present invention
  • FIG. 7 is a schematic diagram of interaction between a third queue and a fourth queue according to an embodiment of the present invention.
  • FIG. 8 is a schematic diagram of a second buffer corresponding to WDMA according to an embodiment of the present disclosure.
  • FIG. 9 is a schematic structural diagram 1 of an apparatus for processing audio data according to an embodiment of the present disclosure.
  • FIG. 10 is a schematic structural diagram 2 of an apparatus for processing audio data according to an embodiment of the present disclosure.
  • FIG. 11 is a schematic structural diagram of a system for processing audio data according to an embodiment of the present invention.
  • An embodiment of the present invention provides a method for processing audio data, as shown in FIG. 1 , including:
  • Step 101 When receiving the triggering instruction, uninstall the information control node of the unit data to be configured from the first queue, and configure the unloaded information control node to be configured, where the configured information control node includes the audio data to be played. Attribute information.
  • the first queue is used to manage the information control node to be configured, and the first queue includes at least one information control node to be configured.
  • the queue is a special kind of linear table, which only allows the deletion operation at the front end of the table, and the insertion operation at the back end of the table.
  • the end that performs the insert operation is called the tail of the team, and the end that performs the delete operation is called the head of the team.
  • the queue is also called the "first in, first out" linear table. Queues can be stored using a linear table or stored in a linked list.
  • the embodiment of the present invention is exemplified in the case that the queue is stored by using a linked list.
  • the linked list is a non-contiguous, non-sequential storage structure on the physical storage unit, and the logical order of the data elements is implemented by the pointer linking order in the queue.
  • a linked list consists of a series of nodes (each element in the list is called a node (a node can also be called a node)), and the node can be dynamically generated at runtime.
  • each node consists of two parts: one is the data field in which the data element is stored (the domain name is data), and the other is the pointer field storing the next node address (the domain name is next), which is stored in the pointer field.
  • Information is also known as a pointer or chain.
  • the use of a linked list structure can make full use of the computer memory space to achieve flexible memory dynamic management.
  • the first queue in the embodiment of the present invention is used to manage the information control node to be configured.
  • N information control nodes may be allocated and inserted into the first queue by using the tail insertion method, where N is greater than or equal to 1.
  • the configured information control node includes attribute information of the audio data to be played. That is to say, the unloaded information control node is configured according to the corresponding to-be-played audio data when the triggering instruction is received, and the configured information control node includes the attribute information of the audio data to be played.
  • the triggering command may be a threshold interrupting instruction, or may be another operation capable of implementing the triggering action, so as to perform a subsequent step according to the triggering operation.
  • Step 102 Link the configured information control node to the second queue and the third queue.
  • the second queue and the third queue are both used to manage the configured information control node. For the second queue and the third queue, it can be set to null at initialization.
  • Step 103 Unload the configured information control node of the unit data from the third queue.
  • the configured information control node of the unit data is unloaded from the queue head of the third queue.
  • Step 104 Control audio data to be played in the node according to the configured information of the uninstallation.
  • the attribute information reads the corresponding audio data to be played.
  • Step 105 Link the uninstalled configured information control node to the fourth queue.
  • the fourth queue is used to manage the information control node of the played audio data.
  • the unit data to be configured is unloaded from the first queue.
  • the information control node configures the unloaded information control node to be unloaded according to the audio data to be played captured when the threshold is interrupted, and links the configured information control node to the second queue for managing the configured information control node and In the third queue, when the third queue is not empty, the configured information control node that unloads the unit data from the third queue controls the attribute information of the audio data to be played in the node according to the unconfigured configured information, and plays corresponding information.
  • the audio data to be played is then linked to the unloaded configured information control node to the fourth queue of the information control node managing the played audio data.
  • the attribute information of the played audio data can be configured in real time, and the audio data to be played and the played audio data are separately managed, and at the same time, the node is controlled according to the configured information, and the corresponding audio data to be played is read.
  • the audio data to be broadcasted is not covered, the development and use of the memory space used for backup is omitted, and the influence of frequent memory copy on system performance is eliminated, and the effect is eliminated.
  • the memory alignment action simplifies the operation process, circumvents the complexity of the memory pool implementation, management, and maintenance, and simplifies the design.
  • the embodiment of the present invention avoids setting the memory pool while preventing the audio data to be played from being overwritten. .
  • the embodiment of the present invention provides a specific implementation manner, as shown in FIG. 2, including:
  • Step 201 Set a first queue, a second queue, a third queue, and a fourth queue.
  • the first queue is used to manage the information control node to be configured
  • the second queue and the third queue are used to manage the configured information control node
  • the fourth queue is used to manage the information control node of the played audio data.
  • the first queue is called The tobe_pushed queue
  • the second queue is called the pushed queue
  • the third queue is called the tobe_played queue
  • the fourth queue is called the played queue.
  • N information control nodes are allocated, and are inserted into the tobe_pushed queue by the tail insertion method, N is greater than or equal to 1; the pushed queue, the tobe_played queue, and the played queue are initialized when empty.
  • the setting of the first queue, the second queue, the third queue, and the fourth queue may be set at the same time of initialization, or may be set when needed. At the same time, the setting is performed at the same time as the initialization.
  • Step 202 Capture the audio data to be played by using direct memory write WDMA.
  • the Write Direct Memory Access corresponds to the first buffer, and the first buffer includes a read pointer and a write pointer.
  • the first buffer is a Ring Buffer
  • the ring buffer includes a write pointer (wpt) and a read pointer (rpt).
  • Wpt indicates that the captured audio data is stored in the Ring Buffer
  • rpt indicates that the read audio data is stored in the Ring Buffer. Therefore, WDMA's audio capture and processing work is mainly done by its write pointer and read pointer. Among them, the write pointer is mainly maintained by the WDMA itself, and the read pointer is mainly controlled by the CPU.
  • FIG. 4 is a schematic diagram showing the logical relationship between wpt, rpt of WDMA and Ring Buffer maintained by the WDMA.
  • st_addr(start address) indicates the starting address (or the first address) of the Ring Buffer
  • end indicates the tail address of the Ring Buffer.
  • both wpt and rpt are 0, which is equivalent to the starting address of the corresponding Ring Buffer.
  • WDMA captures the audio data of the path in which it is located, the captured audio data is stored from the starting address of wpt.
  • the buffer is a ring buffer
  • wpt reaches the tail address of the Ring Buffer
  • Automatically jump to the first address of Ring Buffer continue to store audio data from the starting position of Ring Buffer, so that the storage space of captured audio data can be managed by Ring Buffer, which can effectively solve the problem of wasted memory space for capture.
  • the time limit of audio capture is also canceled, and audio capture with unlimited length of time is supported.
  • Step 203 Detect whether the difference between the write pointer and the read pointer in the first buffer is greater than Or equal to the first preset threshold.
  • the first preset threshold is smaller than the length of the first buffer.
  • the size of the first preset threshold may be set according to the length of the Ring Buffer. For example, if the length of the Ring Buffer is N*M, the first preset threshold may be set to M, that is, the first buffer corresponding to the WDMA is divided into N buffers of a first preset threshold length.
  • the same number (ie, N) of information control nodes can be allocated, and linked to the tobe_pushed queue by tail insertion.
  • Step 204 If it is detected that the difference between the write pointer and the read pointer in the first buffer is greater than or equal to the first preset threshold, triggering the threshold interrupt to generate a trigger instruction.
  • Step 205 Unload the information control node of the unit data to be configured from the first queue according to the triggering instruction, and configure the unloaded information control node to be configured.
  • step 205 specifically includes the following sub-steps:
  • the information control node to be configured mainly includes the following information: a path, such as ATV Demod, AV, Component, VGA or HDMI; number of channels, such as 8-channel, 6-channel, 2-channel, etc.; sampling rate, Such as 32Khz, 35.15625Khz, 48Khz, etc.; the starting address of the audio data to be played; the data length of the audio data to be played.
  • a path such as ATV Demod, AV, Component, VGA or HDMI
  • number of channels such as 8-channel, 6-channel, 2-channel, etc.
  • sampling rate Such as 32Khz, 35.15625Khz, 48Khz, etc.
  • the starting address of the audio data to be played the data length of the audio data to be played.
  • the data structure of the information control node to be configured can be defined as follows:
  • Int channel_num / / number of channels, such as 8 channels, 6 channels, 2 channels
  • the data structure of the information control node to be configured may be deleted or added according to the actual required information to meet the actual needs of the user.
  • the offloaded information control node Configure, according to the to-be-played audio data from the read pointer to the write pointer in the first buffer, the offloaded information control node to be configured.
  • the first buffer is a ring buffer
  • the write pointer is larger than the read pointer and the write pointer is smaller than the read pointer.
  • FIG. 5 is a case where the write pointer is larger than the read pointer
  • the audio data from the read pointer to the write pointer is [rpt, wpt].
  • the unloaded information control node is configured according to the to-be-played audio data from the read pointer to the write pointer in the first buffer, and the configured information control node includes the to-be-played Attribute information of audio data.
  • Step 206 Link the configured information control node to the second queue and the third queue.
  • the configured information control node includes the attribute information of the audio data to be played, that is, the configured information control node includes the corresponding start address of the audio data to be played, the length of the audio data to be played, and of course, the configured
  • the information control node can also include the path, sampling rate, number of channels, and the like.
  • the received configured information control node is chained to the tail of the queue and the tail of the tobe_played queue. among them, The tail of the queue that links the received configured information control node to the tobe_played queue is delivered through the deliver interface. At the same time, the configured information control node in the pushed queue still exists.
  • Step 207 Unload the configured information control node of the unit data from the third queue.
  • step 207 before performing step 207, first determine whether the tobe_played queue is empty. If it is empty, continue to the newly-configured information control node of the to-be-played audio data of the chain (as shown by new_tobe_played_data in FIG. 7). ) to the end of the tobe_played queue (shown as tobe_played_tail in Figure 7); if not empty, control the node from the configured information of the unchain unit data in the third queue, specifically from the queue header of the tobe_played queue (such as 7) Tobe_played_head shows the configured information control node of the unchain unit data.
  • the unit data is preferably an information control node, and the audio data to be played corresponding to the information control node may also be referred to as a piece of data.
  • Step 208 Configure, according to the uninstalled configured information control node, a configuration node in a second buffer corresponding to the direct memory read RDMA.
  • audio data from multiple channels may be stored in a first buffer (ie, an audio buffer), and audio data in the audio buffer belongs to audio data to be played.
  • RDMA Read Direct Memory Access
  • the RDMA is actually reading the DMA, and the DMA is convenient for communication between different hardware devices. Without relying on a large amount of interrupt load on the CPU.
  • the RDMA has a corresponding second buffer buffer, and the second buffer buffer includes a write pointer (wpt), a read pointer (rpt), and a plurality of configuration node items, each configuration node. Item has control information.
  • RDMA's audio data reading work is mainly controlled by its write pointer and read pointer.
  • the write pointer is mainly controlled by the CPU, and the read pointer is maintained by the RDMA itself.
  • an integrated circuit can implement its corresponding buffer buffer as a ring buffer, in which a ring A buffer is a data structure used to represent a fixed-size, head-to-tail buffer that is suitable for caching data streams.
  • a useful feature of a ring buffer is that its storage space can be recycled.
  • the ring buffer can be implemented as a configuration node item, and the item is mainly used to control RDMA to read audio data, wherein each item is composed of 64 bits, and the first 32 bits, That is, the first word is the start address parameter start address (abbreviated as st_addr), pointing to the physical address of the PCM audio data to be read by the RDMA to be stored in the memory; the second 32 bits, that is, the second word, mainly including the length parameter Length member, the length represents the length of the PCM audio data to be read.
  • the relationship between the RDMA write pointer, the read pointer, and the configuration node of the ring buffer is shown in Figure 8.
  • the read pointer points to the item that has been configured and is to be read in the ring buffer, and the write pointer points to the ring.
  • the number of items in the ring buffer is determined by the CPU, and the control information of each item's start address and lengh is also updated by the CPU in real time.
  • step 208 specifically includes the following sub-steps:
  • two ways can be used to determine the target item. One is to read the register corresponding to wpt, and the corresponding item information is stored in the register; the second is to implement the RDMA item (if 20) as a structure.
  • the body array through the index corresponding to the array wpt, can obtain the target item at the location of wpt.
  • the embodiment of the present invention configures the first word (ie, the starting address parameter) of the target configuration node item to point to the physical address of the DDR where the audio data to be broadcasted is located, and then
  • the second word of the item ie, the length parameter
  • the length can be a multiple of 128 bytes required by the hardware.
  • the read pointer has a readable item, thereby ensuring that the write is not fast (ie, the CPU configures the RDMA item and updates its wpt).
  • the slow read ie RDMA reads the specified address corresponding to the item, the specified length of data and updates its rpt
  • the problem can be calculated by the difference between the write pointer and the read pointer in the second buffer.
  • the unit data is unloaded from the third queue.
  • the configured information control node controls the node to configure the corresponding item according to the configured information of the uninstallation.
  • the difference between the write pointer and the read pointer in the second buffer may be greater than or equal to a fourth preset threshold, and the fourth preset threshold may be according to the second The number of the items in the buffer, the processing capacity of the CPU, and the like are set to meet the actual requirements.
  • the setting manner of the fourth preset threshold is not limited in the present invention.
  • Step 209 Control the attribute information of the audio data to be played in the node according to the unconfigured configured information, and read the corresponding audio data to be played.
  • step 209 includes the following sub-steps:
  • step 209a Since the second buffer corresponding to the RDMA is a ring buffer, step 209a includes:
  • step 209a2 is performed; if not, step 209a3 is performed.
  • RDMA since RDMA is implemented as a Ring Buffer, it can be determined whether the target item is the last item in the Ring Buffer. If the target item is the last item in the Ring Buffer, configure its wpt to be the RDMA start. Bit The location where the first item is placed. Otherwise, configure its wpt to be the location of the next next item of the target item.
  • the wpt of RDMA Since the wpt of RDMA is controlled by the CPU, its rpt is maintained by the hardware itself. After the target item is configured as described above, after the write pointer wpt is updated, when the difference between the updated wpt of the location and the rpt of the RDMA is greater than or equal to a second preset threshold (for example, 1 item), the RDMA automatically reads the rpt. Point to the audio data of the specified length in the memory location corresponding to the item, so that it can ensure that there is a configuration node that can be read at this time, and then read the audio data to be played corresponding to the configuration node pointed by the read pointer in the second buffer. .
  • a second preset threshold for example, 1 item
  • the fourth preset threshold may be set according to factors such as the number of items in the second buffer and the processing capability of the CPU. When the description is required, the fourth preset threshold may be the same as or different from the second preset threshold.
  • the RDMA of the embodiment of the present invention can also update the read pointer rpt, and automatically update the rpt to the position of the next item where the rpt is located. Since the RDMA buffer is a ring buffer, when its rpt goes to the end of the buffer, it will automatically ring to the start position of the buffer, and wpt needs software maintenance to the ring buffer header, thereby recycling the memory space.
  • Step 210 Link the uninstalled configured information control node to the fourth queue.
  • the node As shown in FIG. 7, after configuring the to-be-played audio data attribute information corresponding to the unconfigured configured information control node, the node (shown as new_played_data in FIG. 7) is chained to the queue end of the played queue (as shown in FIG. 7). 7 played_tail shown).
  • each threshold is interrupted, and the queue header from the tobe_pushed queue
  • the information control node to be configured in the unchain, and then establish control information for the audio data to be played between the [rpt, wpt] corresponding to the threshold interrupt (that is, the start address, length, sampling rate, and the like of the audio data to be played.
  • the information control node under the unbe_pushed queue unchain has the information, and the information corresponds to the audio data to be played that the interrupt is to be read, and then the shed queue receives (or docks) the information control node.
  • the interface controls the node to the backend, and the backend receives it and then chains it to the tail of the tobe_played queue (note that the information control node is not uninstalled from the pushed queue at this time) ), the backend RDMA starts to read data for the power amplifier, and needs to call the paly_item interface before playing.
  • the interface from the tobe_played queue header unchian information control node, and configures the attribute information of the audio data to be played carried by it to correspond to the RDMA. After the item of the second buffer, the information control node is chained to the end of the played queue.
  • the method further includes:
  • Step 211 Determine a location where the read pointer is located in the second buffer.
  • Step 212 Calculate a difference between the first marker pointer and the second marker pointer in the second buffer.
  • the first mark pointer points to a position where the last configuration node at the position where the read pointer is located in the second buffer, and the second mark pointer is the position where the first mark pointer is located when the last release.
  • Step 213 If the difference between the first marker pointer and the second marker pointer in the second buffer is greater than or equal to a third preset threshold, the fourth queue is configured with the first marker pointer and the second marker pointer.
  • the information of the played audio data corresponding to the configuration node controls the node to be unloaded.
  • the third preset threshold may be set according to the number of items in the second buffer, the processing capability of the CPU, and the like.
  • the method further includes:
  • Step 214 Unload and release the configured information control node corresponding to the played audio data in the second queue.
  • Step 215 Link the information control node that is unloaded and released in the second queue to the first queue.
  • the play_item interface is called, and by determining the first marker pointer and the second marker pointer, if the condition is satisfied, the played is determined. If the queue is not empty, if the played queue is not empty, the information control node corresponding to the broadcasted audio data is unchained from the played queue; at the same time, because the second queue includes the information control node corresponding to the played audio data.
  • the callback mechanism (the callback release interface, the interface is used to complete the operation of the information control node in the tobe_pushed queue and the pushed queue) controls the information corresponding to the played audio data in the pushed queue.
  • the node is unloaded and released (the release refers to clearing the configuration information in the information control node), and then it is linked to the tail of the queue of the tobe_pushed queue, so that a fixed number of information control nodes allocated at initialization can be circulated. Reuse of the purpose, to solve the system memory space waste and implement frequent distribution of letters The problem of excessive memory fragmentation caused by the control node avoids the waste of system resources.
  • the tobe_played queue receives the configured information control node passed by the deliver interface, the configured information control node is not uninstalled from the pushed queue because the configured information is configured at this time.
  • the control node is unloaded from the pushed queue and chained to the tobe_pushed queue. This means that the tobe_pushed queue can use this information to control the node to create audio data to be played on the new memory location.
  • the front end is in the backend tobe_played queue configuration information control node Before the attribute information of the audio data to be played is carried to the item of the RDMA, the information control node is reconfigured, and when the RDMA reads the data at the new location and plays, a problem of sound skipping occurs. Therefore, it is ensured that the audio data on the DDR corresponding to the information control node has been played, and then unloaded from the pushed queue, and chained to the tail of the tobe_pushed queue.
  • the method further includes:
  • the second channel in the embodiment of the present invention is different from the first channel, and when detecting the switch from the first channel to the second channel, unloads and releases the remaining configured information control nodes in the third queue. Specifically, because the audio data allocated before the path switching corresponds to the audio data in the previous path, and the audio data of the path that is newly switched to the path switching is completed, the tobe_played queue head is first unchained. A node, if there is still audio data of the last channel that is not released on the queue, the audio data will be first configured to the RDMA item, so that the RDMA will read the audio data corresponding to the items first, and then play the new real-time configuration. Audio data for the path.
  • each time the path is switched each item that is not configured to the RDMA from the queue head to the tail of the queue on the tobe_played queue, that is, the configured information control node corresponding to the remaining unplayed audio data may be configured.
  • Unloading and releasing in order to solve the problem of switching the channel, first play the audio data remaining in the previous channel and then play the audio data of the newly switched path.
  • the unloading and releasing actions are very fast, and are calculated in milliseconds.
  • the embodiment of the present invention provides a method for processing audio data.
  • a first queue for managing an information control node to be configured when the threshold interrupt is triggered, the information to be configured of the unit data is unloaded from the first queue.
  • the configured information control node that unloads the unit data from the third queue controls the attribute information of the audio data to be played in the node according to the configured information of the uninstallation, and plays the corresponding to-be-played
  • the audio data is played, and the unloaded configured information control node is linked to the fourth queue of the information control node that manages the played audio data.
  • the attribute information of the audio data is configured, and the audio data to be played and the audio data to be played are separately managed, and at the same time, the node is controlled according to the configured information, and the corresponding audio data to be played is read, without the prior art
  • the audio data to be played is copied to another memory space, and the problem caused by the audio data to be played on the copied memory space is read.
  • the audio data to be broadcasted is not covered, the development and use of the memory space used for backup is omitted, and the influence of frequent memory copy on system performance is eliminated, and the effect is eliminated.
  • the memory alignment action simplifies the operation process, circumvents the complexity of the memory pool implementation, management, and maintenance, and simplifies the design.
  • the embodiment of the present invention avoids setting the memory pool while preventing the audio data to be played from being overwritten. .
  • the embodiment of the present invention provides an apparatus for processing audio data.
  • the function units of the audio data processing apparatus perform the corresponding method steps in the first embodiment or the second embodiment. For details, refer to the first embodiment or the second embodiment. The description is not repeated here.
  • the audio data capturing apparatus 110 includes:
  • the node unloading unit 1101 is configured to: when the triggering instruction is received, uninstall the information control node to be configured of the unit data from the first queue, and configure the uninstalled information control node to be configured, where the configured information control node includes The attribute information of the audio data to be played, the first queue includes at least one information control node to be configured;
  • a node linking unit 1102 configured to link the configured information control node to the second queue and the third queue, where the second queue and the third queue are both used to manage the configured information control node;
  • a node unloading unit 1101, configured to uninstall the configured information control node of the unit data from the third queue
  • the reading unit 1103 is configured to control attribute information of the audio data to be played in the node according to the unconfigured configured information, and read corresponding audio data to be played;
  • the node linking unit 1102 is further configured to link the uninstalled configured information control node to the fourth queue, and the fourth queue is used to manage the information control node of the played audio data.
  • the device 110 further includes:
  • the capturing unit 1104 is configured to capture a to-be-played tone by using a direct memory write WDMA Frequency data, wherein the WDMA corresponds to the first buffer, and the first buffer includes a read pointer and a write pointer;
  • the detecting unit 1105 is configured to detect whether a difference between the write pointer and the read pointer in the first buffer is greater than or equal to a first preset threshold
  • the triggering unit 1106 is configured to trigger a threshold interrupt to generate a trigger instruction if a difference between the write pointer and the read pointer in the first buffer is greater than or equal to a first preset threshold.
  • the device 110 further includes: a first configuration unit 1107;
  • the node unloading unit 1101 is specifically configured to: according to the triggering instruction, uninstall the information control node to be configured of the unit data from the first queue;
  • the first configuration unit 1107 is specifically configured to configure the offloaded information control node to be configured according to the audio data to be played between the read pointer and the write pointer in the first buffer.
  • the first configuration unit 1107 is configured to configure a starting address of the audio data to be played and a length of the audio data to be played in the unloaded information control node to be configured.
  • the apparatus 110 further includes: a second configuration node 1108;
  • a second configuration unit 1108, configured to, according to the unconfigured configured information control node, configure a configuration node in a second buffer corresponding to the direct memory read RDMA, where the second buffer includes a read pointer, a write pointer, and Multiple configuration nodes, configuration nodes have configuration information.
  • the attribute information of the audio data to be played includes a start address of the audio data to be played, and a length of the audio data to be played, where the configuration information includes a start address parameter of the configuration node, and a corresponding length parameter;
  • the second configuration unit 1108 includes:
  • a configuration subunit 1108b configured to set a start address parameter of the target configuration node to a start address of audio data to be played
  • the configuration subunit 1108b is further configured to set the length parameter of the target configuration node to the data length of the audio data to be played.
  • the reading unit 1103 includes:
  • the calculating subunit 1103b is configured to calculate a difference between the write pointer and the read pointer in the second buffer
  • the reading subunit 1103c is configured to: if the difference between the write pointer and the read pointer in the second buffer is greater than or equal to a second preset threshold, read a corresponding configuration node pointed by the read pointer in the second buffer Audio data to be played.
  • the update subunit 1103a is specifically configured to:
  • the write pointer in the second buffer is configured to be the location of the next configuration node immediately adjacent to the target configuration node in the second buffer.
  • the apparatus 110 further includes: a determining unit 1109 and a calculating unit 1110;
  • a determining unit 1109 configured to determine a location of the read pointer in the second buffer
  • the calculating unit 1110 is configured to determine a difference between the first mark pointer and the second mark pointer in the second buffer, where the first mark pointer points to a position of a previous configuration node where the read pointer in the second buffer is located, The second mark pointer is the position where the first mark pointer is located when the last release;
  • the node unloading unit 1101 is further configured to: if the calculating unit 1110 calculates that the difference between the first marker pointer and the second marker pointer in the second buffer is greater than or equal to a third preset threshold, then the fourth queue and the first marker pointer The information of the played audio data corresponding to the configured configuration node between the second marker pointer and the control node is unloaded.
  • the node unloading unit 1101 is further configured to uninstall and release the configured information control node corresponding to the played audio data in the second queue;
  • the node linking unit 1102 is further configured to link the information control node that is unloaded and released in the second queue to the first queue.
  • the audio data to be played is the audio data of the first path
  • a detecting unit 1105 configured to detect whether to switch from the first path to the second path
  • the node unloading unit 1102 is further configured to: if the detecting unit 1105 detects the switch from the first path to the second path, uninstall and release the configured information control nodes remaining in the third queue.
  • the embodiment of the present invention provides an apparatus for processing audio data, by setting a first queue for managing an information control node to be configured, and when the threshold interrupt is triggered, the information to be configured of the unit data is unloaded from the first queue. Controlling the node, and configuring the unloaded information control node to be unloaded according to the to-be-played audio data captured when the threshold is interrupted, linking the configured information control node to the second queue and the second queue for managing the configured information control node In the three queues, when the third queue is not empty, the configured information control node that unloads the unit data from the third queue controls the attribute information of the audio data to be played in the node according to the configured information of the uninstallation, and plays the corresponding to-be-played The audio data is played, and the unloaded configured information control node is linked to the fourth queue of the information control node that manages the played audio data.
  • the attribute information of the played audio data can be configured in real time, and the audio data to be played and the played audio data are separately managed, and at the same time, the node is controlled according to the configured information, and the corresponding audio data to be played is read.
  • the audio data to be broadcasted is not covered, the development and use of the memory space used for backup is omitted, and the influence of frequent memory copy on system performance is eliminated, and the effect is eliminated.
  • the memory alignment action simplifies the operation process, circumvents the complexity of the memory pool implementation, management, and maintenance, and simplifies the design.
  • the embodiment of the present invention avoids setting the memory pool while preventing the audio data to be played from being overwritten. .
  • the embodiment of the present invention further provides a processing system for audio data.
  • the system 160 includes:
  • the input module 1601 is configured to receive audio data input by multiple television channels
  • a path switching module 1602 configured to switch between different television channels
  • An audio capture module 1603, configured to capture audio data of different paths
  • a buffer 1604, configured to cache audio data captured by the audio capture module 1603;
  • Controlling the reading module 1605 for controlling the audio data in the read buffer 1604;
  • the control reading module 1605 includes:
  • a node unloading unit configured to: when the triggering instruction is received, unload the information control node to be configured of the unit data from the first queue, and configure the offloaded information control node to be configured, where the configured information control node includes Playing attribute information of the audio data, where the first queue includes at least one information control node to be configured;
  • a node linking unit configured to link the configured information control node to the second queue and the third queue, where the second queue and the third queue are used to manage the configured information control node;
  • a node unloading unit configured to unload unit data from the third queue
  • a reading unit configured to control attribute information of the to-be-played audio data in the node according to the unconfigured configured information, and read corresponding audio data to be played;
  • a node linking unit configured to link the uninstalled configured information control node to the fourth queue, where the fourth queue is used to manage the information control node of the played audio data
  • the system 160 further includes an audio post-processing module 1606 for performing preset sound processing on the audio data read by the reading unit;
  • the audio playing module 1607 is configured to play the audio data processed by the audio post-processing module 1606.
  • the system 160 further includes: a file storage module 1608; wherein the file storage module 1608 is configured to store audio data captured by the audio capture module 1603 in a file;
  • the audio play module 1607 is also used to play the audio data stored in the file storage module 1608.
  • control reading module 1605 For the description of the control reading module 1605, reference may be made to the processing device for the audio data in the first embodiment to the third embodiment, and details are not described herein again.
  • the input module 1601 is an input source of audio data, including ATV Demod, AV, Component, VGA, HDMI, and the like;
  • the path switching module 1602 is responsible for switching the above-mentioned television channels and opening and cutting Changed TV channel;
  • the audio capture module 1603 is responsible for capturing audio data in each television channel.
  • the module is mainly implemented by a CPU to control WDMA, including an audio buffer, and the audio buffer is a memory area for temporarily storing the captured audio data;
  • the file storage module 1608 stores the audio data on the switched TV channel captured by the audio capture module 1603 in a file in real time, and the audio data can be used as the boot music of the television product, or can be used as a local audio through a network or a USB interface. During playback, the correctness of the audio data captured by the audio capture module can be verified by the sensory verification process. In addition, it can also be used as a hardware and hardware developer to implement related audio post-processing functions (for example, sample rate conversion (English: Sample Rate Convert) test source;
  • the control reading module 1605 reads the audio data from the audio buffer to the audio signal line via the AXI (Advanced eXtensible Interface) high-speed bus, and the module is mainly controlled by the CPU to control the RDMA, and reads the audio data captured by the audio capture module, and Passing it to the audio post-processing module 1606 through the audio data transmission line;
  • AXI Advanced eXtensible Interface
  • the audio post-processing module 1606 is configured to perform a series of sound effects processing on the audio data read by the control reading module 1605, such as AVC (Automatic Volume Control), SRC, EQ (Equalizer), Balance (balance). )Wait;
  • the audio playing module 1607 outputs the audio data processed by the audio post-processing unit 1606 or the audio data stored by the file storage module 1608 via a speaker, earphone, Spdif or Subwoofer.
  • the disclosed system, apparatus, and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may be physically included separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
  • the above-described integrated unit implemented in the form of a software functional unit can be stored in a computer readable storage medium.
  • the software functional units described above are stored in a storage medium and include instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform portions of the steps of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like, and the program code can be stored. Medium.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)

Abstract

L'invention concerne un procédé, un appareil et un système de traitement de données audio, qui se rapportent au domaine technique du traitement d'informations, et sont utilisés pour éviter le problème selon lequel des données audio à lire ne peuvent pas être écrasées pendant qu'un groupe de mémoire est fourni. Le procédé de traitement de données audio consiste à : lorsqu'une instruction de déclenchement est reçue, décharger un nœud de commande d'informations à configurer de données d'unité à partir d'une première file d'attente, et configurer le nœud de commande d'informations déchargé à configurer, le nœud de commande d'informations configuré contenant des informations d'attribut concernant des données audio à lire ; relier le nœud de commande d'informations configuré dans une deuxième file d'attente et une troisième file d'attente ; décharger le nœud de commande d'informations configuré des données d'unité à partir de la troisième file d'attente ; selon les informations d'attribut concernant les données audio à lire dans le nœud de commande d'informations configuré déchargé, lire les données audio correspondantes à lire ; et relier le nœud de commande d'informations configuré déchargé dans une quatrième file d'attente. La présente invention s'applique à des systèmes de télévision numérique.
PCT/CN2016/072032 2015-09-28 2016-01-25 Procédé, appareil et système de traitement de données audio Ceased WO2017054378A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510631096.6 2015-09-28
CN201510631096.6A CN106559705B (zh) 2015-09-28 2015-09-28 一种音频数据的处理方法、装置和系统

Publications (1)

Publication Number Publication Date
WO2017054378A1 true WO2017054378A1 (fr) 2017-04-06

Family

ID=58416842

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/072032 Ceased WO2017054378A1 (fr) 2015-09-28 2016-01-25 Procédé, appareil et système de traitement de données audio

Country Status (2)

Country Link
CN (1) CN106559705B (fr)
WO (1) WO2017054378A1 (fr)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115696173A (zh) * 2022-09-14 2023-02-03 合肥杰发科技有限公司 一种芯片、车用音源播放方法、车载设备及存储介质

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108053821B (zh) * 2017-12-12 2022-09-06 腾讯科技(深圳)有限公司 生成音频数据的方法和装置
CN109743668B (zh) * 2019-01-04 2021-06-22 深圳时空壶技术有限公司 一种音频测试方法和设备
CN116246655A (zh) * 2023-03-14 2023-06-09 北斗星通智联科技有限责任公司 音频处理方法、装置、计算机设备及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004318467A (ja) * 2003-04-16 2004-11-11 Sony Corp メモリー制御方法およびメモリー制御装置
CN101330472A (zh) * 2008-07-28 2008-12-24 中兴通讯股份有限公司 流媒体数据的缓存处理方法
CN101404764A (zh) * 2008-10-30 2009-04-08 宁波中科集成电路设计中心有限公司 一种音视频解码过程中的内存管理方法
CN104505109A (zh) * 2014-12-29 2015-04-08 珠海全志科技股份有限公司 多媒体播放器的音轨切换方法、系统及对应播放器和设备

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080301189A1 (en) * 2007-05-31 2008-12-04 Ads Holdings, Llc. System and method for providing a real-time content distribution network
CN102521279A (zh) * 2011-11-25 2012-06-27 Tcl集团股份有限公司 一种流媒体文件播放方法、系统及播放器

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004318467A (ja) * 2003-04-16 2004-11-11 Sony Corp メモリー制御方法およびメモリー制御装置
CN101330472A (zh) * 2008-07-28 2008-12-24 中兴通讯股份有限公司 流媒体数据的缓存处理方法
CN101404764A (zh) * 2008-10-30 2009-04-08 宁波中科集成电路设计中心有限公司 一种音视频解码过程中的内存管理方法
CN104505109A (zh) * 2014-12-29 2015-04-08 珠海全志科技股份有限公司 多媒体播放器的音轨切换方法、系统及对应播放器和设备

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115696173A (zh) * 2022-09-14 2023-02-03 合肥杰发科技有限公司 一种芯片、车用音源播放方法、车载设备及存储介质

Also Published As

Publication number Publication date
CN106559705B (zh) 2019-07-12
CN106559705A (zh) 2017-04-05

Similar Documents

Publication Publication Date Title
US8738884B2 (en) Efficient loading of data into memory of a computing system
WO2017005010A1 (fr) Procédé et dispositif de traitement audio et support d'informations informatique
WO2017054378A1 (fr) Procédé, appareil et système de traitement de données audio
CN106559706A (zh) 一种音频数据的处理方法、装置和系统
CN110019527B (zh) 从库读取方法、相关装置和设备
AU2021202098B2 (en) Multimedia data playing method and terminal device
JP7691463B2 (ja) コンピューティングデバイス上でアプリケーションを更新するための、メモリ効率のよいソフトウェアパッチング
CN109599133B (zh) 语言音轨的切换方法、装置、计算机设备及存储介质
US10171868B2 (en) Method for processing audio data, terminal and television
CN104601535A (zh) 视频处理方法和系统
US8416658B2 (en) Recording apparatus and recording method for data and file system information
US8938596B2 (en) Storage apparatus, control apparatus, and storage apparatus control method
US7684883B2 (en) Information processing apparatus, information processing method, and program
JP2005317115A (ja) 情報処理装置および情報処理方法、並びに、プログラム
WO2017054376A1 (fr) Procédé et appareil de traitement de données audio
US8730348B2 (en) Recording apparatus and control method thereof
US20180052786A1 (en) Improvement in sending of multimedia streams
EP4068692A1 (fr) Système de chaîne de blocs, programme, et dispositif de connexion de réseau
WO2025246677A1 (fr) Procédé et dispositif de montage vidéo, et support de stockage
KR101795258B1 (ko) 클라우드 네트워크를 통한 스냅샷 부트
CN103780947A (zh) 用于接收广播的装置和管理用于时移的文件的方法
CN106445402A (zh) 一种存储单元格式化方法和系统

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16850012

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16850012

Country of ref document: EP

Kind code of ref document: A1