Audio Debug for HiSilicon hi3518

Source: Internet
Author: User
Tags bind svn
U-boot 2010.06-svn (Jan 04 2015-13:34:55)


dram:256 MiB
Check SPI Flash Controller v350 ... Found
Spi (CS1) id:0xc2 0x20 0x18 0xC2 0x20 0x18
Spi (CS1): block:64kb chip:16mb Name: "mx25l128"
ENVCRC 0x52256d0d
Env_size = 0X3FFFC
In:serial
Out:serial
Err:serial
Press CTRL + C to stop Autoboot
cfg_boot_addr:0x58080000
16384 KiB HI_SFC at 0:0 are now current device


# # Boot load complete:1884960 bytes loaded to 0x82000000
# # SAVE to 80008000!
# # booting kernel from Legacy Image at 82000000 ...
Image Name:linux
Image Type:arm Linux Kernel image (uncompressed)
Data size:1884896 Bytes = 1.8 MiB
Load address:80008000
Entry point:80008000




load=0x80008000,_bss_end=80829870,image_end=801d42e0,boot_sp=80797168
Loading Kernel Image ...


U-boot 2010.06-svn (Jan 04 2015-13:34:55)


dram:256 MiB
Check SPI Flash Controller v350 ... Found
Spi (CS1) id:0xc2 0x20 0x18 0xC2 0x20 0x18
Spi (CS1): block:64kb chip:16mb Name: "mx25l128"
ENVCRC 0x52256d0d
Env_size = 0X3FFFC
In:serial
Out:serial
Err:serial
Press CTRL + C to stop Autoboot
HiSilicon # <INTERRUPT>
HiSilicon #
HiSilicon # Printenv
Bootcmd=setenv Setargs setenv Bootargs ${bootargs};run setargs;fload;bootm 0x82000000
Bootdelay=1
baudrate=115200
Bootfile= "Uimage"
DA=MW.B 0x82000000 FF 1000000;tftp 0x82000000 U-BOOT.BIN.IMG;SF probe 0;flwrite
DU=MW.B 0x82000000 FF 1000000;tftp 0x82000000 USER-X.CRAMFS.IMG;SF probe 0;flwrite
DR=MW.B 0x82000000 FF 1000000;tftp 0x82000000 ROMFS-X.CRAMFS.IMG;SF probe 0;flwrite
DW=MW.B 0x82000000 FF 1000000;tftp 0x82000000 WEB-X.CRAMFS.IMG;SF probe 0;flwrite
DL=MW.B 0x82000000 FF 1000000;tftp 0x82000000 LOGO-X.CRAMFS.IMG;SF probe 0;flwrite
DC=MW.B 0x82000000 FF 1000000;tftp 0x82000000 CUSTOM-X.CRAMFS.IMG;SF probe 0;flwrite
UP=MW.B 0x82000000 FF 1000000;tftp 0x82000000 UPDATE.IMG;SF probe 0;flwrite
UA=MW.B 0x82000000 FF 1000000;tftp 0x82000000 UPALL_VERIFY.IMG;SF probe 0;flwrite
TK=MW.B 0x82000000 ff 1000000;tftp 0x82000000 uimage; Bootm 0x82000000
DD=MW.B 0x82000000 FF 1000000;tftp 0x82000000 MTD-X.JFFS2.IMG;SF probe 0;flwrite
ipaddr=192.168.1.10
serverip=192.168.1.107
netmask=255.255.255.0
BOOTARGS=MEM=${OSMEM} console=ttyama0,115200 root=/dev/mtdblock1 Rootfstype=cramfs mtdparts=hi_sfc:512K (boot), 5M ( ROMFS), 7424K (user), 1536K (web), 256K (custom), 256K (logo), 1280K (MTD)
osmem=64m
ethaddr=00:12:13:39:19:8b
hwid=8043420003410427
nid=0x0007
muxctl0=
muxval0=
gpio0=
gpioval0=
Appsystemlanguage=simpchinese
Appvideostandard=pal
Stdin=serial
Stdout=serial
Stderr=serial
Verify=n
Ver=u-boot 2010.06-svn (Jan 04 2015-13:34:55)


Environment size:1435/262140 bytes
HiSilicon #


setenv ipaddr 192.168.2.10;setenv ServerIP 192.168.2.9
Setenv Bootargs ' mem=64m console=ttyama0,115200 root=/dev/mtdblock2 rootfstype=jffs2 mtdparts=hi_sfc:512k (boot), 2M ( Kernel), 8M (Rootfs), 5632K (user) '


TFTP 0x82000000 Uimage;bootm 0x82000000
Note:bootargs must be re-equipped to continue to go down, obviously, after entering Linux, the original product (Chongmai module) generally banned the console.




A certain condition is required to successfully enable ECHO Cancellation: Mono mode with a sample rate of 8kHz and a sampling accuracy of
16bit, frame length of 80 or 160 sample points, and mic acquisition of voice data AI and remote voice playback AO
The configuration frame length must be the same.
When you start resampling, you cannot use the EC function. What the hell is going on with this resample. I guess it's just for digital audio.
Problem: Staioattr.u32ptnumperfrm = 320; This is the minimum value, and if set to 160, an error occurs when configuring Aichn. If so, how does the Echo cancellation function EC work?


Here are two tests:
1, Gs_bmicin=1, recorded as PCM listen.
#./sample_audio 1


/************************************/
Press sample command as follows!
1:send audio frame to Aenc channel form AI, save them
2:read audio stream from File,decode and send AO
3:start AI to AO Loop
Q:quit Whole Audio sample


Sample Command:1
Ai (0,0) bind to aencchn:0 ok!


Please press twice ENTER to exit this sample


Test result: the same. It seems that the HiSilicon SDK does not differentiate between mic and LineIn (select) is true.


2, play 44100 acquisition rate (Hz) of AAC audio, and then use Sample_audio sampling test.
#./sample_audio 1


/************************************/
Press sample command as follows!
1:send audio frame to Aenc channel form AI, save them
2:read audio stream from File,decode and send AO
3:start AI to AO Loop
Q:quit Whole Audio sample


Sample Command:3
AI (0,0) bind to AO (0,0) ok


Please press twice ENTER to exit this sample
Result: The saved AUDIO_HISI.PCM play normally. This means that the input is PCM and the AI has resampled. This is more confused about what resample means. Dizzy.




I modified the Sample_audio.
./sample_audio 1//0:linein,1:mic
Save the AI sampled PCM data under the current directory, AUDIO_HISI.PCM
It is recommended to test with 3:start AI to AO Loop. This is the loopback that aenc/adec around the open.





















Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.