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#include "BIQUAD.h"
192c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent#include "FO_1I_D32F32Cll_TRC_WRA_01_Private.h"
202c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent
212c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent
222c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent/*-------------------------------------------------------------------------*/
232c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent/* FUNCTION:                                                               */
242c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent/*   FO_1I_D32F32Cll_TRC_WRA_01_Init                                       */
252c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent/*                                                                         */
262c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent/* DESCRIPTION:                                                            */
272c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent/*   These functions initializes a BIQUAD filter defined as a cascade of   */
282c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent/*   biquadratic Filter Sections.                                          */
292c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent/*                                                                         */
302c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent/* PARAMETERS:                                                             */
312c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent/*   pInstance    - output, returns the pointer to the State Variable      */
322c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent/*                   This state pointer must be passed to any subsequent   */
332c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent/*                   call to "Biquad" functions.                           */
342c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent/*   pTaps         - input, pointer to the taps memory                     */
352c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent/*   pCoef         - input, pointer to the coefficient structure           */
362c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent/*   N             - M coefficient factor of QM.N                          */
372c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent/* RETURNS:                                                                */
382c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent/*   void return code                                                      */
392c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent/*-------------------------------------------------------------------------*/
402c87e9c923b0362fabf8c97ff63997542394c428Eric Laurentvoid FO_1I_D32F32Cll_TRC_WRA_01_Init( Biquad_Instance_t         *pInstance,
412c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent                                      Biquad_1I_Order1_Taps_t   *pTaps,
422c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent                                      FO_C32_Coefs_t            *pCoef)
432c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent{
442c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent  LVM_INT32 temp;
452c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent  PFilter_State pBiquadState = (PFilter_State)  pInstance;
462c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent  pBiquadState->pDelays      = (LVM_INT32 *)    pTaps;
472c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent
482c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent  temp=pCoef->A1;
492c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent  pBiquadState->coefs[0]=temp;
502c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent  temp=pCoef->A0;
512c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent  pBiquadState->coefs[1]=temp;
522c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent  temp=pCoef->B1;
532c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent  pBiquadState->coefs[2]=temp;
542c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent}
552c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent/*------------------------------------------------*/
562c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent/* End Of File: FO_1I_D32F32Cll_TRC_WRA_01_Init.c */
572c87e9c923b0362fabf8c97ff63997542394c428Eric Laurent
58