固件与用户应用程序通信协议_第1页
固件与用户应用程序通信协议_第2页
固件与用户应用程序通信协议_第3页
固件与用户应用程序通信协议_第4页
固件与用户应用程序通信协议_第5页
已阅读5页,还剩50页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

添加系统控制,系统状态,ADC,DAC,GainControl及VocalCut音效的控制协议替换之前的位置对PGA添加Mute的控制ADCDACMCLKSource对I2S部分添加参数ADCDigitalDCPGAmutePGA1VoiceChangerSPDIF协议,添加GPIOGPIOSPDIFIO4Bytes2I2CSlaveAddressVocalRemover更新SPDIF参数变为17个PitchShifterPro添加MVBassClassic音效和PCMDelay音效MVBassMV3DHowling协议约 版本号约 通讯方式约 通讯模 IIC模 写时 读时 USB模式(HID协议 数据帧格 帧结 字节定 控制字定 控制字格 固件信息 系统控制参数 系统状态参数 PGA0参数 ADC0参数 AGC0参数 PGA1参数 ADC1参数 AGC1参数 DAC0参数 DAC1参数 I2S0参数 I2S1参数 SPDIF参数 GPIOConfiguration参数 GPIOWrite数据 GPIORead数据 音效个数和列表 音效参数 Auto DC DynamicRange Noise Frequency Howling Noise Pitch Silence Gain Reverb VoiceChanger Phase PitchShifter MVBass PCM Harmonic 用户自定义音效格 用户自定义 固件保存参数 固件升级 密钥参数 附录 PGA音量 附录 不同系列功能概 协议约制字定义、数据结构及传输规则,用户应用程序可以是PC机、主控或者其他用户设备。规约版本号是对本规约不同版本的标识,由大版本、中版本和小版本三部分组成。例如‘0000’代表V0.1.0固件收到查询参数命令时,不需要发送Response命令,只需上传对应的参数即可。通讯模该协议支持三种通讯模式:UART,IICUSB(HID)UARTIIC值81无IIC1bitR/W读写控制位,1bitACK,Nbytes的DATA和NbitsACK以及StopCondition。R/W为10110100b(0xB4),读时序时SlaveAddress+R/W为10110101b(0xB5)。图1IIC写时成数据为:0x04,0x03,0x00,0x00,0x00ADC00x04),数据域长度为0x03,0x00(参数代码0x00),参数值0x00,0x00,即ADC0的enable=0。数据域数据长度控制字A数据域数据长度控制字ARSLAVEA=notacknowledgeS=startconditionP=stopcondition读时

