Method and device for realizing native multichannel audio data output and smart television

文档序号:73224 发布日期:2021-10-01 浏览:15次 中文

阅读说明:本技术 实现原生多声道音频数据输出方法、装置及智能电视 (Method and device for realizing native multichannel audio data output and smart television ) 是由 罗迪 于 2021-06-22 设计创作,主要内容包括:本发明公开了一种实现原生多声道音频数据输出方法、装置及智能电视,方法包括构建多声道音频解码模块,其在解码多声道片源后,以原生多声道PCM格式向AudioHal传输音频数据;构建音频设备识别模块,识别标准音频播放设备支持的所有音频声道数目,并据此向音频格式匹配模块发送声道匹配命令;构建音频格式匹配模块,所述音频格式匹配模块接收音频设备识别模块发送的声道匹配命令,动态的对各个源PCM音频数据的声道进行ChannelDownmix或ChannelExpand处理,处理后的数据经过混合,向标准音频播放设备传输包含原生多声道的PCM音频数据。本发明完善了智能电视系统的多声道音频数据处理流程,在智能电视上实现了原生多声道音频数据输出功能,能实时兼容立体声和多声道外接音频设备。(The invention discloses a method and a device for realizing the output of original multichannel audio data and an intelligent television, wherein the method comprises the steps of constructing a multichannel audio decoding module, and transmitting audio data to an audioHal in an original multichannel PCM format after decoding a multichannel film source; constructing an audio equipment identification module, identifying the number of all audio channels supported by standard audio playing equipment, and sending a channel matching command to an audio format matching module according to the number; and constructing an audio format matching module, wherein the audio format matching module receives the channel matching command sent by the audio equipment identification module, dynamically performs channel Downmix or channel expanded processing on the channels of each source PCM audio data, mixes the processed data, and transmits the PCM audio data containing the original multi-channel to standard audio playing equipment. The invention perfects the multichannel audio data processing flow of the intelligent television system, realizes the original multichannel audio data output function on the intelligent television, and can be compatible with stereo and multichannel external audio equipment in real time.)

1. A method of implementing native multi-channel audio data output, comprising:

constructing a multichannel audio decoding module, and transmitting audio data to the Audio Hal in a native multichannel PCM format after decoding a multichannel film source;

constructing an audio equipment identification module, identifying the number of all audio channels supported by standard audio playing equipment, and sending a channel matching command to an audio format matching module according to the number;

and constructing an audio format matching module, wherein the audio format matching module receives the channel matching command sent by the audio equipment identification module, dynamically performs channel Downmix or channel expanded processing on the channels of each source PCM audio data, mixes the processed data, and transmits the PCM audio data containing the original multi-channel to standard audio playing equipment.

2. The method of claim 1, wherein the method of dynamically channelindwnmix or channeliexpanded processing channels of respective source PCM audio data comprises:

the audio format matching module judges the number Src of each source PCM audio data sound channel, and if the number Src of the source PCM audio data sound channel is equal to the number Dst of the audio output sound channel, the audio format matching module does not process the number Src of each source PCM audio data sound channel; if the number Src of audio channels of the source PCM audio data is greater than the number Dst of audio output channels, performing channeldowmix processing on the audio data of the source; if the source PCM audio data channel number Src is less than the audio output channel number Dst, the ChannelExpand processing is performed on the audio data of this source.

3. The method of claim 1 or 2, wherein the standard audio playback devices include a standard 5.1 channel usb audio playback device and a standard stereo usb audio playback device.

4. The method of claim 3, wherein when the standard audio playback device is a standard 5.1 channel usb audio playback device, the audio format matching module receives a channel matching command sent by the audio device identification module, dynamically performs channel downmix or channel expand processing on the channels of the source PCM audio data, mixes the processed data, and transmits PCM audio data containing native multi-channels to the standard audio playback device, and the method includes:

the audio format matching module receives the sound channel matching command and determines that the number Dst of audio output sound channels is 5.1 sound channels; judging the PCM audio data channel number Src sent by the Audio Flinger and the multi-channel audio decoding module, and carrying out ChannelExpand processing on the stereo PCM audio data sent by the Audio Flinger; the 5.1 sound channel PCM audio data sent by the multi-sound channel audio decoding module is not processed;

the audio format matching module mixes the source processed PCM audio data and outputs the native 5.1 channel PCM audio data in a 5.1 channel format supported by the device.

5. The method of claim 3, wherein when the standard audio playback device is a standard stereo usb audio playback device, the audio format matching module receives the channel matching command sent by the audio device identification module, dynamically performs channel downmix or channel expand processing on the channels of the source PCM audio data, mixes the processed data, and transmits PCM audio data containing native multi-channels to the standard audio playback device, the method comprising:

the audio format matching module receives the sound channel matching command and determines that the number Dst of audio output sound channels is 2 sound channels; judging the number Src of PCM audio data channels sent by the Audio Flinger and the multi-channel audio decoding module, and carrying out ChannelDownmix processing on the PCM audio data sent by the multi-channel audio decoding module; the stereo PCM audio data sent by the Audio Flinger is not processed;

the audio format matching module mixes the PCM audio data processed by each source and outputs the PCM audio data in a stereo format supported by the device.

6. An apparatus for implementing native multi-channel audio data output, comprising:

the multichannel audio decoding module is used for transmitting audio data to the Audio Hal in a native multichannel PCM format after decoding the multichannel film source;

the audio equipment identification module is used for identifying the number of all audio channels supported by the standard audio playing equipment and sending a channel matching command to the audio format matching module according to the number of all audio channels supported by the standard audio playing equipment;

and the audio format matching module is used for receiving the channel matching command sent by the audio equipment identification module, dynamically carrying out channel Downmix or channel Expand processing on the channels of each source PCM audio data, mixing the processed data, and transmitting the PCM audio data containing the original multichannel to the standard audio playing equipment.

7. The apparatus of claim 6, wherein the standard audio playback devices include a standard 5.1 channel usb audio playback device and a standard stereo usb audio playback device.

8. An intelligent television comprising a memory, a processor and an implementation native multi-channel audio data output program stored on the memory and running on the processor, the implementation native multi-channel audio data output program when executed by the processor implementing the steps of implementing a native multi-channel audio data output method as claimed in any one of claims 1 to 5.

Technical Field

The invention relates to the technical field of audio output of an intelligent television system, in particular to a method and a device for realizing native multichannel audio data output and an intelligent television.

Background

Nowadays, the number of online multi-channel film sources on a television platform is increased, and meanwhile, a user can easily play local multi-channel film sources through a system player. However, in the existing smart television system, for standard external audio devices (such as USB audio devices, bluetooth audio devices, etc.), the system actually only supports dual-Channel audio output, and the original multichannel movie and television film source can only be Channel downlink mix as dual channels, so that the multichannel external audio devices cannot be well supported, the viewing experience is seriously affected as a television application scene, and the multichannel restoring capability of the standard multichannel audio system externally connected by the user cannot be fully exerted.

Disclosure of Invention

The invention provides a method and a device for realizing output of original multi-Channel audio data and an intelligent television, which aim to solve the problem that the existing system framework can not directly output the original multi-Channel audio data to standard external audio equipment (such as USB audio equipment, Bluetooth audio equipment and the like) because the system is not optimally designed for the transmission of the multi-Channel data, and the multi-Channel audio data can only be output by Channel Downmix as double channels, so that the multi-Channel standard external audio equipment can not be well supported.

The technical scheme adopted by the invention is as follows: there is provided a method of implementing native multi-channel audio data output, including:

constructing a multichannel audio decoding module, and transmitting audio data to the Audio Hal in a native multichannel PCM format after decoding a multichannel film source;

constructing an audio equipment identification module, identifying the number of all audio channels supported by standard audio playing equipment, and sending a channel matching command to an audio format matching module according to the number;

