12c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent/* 22c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent * Copyright (C) 2004-2010 NXP Software 32c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent * Copyright (C) 2010 The Android Open Source Project 42c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent * 52c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent * Licensed under the Apache License, Version 2.0 (the "License"); 62c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent * you may not use this file except in compliance with the License. 72c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent * You may obtain a copy of the License at 82c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent * 92c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent * http://www.apache.org/licenses/LICENSE-2.0 102c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent * 112c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent * Unless required by applicable law or agreed to in writing, software 122c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent * distributed under the License is distributed on an "AS IS" BASIS, 132c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 142c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent * See the License for the specific language governing permissions and 152c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent * limitations under the License. 162c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent */ 172c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent 182c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent/*-------------------------------------------------------------------------*/ 192c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent#include "BIQUAD.h" 202c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent#include "FO_1I_D16F16Css_TRC_WRA_01_Private.h" 212c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent 222c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent 232c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent/*-------------------------------------------------------------------------*/ 242c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent/* FUNCTION: */ 252c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent/* FO_1I_D16F16Css_TRC_WRA_01_Init */ 262c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent/* */ 272c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent/* DESCRIPTION: */ 282c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent/* These functions initializes a BIQUAD filter defined as a cascade of */ 292c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent/* biquadratic Filter Sections. */ 302c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent/* */ 312c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent/* PARAMETERS: */ 322c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent/* pInstance - output, returns the pointer to the State Variable */ 332c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent/* This state pointer must be passed to any subsequent */ 342c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent/* call to "Biquad" functions. */ 352c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent/* pTaps - input, pointer to the taps memory */ 362c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent/* pCoef - input, pointer to the coefficient structure */ 372c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent/* N - M coefficient factor of QM.N */ 382c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent/* RETURNS: */ 392c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent/* void return code */ 402c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent/*-------------------------------------------------------------------------*/ 412c87e9c923b0362fabf8c97ff63997542394c428Eric Laurentvoid FO_1I_D16F16Css_TRC_WRA_01_Init( Biquad_Instance_t *pInstance, 422c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent Biquad_1I_Order1_Taps_t *pTaps, 432c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent FO_C16_Coefs_t *pCoef) 442c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent{ 452c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent LVM_INT16 temp; 462c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent PFilter_State pBiquadState = (PFilter_State) pInstance; 472c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent pBiquadState->pDelays =(LVM_INT32 *) pTaps; 482c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent 492c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent temp=pCoef->A1; 502c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent pBiquadState->coefs[0]=temp; 512c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent temp=pCoef->A0; 522c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent pBiquadState->coefs[1]=temp; 532c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent temp=pCoef->B1; 542c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent pBiquadState->coefs[2]=temp; 552c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent} 562c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent/*------------------------------------------------*/ 572c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent/* End Of File: FO_1I_D16F16Css_TRC_WRA_01_Init.c */ 582c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent 59