frommastertoslavefromslaveto图2IIC为0x04,长度为0为查询模式)。然后再以读时序参数。SSLAVERAAA…AP0SSLAVERAAA…P1控制字数据长度数据域R/WR/W=0:write;1:readA=acknowledgeA=notacknowledgeS=startconditionP=stopconditionfrommastertofromslavetoUSB模式(HID数据帧格控制字个PGA0GPIOConfigurationGPIOWriteGPIORead控制字格0xA5|无0xA5|固件类型(1(3节)+音效库版本号(3字节)DUKaraokeSDK标准SDK0xA5|参数代码(1字节)+参数内容(200:Standard1:Sleep10:Standard1:Reset2SystemSampleRate3SystemSample0:80001:110252:120003:160004:220505:240006:320007:441008:480004SystemMCLKSource个模块的MCLKSource选择无效。5SystemMCLK0:1:2:osc_clk(Input11.2896MHzor3:gpio_mclk_in0(Input11.2896MHzor4:gpio_mclk_in1(Input11.2896MHzor11025Hz,22050Hz,44100Hz,12000Hz,16000Hz,61:Systemrecoverdefault7~0xA5|无0xA50xFF1数(每个参数2字节)0xA5|无0xA5|0xFF(1字节)+MemoryUsage(Kbyte2)+CPUUsage(2字节)+参数变化标志(1字节)+CPUMaxFrequency(MHz,2字节)PGA00xA5|数(每个参数2字节)0Line1Left1Line1Right2Line2Left3Line2Right4MIC45MIC36Line1Leftscale:0~63,0,63量。详细对应的dB值请查看附录1。7Line1Rightscale:0~63,0,63量。详细对应的dB值请查看附录1。8Line2Leftscale:0~63,0,63量。详细对应的dB值请查看附录1。9Line2Rightscale:0~63,0,63量。详细对应的dB值请查看附录1。MIC4scale:0~63,0,63量。详细对应的dB值请查看附录1。MIC4Gain1:使能,gainboost2:使能,gainboost3:使能,gainboost4:使能,gainboostMIC3scale:0~63,0,63量。详细对应的dB值请查看附录1。MIC3Gain1:使能,gainboost2:使能,gainboost3:使能,gainboost4:使能,gainboostPGA0ZeroCross0:All1:ADC0leftPGA2:ADC0rightPGA3:AllPGA0Differential1:PGA0leftchanneldifferentialinputandrightchannelsingle-endedinput.leftchannelsingle-endedinput.3:PGA0leftandrightchanneldifferentialPGA0DifferentialLeft0:PGA0DifferentialRight18~0xA5|无0xA5|个参数2字节)ADC00xA5|参数2字节)00:All1:ADC0leftdigital2:ADC0rightdigital3:All10:All1:ADC0leftdigital2:ADC0rightdigital3:All2LeftScale:0~0x3FFF,3RightScale:0~0x3FFF,4Sample0:80001:110252:120003:160004:220505:240006:320007:441008:480005LR6DCBlockerCoefficient0:Coefficient0xFFE48k20Hz1:Coefficient0xFFC48k40Hz2:Coefficient0xFFD32k40Hz7Fade0:disable1~8MCLK0:1:2:3:4:9DCBlocker0xA5|无0xA5|数(每个参数2字节)AGC0参数0xA5|个参数2字节)0AGC0:1:leftchannel2:rightchannel3:left+right1Maxscale:0~AD0maxlevel=-3-maxlevel;AD0maxlevelrange:3~34dB用户应用程序将dB转为scale值2scale:0~ADC0Targetlevel=-3–targetdBscale3Maxscale:0~63:39.6462:38.7…-0.95dBstepdown0:-20.34Minscale:0~63:39.6462:38.7…-0.95dBstepdown0:-20.35Gainscale:0~:0::1:1.5:2:2.5:3:3.5:-4:-10:-311:-2.512:-13:-1.514:-115:-0.5dB6Frame1~40967Hold8Attack1~40969Decay1~4096NoiseGateNoiseGatescale:0~0:-1:-…2dBstepup30:-31:-NoiseGateNoiseGateHold0xA5|无0xA50xFF(1)+AGC0全部参数(2PGA1参数0xA5|参数代码(1字节)+参数内容(20Line3Left1Line3Right2Line2Left3Line2Right4FMLeft5FMRight6MIC27MIC18Line3Leftscale:0~63,0,63量。详细对应的dB值请查看附录1。9Line3Rightscale:0~63,0,63量。详细对应的dB值请查看附录1。Line2Leftscale:0~63,0,63量。详细对应的dB值请查看附录1。Line2Rightscale:0~63,0,63量。详细对应的dB值请查看附录1。FMLeftscale:0~63,0,63量。详细对应的dB值请查看附录1。FMRightscale:0~63,0,63量。详细对应的dB值请查看附录1。MIC2scale:0~63,0,63量。详细对应的dB值请查看附录1。MIC2Gain1:使能,gainboost2:使能,gainboost3:使能,gainboost4:使能,gainboostMIC1scale:0~63,0,63量。详细对应的dB值请查看附录1。MIC1Gain1:使能,gainboost2:使能,gainboost3:使能,gainboost4:使能,gainboostPGA1ZeroCross0:All1:ADC1_LPGA2:ADC1_RPGA3:AllPGA1Differential1:PGA1leftchanneldifferentialinputandrightchannelsingle-endedinput.leftchannelsingle-endedinput.3:PGA1leftandrightchanneldifferential20~0xA5|无0xA5|参数(2ADC1ADC0AGC1参数DAC0参数0xA5|参数代码(1字节)+参数内容(200:All1:DAC0leftdigital2:DAC0rightdigital3:All1Sample0:80001:110252:120003:160004:220505:240006:320007:441008:4800020:Allunmute1:Leftmute3:All3LeftScale:0~0x3FFF,4RightScale:0~0x3FFF,50:禁能otherdither60:使能70:立体声标准输出(L_oL_i;R_o2:单声道输出(L_o=(L_i+R_i)/2;89SampleEdgeSCF0:all1:leftSCF2:rightSCF3:left+rightSCFFade1~Zero0:zerosnumbervalue:1:zerosnumbervalue:2:zerosnumbervalue:3:zerosnumbervalue:4:zerosnumbervalue:5:zerosnumbervalue:6:zerosnumbervalue:7:zerosnumbervalue:MCLK0:1:2:3:4:14~0xA5|无0xA5(2DAC1参数DAC1modeDAC0LeftVolumeDAC0完全一样,详细请参考DAC0章节。I2S0参数0xA5|参数代码(1)个参数2字节)0TX1RX2Sample0:80001:110252:120003:160004:220505:240006:320007:441008:480009:8820010:9600011:17640012:1920003MCLK0:1:2:3:4:40:1:5Word0:161:202:243:3260:1:7Fade:disable~2558Data9BCLKLRCLK0xA5|无0xA5|个参数2字节)I2S1参数SPDIF参数0xA5|(200:Disable1:SPDIFRX2:SPDIFTX1Sample0:80001:110252:120003:160004:220505:240006:320007:441008:480009:8820010:9600011:17640012:192000当SPDIF2ChannelFIFO正常,右声道数据填03IO0:1:2:3:4SPDIFLock 5~0xA5|无0xA5|全部参数,每个参数2字节)GPIOConfiguration参数0xA5|0GPIO1R/W2,0Read;1+PU/PD2,0nopull-down,nopull-up;–pull-up;2–pull+PU/PDDS(drivestrength2,0pull(20uA),1-strongpull(70uA)1GPIO22~0xA5|无0xA5|0xFF(1)GPIO20GPIO1R/W2,0Read;1+PU/PD2,0nopull-down,nopull-up;–pull-up;2–pull+PU/PDDS(drivestrength2,0weakpull(20uA),1-strongpull(70uA))1GPIO22~GPIOWrite数据0xA5|个参数占2字节)0GPIO11GPIO22~GPIORead数据0xA5|无0xA5|0xFF1GPIO全部参数(20GPIO11GPIO22~0Auto1DC2DynamicRangeCompressor(DRC345Noise67Howling8Noise9PitchSilenceGainReverbReverbPhasePitchShifterMVBassPCM27~1000xA5|0xA5|0(1音效个数(1)1(2),字节),音效类型码3(2字节1(11(变长2(12(变长3(13(变长……010x81,音效类型码2对应的控制字为0x82,依次类推。0x000x040x00,0x000x02,0x000x03,0x000x000x00。则表示参数代,AutoTune并且依次对应的控制字为0x81,0x82,0x83,0x84.数据域的内容为:0x010x31,0x3A0x410x75,0x740x6F,0x540x750x6E0xA5|0(1音效个数(1)1(2),字节),音效类型码3(2字节1(11)+‘:’(0x3A)+该音效名称(变长),如果不1(1名称(变长2(1名称(变长3(1名称(变长………0xA5|数占2字节)控制字:0x81~0xFC0xA5|无0xA5|个参数占2字节)Auto001Supportedkeys(12majorscales1chromaticscale):'a'forA-flat'A'forA'b'forB-flat'B'forB'C'forC'C'forC'd'forD-flat'D'forD'e'forE-flat'E'forE'F'forF'g'forG-flat'G'forG'X'forchromatic2'n':near'u':upper'l':lower'n':nearDC00DynamicRange001crossover0~20000in*0meansfull2DRCfullfilters,order=1)2-band(LRfilters,order=0:fullfilters,order=4)2-band(Butterworthfilters,order=1)+full2-band(LRfilters,order=4)+fullband2-band(Qcontrolledfilters,order=4)+full3{724,4-9000~0in{0,0,5{100,100,60~7500in{1,1,70~7500in{1000,1000,8Q4.12scaleforfull-bandorlowerbandincaseof2-band上位机需要将界面dB值转为scale9Q4.12scaleforupperbandincaseof2-bandscaleenable+crossoverfrequency+DRCmode+q+threshold+ratio+attack+release+001cutoff0~24000in0meansdisablingtheuseoflowpassfilter2Q1.15scale341enable+cutofffrequency++001Q8.8in02304050~24000in67Q8.8in080900~24000inQ8.8in013…+filter1_enable+filter1_type++filter1_gain+filter2_enable+filter2_type++…Noise001-9000~0in2330~7500in540~7500inenable++ratio+attack+Frequency001 enable+001NoPrecise1:Preciseenable+001-90~0in2-90~0in30~7500in540~7500in50~7500inenable+lower+upper+attack+release+holdPitch001-120~120in0.10enable+0010~20~30~40~50~60enable+dry+wet+width++dam+Silence001PCM0010~enable+001cutoff30~300in20~31frequency+intensity+Voice00150~266~2003~Gain00102Scale:0~0x3FFF,3~Vocal0012~enabl

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论