and constructing an audio format matching module, wherein the audio format matching module receives the channel matching command sent by the audio equipment identification module, dynamically performs channel Downmix or channel expanded processing on the channels of each source PCM audio data, mixes the processed data, and transmits the PCM audio data containing the original multi-channel to standard audio playing equipment.

As a preferred mode of implementing the native multichannel audio data output method, the method for dynamically performing channeldownlink or channelextended processing on the channels of each source PCM audio data includes:

the audio format matching module judges the number Src of each source PCM audio data sound channel, and if the number Src of the source PCM audio data sound channel is equal to the number Dst of the audio output sound channel, the audio format matching module does not process the number Src of each source PCM audio data sound channel; if the number Src of audio channels of the source PCM audio data is greater than the number Dst of audio output channels, performing channeldowmix processing on the audio data of the source; if the source PCM audio data channel number Src is less than the audio output channel number Dst, the ChannelExpand processing is performed on the audio data of this source.

As a preferable way to implement the native multichannel audio data output method, the standard audio playback devices include a standard 5.1 channel usb audio playback device and a standard stereo usb audio playback device.

As a preferred mode for implementing the method for outputting native multichannel audio data, when the standard audio playing device is a standard 5.1 channel usb audio playing device, the audio format matching module receives a channel matching command sent by the audio device identification module, dynamically performs channel down mix or channel expand processing on the channels of each source PCM audio data, mixes the processed data, and transmits PCM audio data containing native multichannel audio data to the standard audio playing device, where the method includes:

the audio format matching module receives the sound channel matching command and determines that the number Dst of audio output sound channels is 5.1 sound channels; judging the PCM audio data channel number Src sent by the Audio Flinger and the multi-channel audio decoding module, and carrying out ChannelExpand processing on the stereo PCM audio data sent by the Audio Flinger; the 5.1 sound channel PCM audio data sent by the multi-sound channel audio decoding module is not processed;

the audio format matching module mixes the source processed PCM audio data and outputs the native 5.1 channel PCM audio data in a 5.1 channel format supported by the device.

As a preferred mode for implementing the method for outputting native multichannel audio data, when the standard audio playing device is a standard stereo usb audio playing device, the audio format matching module receives a channel matching command sent by the audio device identification module, dynamically performs channeldownlink or channelexpansion processing on the channels of each source PCM audio data, mixes the processed data, and transmits PCM audio data including native multichannel audio data to the standard audio playing device, where the method includes:

the audio format matching module receives the sound channel matching command and determines that the number Dst of audio output sound channels is 2 sound channels; judging the number Src of PCM audio data channels sent by the Audio Flinger and the multi-channel audio decoding module, and carrying out ChannelDownmix processing on the PCM audio data sent by the multi-channel audio decoding module; the stereo PCM audio data sent by the Audio Flinger is not processed;

the audio format matching module mixes the PCM audio data processed by each source and outputs the PCM audio data in a stereo format supported by the device.

The invention also discloses a device for realizing the native multichannel audio data output, which comprises:

the multichannel audio decoding module is used for transmitting audio data to the Audio Hal in a native multichannel PCM format after decoding the multichannel film source;

the audio equipment identification module is used for identifying the number of all audio channels supported by the standard audio playing equipment and sending a channel matching command to the audio format matching module according to the number of all audio channels supported by the standard audio playing equipment;

and the audio format matching module is used for receiving the channel matching command sent by the audio equipment identification module, dynamically carrying out channel Downmix or channel Expand processing on the channels of each source PCM audio data, mixing the processed data, and transmitting the PCM audio data containing the original multichannel to the standard audio playing equipment.

As a preferable way to realize the native multichannel audio data output apparatus, the standard audio playing device includes a standard 5.1 channel usb audio playing device and a standard stereo usb audio playing device.

The invention also discloses an intelligent television which comprises a memory, a processor and a program which is stored on the memory and runs on the processor to realize the output of the original multi-channel audio data, wherein the program to realize the output of the original multi-channel audio data realizes the steps of the method for realizing the output of the original multi-channel audio data when being executed by the processor.

