Home

Embedded SDK (Software Development Kit)

image

Contents

1. tH Heit te Ht He Het H HHHH Figure 2 2 Telephony Directory Structure 2 2 Noise Suppression Library MOTOROLA For More Information On This Product Go to www freescale com Because of an order from the United States International Trade Commission BGA packaged product lines and part numbers indicated here currently are not available from Freescale for import or sale in the United States prior to September 2010 DSP56852VFE ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor ANGxin specific Directories ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Figure 2 3 shows the ns directory structure under telephony directory mi telephony aec s caller id cas detect cidparse cidtype1 cidtype12 cpt ctg dtmf det dtmf gen __ fdspk HC 9165 J g168 g711 g723 g726 gec L7 APIs asm sources Vs test m C Sources 1 configextram TE H vad M T 3 3 3 LY ID Peer Figure 2 3 ns Directory Structure The ns directory includes the following sub directories asm sources includes all asm sources required for Noise Suppression c sources includes APIs for Noi
2. pNS ns ch snr Word16 memMallocEM NS NUM CHANNEL sizeof Word10 pNS ns ch noise db Wordl16 memMallocEM NS NUM CHANNEL rj sizeof Word16 pNS ns ch enrg db Wordl16 memMallocEM NS NUM CHANNEL sizeof Word160 pNS ns ch enrg long db Wordl6 memMallocEM NS NUM CHANNEL rj sizeof Word16 pNS ns ch gain Word16 memMallocEM NS FFT LEN sizeof Word16 pNS ns overlap Word16 memMallocEM 2 NS FFT LEN NS FRM LEN sizeof Word10 pNS gt callback ns sCallback memMallocEM sizeof ns sCallback pNS pContextBuf Word16 memMallocIM NS FRM LEN sizeof Word16 memflag memflag amp memIsIM pNS pContextBuf if memflag false pNS ns hpf states NULL pNS ns prev ch snr NULL pNS gt ns window overlap NULL pNS ns buffer NULL pNS ns scratch for fft NULL pNS ns ch enrg NULL pNS ns ch noise NULL pNS ns ch snr NULL pNS gt ns ch noise db NULL pNS ns ch enrg db NULL pNS ns ch enrg long db NULL pNS ns ch gain NULL pNS ns overlap NULL pNS callback NULL pNS gt pContextBuf NULL nsDestroy pNS
3. Linker cmd file for DSP56852 External RAM using only external program and data memory JERCKCKCkCk kk A A A A A A k k eA A A k A A A A ko A A KK A AK kk MEMORY MOTOROLA Linking Applications with the Noise Suppression Library 5 1 For More Information On This Product Go to www freescale com Because of an order from the United States International Trade Commission BGA packaged product lines and part numbers indicated here currently are not available from Freescale for import or sale in the United States prior to September 2010 DSP56852VFE ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Linking Applications with Eragscale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 0x000082 pInterruptVector RWX ORIGIN 0x000000 LENGTH pIntRAM RWX ORIGIN 0x000082 LENGTH pEXtRAI RWX ORIGIN 0x001800 LENGTH pIntRO RX ORIGIN 0x1F0000 LENGTH xIntRA RW ORIGIN 0x000100 LENGTH xIntRAM DynamicMem RW ORIGIN 0x000800 LENGTH xStack RW ORIGIN 0x001000 LENGTH xExtRAM DynamicMem RW ORIGIN 0x001800 LENGTH XEXtRAl RW ORIGIN 0x002800 LENGTH xPeripherals RW ORIGIN Ox1FFC00 LENGTH xExtRAM2 RW ORIGIN 0x200000 LENGTH xCoreRegisters RW ORIGIN OxFFFF00 LENGTH 0x00177e Ox1EE800 0x000400 0x000700 0x000800 0x000800 0x001000
4. Description The nsDestroy function destroys the instance of Noise Suppression originally created by a call to nsCreate function Returns None Special Considerations Calling the nsDestroy function frees the memory allocated during the nsCreate function The nsDestroy function should only be called if the nsCreate function was used to create the instance If user created the instance himself bypassing the nsCreate function then the user himself must free the memory Code Example See Code Example 3 3 to learn how to use the nsProcess function MOTOROLA Noise Suppression Library Interfaces 3 13 For More Information On This Product Go to www freescale com Because of an order from the United States International Trade Commission BGA packaged product lines and part numbers indicated here currently are not available from Freescale for import or sale in the United States prior to September 2010 DSP56852VFE ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Noise Suppression Librar HERR EaleE Semiconductor Inc FAAZS89SdSC 0L0z Jequieydes 0 Joud sejejs peju eu ui ejes JO JIOdUUI 10J 9 e2s8944 WO ejqe ie e jou oje pueuno eJeu pejeoipui saequunu wed pue saul jonpojd peBexoed vog uoissiuuo OPEJ jeuoneujJeju sejejs paun eui WO JepJo ue Jo esneoeg S002 ONI YOLONGNOOIWNAS 31V9S33 4 A8 Q3AIHOSNHV MOTOROLA Go to www freescale com Noise Suppression Library For More Information On This Product 8 14 ARCHIVED B
5. This structure is used internally by NS for its operation The user should not setup this structure typedef struct Wordl6 ns hpf states Wordl6 ns prev ch snr Wordl6 ns window overlap Wordl6 ns pre emp mem Wordl6 ns buffer long ns scratch for fft Wordl6 ns not first 3 2 Noise Suppression Library For More Information On This Product Go to www freescale com MOTOROLA Because of an order from the United States International Trade Commission BGA packaged product lines and part numbers indicated here currently are not available from Freescale for import or sale in the United States prior to September 2010 DSP56852VFE ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Word16 Wordl Wordl Wordl Wordl Wordl Wordl Wordl Wordl Wordl Wordl Wordl Wordl Wordl Wordl OY OV OV OV OV OV OV OV a OV OD OV OV OV Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 ns_frame_cnt long ns_ch_enrg long ns_ch_noise long ns_tce long ns_tne ns ch snr ns ch noise db ns ch enrg db ns ch enrg long db ns update counter ns vm sum ns update flag ns last update counter ns hyster counter ns ch gain ns zflag ns ch enrg dev ns overlap ns de emp mem ns sCallback callback Word16 pContextBuf UWord16 ContextLen ns sHandle RR KKK kk ke o k ke ke ke ke ke ek ek ke k k k Function Prototypes Fe I KAKA kok ko ke
6. return NULL res nsInit pNS pConfig return pNS For details on the ns_sHandle structure please refer to Code Example 3 1 The pConfig argument points to the ns_sConfigure structure which configures the Noise Suppression operation as shown in Code Example 3 3 3 6 Noise Suppression Library MOTOROLA For More Information On This Product Go to www freescale com Because of an order from the United States International Trade Commission BGA packaged product lines and part numbers indicated here currently are not available from Freescale for import or sale in the United States prior to September 2010 DSP56852VFE ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 If the nsCreate function is called to create an instance then nsDestroy Section 3 3 4 should be used to destroy the instance Specifications Alternatively the user can allocate memory statically which requires duplicating all statements in the nsCreate function In this case the user can call the ns nit function directly bypassing the nsCreate function If the user dynamically allocates memory without calling nsCreate then the user himself must destroy the memory allocated Returns Upon successful completion the nsCreate function will return a pointer to the specific instance of Noise Suppression created If nsCreate is unsuccessful for any reason it will return NULL S
7. g168 Sy 9711 m g723 u 9726 va c sources configextram _ inputs Figure 2 4 Noise Suppression Application 2 4 Noise Suppression Library MOTOROLA For More Information On This Product Go to www freescale com Because of an order from the United States International Trade Commission BGA packaged product lines and part numbers indicated here currently are not available from Freescale for import or sale in the United States prior to September 2010 DSP56852VFE I ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Chapter 3 Noise Suppression Library Interfaces 3 1 Noise Suppression Services The NS library cancels noise from the speech signal The data to be supplied must be in 16 bit word fixed point 1 15 format as shown below MSB LSB i information bit s sign bit 3 2 Interface The C interface for Noise Suppression services is defined in the C header file ns h shown in Code Example 3 1 Code Example 3 1 C Header File ns h ifndef NS H define _ NS H This include file is the master include file for the Noise Suppression The applications using NS should include this file a BRK KKK KKK KKK k kk ko ke k k k k k k k k k k Foundational
8. 0x1FD400 0x000400 OxDFFFOO 0x000100 JR K K K K kk kk k kk kc k k kk Ck kk kk kok k ok kk k kk k k kk kk k kk kk kA k kk kk A kA kA k k k k kk k k ko k k IK k FORCE ACTIVE FconfigInterruptVector HKK Ck CkCk kk kk Ck kk kk kk A kk Ck k kk kk kk k kk kk k kk Ck k ke kk k kk kA kA X Ak kk Ck ko kk ko ke k k ko k kk k kk kc kc ke ke IK k a 5 2 ECTIONS JENCKCKCKCkC Kk k k k kk k A k k kk kk k kok k k kk kk kk kk kk k kk kk k kok kk kk k kk k kok k A IK A ke A HH I kok ApplicationInterruptVector vector c text gt pInterruptVector EK A KR kok k k A k k K kk kk K kk K k k k kK k kk k k A k k k k k k k A k k kk k A A I kkk kkk kkk kkk K ApplicationCode Place all code into Program RAM text rtlib text fp_engine text user text Place all data into Program RAM nj Pdata start addr in ROM Pdata start addr in RAM pramdata c data F Pdata ROMtoRAM length 0 nj F Pbss start addr P BSS ADDR pramdata c bss F Pbss length P BSS ADDR gt pExtRAM Noise Suppression Library For More Information On This Product Go to www freescale com MOTOROLA Because of an order from the United States International Trade Commission BGA packaged product lines and part numbers indicated here currently are not available from Freescale for import or sale in the United States prior to September 2010 DSP56
9. Motorola DSPs to expedite your application develop ment and reduce the time it takes to bring your own products to market Motorola s Noise Suppression Library is licensed for your use on Motorola processors Please refer to the standard Software License Agreement in Chapter 7 for license terms and conditions please consult with your Motorola representative for premium product licensing 1 1 Quick Start Motorola s Embedded SDK is targeted to a large variety of hardware platforms To take full advantage of a particular hardware platform use Quick Start from the appropriate Targeting Motorola DSP568xx Platform documentation For example the Targeting Motorola DSP56852 Platform manual provides more specific information and examples about this hardware architecture If you are developing an application for an DSP56852EVM board or any other DSP56852 development system refer to the Targeting Motorola DSP56852 Platform manual for Quick Start or other DSP56852 specific information Note DSP568xx refers to the specific device for which you re developing as shown in the preceding example 1 2 Overview of Noise Suppression 1 2 1 Background The Noise Suppression Library improves the overall quality of the desired speech signal by filtering out the background noise This speech enhancement process is particularly necessary in environments having abnormally high levels of ambient background noise such as an aircraft a moving vehicle
10. manual 1 2 Noise Suppression Library MOTOROLA For More Information On This Product Go to www freescale com Because of an order from the United States International Trade Commission BGA packaged product lines and part numbers indicated here currently are not available from Freescale for import or sale in the United States prior to September 2010 DSP56852VFE ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Chapter 2 Directory Structure Note DSP568xx refers to the specific device for which you re developing as shown in Chapter 1 Introduction 2 1 Required Core Directories Figure 2 1 details required platform directories rai dsp568xxevm E nos angi applications bsp Had config Hsi include H modem I multimedia security HJ signal cu speech IL Sys telephony E tools Figure 2 1 Core Directories In this example the DSP568xxEVM has no operating system nos support This platform contains the following core directories applications contains applications software that can be exercised on this platform e bsp contains board support package specific for this platform config contains default hardware and software configurations for this platform include contains SDK header files which define th
11. ns_sHandle nsCreate ns_sConfigure pConfig ns_sHandle pNS bool memflag true Result res Memory allocation for Handle pNS ns sHandle memMallocEM sizeof ns sHandle if pNS NULL return NULL Filter states buffer pNS ns hpf states Wordl6 memMallocIM 6 sizeof Wordl6 memflag memflag amp memIsIM pNS ns hpf states pNS gt ns prev ch snr Word16 memMallocEM NS NUM CHANNEL sizeof Word16 pNS gt ns window overlap Word16 memMallocEM NS DELAY sizeof Word10 pNS gt ns buffer Word16 memMallocEM 2 NS FFT LEN sizeof Word160 pNS gt ns scratch for fft long memMallocEM NS FFT LEN sizeof 10ong MOTOROLA Noise Suppression Library Interfaces 3 5 For More Information On This Product Go to www freescale com Because of an order from the United States International Trade Commission BGA packaged product lines and part numbers indicated here currently are not available from Freescale for import or sale in the United States prior to September 2010 DSP56852VFE ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Noise Suppression Librar BRR S ale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 pNS ns ch enrg long memMallocEM NS NUM CHANNEL sizeof long pNS ns ch noise long memMallocEM NS NUM CHANNEL sizeof long
12. or a noisy fac tory MOTOROLA Introduction 1 1 For More Information On This Product Go to www freescale com Because of an order from the United States International Trade Commission BGA packaged product lines and part numbers indicated here currently are not available from Freescale for import or sale in the United States prior to September 2010 DSP56852VFE ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Motorola s Noise Suppression Library works in the frequency domain and performs speech quality enhancement by spectral gain modification The speech signal is high pass filtered and transformed into frequency domain using FFT Noise is estimated and cancelled in the frequency domain The noise can celled frequency domain signal is transformed back to time domain using IFFT as depicted in Figure 1 1 Introduction Input aaa HPF Pre emphasis gt FFT at 8kHz amp Windowing Noise Estimation amp Attenuation of the Signal Noise Suppressed Speech ag De emphasis E IFFT E Figure 1 1 Functional Blocks of Noise Suppression library 1 2 2 Features and Performance The Noise Suppression Library is multichannel and re entrant For details on Memory and MIPS for a particular DSP refer to the Libraries Chapter of the appropriate Targeting
13. 20dseieaserasienaeen ss X o 0 RR Pe xi Chapter 1 Introduction Ll ANO ll 1 1 12 Overview OF Noise SHuDDEOREUL aid aw riki een ROO o ERROR RD 1 1 1 2 1 a kom ous seda ETHER a Heed eee a ehs koed anoda 1 1 122 Poule and B OE S Quien dk ox ws vcio OR Shs ews Kr 1 2 Chapter 2 Directory Structure 24 Required Core Directories 4422492440445 RXATEASPITERUEEREL ESTA UPPER E Rp 2 1 2 2 Optional Domain Specific Directories codices epe E RR Ryu 2 2 Chapter 3 Noise Suppression Library Interfaces 3 1 Noise OR o a o MERECE 3 1 3 2 IMDB ata ditta dod dedos do k ae d d EE ED dpt da ded ee 3 1 A3 Mie CAI S C co E43 O da Pee dia S OY da Pe eee E dora 3 4 3l rp n PRI ee ee ee a ee eee ee eS O ee 3 5 3 3 2 cs PP OP ee 3 9 dudo Digo o ec Tl M 3 12 3 3 4 MDR Loses idv PRESE S KERN Poth Ses PENSE SRS PSE CENT T 3 13 Chapter 4 Building the Noise Suppression Library 4 1 Building the Noise Suppression LIDGty 66 445 5405s 44s esd E ER Y 4 4 1 1 Dependency Bulla zdassh ag An SERRA ee s ka k sk dl 4 4 1 2 DM C rC rrr 4 2 MOTOROLA Table of Contents For More Information On This Product Go to www freescale com Because of an order from the United States International Trade Commission BGA packaged product lines and part numbers indicated here currently are not available from Freescale for import or sale i
14. 852VFE ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc B persesion bran ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 AAKA KAKEK kok k k kok k Kk kk k k kk k k kk Ck Kk kk kk kk k CK kok k k kok k k CK Kk k k kok A kk kkk kkk kkk kkk kkk K ApplicationData Define variables for C initialization code F_Xdata_start_addr_in_ROM F_StackAddr ADDR xStack F_StackEndAddr ADDR xStack SIZEOFW xStack 1 F_Xdata_start_addr_in_RAM Define variables for SDK mem library Data X Memory Layout _EX_BIT 0 Internal Memory Partitions for mem h partitions NUM IM PARTITIONS 1 IM ADDR 1 no IM ADDR 2 f External Memory Partition for mem h partitions NUM EM PARTITIONS 1 EM ADDR 1 FmemEXbit WRITEH EX BIT FmemNumIMpartitions WRITEH NUM IM PARTITIONS FmemNumEMpartitions EM PAI FmemIMpartitionList WRITEH ADDR xIntRAM DynamicMem 2 EH SIZEOF xIntRAM DynamicMem 1 tionList R xExtRAM DynamicMem 2 H SIZEOF xExtRAM DynamicMem 1 z AJ m 1 El I v C m E TIONS FmemEMpar AJ a 1 Ae I O Add rest of the data into External RAM const data data fp state data rtlib data F Xdata ROMtoRAM length 0 F Xbss start
15. DSP56852VFE ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Chapter 6 Noise Suppression Applications 6 1 Test and Demo Applications To verify the Noise Suppression algorithm test and demo applications have been developed Refer to the Targeting Motorola DSP568xx Platform Manual for the DSP you are using to see if the test and demo applications are available for your target MOTOROLA Noise Suppression Applications 6 1 For More Information On This Product Go to www freescale com Because of an order from the United States International Trade Commission BGA packaged product lines and part numbers indicated here currently are not available from Freescale for import or sale in the United States prior to September 2010 DSP56852VFE ductor Inc icon Freescale Sem ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Noise Suppression Applic FAAZS89SdSC 0L0z Jequieydes 0 Joud sejejs peju eu ui ejes JO JIOdUUI 10J 9 e2s8944 WO ejqe ie e jou oje pueuno eJeu pejeoipui saequunu wed pue saul jonpojd peBexoed vog uoissiuuo OPEJ jeuoneujJeju sejejs paun eui WO JepJo ue Jo esneoeg S002 ONI YOLONGNOOIWNAS 31V9S33 4 A8 Q3AIHOSNHV MOTOROLA Go to www freescale com Noise Suppression Library For More Information On This Product 6 2 ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEM
16. FM AD 2 DSP568xx User s Manual 3 Embedded SDK Programmer s Guide MOTOROLA Preface For More Information On This Product Go to www freescale com Xi Because of an order from the United States International Trade Commission BGA packaged product lines and part numbers indicated here currently are not available from Freescale for import or sale in the United States prior to September 2010 DSP56852VFE Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 FAAZS89SdSC 0L0z Jequieydes 0 Joud sejejs peju eu ui ejes JO JIOdUUI 10J 9 e2s8944 WO ejqe ie e jou oje pueuno eJeu pejeoipui saequunu wed pue saul jonpojd peBexoed vog uoissiuuo OPEJ jeuoneujJeju sejejs paun eui WO JepJo ue Jo esneoeg S002 ONI YOLONGNOOIWNAS 31V9S33 4 A8 Q3AIHOSNHV MOTOROLA Go to www freescale com Noise Suppression Library For More Information On This Product Xii ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Chapter 1 Introduction Welcome to Motorola s Family of Digital Signal Processors DSPs This document describes the Noise Suppression Library which is a part of Motorola s comprehensive Embedded Software Development Kit SDK for its DSPs In this manual you will find all the information required to use and maintain the Noise Suppression Library interface and algorithms Motorola provides these algorithms to you for use on
17. Freescale Semiconductor Inc SEMICONDUCTOR MOTOROLA Embedded SDK Software Development Kit Noise Suppression Library SDK149 D Rev 1 07 22 2002 Because of an order from the United States International Trade Commission BGA packaged product lines and part numbers indicated here currently are not available from Freescale for import or sale in the United States prior to September 2010 DSP56852VFE ef H s mworonoLA digital dna Motorola Inc 2002 All rights reserved intelligence everywhere For More Information On This Product Go to www freescale com Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 FAAZS89SdSC 0L0z Jequieydes 0 Joud sejejs peju eu ui ejes JO JIOdUUI 10J 9 e2s8944 WO ejqe ie e jou oje pueuno eJeu pejeoipui saequunu wed pue saul jonpojd peBexoed vog uoissiuuo OPEJ jeuoneujJeju sejejs paun eui WO JepJo ue Jo esneoeg S002 ONI YOLONGNOOIWAS 31V9S33 ld A8 Q3AIHOSNV For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Contents About This Document A ee ee ee E eee b kk Abd k ee ee 1X A P R R O E O ERE EE ESO ee RD aS OS 1X Suggested Reade lt lt skduikuaik skkaiab k k Kika k n AE d RR AA 1X KDM ON ode eee d hoes E o oes ees VIE P EVER VP dS X Definitions Acronyms and Abbreviations 2 42446
18. ICONDUCTOR INC 2005 Chapter 7 License 7 1 Limited Use License Agreement LIMITED USE LICENSE AGREEMENT PLEASE READ THIS AGREEMENT CAREFULLY BEFORE USING THIS SOFTWARE BY USING OR COPYING THE SOFTWARE YOU AGREE TO THE TERMS OF THIS AGREEMENT The software in either source code form Source or object code form Object cumulatively hereinafter Software is provided under a license agreement Agreement as described herein Any use of the Software including copying modifying or installing the Software so that it is usable by or accessible by a central processing unit constitutes acceptance of the terms of the Agreement by the person or persons making such use or if employed the employer thereof Licensee and if employed the person s making such use hereby warrants that they have the authority of their employer to enter this license agreement If Licensee does not agree with and accept the terms of this Agreement Licensee must return or destroy any media containing the Software or materials related thereto and destroy all copies of the Software The Software is licensed to Licensee by Motorola Incorporated Motorola for use under the terms of this Agreement Motorola retains ownership of the Software Motorola grants only the rights specifically granted in this Agreement and grants no other rights Title to the Software all copies thereof and all rights therein including all rights in any intellectual property including p
19. Include Files Fe KAKA kok ko eee eee e k MOTOROLA Noise Suppression Library Interfaces 3 1 For More Information On This Product Go to www freescale com Because of an order from the United States International Trade Commission BGA packaged product lines and part numbers indicated here currently are not available from Freescale for import or sale in the United States prior to September 2010 DSP56852VFE ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Noise Suppression Libra ie eeale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 include port h RR KKK kok k kok k kok ck kokck ck ok ck kk kkk Flags CKCKCKCkck kckck kok ck kok ck kk ke ke e e e kx define NS HPF ON 1 define NS HPF OFF 0 KOR KKK kok k kok k kok k kCKCKCkCKCkCk OR kckck ck kck k kok ck kck ck kkk k Structure for NS OKCKCKCKCKCkCkCKCk kCk k k Ck Ck kCk Ck kok ck k kc k kck ck X kk kok kok kk Callback structure typedef struct void pCallback void pCallbackArg Wordl6 pSamples UWord16 NumSamps void pCallbackArg ns sCallback User configurable structure This structure has to be used by the user to configure NS typedef struct ns_sCallback Callback ns_sConfigure Definitions for Noise suppression used in the create function define NS_NUM_CHANNEL 16 define NS_DELAY 24 define NS_FFT_LEN 64 define NS FRM LEN 80 NS handle structure
20. Library functions Chapter 4 Building the Noise Suppression Library tells how to execute the system library project build Chapter 5 Linking Applications with the Noise Suppression Library describes organization of the Noise Suppression Library Chapter 6 Noise Suppression Applications describes the use of Noise Suppression Library through test demo applications Chapter 7 License provides the license required to use this product Suggested Reading We recommend that you have a copy of the following references DSP56852 Family Manual DSP56852FM AD DSP566xx User s Manual for the DSP device you re implementing Inside CodeWarrior Core Tools Metrowerks Corp MOTOROLA Preface ix For More Information On This Product Go to www freescale com Because of an order from the United States International Trade Commission BGA packaged product lines and part numbers indicated here currently are not available from Freescale for import or sale in the United States prior to September 2010 DSP56852VFE Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Conventions This document uses the following notational conventions Typeface Symbol Meaning Examples or Term Courier Commands command Foundational include files Monospaced Type parameters code examples a data structure of type vad tConfigure expressions data
21. OdUUI 10J 9 e2s8944 WO ejqe ie e jou oje pueuno eJeu pejeoipui saequunu wed pue saul jonpojd peBexoed vog uoissiuuo OPEJ jeuoneujJeju sejejs paun eui WO JepJo ue Jo esneoeg S002 ONI YOLONGNOOIWNAS 31V9S33 4 A8 Q3AIHOSNV MOTOROLA Go to www freescale com Noise Suppression Library For More Information On This Product 4 4 I ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Chapter 5 Linking Applications with the Noise Suppression Library 5 1 Noise Suppression Library The Noise Suppression Library includes APIs which provide an interface between the user application and the Noise Suppression modules To invoke Noise Suppression APIs must be called in this order nsCreate y nsInit y nsProcess y nsDestroy y For details on the Noise Suppression interface see Chapter 3 5 1 1 Library Sections The Noise Suppression Library contains the following data ROM section that must be placed in internal memory through the linker command file NS ROM This section contains the high pass filter coefficients for Noise Suppression Code Example 5 1 shows a sample inker cmd file which may be used in testing the Noise Suppression library Code Example 5 1 inker cmd File EA ee A kk k kk kk Ck kk kk k k kk kk k kk k ke kk k KKK KK KKK ke KA KKK KKK KKK KKK KK KK kkk KK IK
22. Y FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Chapter 4 Building the Noise Suppression Library 4 1 Building the Noise Suppression Library The Noise Suppression Library combines all of the components described in previous sections into one library ns lib To build this library a Metrowerks CodeWarrior project ns mcp is provided This project and all the necessary components to build the Noise Suppression library are located in the wosMelephonyWis directory of the SDK directory structure There are two methods to execute a system library project build dependency build and direct build 4 1 1 Dependency Build Dependency build is the easiest approach and requires no additional work on the user s part If you add the Noise Suppression library project ns mcp to your application project as shown in Figure 4 1 the Noise Suppression Library will automatically build when the application is built External RAM ia vf M c Files Link Order Targets v Fie Code Data a Dependencies 76K 10K mz HC SDK Configuration 238 220 m a SDK Projects 0 0 A Ai bsp mep n a nia m Hb sys mep n a nia m f tools mcp n a nia m n a n a a 30K 1K a MSL 56800E 46K 8K a C Sources 199 573 m B testmain c 11 0 m B test ns c 188 573 m 13 files Figure 4 1 Dependency Build for the Noise S
23. addr X BSS ADDR rtlib bss lo rtlib bss bss MOTOROLA Linking Applications with the Noise Suppression Library 5 3 For More Information On This Product Go to www freescale com Because of an order from the United States International Trade Commission BGA packaged product lines and part numbers indicated here currently are not available from Freescale for import or sale in the United States prior to September 2010 DSP56852VFE ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Linking Applications with Eragscale Semis nductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 F Xbss length X BSS ADDR Copy DATA gt xExtRAM EK A Ke k k A k k A k k K k k k k K kk K kK kk k k k kk k k k kok k A kk k k kk k A k kkk k k kkk kk kkk kkk kK NS ROM Data EK A KK kk k ko Ie k k K kK k k k Noise suppression ROM data EK Kk KR kk kk k k kk k kok NS ROM data NS ROM bss EK A AK kK kk kk kk kk k ke kk koe gt xIntRAM FArchlO 0x0000 FArchCore ADDR xCoreRegisters FArchInterrupts ADDR pInterruptVector 5 4 Noise Suppression Library For More Information On This Product Go to www freescale com MOTOROLA Because of an order from the United States International Trade Commission BGA packaged product lines and part numbers indicated here currently are not available from Freescale for import or sale in the United States prior to September 2010
24. are not available from Freescale for import or sale in the United States prior to September 2010 DSP56852VFE ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Motorola reserves the right to make changes without further notice to any products herein Motorola makes no warranty representation or guarantee regarding the suitability of its products for any particular purpose nor does Motorola assume any liability arising out of the application or use of any product or circuit and specifically disclaims any and all liability including without limitation consequential or incidental damages Typical parameters which may be provided in Motorola data sheets and or specifications can and do vary in different applications and actual performance may vary over time All operating parameters including Typicals must be validated for each customer application by customer s technical experts Motorola does not convey any license under its patent rights nor the rights of others Motorola products are not designed intended or authorized for use as components in systems intended for surgical implant into the body or other applications intended to support or sustain life or for any other application in which the failure of the Motorola product could create a situation where personal injury or death may occur Should Buyer purchase or use Motorola products for any such unintended o
25. arrant that the Software is free of infringement of any third party patents copyrights trade secrets or other intellectual property rights or that Motorola has the right to grant the licenses contained herein Motorola does not represent or warrant that the Software is free of defect or that it meets any particular requirements or need of the Licensee or that it conforms to any documentation or that it meets any standards License Motorola shall not be responsible to maintain the Software provide upgrades to the Software or provide any field service of the Software Motorola reserves the right to make changes to the Software without further notice to Licensee The Software is not designed intended or authorized for use as components in systems intended for surgical implant into the body or other applications intended to support or sustain life or for any other application in which the failure of the Software could create a situation where personal injury or death may occur Should Licensee purchase or use the Software for any such unintended or unauthorized application Licensee shall indemnify and hold Motorola and its officers employees subsidiaries affiliates and distributors harmless against all claims costs damages and expenses and reasonable attorney fees arising out of directly or indirectly any claim of personal injury or death associated with such unintended or unauthorized use even if such claim alleges that Motorola was
26. atents copyrights and trade secrets applicable thereto shall remain vested in Motorola For the Source Motorola grants Licensee a personal non exclusive non assignable revocable royalty free right to use copy and make derivatives of the Source solely in a development system environment in order to produce object code solely for operating on a Motorola semiconductor device having a central processing unit Derivative Object For the Object and Derivative Object Motorola grants Licensee a personal non exclusive non assignable revocable royalty free right to copy use and distribute the Object and the Derivative Object solely for operating on a Motorola semiconductor device having a central processing unit Licensee agrees to a not use modify or copy the Software except as expressly provided herein b not distribute disclose transfer sell assign rent lease or otherwise make available the Software any derivatives thereof or this license to a third party except as expressly provided herein c not remove obliterate or otherwise defeat any copyright trademark patent or proprietary notices related to the Software d not in any form export re export resell ship or divert or cause to be exported re exported resold shipped or diverted directly or indirectly the Software or a direct product thereof to any country which the United States government or any agency thereof at the time of export or re export requires an
27. cale com vii Because of an order from the United States International Trade Commission BGA packaged product lines and part numbers indicated here currently are not available from Freescale for import or sale in the United States prior to September 2010 DSP56852VFE Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 FAAZS89SdSC 0L0z Jequieydes 0 Joud sejejs peju eu ui ejes JO JIOdUUI 10J 9 e2s8944 WO ejqe ie e jou oje pueuno eJeu pejeoipui saequunu wed pue saul jonpojd peBexoed vog uoissiuuo OPEJ jeuoneujJeju sejejs paun eui WO JepJo ue Jo esneoeg S002 ONI YOLONGNOOIWNAS 31V9S33 4 A8 Q3AIHOSNHV MOTOROLA Go to www freescale com Noise Suppression Library For More Information On This Product viii ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 About This Document This manual describes the Noise Suppression algorithm for use with Motorola s Embedded Software Development Kit SDK Audience This document targets software developers implementing noise suppression functions within software applications Organization This manual is arranged in the following sections Chapter 1 Introduction provides a brief overview of this document Chapter 2 Directory Structure provides a description of the required core directories Chapter 3 Noise Suppression Library Interfaces describes Noise Suppression
28. der from the United States International Trade Commission BGA packaged product lines and part numbers indicated here currently are not available from Freescale for import or sale in the United States prior to September 2010 DSP56852VFE
29. ductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Index A API x Application Programming Interface x asm_source 2 3 C c sources 2 3 COMI x Communication Port 1 x D Dependency Build 4 1 Direct Build 4 2 DSP x Digital Signal Processor x E EVM x Evaluation Module x F FFT xi Fast Fourier Transforms xi FIR xi Finite Impulse Response xi G G 165 Services 3 1 g165Create 3 5 g165lnit 3 9 g165Process 3 12 H HPF xi High Pass Filter xi VO xi Input Output xi IDE xi Integrated Development Environment xi IFFT xi Inverse Fast Fourier Transform xi TIR xi Infinite Impulse Response xi IRQA xi Interrupt Request A xi MOTOROLA L Linking Applications 5 1 M MAC xi Multiply Accumulate xi Metrowerks CodeWarrior 4 1 MIPS xi Million Instructions Per Second xi MSB xi Most Significant Bit xi N NS xi Noise Suppression xi O OMR xi Operating Mode Register xi OnCE xi On Chip Emulation xi P PC xi Program Counter xi S SDK xi Software Development Kit xi SNR xi Signal to Noise Register xi SP xi Stack Pointer xi SPI xi Serial Peripheral Interface xi SR xi Status Register xi SRC xi Source xi T telephony 2 2 algorithms 2 2 test_g165 2 3 Index For More Information On This Product Go to www freescale com Because of an order from the United States International Trade Commission BGA packaged product lines and part numbers indicated here currently
30. e Application Programming Interface e Sys contains required system components e tools contains utilities used by system components Also there are optional directories that include domain specific libraries MOTOROLA Directory Structure 2 1 For More Information On This Product Go to www freescale com Because of an order from the United States International Trade Commission BGA packaged product lines and part numbers indicated here currently are not available from Freescale for import or sale in the United States prior to September 2010 DSP56852VFE ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 2 2 Optional Domain Specific Directories Directory Structure Figure 2 2 demonstrates how the Noise Suppression algorithm is encapsulated in the domain specific directories under the directory telephony which includes telephony specific algorithms EK dsp568xxevm mm ag applications C bsp ag config HJ include I modem H multimedia ERN security His signal speech HZ sys telephony aec I caller id I cas detect I cidparse Hag cidtype 1 E cidtype12 HJ cpt Hag ctg E dtmf det Hag dtmf gen B fdspk J 9165 OJ g168 HB 9711 H g723 HC 9726 zl gec E MH vad tools H H
31. export license or other government approval without first obtaining such license or approval THE SOFTWARE IS PROVIDED ON AN AS IS BASIS AND WITHOUT WARRANTY OF ANY KIND INCLUDING WITHOUT LIMITATION ANY WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE IN NO EVENT SHALL MOTOROLA BE LIABLE FOR MOTOROLA License 7 1 For More Information On This Product Go to www freescale com Because of an order from the United States International Trade Commission BGA packaged product lines and part numbers indicated here currently are not available from Freescale for import or sale in the United States prior to September 2010 DSP56852VFE ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 ANY LIABILITY OR DAMAGES OF ANY KIND INCLUDING WITHOUT LIMITATION DIRECT OR INDIRECT OR INCIDENTAL OR CONSEQUENTIAL OR PUNITIVE DAMAGES OR LOST PROFITS OR LOSS OF USE ARISING FROM USE OF THE SOFTWARE OR THE PRODUCT REGARDLESS OF THE FORM OF ACTION OR THEORY OF LIABILITY INCLUDING WITHOUT LIMITATION ACTION IN CONTRACT NEGLIGENCE OR PRODUCT LIABILITY EVEN IF MOTOROLA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE THIS DISCLAIMER OF WARRANTY EXTENDS TO LICENSEE OR USERS OF PRODUCTS AND IS IN LIEU OF ALL WARRANTIES WHETHER EXPRESS IMPLIED OR STATUTORY INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR PARTICULAR PURPOSE Motorola does not represent or w
32. from the United States International Trade Commission BGA packaged product lines and part numbers indicated here currently are not available from Freescale for import or sale in the United States prior to September 2010 DSP56852VFE Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 FAAZS89SdSC 0L0z Jequieydes 0 Joud sejejs peju eu ui ejes JO JIOdUUI 10J 9 e2s8944 WO ejqe ie e jou oje pueuno eJeu pejeoipui saequunu wed pue saul jonpojd peBexoed vog uoissiuuo OPEJ jeuoneujJeju sejejs paun eui WO JepJo ue Jo esneoeg S002 ONI YOLONGNOOIWNAS 31V9S33 4 A8 Q3AIHOSNHV MOTOROLA Go to www freescale com Noise Suppression Library For More Information On This Product iv ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 List of Figures Figure 1 1 Figure 2 1 Figure 2 2 Figure 2 3 Figure 2 4 Figure 4 1 Figure 4 2 Figure 4 3 MOTOROLA Functional Blocks of Noise Suppression library 44444 Lore DEC EOE o a are Telephony Directory SIC 5 oc ec obe be oh eek eee ak ne Directory SUCE La eknaxkbREE REFERRI REARERAERXATEERTEEE ARES Noise Suppression A PODOS UD sud cd Rd Rm ERR RE tesan kiTa REA E RP A E Dependency Build for the Noise Suppression Library nox e PL Panu BER o2 564556945455 2565 40598459665 40569 26 FACIET TP ENSE ES List of Figures For More Information On This Prod
33. ke eee ke k endif MOTOROLA EXPORT ns sHandle nsCreate ns sConfigure pConfig EXPORT Result nsInit ns sHandle pNS ns sConfigure pConfig EXPORT Result nsProcess ns sHandle pNS Wordl6 pSamples UWord16 NumSamples EXPORT void nsDestroy ns sHandle pNS Noise Suppression Library Interfaces For More Information On This Product Go to www freescale com Interface 3 3 Because of an order from the United States International Trade Commission BGA packaged product lines and part numbers indicated here currently are not available from Freescale for import or sale in the United States prior to September 2010 DSP56852VFE ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Noise Suppression Libra iege ale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 3 3 Specifications The following pages describe the Noise Suppression Library functions Function arguments for each routine are described as in out or inout An in argument means that the parameter value is an input only to the function An out argument means that the parameter value is an output only from the function An inout argument means that a parameter value is an input to the function but the same parameter is also an output from the function Typically inout parameters are input pointer variables in which the caller passes the address of a pre allocated data structure to a function The function stores its results
34. l6 pSamples UWordl6 NumSamples Required Header ns h Arguments Table 3 3 nsProcess Arguments pNS in Handle to an instance of Noise Supression pSamples in Pointer to the input sample buffer NumSamples in Number of samples in the input buffer Description The nsProcess function suppresses noise on the input samples It calls the Callback function once a valid output is available The user can call the nsProcess function any number of times as long as there is data Returns Upon successful completion nsProcess returns PASS if there is any error nsProcess returns FAIL Special Considerations None Code Example See Code Example 3 3 to learn how to use the nsProcess function 3 12 Noise Suppression Library MOTOROLA For More Information On This Product Go to www freescale com Because of an order from the United States International Trade Commission BGA packaged product lines and part numbers indicated here currently are not available from Freescale for import or sale in the United States prior to September 2010 DSP56852VFE ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 3 3 4 nsDestroy Call s Specifications void nsDestroy ns_sHandle pNS Required Header ns h Arguments Table 3 4 nsDestroy Arguments pNS in Handle to an instance of Noise Suppression generated by a call to nsCreate
35. n the United States prior to September 2010 DSP56852VFE ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Chapter 5 Linking Applications with the Noise Suppression Library IA Noise Suppression LIDIA aeuo eR VOY EV PRVEE oo AAA ea Am Luar DOE Ba o od Road dc dos tco qood Un ub ded dca lc uo dc dm GA Chapter 6 Noise Suppression Applications 6 1 Test and Demo Applications 22142450 dob A EE WERE Sr Chapter 7 License T4 Limited Lise License Agreement oasaeXxsoeszaodec ee red eR Y eo KC REY ii Noise Suppression Library For More Information On This Product Go to www freescale com MOTOROLA Because of an order from the United States International Trade Commission BGA packaged product lines and part numbers indicated here currently are not available from Freescale for import or sale in the United States prior to September 2010 DSP56852VFE ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 List of Tables Table 3 1 WS Peete ALTOS assu bh ieee dE k Ode ULTRI beens kd dud Table 3 2 TE S P i e o dc A BR ee eh k DR OR RE RO RE Table 3 3 PSP ie I a Cus Ops eh et eck MER RU ROCA IH EROR io es Table 3 4 sDesteoy ATTEN sa Laschnaska earch dds dikeen rr Ore Iku urek MOTOROLA List of Tables For More Information On This Product Go to www freescale com Because of an order
36. nce is passed to ns nit along with the Noise Suppression configuration structure pConfig Code Example 3 5 Use of nslnit Interface include ns h Note This example shows the use of nsInit function when the user does not use nsCreate function define FRAME rj H EN 80 ns sConfigure pConfig ns sHandle pNS Noise Suppressor Data Wordl6 ns hpf states 6 Wordl6 ns prev ch snr NS NUM CHANNEL Wordl6 ns window overlap NS DELAY Word16 ns buffer 2 NS FFT LEN long ns scratch for fft NS FFT LEN long ns ch enrg NS NUM CHANNEL long ns ch noise NS NUM CHANNEL Word16 ns ch snr NS NUM CHANNEL Word16 ns ch noise db NS NUM CHANNEL 3 10 Noise Suppression Library MOTOROLA For More Information On This Product Go to www freescale com Because of an order from the United States International Trade Commission BGA packaged product lines and part numbers indicated here currently are not available from Freescale for import or sale in the United States prior to September 2010 DSP56852VFE ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC Wordl6 ns ch enrg db NS NUM CHANNEL Wordl6 ns ch enrg long db NS NUM CHANNEL Wordl6 ns ch gain NS FFT LEN Wordl6 ns overlap 2 NS FFT LEN NS FRM LEN Wordl16 Context buff NS FRM LEN void main Result re
37. negligent regarding the design or manufacture of the Software The term of this Agreement is for as long as Licensee uses the Software for its intended purpose and is not in default of any provisions of this Agreement Motorola may terminate this Agreement if Licensee is in default of any of the terms and conditions of this Agreement This Agreement shall be governed by and construed in accordance with the laws of the State of Arizona and can only be modified in a writing signed by both parties Licensee agrees to jurisdiction and venue in the State of Arizona By using modifying installing compiling or copying the Software Licensee acknowledges that this Agreement has been read and understood and agrees to be bound by its terms and conditions Licensee agrees that this Agreement is the complete and exclusive statement of the agreement between Licensee and Motorola and supersedes any earlier proposal or prior arrangement whether oral or written and any other communications relative to the subject matter of this Agreement 7 2 Noise Suppression Library MOTOROLA For More Information On This Product Go to www freescale com Because of an order from the United States International Trade Commission BGA packaged product lines and part numbers indicated here currently are not available from Freescale for import or sale in the United States prior to September 2010 DSP56852VFE ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semicon
38. ode Example 3 4 as a reference you must write your own callback procedure This callback procedure processes the result as specified by the user The simplest method may be to copy the result into an output buffer as shown in Code Example 3 4 MOTOROLA Noise Suppression Library Interfaces 3 9 For More Information On This Product Go to www freescale com Because of an order from the United States International Trade Commission BGA packaged product lines and part numbers indicated here currently are not available from Freescale for import or sale in the United States prior to September 2010 DSP56852VFE ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Noise Suppression Libra ie geale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Code Example 3 4 Sample Callback Procedure void Callback void pCallbackArg Wordl6 pSamples UWordl6 NumSamples int i for i 0 i lt NumSamples i output_sample i pSamples i Copy NS output into output buffer The output_sample buffer could be as defined in Code Example 3 3 Returns Upon successful completion a value of PASS will be returned otherwise a value of FALSE will be returned Special Considerations e IfnsCreate is called then the user need not call the nsInit function which is called internally in the nsCreate function Code Example In Code Example 3 5 the application creates an instance of Noise Suppression The insta
39. pecial Considerations e The Noise Suppression application is multichannel and re entrant e If nsCreate is called then the user need not call the ns nit function which is called internally in the nsCreate function Code Example In Code Example 3 3 the application creates an instance of Noise Suppression Code Example 3 3 Use of the nsCreate Interface include assert h include mem h include ns h I H define FRAI EN 80 Wordl6 input sample FRAME Wordl6 output sample FRAME LEN T ri Function prototype void Callback void pCallbackArg Wordl6 pSamples UWordl6 NumSamples void main void ns_sHandle pNS ns_sConfigure pConfig Result res Memory allocation pConfig ns sConfigure memMallocEM sizeof ns sConfigure if pConfig NULL assert Out of Memory Initialize pConfig structure for Noise Suppression pConfig gt Callback pCallback Callback pConfig Callback pCallbackArg NULL NS handle instance pNS nsCreate pConfig if pNS NULL assert Out of Memory MOTOROLA Noise Suppression Library Interfaces 3 7 For More Information On This Product Go to www freescale com Because of an order from the United States International Trade Commission BGA packaged product lines and part numbers indicated here currently are not available from Freescale for impor
40. r unauthorized application Buyer shall indemnify and hold Motorola and its officers employees subsidiaries affiliates and distributors harmless against all claims costs damages and expenses and reasonable attorney fees arising out of directly or indirectly any claim of personal injury or death associated with such unintended or unauthorized use even if such claim alleges that Motorola was negligent regarding the design or manufacture of the part Motorola and the Stylized M Logo are registered trademarks of Motorola Inc Motorola Inc is an Equal Opportunity Affirmative Action Employer MOTOROLA and the Stylized M Logo are registered in the US Patent amp Trademark Office All other product or service names are the property of their respective owners Motorola Inc 2002 How to reach us USA EUROPE Locations Not Listed Motorola Literature Distribution P O Box 5405 Denver Colorado 80217 1 303 675 2140 or 1 800 441 2447 JAPAN Motorola Japan Ltd SPS Technical Information Center 3 20 1 Minami Azabu Minato ku Tokyo 106 8573 Japan 81 3 3440 3569 ASIA PACIFIC Motorola Semiconductors H K Ltd Silicon Harbour Centre 2 Dai King Street Tai Po Industrial Estate Tai Po N T Hong Kong 852 26668334 Technical Information Center 1 800 521 6274 HOME PAGE http www motorola com semiconductors MOTOROLA For More Information On This Product SDK149 D Go to www freescale com Because of an or
41. re Information On This Product Go to www freescale com MOTOROLA Because of an order from the United States International Trade Commission BGA packaged product lines and part numbers indicated here currently are not available from Freescale for import or sale in the United States prior to September 2010 DSP56852VFE Freescale Semiconductor Ince Suppression Library ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Metrowerks CodeWarrior Project eR EG STIEG GUI Target Wc bb BITES FG Dependencies SDK Configure Biers UISasseniule DESINE S Mak F Stop Bong bt FIT GIG FH MSL 56800E FC Sources M testmain c test ns c Debug KATY Figure 4 3 Execute Make At this point if the build is successful an ns lib library file is created in the nos telephony ns Debug directory Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 MOTOROLA Building the Noise Suppression Library 4 3 For More Information On This Product Go to www freescale com Because of an order from the United States International Trade Commission BGA packaged product lines and part numbers indicated here currently are not available from Freescale for import or sale in the United States prior to September 2010 DSP56852VFE ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Building the Noise SuppresiSaneAle Semiconductor Inc FAAZS89SdSC 0L0z Jequieydes 0 Joud sejejs peju eu ui ejes JO JI
42. s ns_sCallback callback_instance Instance of NS pNS ns hpf states ns hpf states pNS ns prev ch snr ns prev ch snr pNS ns window overlap ns window overlap pNS ns buffer ns buffer pNS ns scratch for fft ns scratch for fft pNS ns ch enrg ns ch enrg pNS ns ch noise ns ch noise pNS ns ch snr ns ch snr pNS ns ch noise db ns ch noise db pNS ns ch enrg db ns ch enrg db pNS ns ch enrg long db ns ch enrg long db pNS ns ch gain ns ch gain pNS ns overlap ns overlap pNS pContextBuf Context buff Initialize pConfig structure for Noise Suppression callback instance pCallback Callback callback instance pCallbackArg NULL pConfig Callback callback instance Call to Noise Suppression Init res nsInit amp pNS amp pConfig MOTOROLA Noise Suppression Library Interfaces For More Information On This Product Go to www freescale com 2005 Specifications 3 11 Because of an order from the United States International Trade Commission BGA packaged product lines and part numbers indicated here currently are not available from Freescale for import or sale in the United States prior to September 2010 DSP56852VFE ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Noise Suppression Libra ie eeale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 3 3 3 nsProcess Call s Result nsProcess ns sHandle pNS Word
43. se Suppression e test includes C sources and configuration necessary for testing Noise Suppression library modules c sources contains a sample test code configextram contains configuration files appconfig c appconfig h and linker cmd specific to Noise Suppression io contains input and reference test files MOTOROLA Directory Structure 2 3 For More Information On This Product Go to www freescale com Because of an order from the United States International Trade Commission BGA packaged product lines and part numbers indicated here currently are not available from Freescale for import or sale in the United States prior to September 2010 DSP56852VFE ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Directory Structure Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 The applications directory includes high level software that exercises the Noise Suppression Library As shown in Figure 2 4 the applications directory contains the ns application under telephony dsp568xxevm EI nos a applications I bsp feature phone intelligent speech H H D modem multimedia __ security speech L telephony H demo cpt H Am demo ctg am demo vad H dtmf det 3 dtmf gen H H ag feature phone HL 9165 H H H
44. se note that while the acronyms are in solid caps terms in the definition should be initial capped ONLY IF they are trademarked names or proper nouns API COMI DSP EVM Application Programming Interface Communication Port 1 Digital Signal Processor or Digital Signal Processing Evaluation Module Noise Suppression Library For More Information On This Product Go to www freescale com MOTOROLA Because of an order from the United States International Trade Commission BGA packaged product lines and part numbers indicated here currently are not available from Freescale for import or sale in the United States prior to September 2010 DSP56852VFE ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 FFT Fast Fourier Transforms FIR Finite Impulse Response HPF High Pass Filter VO Input Output IDE Integrated Development Environment IFFT Inverse Fast Fourier Transform IIR Infinite Impulse Response IROA Interrupt Reguest A MAC Multiply Accumulate MIPS Million Instructions Per Second MSB Most Significant Bit NS Noise Suppression OnCE On Chip Emulation OMR Operating Mode Register PC Program Counter SDK Software Development Kit SNR Signal to Noise Ratio SP Stack Pointer SPI Serial Peripheral Interface SR Status Register SRC Source References The following sources were used to produce this book 1 DSP56852 Family Manual DSP56852
45. t or sale in the United States prior to September 2010 DSP56852VFE ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Noise Suppression Librar KEES cale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Get FRAME LEN number of samples into input sample buffer res nsProcess pNS input sample FRAME LEN nsDestroy pNS if res FAIL assert Buffers could not be flushed memFreeEM pConfig return void Callback void pCallbackArg Wordl6 pSamples UWord16 NumSamples int i for i 0 i lt NumSamples i output_sample i pSamples i Copy NS output into output buffer For details about structures used in Code Example 3 3 see Code Example 3 1 Noise Suppression Library MOTOROLA For More Information On This Product Go to www freescale com Because of an order from the United States International Trade Commission BGA packaged product lines and part numbers indicated here currently are not available from Freescale for import or sale in the United States prior to September 2010 DSP56852VFE ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Specifications 3 3 2 nslnit Call s Result nsInit ns sHandle pNS ns sConfigure pConfig Required Header ns h Arguments Table 3 2 nslnit Arguments pNS in Handle to an instance of Noise Suppression pConfig in A pointer to a data str
46. types and directives Italic Calls functions statements the pConfig argument zh laa 7 defined in the C header file aec h arguments file names an applications makes a call to the Callback procedure Bold Reference sources paths refer to the Targeting DSP56852 Platform D emphasis manual Si see C Program FilesMotorola Embedded G SDK help tutorials Z Bold Italic Directory name project name and contains these core directories 5 applications contains applications software O CodeWarrior project ns mcp is gt Blue Text Linkable on line refer to Chapter 7 License 5 Number Any number is considered a 3V positive value unless preceded 10 Lu by a minus symbol to signify a P A negative value DES mr ALL CAPITAL Variables directives defined INCLUDE DSPFUNC o LETTERS constants files libraries define INCLUDE STACK CHECK L Brackets Function keys by pressing function key F7 LL a Quotation marks Returned messages the message Test Passed is displayed a Jf unsuccessful for any reason it will return Ww NULL 2 I o me lt Definitions Acronyms and Abbreviations The following list defines the acronyms and abbreviations used in this document As this template develops this list will be generated from the document As we develop more group resources these acronyms will be easily defined from a common acronym dictionary Plea
47. uct Go to www freescale com Because of an order from the United States International Trade Commission BGA packaged product lines and part numbers indicated here currently are not available from Freescale for import or sale in the United States prior to September 2010 DSP56852VFE Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 FAAZS89SdSC 0L0z Jequieydes 0 Joud sejejs peju eu ui ejes JO JIOdUUI 10J 9 e2s8944 WO ejqe ie e jou oje pueuno eJeu pejeoipui saequunu wed pue saul jonpojd peBexoed vog uoissiuuo OPEJ jeuoneujJeju sejejs paun eui WO JepJo ue Jo esneoeg S002 ONI YOLONGNOOIWNAS 31V9S33 4 A8 Q3AIHOSNHV MOTOROLA Go to www freescale com Noise Suppression Library For More Information On This Product vi ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 List of Examples Code Example 3 1 C Header Fe mal ooueassseuashzesksssAquLBsberESeRRYAE beads wa Logs Example 3 mem LIMAY Le od don No odk k RR RAO CERO ER RE RR drach Code Example 3 3 Use ofthe nsL rene ee osa OC OIN ANCHO RICH CON Code Example 3 4 Sample Callback Procedure 2 2ccccccicdesassaanebacxiaaas s Code Example 3 5 Useof nsinit eo 2 nos cc dnd REIR UEPFREPAqES RE ER SIC EK EAM Code Example 3 1 Tiered File eioaoosaduessotzwesckwse4E52445wVeEYcxskrr duad sk MOTOROLA List of Examples For More Information On This Product Go to www frees
48. ucture containing data for initializing the Noise Suppression algorithm Description The ns nit function will initialize the Noise Suppression algorithm During initialization each resource will be set to its initial values in preparation for the Noise Suppression operation Before calling the nslnit function a Noise Suppression instance must be created either by calling the nsCreate function see Section 3 3 1 or by statically allocating memory which does not require calling the nsCreate function The parameter pConfig points to a data structure of type ns sConfigure its fields initialize Noise Suppression operation in the following manner Callback A structure of type ns sCallback It describes the procedure which Noise Suppression will call once a valid output data is available The callback procedure has the following declaration void Callback void pCallbackArg Wordl6 pSamples UWordl6 NumSamples The callback procedure parameter pCallbackArg is supplied by the user in the ns sCallback structure this value is passed back to the user during the call to the callback procedure Typically pCallbackArg points to context information used by the callback procedure which the user must write pSamples is a pointer to noise suppressed data passed during a call to the Callback function from the nsProcess function NumSamples is the length of noise suppressed data in words A sample callback procedure is shown in C
49. uppression Library Because of an order from the United States International Trade Commission BGA packaged product lines and part numbers indicated here currently are not available from Freescale for import or sale in the United States prior to September 2010 DSP56852VFE MOTOROLA Building the Noise Suppression Library 4 1 For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Building the Noise SuppresiSaneAle Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 4 1 2 Direct Build Direct build allows you to build a Noise Suppression Library independently of any other build Follow these steps Step 1 Open ns mcp project as shown in Figure 4 2 m ns mcp ojx 9 Library Jn o6 s B Files Link Order Targets g File Code Data X EHESASM Sources 1K 346 m Bl ns main asm 100 0 m Bl ns estimate asm 431 0 m A ns utils asm 187 0 m Bl ns rfft asm 175 0 m Bl ns rift asm 182 0 m Bl ns fftbitrev asm 32 0 m B ns rom asm 0 346 m B ns egu asm 0 0 m ff ns offsets asm 0 0 m mac Sources 800 0 m i ns create c 387 0 m B ns init c 32 0 z B ns process c 141 0 m A ns control c 2 0 m B ns destroy c 238 0 m 14 files 1K E n Figure 4 2 ns mcp Project Step 2 Execute the build by pressing function key F7 or by choosing the Make command from the Project menu see Figure 4 3 4 2 Noise Suppression Library For Mo
50. within that data structure The actual value of the inout pointer parameter is not changed 3 4 Noise Suppression Library MOTOROLA For More Information On This Product Go to www freescale com Because of an order from the United States International Trade Commission BGA packaged product lines and part numbers indicated here currently are not available from Freescale for import or sale in the United States prior to September 2010 DSP56852VFE ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 3 3 1 nsCreate Call s Specifications ns_sHandle nsCreate ns_sConfigure pConfig Required Header ns Arguments Table 3 1 nsCreate Arguments pConfig in Points to configuration data for Noise Suppression Description The nsCreate function creates an instance of Noise Suppression The pConfig argument points to the ns sConfigure structure which configures the Noise Suppression operation For additional information see nsJnit Section 3 3 2 Multiple instances are possible During the nsCreate call any dynamic resources required by the Noise Suppression algorithm are allocated each call of nsCreate allocates 567 words of external data memory and 86 words of internal data memory The library allocates dynamic memory using the mem library routines shown in Code Example 3 2 Code Example 3 2 mem Library include ns h include mem h

Download Pdf Manuals

image

Related Search

Related Contents

Philips Softone Candle Candle energy saving bulb 872790089715903  février / mars 2010 - Ville de Saint  Enterasys (9E429-12) Expansion Module  Cooper Lighting METALUX SM-SYM-RP User's Manual  Lightolier MFA User's Manual  Single Zone VAV Systems  Für Ihre Sicherheit  Timing Gear Adjustment  

Copyright © All rights reserved.
Failed to retrieve file