CN113365189B - Multi-channel seamless switching method - Google Patents
Multi-channel seamless switching method Download PDFInfo
- Publication number
- CN113365189B CN113365189B CN202110626730.2A CN202110626730A CN113365189B CN 113365189 B CN113365189 B CN 113365189B CN 202110626730 A CN202110626730 A CN 202110626730A CN 113365189 B CN113365189 B CN 113365189B
- Authority
- CN
- China
- Prior art keywords
- data
- channel
- input data
- chip
- switching
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
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
- H04R5/00—Stereophonic arrangements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04S—STEREOPHONIC SYSTEMS
- H04S7/00—Indicating arrangements; Control arrangements, e.g. balance control
- H04S7/30—Control circuits for electronic adaptation of the sound field
- H04S7/305—Electronic adaptation of stereophonic audio signals to reverberation of the listening space
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Acoustics & Sound (AREA)
- Signal Processing (AREA)
- Multimedia (AREA)
- Stereophonic System (AREA)
Abstract
Description
技术领域technical field
本发明涉及音频信号技术领域,特别涉及一种多声道无缝切换方法。The present invention relates to the technical field of audio signals, in particular to a multi-channel seamless switching method.
背景技术Background technique
智能功放芯片在实际项目应用中,需要实现输入的多声道数据(输入信号可能是2声道、4声道、8声道的数据)在播放过程中实时切换。比如,从左声道输出切换为右声道输出,或右声道输出切换为左声道输出。In the application of the intelligent power amplifier chip, it is necessary to realize the real-time switching of the input multi-channel data (the input signal may be 2-channel, 4-channel, and 8-channel data) during the playback process. For example, switching from the left channel output to the right channel output, or switching the right channel output to the left channel output.
目前这种切换过程可以通过如下方式实现:Currently, this switching process can be implemented in the following ways:
方式一:平台通过软件算法实时切换数据。该方案的局限在于:如果平台端输出的是立体声信号,而实际项目是4芯片(对应4个喇叭,4声道输出)的场景,只能实现两个左喇叭同时切换,而无法实现4个喇叭中的任意一个实时切换输出。Method 1: The platform switches data in real time through software algorithms. The limitation of this solution is: if the platform output is a stereo signal, and the actual project is a scene of 4 chips (corresponding to 4 speakers, 4 channel output), only two left speakers can be switched at the same time, but 4 speakers cannot be realized. Any one of the speakers switches the output in real time.
方式二:通过芯片内置的DSP(数字信号处理模块)来实时切换数据通路。该方案的局限在于:需要芯片本身内置独立的数字信号处理模块,内置独立的数字信号处理模块会额外增加芯片设计复杂度和芯片成本。某些芯片可以实现在数据输入接口进行数据切换,但是由于设计的局限性导致切换过程中需要短时间中断输出。Mode 2: The data path is switched in real time through the built-in DSP (digital signal processing module) of the chip. The limitation of this solution is that an independent digital signal processing module needs to be built in the chip itself, and the built-in independent digital signal processing module will additionally increase the complexity of the chip design and the cost of the chip. Some chips can implement data switching at the data input interface, but due to design limitations, the output needs to be interrupted for a short time during the switching process.
因此有必要提供一种多声道无缝切换方法,通过在芯片的输入数据接口模块中采用交叉渐变算法,实现了左右声道无缝切换,且不会出现输出信号中断的问题。Therefore, it is necessary to provide a multi-channel seamless switching method. By adopting a cross-fading algorithm in the input data interface module of the chip, the left and right channels can be seamlessly switched without the problem of output signal interruption.
发明内容SUMMARY OF THE INVENTION
本发明的目的在于提供一种多声道无缝切换方法,通过在芯片的输入数据接口模块中采用交叉渐变算法,实现了左右声道无缝切换,且不会出现输出信号中断的问题。The purpose of the present invention is to provide a multi-channel seamless switching method. By adopting a cross-fading algorithm in the input data interface module of the chip, the left and right channels can be seamlessly switched without the problem of output signal interruption.
为了解决现有技术中存在的问题,本发明提供了一种多声道无缝切换方法,包括以下步骤:In order to solve the problems existing in the prior art, the present invention provides a multi-channel seamless switching method, comprising the following steps:
在芯片内部预设输入数据接口模块和信号输出模块;The input data interface module and the signal output module are preset inside the chip;
在输入数据接口模块内设置数字逻辑以对输入数据进行切换,所述数字逻辑的算法为交叉渐变算法;A digital logic is set in the input data interface module to switch the input data, and the algorithm of the digital logic is a cross-fading algorithm;
输入数据接口模块接收输入数据,采用交叉渐变算法对输入数据进行声道切换,所述信号输出模块将切换后的数据输出;The input data interface module receives the input data, adopts the cross-fading algorithm to switch the channel of the input data, and the signal output module outputs the switched data;
实现多声道无缝切换。Achieve seamless multi-channel switching.
可选的,在所述多声道无缝切换方法中,交叉渐变算法如下:Optionally, in the multi-channel seamless switching method, the cross-fading algorithm is as follows:
设置交叉渐变系数Coef[i];Set the crossfade coefficient Coef[i];
当声道切换开始时,左声道的数据输出为:When channel switching starts, the data output for the left channel is:
Data_Left[i]=(Data_Right[i]*Coef[i]+Data_Left[i]*Coef[n-1-i])/n;Data_Left[i]=(Data_Right[i]*Coef[i]+Data_Left[i]*Coef[n-1-i])/n;
当声道切换开始时,右声道的数据输出为:When channel switching starts, the data output for the right channel is:
Data_Right[i]=(Data_Left[i]*Coef[i]+Data_Right[i]*Coef[n-1-i])/n;Data_Right[i]=(Data_Left[i]*Coef[i]+Data_Right[i]*Coef[n-1-i])/n;
其中Data_Left是左声道数据值,Data_Right是右声道数据值,i是系数下标,n是系数总个数。Where Data_Left is the left channel data value, Data_Right is the right channel data value, i is the coefficient subscript, and n is the total number of coefficients.
可选的,在所述多声道无缝切换方法中,交叉渐变系数Coef[i]按照步长为1定义。Optionally, in the multi-channel seamless switching method, the cross-fading coefficient Coef[i] is defined as a step size of 1.
可选的,在所述多声道无缝切换方法中,渐变系数Coef为:0,1,2,…,n-1。Optionally, in the multi-channel seamless switching method, the gradient coefficient Coef is: 0, 1, 2, ..., n-1.
可选的,在所述多声道无缝切换方法中,n的典型值为256。Optionally, in the multi-channel seamless switching method, a typical value of n is 256.
在本发明所提供的多声道无缝切换方法中,通过在芯片内部设置数字逻辑以实时切换输入数据,无需在芯片内置通用的DSP逻辑,减少了芯片资源的消耗和降低了设计复杂度,从而降低了成本;且所述数字逻辑在切换过程中通过采用交叉渐变算法实现无缝切换,避免了出现输出信号中断的问题。In the multi-channel seamless switching method provided by the present invention, by setting digital logic inside the chip to switch input data in real time, there is no need to build a general DSP logic in the chip, which reduces the consumption of chip resources and reduces the design complexity, Thus, the cost is reduced; and the digital logic realizes seamless switching by adopting a cross-fading algorithm in the switching process, thereby avoiding the problem of output signal interruption.
附图说明Description of drawings
图1为本发明实施例提供的多声道无缝切换方法的流程图;1 is a flowchart of a multi-channel seamless switching method provided by an embodiment of the present invention;
图2为本发明实施例提供的声道无缝切换的示意图。FIG. 2 is a schematic diagram of channel seamless switching according to an embodiment of the present invention.
具体实施方式Detailed ways
下面将结合示意图对本发明的具体实施方式进行更详细的描述。根据下列描述,本发明的优点和特征将更清楚。需说明的是,附图均采用非常简化的形式且均使用非精准的比例,仅用以方便、明晰地辅助说明本发明实施例的目的。The specific embodiments of the present invention will be described in more detail below with reference to the schematic diagrams. The advantages and features of the present invention will become more apparent from the following description. It should be noted that, the accompanying drawings are all in a very simplified form and in inaccurate scales, and are only used to facilitate and clearly assist the purpose of explaining the embodiments of the present invention.
如果本文所述的方法包括一系列步骤,则本文所呈现的这些步骤的顺序并非必须是可执行这些步骤的唯一顺序,且一些所述的步骤可被省略和/或一些本文未描述的其他步骤可被添加到该方法中。If a method described herein includes a series of steps, the order of the steps presented herein is not necessarily the only order in which the steps can be performed, and some of the steps described may be omitted and/or some other steps not described herein can be added to this method.
目前声道切换过程可以通过如下方式实现:方式一:平台通过软件算法实时切换数据;方式二:通过芯片内置的DSP(数字信号处理模块)来实时切换数据通路。方式一存在只能实现两个左喇叭同时切换,而无法实现所有喇叭中的任意一个实时切换输出的问题;方式二存在设计复杂、芯片成本高和信号容易中断等问题。At present, the channel switching process can be implemented in the following ways: way 1: the platform switches data in real time through software algorithms; way 2: real-time switching of data paths through the built-in DSP (digital signal processing module) of the chip. The first method has the problem that only two left speakers can be switched at the same time, but cannot realize the real-time switching output of any one of all the speakers; the second method has the problems of complicated design, high chip cost and easy signal interruption.
因此有必要提供一种多声道无缝切换方法,如图1所示,图1为本发明实施例提供的多声道无缝切换方法的流程图,所述多声道无缝切换方法包括以下步骤:Therefore, it is necessary to provide a multi-channel seamless switching method. As shown in FIG. 1, FIG. 1 is a flowchart of a multi-channel seamless switching method provided by an embodiment of the present invention. The multi-channel seamless switching method includes: The following steps:
在芯片内部预设输入数据接口模块和信号输出模块;The input data interface module and the signal output module are preset inside the chip;
在输入数据接口模块内设置数字逻辑以对输入数据进行切换,所述数字逻辑的算法为交叉渐变算法;A digital logic is set in the input data interface module to switch the input data, and the algorithm of the digital logic is a cross-fading algorithm;
输入数据接口模块接收输入数据,采用交叉渐变算法对输入数据进行声道切换,所述信号输出模块将切换后的数据输出;The input data interface module receives the input data, adopts the cross-fading algorithm to switch the channel of the input data, and the signal output module outputs the switched data;
实现多声道无缝切换。Achieve seamless multi-channel switching.
具体的,请参考图2,图2为本发明实施例提供的声道无缝切换的示意图,其中,交叉渐变算法如下:Specifically, please refer to FIG. 2 , which is a schematic diagram of a seamless channel switching provided by an embodiment of the present invention, wherein the cross-fading algorithm is as follows:
设置交叉渐变系数Coef[i];Set the crossfade coefficient Coef[i];
当声道切换开始时,左声道的数据输出为:When channel switching starts, the data output for the left channel is:
Data_Left[i]=(Data_Right[i]*Coef[i]+Data_Left[i]*Coef[n-1-i])/n;Data_Left[i]=(Data_Right[i]*Coef[i]+Data_Left[i]*Coef[n-1-i])/n;
当声道切换开始时,右声道的数据输出为:When channel switching starts, the data output for the right channel is:
Data_Right[i]=(Data_Left[i]*Coef[i]+Data_Right[i]*Coef[n-1-i])/n;Data_Right[i]=(Data_Left[i]*Coef[i]+Data_Right[i]*Coef[n-1-i])/n;
其中Data_Left是左声道数据值,Data_Right是右声道数据值,i是系数下标,n是系数总个数。Where Data_Left is the left channel data value, Data_Right is the right channel data value, i is the coefficient subscript, and n is the total number of coefficients.
优选的,在一个实施例中,交叉渐变系数Coef[i]按照步长为1定义,则渐变系数Coef为:0,1,2,…,n-1。例如n的典型值为256,渐变系数Coef为:0,1,2,…,255。当然,在实际操作中实现声道无缝切换是可以定义任意长度的。Preferably, in an embodiment, the cross gradient coefficient Coef[i] is defined according to a step size of 1, and the gradient coefficient Coef is: 0, 1, 2, ..., n-1. For example, the typical value of n is 256, and the gradient coefficient Coef is: 0, 1, 2, ..., 255. Of course, any length can be defined to achieve seamless channel switching in practice.
综上,在本发明所提供的多声道无缝切换方法中,通过在芯片内部设置数字逻辑以实时切换输入数据,无需在芯片内置通用的DSP逻辑,减少了芯片资源的消耗和降低了设计复杂度,从而降低了成本;且所述数字逻辑在切换过程中通过采用交叉渐变算法实现无缝切换,避免了出现输出信号中断的问题。To sum up, in the multi-channel seamless switching method provided by the present invention, by setting digital logic inside the chip to switch the input data in real time, there is no need to build a general DSP logic in the chip, which reduces the consumption of chip resources and reduces the design The complexity is reduced, and the cost is reduced; and the digital logic realizes seamless switching by using a cross-fading algorithm during the switching process, avoiding the problem of output signal interruption.
上述仅为本发明的优选实施例而已,并不对本发明起到任何限制作用。任何所属技术领域的技术人员,在不脱离本发明的技术方案的范围内,对本发明揭露的技术方案和技术内容做任何形式的等同替换或修改等变动,均属未脱离本发明的技术方案的内容,仍属于本发明的保护范围之内。The above are only preferred embodiments of the present invention, and do not have any limiting effect on the present invention. Any person skilled in the art, within the scope of not departing from the technical solution of the present invention, makes any form of equivalent replacement or modification to the technical solution and technical content disclosed in the present invention, and does not depart from the technical solution of the present invention. content still falls within the protection scope of the present invention.
Claims (2)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202110626730.2A CN113365189B (en) | 2021-06-04 | 2021-06-04 | Multi-channel seamless switching method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202110626730.2A CN113365189B (en) | 2021-06-04 | 2021-06-04 | Multi-channel seamless switching method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN113365189A CN113365189A (en) | 2021-09-07 |
| CN113365189B true CN113365189B (en) | 2022-08-05 |
Family
ID=77532400
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202110626730.2A Active CN113365189B (en) | 2021-06-04 | 2021-06-04 | Multi-channel seamless switching method |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN113365189B (en) |
Citations (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1943214A (en) * | 2004-08-27 | 2007-04-04 | 松下电器产业株式会社 | Information terminal |
| CN101783917A (en) * | 2010-02-09 | 2010-07-21 | 深圳市唯奥视讯技术有限公司 | Method for realizing seamless switching of high-definition videos |
| CN201657134U (en) * | 2010-02-09 | 2010-11-24 | 深圳市唯奥视讯技术有限公司 | High-definition video seamless switching device |
| CN101924883A (en) * | 2010-06-26 | 2010-12-22 | 大连捷成实业发展有限公司 | Embedded digital audio signal switching circuit and switching method |
| CN103561378A (en) * | 2008-07-31 | 2014-02-05 | 弗劳恩霍夫应用研究促进协会 | Signal generation for binaural signals |
| CN105453175A (en) * | 2013-07-22 | 2016-03-30 | 弗劳恩霍夫应用研究促进协会 | Apparatus, method and computer program for decoding an encoded audio signal |
| CN109581918A (en) * | 2018-11-29 | 2019-04-05 | 北京强度环境研究所 | A kind of multi channel signals switching equipment and signal switching method |
| US10417279B1 (en) * | 2015-12-07 | 2019-09-17 | Amazon Technologies, Inc. | Customized cross fades for continuous and seamless playback |
| CN210124004U (en) * | 2019-08-28 | 2020-03-03 | 成都成电光信科技股份有限公司 | Board card with video switching and audio playing functions |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7769189B1 (en) * | 2005-04-12 | 2010-08-03 | Apple Inc. | Preserving noise during editing of a signal |
-
2021
- 2021-06-04 CN CN202110626730.2A patent/CN113365189B/en active Active
Patent Citations (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1943214A (en) * | 2004-08-27 | 2007-04-04 | 松下电器产业株式会社 | Information terminal |
| CN103561378A (en) * | 2008-07-31 | 2014-02-05 | 弗劳恩霍夫应用研究促进协会 | Signal generation for binaural signals |
| CN101783917A (en) * | 2010-02-09 | 2010-07-21 | 深圳市唯奥视讯技术有限公司 | Method for realizing seamless switching of high-definition videos |
| CN201657134U (en) * | 2010-02-09 | 2010-11-24 | 深圳市唯奥视讯技术有限公司 | High-definition video seamless switching device |
| CN101924883A (en) * | 2010-06-26 | 2010-12-22 | 大连捷成实业发展有限公司 | Embedded digital audio signal switching circuit and switching method |
| CN105453175A (en) * | 2013-07-22 | 2016-03-30 | 弗劳恩霍夫应用研究促进协会 | Apparatus, method and computer program for decoding an encoded audio signal |
| US10417279B1 (en) * | 2015-12-07 | 2019-09-17 | Amazon Technologies, Inc. | Customized cross fades for continuous and seamless playback |
| CN109581918A (en) * | 2018-11-29 | 2019-04-05 | 北京强度环境研究所 | A kind of multi channel signals switching equipment and signal switching method |
| CN210124004U (en) * | 2019-08-28 | 2020-03-03 | 成都成电光信科技股份有限公司 | Board card with video switching and audio playing functions |
Also Published As
| Publication number | Publication date |
|---|---|
| CN113365189A (en) | 2021-09-07 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| EP3175446B1 (en) | Audio processing systems and methods | |
| CN102932567B (en) | Terminal and audio processing method | |
| CN109660933A (en) | A kind of device of simultaneous transmission multi-channel analog audio | |
| CN102802112A (en) | Electronic device with audio file format conversion function | |
| CN1136760C (en) | Method and apparatus for error masking in multi-channel audio signals | |
| CN105959438A (en) | Processing method and system for audio multi-channel output loudspeaker and mobile phone | |
| CN113365189B (en) | Multi-channel seamless switching method | |
| JP5629429B2 (en) | Audio playback apparatus and audio playback method | |
| CN101924883A (en) | Embedded digital audio signal switching circuit and switching method | |
| JP2005502247A (en) | Audio playback device | |
| WO2005084077A1 (en) | Acoustic processing device | |
| US10680640B2 (en) | Power-saving current-mode digital-to-analog converter (DAC) | |
| EP1758428A1 (en) | Acoustical signal processing apparatus | |
| CN216017039U (en) | Multichannel audio frequency inserts resampling device | |
| CN104954942A (en) | Signal input device and method for echo cancellation | |
| CN117316169B (en) | Audio data processing method, device, equipment and computer readable storage medium | |
| US11523239B2 (en) | Display apparatus and method for processing audio | |
| CN2501273Y (en) | High-power hi-fi surrounding stereo TV set | |
| CN119673195A (en) | A vehicle-mounted sadsp system | |
| JP3428149B2 (en) | Digital signal processor | |
| CN205946121U (en) | DAC sound equipment of multitone output port output frequently | |
| US7391871B2 (en) | Method and system for PCM audio ramp and decay function | |
| CN121442240A (en) | Systems and methods for operating FIR filters in multi-channel audio systems | |
| CN121397453A (en) | Audio data processing method and related device | |
| CN120378797A (en) | Audio power amplifier, electronic equipment and intelligent cabin |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| TR01 | Transfer of patent right | ||
| TR01 | Transfer of patent right |
Effective date of registration: 20221019 Address after: 201303 building C, No. 888, Huanhu West 2nd Road, Lingang New District, Pudong New Area pilot Free Trade Zone, Shanghai Patentee after: Shanghai Fourier Semiconductor Co.,Ltd. Address before: 201103 Room 903, 9 / F, building 1, 2007 Hongmei Road, Xuhui District, Shanghai Patentee before: SHANGHAI FUGUI ELECTRONIC TECHNOLOGY CO.,LTD. |
|
| CP03 | Change of name, title or address |
Address after: 201103 Shanghai City Minhang District Hongmei Road 2007 Lane Yuanzhong Industrial Park Building 1 9th Floor Patentee after: Shanghai Fourier Semiconductor Co.,Ltd. Country or region after: China Address before: 201303 building C, No. 888, Huanhu West 2nd Road, Lingang xinpian District, Pudong New Area, Shanghai Patentee before: Shanghai Fourier Semiconductor Co.,Ltd. Country or region before: China |