The invention has the beneficial effects that: the invention perfects the multichannel audio data processing flow of the intelligent television system, realizes the original multichannel audio data output function on the intelligent television, can perfectly support external standard multichannel audio playing equipment, can be compatible with stereo and multichannel external audio equipment in real time, is easy to implement and improves the multichannel viewing experience of users.

Drawings

Fig. 1 is a schematic flow chart illustrating a method for outputting native multi-channel audio data according to the present disclosure.

Fig. 2 is a schematic diagram of an access flow of a standard 5.1 channel usb audio playing device disclosed in the present invention.

Fig. 3 is a schematic diagram of an access process of a standard stereo usb audio playing device disclosed in the present invention.

Fig. 4 is a block diagram illustrating an exemplary embodiment of an apparatus for outputting native multi-channel audio data.

Detailed Description

In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail below with reference to the accompanying drawings, but embodiments of the present invention are not limited thereto.

Example 1:

as is known, the audio framework of the smart television system includes, from top to bottom, a hierarchy of AudioFlinger, AudioHal, AudioDriver, audio hardware, and the like. When playing a movie source, the movie source is generally decoded by a hardware decoder, and audio data is directly injected into the lower layer of AudioHal; the audio effect of other systems is generated by the AudioFlinger and is filled into the AudioHal at the lower layer; and finally, the AudioHal outputs audio data to the standard external equipment. Since audio data transmission of the system only supports stereo two channels, hard-decoded multi-Channel audio data must be first Channel down mix into two channels and then injected into AudioHal. In fact, the AudioDriver at the bottom layer of the system can support data transmission of the multi-channel external audio device, and only as the audioframe of the system is not specially designed for the multi-channel audio data, the original multi-channel audio data cannot be transmitted to the standard audio playing device supporting the multi-channel.

Referring to fig. 1, the present embodiment provides a method of implementing native multi-channel audio data output, including:

s1: a multi-channel audio decoding module is constructed which, after decoding a multi-channel slice source, transmits audio data to AudioHal in native multi-channel PCM format.

Specifically, the existing audio decoding module processes audio data of a multi-Channel movie and television source by directly transmitting stereo PCM format data to AudioHal after Channel Downmix is a dual Channel. In order to enable lossless transmission of multi-channel audio data, the present embodiment constructs a multi-channel audio decoding module that transmits audio data to AudioHal in native multi-channel PCM format after decoding a multi-channel slice source.

S2: and constructing an audio equipment identification module, identifying the number of all audio channels supported by the standard audio playing equipment, and sending a channel matching command to the audio format matching module according to the number.

Specifically, after the standard audio playing device is connected, an audio device identification module is designed in order to dynamically identify the channel format supported by the device and perform corresponding processing. It is able to identify the number of all audio channels supported by the device and accordingly send a channel match command to the audio format matching module.

S3: and constructing an audio format matching module, wherein the audio format matching module receives the channel matching command sent by the audio equipment identification module, dynamically performs channel Downmix or channel expanded processing on the channels of each source PCM audio data, mixes the processed data, and transmits the PCM audio data containing the original multi-channel to standard audio playing equipment.

The following describes in detail the processing when accessing the multi-channel playback device (i.e., detailed description of S2 and S3).

When the standard audio playing device is accessed, the audio device identification module firstly detects the number of all channels supported by the device, preferentially selects multi-channel audio, and determines the number Dst of a current audio output channel. Subsequently, the audio device identification module sends a channel matching command to the audio format matching module, wherein the channel matching command contains the current audio output channel number Dst.

And the audio format matching module receives the sound channel matching command sent by the audio equipment identification module to obtain the current audio output sound channel number Dst. Meanwhile, the number of channels of each source PCM audio data (e.g., audio data input by audiolinger, audio data input by a multi-channel audio decoding module, etc.) is identified. Then the audio format matching module judges the number Src of each source PCM audio data sound channel, and if the number Src of the source PCM audio data sound channel is equal to the number Dst of the audio output sound channel, the audio format matching module does not process the audio output sound channel; if the number Src of audio channels of the source PCM audio data is greater than the number Dst of audio output channels, performing channeldowmix processing on the audio data of the source; if the source PCM audio data channel number Src is less than the audio output channel number Dst, the ChannelExpand processing is performed on the audio data of this source. In this way, the number of PCM audio data channels per source is equal to the number of audio output channels. And finally, mixing all the active PCM audio data, and transmitting the mixed PCM audio data to audio playing equipment.

The standard audio playing device described in this embodiment includes a standard 5.1 channel usb audio playing device and a standard stereo usb audio playing device.

Taking a standard audio playing device as a standard 5.1 channel usb audio playing device as an example, referring to fig. 2, fig. 2 is a schematic diagram of an access flow of the standard 5.1 channel usb audio playing device, where the S2 specifically includes:

s2-1: the user accesses a standard 5.1 channel usb audio playing device.

S2-2: the audio equipment identification module checks the number of channels supported by the equipment, determines that the number Dst of audio output channels is 5.1 channels, and sends an equipment channel matching command to the audio format matching module.

The S3 specifically includes:

s3-1: the audio format matching module receives the sound channel matching command and determines that the number Dst of audio output sound channels is 5.1 sound channels; judging the PCM audio data channel number Src sent by the Audio Flinger and the multi-channel audio decoding module, and carrying out ChannelExpand processing on the stereo PCM audio data sent by the Audio Flinger; the 5.1 channel PCM audio data transmitted from the multi-channel audio decoding module is not processed.

S3-2: the audio format matching module mixes the source processed PCM audio data and outputs the native 5.1 channel PCM audio data in a 5.1 channel format supported by the device.

Example 2

The present embodiment provides a method for implementing native multi-channel audio data output, which is different from embodiment 1 in that the present embodiment takes a standard audio playing device as a standard stereo usb audio playing device as an example, referring to fig. 3, fig. 3 is a schematic diagram of an access flow of the standard stereo usb audio playing device, where S2 specifically includes:

s2-1: the user accesses a standard stereo usb audio playback device.

S2-2: the audio equipment identification module checks the number of channels supported by the equipment, determines that the number Dst of audio output channels is 2 channels, and sends an equipment channel matching command to the audio format matching module.

At this time, S3 specifically includes:

s3-1: the audio format matching module receives the sound channel matching command and determines that the number Dst of audio output sound channels is 2 sound channels; judging the number Src of PCM audio data channels sent by the Audio Flinger and the multi-channel audio decoding module, and carrying out ChannelDownmix processing on the PCM audio data sent by the multi-channel audio decoding module; the stereo PCM audio data transmitted from the AudioFlinger is not processed.

S3-2: the audio format matching module mixes the PCM audio data processed by each source and outputs the PCM audio data in a stereo format supported by the device.

Example 3

Referring to fig. 4, the present invention provides an apparatus for implementing native multi-channel audio data output, including:

and the multi-channel audio decoding module is used for transmitting audio data to the Audio Hal in a native multi-channel PCM format after decoding the multi-channel slice source.

And the audio equipment identification module is used for identifying the number of all audio channels supported by the standard audio playing equipment and sending a channel matching command to the audio format matching module according to the number.

And the audio format matching module is used for receiving the channel matching command sent by the audio equipment identification module, dynamically carrying out channel Downmix or channel Expand processing on the channels of each source PCM audio data, mixing the processed data, and transmitting the PCM audio data containing the original multichannel to the standard audio playing equipment.

Specifically, the standard audio playing device includes a standard 5.1 channel usb audio playing device and a standard stereo usb audio playing device.

Example 4

The present invention also provides a smart tv, which includes a memory, a processor, and a program stored on the memory and running on the processor for implementing a native multi-channel audio data output, wherein the program for implementing a native multi-channel audio data output implements the steps of implementing a native multi-channel audio data output method as described in embodiment 1 or 2 when executed by the processor.

The above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

10页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种音效自动启动方法及显示设备

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类