![]() |
|
If you can't view the Datasheet, Please click here to try to view without PDF Reader . |
|
Datasheet File OCR Text: |
AN163G Appendix G to Application Note 163 CRYSTAL DIGITAL POST-PROCESSING USER'S GUIDE FOR THE CS49330 Contents l Crystal Description This document includes a brief description of hardware configuration and in depth descriptions of application control modules. The main body of this document covers all the features included in the D.P.P. application. l Crystal D.P.P. Specific Features: - Multichannel and Stereo PCM Inputs - Full Bandwidth Channel (L,C,R,Ls,Rs) 3-Band Parametric Equalization - Full Bandwidth Channel (L,C,R,Ls,Rs) Tone Control - LR2LsRs Copy Module - Impulse/Noise Generator Module - Dual-Precision Bass Management - Dolby Downmix Module - Dual Zone Output - Stereo PCM + Multichannel Source Mixer DIGITAL SOUND TM Digital Post-Processing (D.P.P.) Description l Hardware Configurations Supported by the CS49330 and the Crystal D.P.P. Code l How to Control Application Modules such as: Audio Manger for Crystal D.P.P. Crystal D.P.P. Manager Tone Control/3-Band Parametric EQ Manager Dual-Precision Bass Manager CRYSTAL (R) PROC ESSING Up to 5 Discrete Channels LtRt_Downmix_Source Lt/Rt Downmix for Dualzone Output LR2LsRs_Copy_Enable SDATAN1 Lk, Rk Stereo Input Downmixed 2 Channel Output Impulse Train Generator (2048 Sample Period) MC_Input_Disable Double-Precision Bass Manager Audio Manager Lt/Rt Downmixed 2 Channel Output (Formatted as either Digital Audio or S/PDIF) Stereo_PCM_Input_Disable LR2LsRs Copy Test_Mode CMPDAT Multichannel Input Multichannel Impulse Generator (94 Samples Apart) Lk/Rk Mixer Dolby Downmix L/C/R/Ls/Rs 3-Band Parametric EQ L/C/R/Ls/Rs Bass + Treble Tone Control Up to 5.1 Discrete Channels Up to 5.1 Discrete Channels Mixer_Enable Downmix_Enable L/C/R/Ls/Rs_3B _PEQ_Enable L/C/R/LsRs _Tone_Enable Bass Management for L/C/R/Ls/Rs/LFE (Bass Management is not applicable for Lt/Rt Channels) PCM Precision, Master Volume, Master Mute, Independent Volume Control and Dynamic Channel Remap for L/C/R/Ls/Rs/LFE Multichannel Pink Noise Generator Noise_Control * See page 6 for enlarged drawing. P.O. Box 17847, Austin, Texas 78760 (512) 445 7222 FAX: (512) 445 7581 http://www.cirrus.com Copyright (c) Cirrus Logic, Inc. 2000 (All Rights Reserved) JUN `00 AN163GREV1 1 AN163G TABLE OF CONTENTS 1. OVERVIEW ..................................................................................................... 4 1.1 Crystal D.P.P. Multichannel PCM Post-Processing Application Description ..................... 4 1.2 Crystal D.P.P. and Multichannel Audio Processing Module Terminology .......................... 4 1.2.1 Multichannel PCM Input ........................................................................................ 4 1.2.2 LR2LsRs Copy ...................................................................................................... 5 1.2.3 Mixer ..................................................................................................................... 5 1.2.4 Dolby Downmix ..................................................................................................... 5 1.2.5 Tone Control and 3-Band Parametric Equalization ............................................... 5 1.2.6 Dual-Precision Bass Manager ............................................................................... 5 1.2.7 Delay ..................................................................................................................... 5 2. HARDWARE CONFIGURATION ................................................................ 7 2.1 Supported Input/Output Modes .......................................................................................... 7 2.1.1 Configuring the XMT958/AUDAT3 Data Format ................................................... 7 2.1.2 S/PDIF (AES/EBU) Channel Status Block Control ................................................ 8 2.1.3 S/PDIF (AES/EBU) Validity Bit Control ............................................................... 11 2.2 Application Messaging ..................................................................................................... 11 2.3 Unsolicited Messages (Read-Only) ................................................................................. 11 3. APPLICATION MODULES ......................................................................... 12 3.1 Audio Manager for Crystal D.P.P. .................................................................................... 13 3.1.1 Audio_Control: (Index 0x00) ............................................................................... 15 3.1.2 Noise_Control: (Index 0x01) ............................................................................... 15 3.2 Crystal D.P.P. Manager ................................................................................................... 16 3.2.1 Mixer Coefficients ................................................................................................ 20 3.2.2 Karaoke Capable Function .................................................................................. 20 3.2.3 Karaoke Downmix Coefficients: .......................................................................... 20 3.3 Dual-Precision Bass Manager ......................................................................................... 21 3.3.1 Understanding the Dual-Precision Bass Manager .............................................. 26 3.4 Tone Control and 3-Band Parametric Equalization Manger ............................................ 28 3.4.1 Controlling the Level for Treble and Bass Boost/Cut .......................................... 35 3.4.2 Controlling the Corner Frequencies of the LPF/HPF for Bass and Treble Control ...................................................................................................... 36 3.4.3 Controlling the Three-band Parametric EQ ......................................................... 36 Contacting Cirrus Logic Support For a complete listing of Direct Sales, Distributor, and Sales Representative contacts, visit the Cirrus Logic web site at: http://www.cirrus.com/corporate/contacts/ Dolby Digital, AC-3, Dolby Pro Logic and Dolby Surround are trademarks and the "Dolby Digital Logo", "Dolby" and the double-"D" symbol are registered trademarks of Dolby Laboratories Licensing Corporation. DTS and DTS Digital Surround are trademarks and the "DTS Logo" is a registered trademarks of the Digital Theater Systems Corporation. The "Crystal Logo" and the "Crystal Digital Sound Processing Logo" are registered trademarks of Cirrus Logic, Inc. Preliminary product information describes products which are in production, but for which full characterization data is not yet available. Advance product information describes products which are in development and subject to development changes. Cirrus Logic, Inc. has made best efforts to ensure that the information contained in this document is accurate and reliable. However, the information is subject to change without notice and is provided "AS IS" without warranty of any kind (express or implied). No responsibility is assumed by Cirrus Logic, Inc. for the use of this information, nor for infringements of patents or other rights of third parties. This document is the property of Cirrus Logic, Inc. and implies no license under patents, copyrights, trademarks, or trade secrets. No part of this publication may be copied, reproduced, stored in a retrieval system, or transmitted, in any form or by any means (electronic, mechanical, photographic, or otherwise) without the prior written consent of Cirrus Logic, Inc. Items from any Cirrus Logic website or disk may be printed for use by the user. However, no part of the printout or electronic files may be copied, reproduced, stored in a retrieval system, or transmitted, in any form or by any means (electronic, mechanical, photographic, or otherwise) without the prior written consent of Cirrus Logic, Inc.Furthermore, no part of this publication may be used as a basis for manufacture or sale of any items without the prior written consent of Cirrus Logic, Inc. The names of products of Cirrus Logic, Inc. or other vendors and suppliers appearing in this document may be trademarks or service marks of their respective owners which may be registered in some jurisdictions. A list of Cirrus Logic, Inc. trademarks and service marks can be found at http://www.cirrus.com. 2 AN163GREV1 AN163G LIST OF FIGURES Figure 1. Crystal D.P.P. Block Diagram ......................................................................................... 6 Figure 2. Filter Topology of Dual-Precision Bass Manager .......................................................... 26 Figure 3. Bass Manager Processing Unit ..................................................................................... 27 Figure 4. Subwoofer Summing Module ........................................................................................ 27 LIST OF TABLES Table 1. Input/Output Configurations Supported By: Crystal D.P.P. Code .................................... 7 Table 2. Professional Channel Status bytes 0, 1 and 3 ................................................................. 8 Table 3. Consumer Channel Status Bytes 0, 1 and 3 .................................................................... 9 Table 4. Unsolicited Messages .................................................................................................... 11 Table 5. Audio Manager for Crystal D.P.P. .................................................................................. 13 Table 6. Crystal D.P.P. Manager ................................................................................................. 16 Table 7. Dual-Precision Bass Manager ........................................................................................ 21 Table 8. Tone Control + 3-Band Parametric EQ Manager ........................................................... 28 Table 9. Shelf Gain Values for Tone Control ............................................................................... 35 AN163GREV1 3 AN163G 1. OVERVIEW This software user's guide covers the multichannel PCM Crystal Digital Post-Processing (D.P.P.) application code. This code is designed to run exclusively on the CS49330, which in a Dual-DSP system would act as the digital post-processor to a CS49325, CS49326, CS49328 or the CS49329 that produces up to 5.1 discrete channels of PCM from such decoding algorithms as: AC-3TM, DTS(R), MPEG Multichannel, Crystal Original Surround and MPEG-2 AAC. There is no license requirement for using the Crystal D.P.P. code or the IC that this code runs on, other than a Dolby Pro LogicTM license from Dolby Laboratories. However, most systems that would use this code should already have a Dolby Digital license for the primary decoder. This document contains only the Crystal D.P.P. audio IC application code-specific information, such as: Audio Manager for Crystal D.P.P., Crystal D.P.P. Manager, Tone Control and 3-Band Parametric Equalization Manager. For a description of hardware configuration and in-depth descriptions of application messaging protocol, application control modules and application configuration examples other than those pertaining to the Crystal D.P.P. specific features, please refer to AN163. The main processing blocks in the Crystal D.P.P. 5.1 channel PCM post-processing application code are: LR2LsRsCopy, Pink Noise/Impulse Generator, Lt/Rt Downmix, Full Bandwidth Channel (L,C,R,Ls,Rs) 3-Band Parametric Equalization, Full Bandwidth Channel (L,C,R,Ls,Rs) Tone Control, Double-Precision Bass Management and Audio Manager (which offers: Independent and Master Volume Control, Independent Channel Muting, Independent Channel Delay, and Channel Remap). The Lk/Rk Mixer module provides an option for an additional stereo PCM input which may be mixed into the multichannel PCM. Depending on the design, it may be desirable to output a 2 channel (Lt,Rt) downmix of the multichannel PCM input prior to post-processing. This is facilitated by the Lt/Rt Downmix module which outputs the 2 channel downmix via the XMT (S/PDIF) port of the CS49330. Other processing features include a L and R channel to Ls and Rs channel copy module and a test module which is capable of generating noise and impulse signals on selected channels of the multichannel PCM input overriding the multichannel input to the CS49330. 1.2 Crystal D.P.P. and Multichannel Audio Processing Module Terminology 1.2.1 Multichannel PCM Input Although this is really not a PCM processing function, it is nevertheless worth description. This block is responsible for capture and generation of the multichannel PCM input from the port configured for multichannel PCM input to the CS49330. Note that it is possible to disable this function (see Figure 1) in which case the multichannel PCM input is undefined. It is up to the user to configure the Mixer appropriately (i.e. zero-out multichannel input) to ensure predictable output in this circumstance. 1.1 Crystal D.P.P. Multichannel PCM PostProcessing Application Description Figure 1 is a block diagram of the Crystal D.P.P. multichannel PCM post-processing application. The diagram gives an idea of the processing sequence of the various modules in the Crystal D.P.P. application code (DPP_3XXX.LD). The primary goal of the Crystal D.P.P. multichannel PCM post-processing application code is to off-load typical back-end processing performed on multichannel PCM output from a front-end audio decoder. 4 AN163GREV1 AN163G 1.2.2 LR2LsRs Copy This block, if enabled (please refer to Section 3.2 "Crystal D.P.P. Manager"), replaces the Ls and Rs channel data with those from the L and R channels, respectively. Pink Noise Generator, 94 Sample Impulse Generator, and 2048 Sample Impulse Train Generator If the test mode function is set to 10 (please refer to Section 3.2 "Crystal D.P.P. Manager"), the input multichannel PCM is replaced by either "Pink Noise" or the "94 Sample Impulse Generator", on a selected channel. If the test mode function is set to 01 (please refer to Section 3.2 "Crystal D.P.P. Manager"), the input multichannel PCM is replaced by "2048 Sample Impulse Train Generator". Pink Noise refers to the "pink" spectrum, having equal energy for equal logarithmic units of frequency, and with a Gaussian distribution of instantaneous amplitude. It has a bandwidth from 500 Hz to 2 KHz to the -3 dB points, with slopes of 18 dB/octave below 500 Hz and above 2 KHz for all but the LFE channel. The LFE channel noise is band-limited by a LPF with a -6 dB response up to 80 Hz and a 24 dB/octave slope. The levels for L, C, R and LFE channels are -30 dBFS while the levels for Ls,Rs,Lsb,Rsb channels are -27 dBFS. Please refer to both Section 3.1 "Audio Manager for Crystal D.P.P." and Section 3.2 "Crystal D.P.P. Manager" for how to enable this feature. Alternatively the host may select one of two styles of Impulse Generation (either a Discrete Channel 94-Sample Impulse or a Synchronous All-Channel 2048 Sample Impulse Train). Please refer to both Section 3.1 "Audio Manager for Crystal D.P.P." and Section 1 "Crystal D.P.P. Block Diagram" for how to enable either of these features. any and all of the 6 channels of multichannel PCM input. Please refer to Section 3.2 "Crystal D.P.P. Manager"for how to enable this feature. It is up to the user to ensure that the mixing of PCM does not overflow. 1.2.4 Dolby Downmix This processing block, if enabled, performs all the multichannel downmix modes prescribed by Dolby for 5.1 channel downmix. Please refer to Section 3.2 "Crystal D.P.P. Manager" for how to enable this feature. 1.2.5 Tone Control and 3-Band Parametric Equalization Each full bandwidth channel (L,C,R,Ls,Rs) is provided with independent tone control and a 3band parametric equalizer with separately controllable pre-attenuation, post-gain and downloadable biquad coefficients for each band. Please refer to Section 3.4 "Tone Control and 3Band Parametric Equalization Manger" for how to enable and control these processing features. 1.2.6 Dual-Precision Bass Manager A highly flexible and general bass management module is provided that enables the user to cover all standard bass management functions in the context of multichannel input and output configurations (please refer to Section 3.3 "Dual-Precision Bass Manager"). 1.2.7 Delay Each of the 6 output channels may be independently delayed from -5 ms to 20 ms (please refer to Section 3.1 "Audio Manager for Crystal D.P.P."). Figure 1, located on the following page, is an enlarged version of the Crystal D.P.P. Block Diagram found on the cover page. 1.2.3 Mixer This processing block, if enabled, allows the optional stereo PCM input to be flexibly mixed into AN163GREV1 5 6 Up to 5 Discrete Channels Lt/Rt Downmix for LtRt_Downmix_Source Dualzone Output SDATAN1 Lk, Rk LR2LsRs_Copy_Enable Stereo Input Downmixed 2 Channel Output Lt/Rt Downmixed 2 Channel Output Double-Precision Impulse Train Generator (2048 Sample Period) MC_Input_Disable Stereo_PCM_Input_Disable Bass Manager Audio Manager (Formatted as either Digital Audio or S/PDIF) LR2LsRs Copy Test_Mode CMPDAT Multichannel Input Multichannel Impulse Generator (94 Samples Apart) Up to 5.1 Discrete Channels Mixer_Enable Downmix_Enable L/C/R/Ls/Rs_3B _PEQ_Enable L/C/R/LsRs _Tone_Enable Bass Management for L/C/R/Ls/Rs/LFE (Bass Management is not applicable for Lt/Rt Channels) Up to 5.1 Discrete Channels L/C/R/Ls/Rs Lk/Rk Mixer Dolby Downmix 3-Band Parametric EQ L/C/R/Ls/Rs Bass + Treble Tone Control PCM Precision, Master Volume, Master Mute, Independent Volume Control and Dynamic Channel Remap for L/C/R/Ls/Rs/LFE Multichannel Pink Noise Generator Noise_Control Figure 1. Crystal D.P.P. Block Diagram AN163GREV1 AN163G AN163G 2. HARDWARE CONFIGURATION After download, and before kickstarting the application (please see Section 2.2 "Application Messaging" for more information on kickstarting), the host has the option of changing the default hardware configuration. Address checking for serial communication and data type and format for digital data input and output can be changed through hardware configuration settings. The entire hardware configuration can only be changed immediately after download. on the port being fed Multichannel input even if the Multichannel PCM input is to be ignored (please refer to Section 3.2 "Crystal D.P.P. Manager" on how to configure the software to ignore Multichannel PCM input) in addition to valid clocks on the output. I/O Configuration INPUTA INPUTB INPUTC OUTPUTA OUTPUTB OUTPUTC OUTPUTD OUTPUTE Description Input Data Type Input Data Format Input SCLK/Data Edge Output Master/Slave Clock Setup Output Data Format Output MCLK Rate Output SCLK Rate Output SCLK/Data Edge Supported Modes 4,5 2,3,7..9 0, 1 0,1 0...7 0...3 0...3 0...1 2.1 Supported Input/Output Modes The CS49330 has two input ports and two output ports (of the two output ports, one is configurable to act as either a S/PDIF or I2S output). The CS49300 Family datasheet describes the digital audio formats supported by the ports and gives a description of the ports themselves. The capabilities of each port are presented in the CS49300 Family datasheet although all configurations are not supported by all softwares. Each Application Code User's Guide (AN161AN163) specifies the exact input/output modes supported by the application. For Crystal D.P.P. multichannel PCM-Processing code, in order to transfer of all 5.1 channels of PCM out of the CS4932X which initially decoded the AC-3, DTS, MPEG Multichannel, etc. data stream, multichannel mode is recommended. Please refer to the CS49300 Family Datasheet for more information on these hardware I/O configurations. The following input/output modes are supported when the Crystal D.P.P. code is active: IMPORTANT: Regardless of how the CS49330 is configured for operation while running the Crystal D.P.P. Multichannel PCM post-processing application code, it is assumed that there is a clock Table 1. Input/Output Configurations Supported By: Crystal D.P.P. Code 2.1.1 Configuring the XMT958/AUDAT3 Data Format The following commands must be sent to configure the data present on the XMT958/AUDAT3 pin to S/PDIF format that is driven from the supplied MCLK that is 256 Fs: 0x800271 0xf7ffff 0x800171 0x021000 The following commands must be sent to configure the data present on the XMT958/AUDAT3 pin to S/PDIF format that is driven from the supplied MCLK that is 512 Fs: 0x800271 0xf7ffff 0x800171 0x061000 AN163GREV1 7 AN163G The following commands must be sent to configure the data present on the XMT958/AUDAT3 pin to I2S format that is driven from the supplied MCLK that is 256 Fs (set by default in D.P.P.): 0x800171 0x0a1000 The following commands must be sent to configure the data present on the XMT958/AUDAT3 pin to I2S format that is driven from the supplied MCLK that is 512 Fs: 0x800171 0x0e1000 One of the above configurations must be sent before kickstart. 2.1.2 S/PDIF (AES/EBU) Channel Status Block Control The CS49330 offers the "minimum" professional implementation of control over the IEC60958 channel status bits. According to the IEC60958 specification, this means that the host has control over the setting of the "PRO" bit in the channel status word (Channel Status Byte 0, Bit 0). "Professional use of the channel status block" will be implemented if the host sets the PRO bit to a state of logic 1. The additional following channel status bits may also be set by the host: Channel Status Byte 0, Bits 1-5; Channel Status Byte 1, Bits 0-7; and Channel Status Byte 3, Bits 0 and 1. Please refer to Table 2 for the IEC60958 definition for the setting of each bit or set of bits. 0 0 1 bit 1 0 1 bits 2 3 4 000 bit 1 1 1 X bit 5 0 1 bits 6 0 0 1 1 X 0 0 1 X 7 0 01 10 11 BYTE 0 PRO = 1 Consumer use of channel status block Professional use of channel status block Audio Normal Audio Non-Audio Encoded audio signal emphasis Emphasis not indicated. Receiver defaults to no emphasis with manual override enabled None. Rec. manual override disabled 50/15 S. Rec. manual override disabled CCITT J.17. Rec. man. override disabled All other states of bits 2-4 are reserved Lock: Source Sample Frequency Locked - default Unlocked Fs: Sample Frequency Not indicated. Receiver default to 48 kHz and manual override or auto set enabled 48 kHz. Man. override or auto disabled 44.1 kHz. Man. override or auto disabled 32 kHz. Man. override or auto disabled BYTE 1 bits 0 1 2 3 Channel Mode 0 0 0 0 Mode not indicated. Receiver default to 2-channel mode. Manual override enabled 0 0 0 1 Two-channels. Man. override disabled 0 0 1 0 Single channel. Man. override disabled 0 0 1 1 Primary/Secondary (Ch. A is primary) Manual override disabled 0 1 0 0 Stereophonic. (Ch. A is left) Manual override disabled. 0 1 0 1 Reserved for user defined application 0 1 1 0 Reserved for user defined application 1 1 1 1 Vector to byte 3. Reserved X X X X All other states of bits 0-3 are reserved. bits 4 5 6 7 User bits management 0 0 0 0 Default, no user info indicated 0 0 0 1 192 bit block structure Preamble `Z' starts block 0 0 1 0 Reserved 0 0 1 1 User defined application X X X X All other states of bits 4-7 are reserved. BYTE 3 Vectored target byte Reserved bits 0-7 XXXXXX Table 2. Professional Channel Status bytes 0, 1 and 3 8 AN163GREV1 AN163G BYTE 0 PRO = 0 (consumer) Consumer use of channel status block Professional use of channel status block Audio Digital Audio Non-Audio Copy / Copyright Copy inhibited / copyright asserted Copy permitted / copyright not asserted Pre-emphasis - if bit 1 is 0 (dig. audio) None - 2 channel audio 50/15 s - 2 channel audio Reserved - 2 channel audio Reserved - 2 channel audio Reserved - 4 channel audio if bit 1 is 1 (non-audio) Digital data All other states of bits 3-5 are reserved Mode Mode 0 (defines bytes 1-3) All other states of bits 6-7 are reserved BYTE 1 - Category Code 001 6 Broadcast reception of digital audio 0 Japan 1 United States 0 Europe 1 Electronic software delivery X All other states are reserved BYTE 1 - Category Code 100 6 Laser Optical 0 CD - compatible with IEC-908 0 CD - not comp. with IEC-908 (magneto-optical) X All other states are reserved BYTE 1 - Category Code 110 6 Magnetic tape or disk 0 DAT 0 Digital audio sound VCR X All other states are reserved BYTE 1 - Category Code 101 6 Musical Instruments, mics, etc. 0 Synthesizer 0 Microphone X All other states are reserved BYTE 1 Category Code General Experimental Reserved Solid state memory Broadcast recep. of digital audio Digital/digital converters A/D converters w/o copyright A/D converters w/ copyright (using Copy and L bits) * 0 1 1 1 X X X Broadcast recep. of digital audio 1 0 0 X X X X Laser-optical * 1 0 1 X X X X Musical Instruments, mics, etc. 1 1 0 X X X X Magnetic tape or disk 1 1 1 X X X X Reserved bit 7 L: Generation Status. Only category codes:001XXXX, 0111XXX,100XXXX * 0 Original/Commercially pre-recorded data * 1 No indication or 1st generation or higher All other category codes * 0 No indication or 1st generation or higher * 1 Original/Commercially pre-recorded data The subgroups under the category code groups listed above are described in tables below. Those not listed are reserved. The Copy and L bits form a copy protection scheme for original works. Further explanations can be found in the proposed amendment (TC84) to IEC-958. bits 0 1 2 3 4 5 0 0 0 000 * 00 XX * 0 0 0 1XX * 0 0 1X XX 0 1 0X XX * 0 1 10 0X * 1X 6 0 1 X X X X X X BYTE 1 - Category Code 010 6 Digital/digital conv. & signal processing 0 PCM encoder/decoder 0 Digital sound sampler 0 Digital signal mixer 0 Sample-rate converter X All other states are reserved BYTE 3 Fs: Sample Frequency 44.1 kHz 48 kHzr 32 kHz Sample-rate converter All other states are reserved bit bit bits bits bits bits 0 0 1 1 0 1 2 0 1 3 0 1 0 1 X 3 0 X 6 0 X 4 0 0 1 1 X 4 0 X 6 0 X 5 0 0 0 0 1 5 0 X bits * * * * 3 0 0 1 0 X 4 0 0 0 0 X 5 0 1 0 0 X bits 3 4 5 000 * 100 XXX bits 3 0 * 0 * 0 * 1 X 4 0 0 1 1 X 5 0 1 0 0 X bits 3 0 * 1 X 4 0 0 X 5 0 0 X bits 3 4 5 * 000 * 100 XXX bits 0 0 0 1 1 X 1 0 1 1 1 X 2 0 0 0 0 X 3 0 0 0 0 X Table 3. Consumer Channel Status Bytes 0, 1 and 3 AN163GREV1 9 AN163G "Consumer use of the channel status block" will be implemented if the host sets the PRO bit to a state of logic 0. The additional following channel status bits may also be set by the host: Channel Status Byte 0, Bits 1-5; Channel Status Byte 1, Bits 0-7; and Channel Status Byte 3, Bits 0 and 1. Please refer to Table 3 for the IEC60958 definition for the setting of each bit or set of bits. The channel status bits map to the DSP Write Data Word in the following manner (please refer to Table 7 in AN163): Channel Status Byte 0, Bit 0 = maps to bit 8 in the DSP Write Data Word. Channel Status Byte 0, Bits 1:5 = map to bits 9:13 in the DSP Write Data Word. Channel Status Byte 1, Bits 0:7 = map to bits 14:21 in the DSP Write Data Word. Channel Status Byte 3, Bits 0 and 1 = map to bits 22 and 23 in the DSP Write Data Word. Please refer to the IEC60958 Specification for more a more detailed explanation of the channel status block definitions. The following command performs a following messages can be used to control the Channel Status of Channel A (or Channel B): 0x800072 (or 0x800073) 0xhhhhhh (DSP Data Write Word) writes the value of 0xhhhhhh absolutely. 0x800272 (or 0x800273) 0xhhhhhh (DSP Data Write Word; data is mask) ANDs with the mask 0x800172 (or 0x800173) 0xhhhhhh (DSP Data Write Word; data is mask) ORs with the mask For example the following command sets the Channel Status Block of the Left Subframe (Channel A) for: Consumer Mode (Byte 0, Bit 0 = 0), 48 kHz Fs (Byte 3, Bit 0 and 1 = 01), Category Code = General (Byte 1, Bits 0:7 = 000000000), 2 Audio Channels without Pre-Emphasis and Copy Prohibited (Byte 0, Bits 1:5 = 00000): 0x800272 0xFFFF00 0x800172 0x800000 For example the following command sets the Channel Status Block of the Right Subframe (Channel B) for: Consumer Mode (Byte 0, Bit 0 = 0), 32 kHz Fs (Byte 3, Bits 0 and 1 = 11), Category Code = General (Byte 1, Bits 0:7 = 000000000), 2 Audio Channels without Pre-Emphasis and Copy Prohibited (Byte 0, Bits 1:5 = 00000): 0x800273 0xFFFF00 0x800173 0xC00000 The first word performs a logical "AND" of the register with the second word, which acts as a mask. The values located in the bit locations "AND'ed" with a one are preserved, while the locations "AND'ed" with a zero are cleared. The third word performs a logical "OR" of the same register with the fourth word, which contains the necessary CSW Bits which the user wants to set. 10 AN163GREV1 AN163G 2.1.3 S/PDIF (AES/EBU) Validity Bit Control In addition to the Channel Status Block Control, the Validity Bit in the IEC60958 stream may also be set by the host to indicate if the according audio sample is fit for conversion to analog. The following command must be sent to SET the IEC60958 Validity Bit: 0x800271 0xFFBFFF The following command must be sent to CLEAR the IEC60958 Validity Bit: 0x800171 0x004000 2.2 Application Messaging Please refer to Section 3 "Application Messaging", AN163 for details regarding all application messaging. 2.3 Unsolicited Messages (Read-Only) No Write Message. No Read Request. Unsolicited Read Response = 0x8700HH 0xhhhhhh 0xHH = index, 0xhhhhhh = data value Index 0x10 Variable PLL_Out_Of_Lock Bit 23 = 1. Bits 22:0 = Reserved. Dataword Content Table 4. Unsolicited Messages AN163GREV1 11 AN163G 3. APPLICATION MODULES This section describes the standard application modules available in the Crystal D.P.P. multichannel PCM post-processing application. The following should be noted about all values in the application modules: Variables marked by `Default*' will only be initialized after download. These variables will retain their values after a soft reset. Variables marked by `Default' will be reinitialized to the values shown in this application note after download, soft reset. Variables marked by `' can be modified during runtime of any application code. Variables NOT marked by `' can NOT be modified during runtime of any application code. Only those values which are presented as valid or which fall within the specified range should be written to the application module variables. If a value which falls outside the stated range is written to a variable, functionality of the application is not guaranteed and erroneous output could result. All bits that are not defined should be considered reserved and written with 0's unless specified otherwise. For variables such as volume and scaling factors, the real number range of 0.0-1.0 is written as 0x000000-0x7FFFFF. This range is linear, i.e. 1/4 volume, or -12 dB, is represented as 0x1FFFFF and is equivalent to a value of 0.25. The formula for converting variable settings from a hexadecimal number into dB is as follows: 20 * log (variable setting/max value for variable) e.g. 20 * log (0x1FFFFF/0x7FFFFF) == -12 dB Numbers preceded by 0x should be interpreted as hex, and numbers followed by `b' should be interpreted as binary. All values sent to the CS49330 should be converted to hexadecimal. Likewise all values read from the part are in hexadecimal. 12 AN163GREV1 AN163G 3.1 Audio Manager for Crystal D.P.P. Write Opcode = 0x88; Read Opcode = 0x09; Read Response Opcode = 0x89 Write Message = 0x8800HH 0xhhhhhh Read Request Message = 0x0900HH; Read Response Message = 0x8900HH 0xhhhhhh 0xHH = index, 0xhhhhhh = data value Index 0x00 Variable AUDIO_MGR_CONTROL Dataword Content Bit 9 = Delay_Granularity 0/1 = ms/16 sample. Bit 4 = PLL_Enable = 0/1 = Disable/Enable Phase Locked Loop generation of DSP clock. It is mandatory that the PLL be enabled for the CS49330. Bit 0 = Kickstart_Enable = 0/1 = Disable/Enable Kickstart of application. Default = 0x000000 0x01 NOISE_CONTROL Bit 8 = 94_Sample_Impulse_Enable = 0/1 = Disables/Enables Impulses 94 Samples apart. Bit 6 = Band_Pass_Filtered_Bass_Noise_Enable = 0/1 = Disable/Enable. Note: Bit 6 and Bit 4 are mutually exclusive. Set only one HIGH. Bit 5 = Level_Select = 0/1 = Normal Level / High Level White Noise output. Refer to Section 3.1.2 "Noise_Control: (Index 0x01)". Note: Bit 5 should only be set HIGH if Bit 4 or Bit 6 has been set HIGH. Bit 4 = White_Noise_Enable = 0/1 = Pink/White Noise output. Note: Bit 6 and Bit 4 are mutually exclusive. Set only one HIGH. Bits 3:0 = Output _Channel = 0...5 = L, C, R, Ls, Rs, LFE channel output. Default = 0x000000 0x03 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 PCM_PRECISION MASTER_VOLUME L_VOLUME C_VOLUME R_VOLUME LS_VOLUME RS_VOLUME LFE_VOLUME MUTE DAO0_CHANNELA DAO1_CHANNELA DAO2_CHANNELA 1...24 = Precision of output PCM. Default* = 24 0x800000-0x7FFFFF (-1.0 to 1.0). Default* = 0x7FFFFF 0x800000-0x7FFFFF (-1.0 to 1.0). Default* = 0x7FFFFF 0x800000-0x7FFFFF (-1.0 to 1.0). Default* = 0x7FFFFF 0x800000-0x7FFFFF (-1.0 to 1.0). Default* = 0x7FFFFF 0x800000-0x7FFFFF (-1.0 to 1.0). Default* = 0x7FFFFF 0x800000-0x7FFFFF (-1.0 to 1.0). Default* = 0x7FFFFF 0x800000-0x7FFFFF (-1.0 to 1.0). Default* = 0x7FFFFF 0/1 = Unmute/mute audio. This is a soft mute. Default = 0 0...7 = Channel typea for Digital Audio Output 0. Any channel may be mapped to any valid number of outputs. Default* = 0(L) 0...7 = Channel typea for Digital Audio Output 1. Any channel may be mapped to any valid number of outputs. Default* = 2(R) 0...7 = Channel typea for Digital Audio Output 2. Any channel may be mapped to any valid number of outputs. Default* = 3(Ls) Table 5. Audio Manager for Crystal D.P.P. AN163GREV1 13 AN163G Index 0x11 0x12 0x13 0x14 Variable DAO3_CHANNELA DAO4_CHANNELA DAO5_CHANNELA SAMPLING_FREQUENCY _CODE Dataword Content 0...7 = Channel typea for Digital Audio Output 3. Any channel may be mapped to any valid number of outputs. Default* = 4(Rs) 0...7 = Channel typea for Digital Audio Output 4. Any channel may be mapped to any valid number of outputs. Default* = 1(C) 0...7 = Channel typea for Digital Audio Output 5. Any channel may be mapped to any valid number of outputs. Default* = 5(LFE) 0..2 = Sampling Frequency code to be set by host in case of PCM-only input applications. Irrelevant for non-PCM processing. 0 = 48 KHz (note b) 1 = 44.1 KHz (note c) 2 = 32 KHz (note d) Default* = 0 0x17 PLL_REGISTER_1 Register 1 value for Phase Locked Loop (no Fs generation). The following values should be used for each corresponding CLKIN frequency: Default* = 0x05F1BF 0x18 PLL_REGISTER_2 Register 2 value for Phase Locked Loop (no Fs generation). The following values should be used for each corresponding CLKIN frequency: Default* = 0x002F7D 0x1c 0x1d 0x1e 0x1f LT_VOLUME RT_VOLUME DAO6_CHANNELA DAO7_CHANNELA 0x800000-0x7FFFFF (-1.0 to 1.0). Default* = 0x7FFFFF 0x800000-0x7FFFFF (-1.0 to 1.0). Default* = 0x7FFFFF 0...7 = Channel typea for Digital Audio Output 6. Any channel may be mapped to any valid number of outputs. Default* = 6(Lt) 0...7 = Channel typea for Digital Audio Output 7. Any channel may be mapped to any valid number of outputs. Default* = 7(Rt) Table 5. Audio Manager for Crystal D.P.P. (Continued) Notes: a. Channel type 0...7 corresponds to Channels L, C, R, Ls, Rs, LFE, Lt, and Rt respectively. Lt and Rt refer downmixed outputs. If the source made available to the decoder is a 5.1 Channel AC-3 stream, these outputs will be Pro Logic encoded and should be considered to be Lt and Rt. However, for a 2.0 Channel AC-3 stream, these outputs will be simply L and R. b. Pre-loaded coefficients will provide a 80 Hz Crossover if input Fs is 48 kHz. A different set of coefficients must be downloaded for 96 kHz or 192 kHz Fs support. c. Pre-loaded coefficients will provide a 80 Hz Crossover if input Fs is 44.1 kHz. A different set of coefficients must be downloaded for 88.2 kHz or 176.4 kHz Fs support. d. Pre-loaded coefficients will provide a 80 Hz Crossover if input Fs is 32 kHz. A different set of coefficients must be downloaded for 64 kHz or 128 kHz Fs support. See definition in AN163, page 28. See definition AN163, page 28. "Default" vs. "Default*" 14 AN163GREV1 AN163G 3.1.1 Audio_Control: (Index 0x00) Bit 4: PLL_Enable Enables the use of the Phase Locked Loop (PLL) to generate internal DSPCLK from the desired external CLKIN. 0 - Disables PLL 1 - Enables PLL The register values in PLL_Register_1 (0x17) and PLL_Register_2 (0x18) define the desired DSP clock and reference CLKIN used. The default values at download, setup a 86 MHz DSPCLK from a 12.288 MHz external CLKIN. These register values should be downloaded prior to Kickstart with PLL_Enable. For other system requirements, please contact the factory for appropriate register values. Bit 0: Kickstart Enable Puts CS49330 into run-time mode. Indicates that all hardware and software configuration has been completed and CS49330 can start the application. 0 - Application continues waiting for kickstart 1 - Application is kickstarted 3.1.2 Noise_Control: (Index 0x01) Switches ON Pink/White Noise in Channels L, C, R, Ls, Rs, and LFE. Pink/White noise will not be enabled unless the Output_Channel is set to a value in the range 0x0 - 0x5. AN163GREV1 15 AN163G 3.2 Crystal D.P.P. Manager Write Opcode = 0x92; Read Opcode = 0x13; Read Response Opcode = 0x93 Write Message = 0x9200HH 0xhhhhhh Read Request Message = 0x1300HH; Read Response Message = 0x9300HH 0xhhhhhh 0xHH = index, 0xhhhhhh = data value Index 0x00 Variable DPP_CONTROL Dataword Content Bit 13:12 = Test_Modes. 0 = Test Mode Outputs Off. 1 = Replaces Multichannel Data with Impulse Train @ 2048 Sample Period. 2 = Replaces Multichannel Data with Pink Noise, White Noise or Impulse @ 94 Sample Period, depending on setting of Noise_Control in the Audio Manager. Bit 9 = Stereo_PCM_Input_Disable = 0/1 = Enable/Disable stereo PCM (Lk/Rk) input data. Note: Stereo_PCM_Input_Disable = MC_PCM_Input_Disable = 1 is illegal due to the fact there is not input and must be setup before kickstart. Bit 8 = Mixer_Enable = 0/1 = Disable/Enable Mixer. Bit 5 = LtRt_Source = 0/1 = Pre-Mix/Post-Mix source select for LtRt downmix. Bit 4 = LtRt_Downmix_Enable = 0/1 = Disable/Enable simultaneous LtRt downmix and output via IEC60958 transmitter. Bit 2 = MC_LR2LsRs_Copy_Enable = 0/1 = Disable/Enable replacement of Multichannel PCM input Ls and Rs channel data with that in L and R channels, respectively. Bit 1 = MC_PCM_Input_Disable = 0/1 = Enable/Disable Multichannel PCM input data. Note: Stereo_PCM_Input_Disable = MC_PCM_Input_Disable = 1 is illegal due to the fact there is no input and must be setup before kickstart. Bit 0 = Dolby_Downmix_Enable = 0/1 = Disable/Enable Dolby downmix processing. Note: All other bits should be 0. Default = 0x000000 (Multichannel Pass-Through Mode) Table 6. Crystal D.P.P. Manager 16 AN163GREV1 AN163G Index 0x01 Variable INPUT_ACMOD Dataword Content Indicates configuration of input multichannel audio. Controller should set this up using AC-3 syntax based on audio configuration reported by preceding decoder. 0 = Ch1/Ch2 dual mono (1+1) 1 = C (1/0) 2 = L, R (2/0) 3 = L, C, R (3/0) 4 = L, R, S (2/1) 5 = L, C, R, S (3/1) 6 = L, R, Ls, Rs (2/2) 7 = L, C, R, Ls, Rs (3/2) Default = 0x000007 0x02 INPUT_BSMOD Indicates Karaoke mode of input multichannel audio. Controller should set this up using AC-3 syntax based on Karaoke configuration reported by preceding decoder (typically AC-3 only). 0 = Main audio service, not Karaoke 1...6 = Not used in receiver products. 7 = Main audio service, Karaoke (acmod > 1) Default = 0x000000 0x03 OUTPUT_MODE Desired output speaker configuration. 0 = 2/0 Lt, Rt Dolby Surround compatible (equation in AN163). 1 = 1/0 C 2 = 2/0 L, R 3 = 3/0 L, C, R 4 = 2/1 L, R, S (Ls = Rs = S - 3 dB) 5 = 3/1 L, C, R, S (Ls = Rs = S - 3 dB) 6 = 2/2 L, R, Ls, Rs 7 = 3/2 L, C, R, Ls, Rs Note: Undesired Channel outputs should be explicitly muted by setting the corresponding Ch_Vol (see Section 3.1 "Audio Manager for Crystal D.P.P.") to 0.0 Default = 0x000007 0x04 DUALMODE Desired output configuration in case of dual mono (Input_acmod=0). 0 = Stereo 1 = Left Mono 2 = Right Mono 3 = Mixed-Mono. Default = 0x000000 Table 6. Crystal D.P.P. Manager (Continued) AN163GREV1 17 AN163G Index 0x05 Variable Dataword Content KARAOKE_CAPABLE_ENABLE 0/1 = Disables/Enables Karaoke capable downmix mode (default is Karaoke aware) in case multi-channel input is indicated as Karaoke (Input_bsmod = 7 and Input_acmod > 1). Default = 0x000000 0x06 DOWNMIX_SLEV Nominal downmix level to be used for surrounds. Controller should set this based on surround mix level reported by preceding decoder. Default = 0x5a827a = -3 dB 0x07 DOWNMIX_CLEV Nominal downmix level to be used for center. Controller should set this based on center mix level reported by preceding decoder. Default = 0x5a827a = -3 dB 0x08 COMPRESSION_CONTROL Indicates compression control mode used in preceding decoder. Valid only for AC3 as: 0 = Custom Mode 0 (Analog Dialnorm) 1 = Custom Mode 1 (Digital Dialnorm) 2 = Line Out Mode 3 = RF Remodulation Mode For modes 0 and 1, 11 dB attenuation is performed before downmix. For modes 2 and 3, no attenuation is performed since the preceding decoder will ensure headroom by applying dynamic range compression (only for AC-3). Note: For all multichannel sources other than AC-3, maintain the default value of 0x000001. The resulting 11 dB attenuation should be compensated in the analog domain. Default = 0x000001 0x09 MIXER_COEFF_L2L Mixer configuration parameter, scales Left channel of multichannel PCM as summed forward into Left channel. Default = 0x7fffff = 0dB 0x0a MIXER_COEFF_LK2L Mixer configuration parameter, scales Left channel of mix-in stereo input as summed forward into Left channel. Default = 0x000000 = 0 0x0b MIXER_COEFF_RK2L Mixer configuration parameter, scales Right channel of mix-in stereo input as summed forward into Left channel. Default = 0x000000 = 0 0x0c MIXER_COEFF_C2C Mixer configuration parameter, scales Center channel of multichannel PCM as summed forward into Center channel. Default = 0x7fffff = 0dB 0x0d MIXER_COEFF_LK2C Mixer configuration parameter, scales Left channel of mix-in stereo input as summed forward into Center channel. Default = 0x000000 = 0 Table 6. Crystal D.P.P. Manager (Continued) 18 AN163GREV1 AN163G Index 0x0e Variable MIXER_COEFF_RK2C Dataword Content Mixer configuration parameter, scales Right channel of mix-in stereo input as summed forward into Center channel. Default = 0x000000 = 0 0x0f MIXER_COEFF_R2R Mixer configuration parameter, scales Right channel of multichannel PCM as summed forward into Right channel. Default = 0x7fffff = 0 dB 0x10 MIXER_COEFF_LK2R Mixer configuration parameter, scales Left channel of mix-in stereo input as summed forward into Right channel. Default = 0x000000 = 0 0x11 MIXER_COEFF_RK2R Mixer configuration parameter, scales Right channel of mix-in stereo input as summed forward into Right channel. Default = 0x000000 = 0 0x12 MIXER_COEFF_LS2LS Mixer configuration parameter, scales Left Surround channel of multichannel PCM as summed forward into Left Surround channel. Default = 0x7fffff = 0 dB 0x13 MIXER_COEFF_LK2LS Mixer configuration parameter, scales Left channel of mix-in stereo input as summed forward into Left Surround channel. Default = 0x000000 = 0 0x14 MIXER_COEFF_RK2LS Mixer configuration parameter, scales Right channel of mix-in stereo input as summed forward into Left Surround channel. Default = 0x000000 = 0 0x15 MIXER_COEFF_RS2RS Mixer configuration parameter, scales Right Surround channel of multichannel PCM as summed forward into Right Surround channel. Default = 0x7fffff = 0 dB 0x16 MIXER_COEFF_LK2RS Mixer configuration parameter, scales Left channel of mix-in stereo input as summed forward into Right Surround channel. Default = 0x000000 = 0 0x17 MIXER_COEFF_RK2RS Mixer configuration parameter, scales Right channel of mix-in stereo input as summed forward into Right Surround channel. Default = 0x000000 = 0 0x18 MIXER_COEFF_LFE2LFE Mixer configuration parameter, scales LFE channel of multichannel PCM as summed forward into LFE channel. Default = 0x7fffff = 0dB 0x19 MIXER_COEFF_LK2LFE Mixer configuration parameter, scales Left channel of mix-in stereo input as summed forward into LFE channel. Default = 0x000000 = 0 0x1a MIXER_COEFF_RK2LFE Mixer configuration parameter, scales Right channel of mix-in stereo input as summed forward into LFE channel. Default = 0x000000 = 0 Table 6. Crystal D.P.P. Manager (Continued) Notes: See definition in AN163, page 28. 19 AN163GREV1 AN163G 3.2.1 Mixer Coefficients Mixer_Coeff_L2L, Mixer_Coeff_Lk2L, Mixer_Coeff_Rk2L,..., Mixer_Coeff_Sb2Sb, Mixer_Coeff_Lk2Sb and Mixer_Coeff_Rk2Sb are Mixer scaling coefficients used in the mixing of stereo input (Lk and Rk channels) with multichannel input (L, C, R, Ls, Rs and LFE channels). 3.2.3 Karaoke Downmix Coefficients: * * 1 front channel Ck = mlev * M + v1lev * V1 + v2lev * V2. 2 front channels Lk = mllev * M + v1llev * V1 + v2llev * V2. Rk = mrlev * M + v1rlev * V1 + v2rlev * V2. Notes: 1. 0 <= mllev+v1llev + v2llev <= 0x7fffff 2. 0 <= mrlev+v1rlev + v2rlev <= 0x7fffff 3.2.2 Karaoke Capable Function Although this is part of AC-3, it is included here since it may be reused with other multichannel sources. In a karaoke bit stream, 3 channels should be downmixed according to user specification. They are M (e.g., guide melody), and V1, V2 (e.g., one or two vocal tracks). The downmix coefficients used are determined by the number of output front channels. * 3 front channels Ck = mcpan * M + v1cpan * V1 + v2cpan * V2. Lk = mlpan * M + v1lpan * V1 + v2lpan * V2. Rk = mrpan * M + v1rpan * V1 + v2rpan * V2. Notes: 1. 0 <= mcpan + v1cpan + v2cpan <= 0x7fffff; 2. 0 <= mlpan + v1lpan + v2lpan <= 0x7fffff; 3. 0 <= mrpan + v1rpan + v2rpan <= 0x7fffff; 20 AN163GREV1 AN163G 3.3 Dual-Precision Bass Manager Write Opcode = 0x94; Read Opcode = 0x15; Read Response Opcode = 0x95 Write = 0x9400HH 0xhhhhhh Read Request = 0x1500HH; Read Response = 0x9500HH 0xhhhhhh 0xHH = index, 0xhhhhhh = data value Index 0x00 Variable BASS_MGR_CONTROL Dataword Content Bit 16 = LFE_To_Sub_Enable = 0/1 = Disable/Enable LFE Only to subwoofer. If 0, Sum is sent to Subwoofer. Bit 12 = LPF_Enable = 0/1 = Disable/Enable LPF at the output of summer. Bit 8 = HPF_L_Enable = 0/1/ = Disable/Enable L channel HPF. Bit 7 = HPF_C_Enable = 0/1/ = Disable/Enable C channel HPF. Bit 6 = HPF_R_Enable = 0/1/ = Disable/Enable R channel HPF. Bit 5 = HPF_Ls_Enable = 0/1/ = Disable/Enable Ls channel HPF. Bit 4 = HPF_Rs_Enable = 0/1/ = Disable/Enable Rs channel HPF. Bit 0 = Bass_Mgr_Enable = 0/1 = Disable/Enable Bass Manager post-processing. Note: All other bits should be 0. Default = 0x000000 0x01 0x02 BASS_MGR_INPUT_L_LEVEL BASS_MGR_INPUT_C_LEVEL 0.0-1.0 = Level adjustment for input L channel pass-through. Default* = 0x7ffffff = 0 dB 0.0-1.0 = Level adjustment for input C channel input passthrough. Default* = 0x7ffffff = 0 dB 0x03 BASS_MGR_INPUT_R_LEVEL 0.0-1.0 = Level adjustment for input R channel input passthrough. Default* = 0x7ffffff = 0 dB 0x04 BASS_MGR_INPUT_LS_LEVEL 0.0-1.0 = Level adjustment for input Ls channel passthrough. Default* = 0x7ffffff = 0 dB 0x05 BASS_MGR_INPUT_RS_LEVEL 0.0-1.0 = Level adjustment for input Rs channel passthrough. Default* = 0x7ffffff = 0 dB Table 7. Dual-Precision Bass Manager AN163GREV1 21 AN163G Index 0x06 Variable BASS_MGR_INPUT_LFE_LEVEL Dataword Content 0.0-1.0 = Level adjustment for input LFE channel passthrough. Default* = 0x7ffffff = 0 dB 0x07 0x08 RESERVED BASS_MGR_SUM_OUTPUT_L_LEVEL Reserved. 0.0-1.0 = Level adjustment for bass summer output contribution to L channel output. Default* = 0 0x09 BASS_MGR_SUM_OUTPUT_C_LEVEL 0.0-1.0 = Level adjustment for bass summer output contribution to C channel output. Default* = 0 0x0a BASS_MGR_SUM_OUTPUT_R_LEVEL 0.0-1.0 = Level adjustment for bass summer output contribution to R channel output. Default* = 0 0x0b BASS_MGR_SUM_OUTPUT_LS_LEVEL 0.0-1.0 = Level adjustment for bass summer output contribution to Ls channel output. Default* = 0 0x0c BASS_MGR_SUM_OUTPUT_RS_LEVEL 0.0-1.0 = Level adjustment for bass summer output contribution to Rs channel output. Default* = 0 0x0d 0x0e RESERVED BASS_MGR_LFE_L_LEVEL Reserved. 0.0-1.0 = Level adjustment for input LFE contribution to L channel output. Default* = 0 0x0f BASS_MGR_LFE_C_LEVEL 0.0-1.0 = Level adjustment for input LFE contribution to C channel output. Default* = 0 0x10 BASS_MGR_LFE_R_LEVEL 0.0-1.0 = Level adjustment for input LFE contribution to R channel output. Default* = 0f 0x11 BASS_MGR_LFE_LS_LEVEL 0.0-1.0 = Level adjustment for input LFE contribution to Ls channel output. Default* = 0 0x12 BASS_MGR_LFE_RS_LEVEL 0.0-1.0 = Level adjustment for input LFE contribution to Ls channel output. Default* = 0 0x13 0x14 RESERVED BASS_MGR_SUM_INPUT_L_LEVEL Reserved. 0.0-1.0 = Level adjustment for input L channel contribution to bass summer input. Default* = 0x16c311 = -15 dB Table 7. Dual-Precision Bass Manager (Continued) 22 AN163GREV1 AN163G Index 0x15 Variable BASS_MGR_SUM_INPUT_C_LEVEL Dataword Content 0.0-1.0 = Level adjustment for input C channel contribution to bass summer input. Default* = 0x16c311 = -15 dB 0x16 BASS_MGR_SUM_INPUT_R_LEVEL 0.0-1.0 = Level adjustment for input R channel contribution to bass summer input. Default* = 0x16c311 = -15 dB 0x17 BASS_MGR_SUM_INPUT_LS_LEVEL 0.0-1.0 = Level adjustment for input Ls channel contribution to bass summer input. Default* = 0x16c311 = -15 dB 0x18 BASS_MGR_SUM_INPUT_RS_LEVEL 0.0-1.0 = Level adjustment for input Rs channel contribution to bass summer input. Default* = 0x16c311 = -15 dB 0x19 BASS_MGR_SUM_INPUT_LFE_LEVEL 0.0-1.0 = Level adjustment for input LFE channel contribution to bass summer. Default* = 0x47facd = -5 dB 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 RESERVED RESERVED RESERVED RESERVED BASS_MGR_LPF_48_B0 BASS_MGR_LPF_48_B1 BASS_MGR_LPF_48_B2 BASS_MGR_LPF_48_A1 BASS_MGR_LPF_48_A2 BASS_MGR_HPF_48_B0 BASS_MGR_HPF_48_B1 BASS_MGR_HPF_48_B2 BASS_MGR_HPF_48_A1 Reserved. Reserved. Reserved. Reserved. 0.0-1.0 = b0 coefficient for Low Pass Filter, Fs=48 KHz. Default* = 0x000072 0.0-1.0 = b1 coefficient for Low Pass Filter, Fs=48 KHz. Default* = 0x0000e4 0.0-1.0 = b2 coefficient for Low Pass Filter, Fs=48 KHz. Default* =0x000072 0.0-1.0 = a1 coefficient for Low Pass Filter, Fs=48 KHz. Default* = 0x7f0d13 0.0-1.0 = a2 coefficient for Low Pass Filter, Fs=48 KHz. Default* = 0xc0f124 0.0-1.0 = b0 coefficient for High Pass Filter, Fs=48 KHz. Default* = 0x3f8745 0.0-1.0 = b1 coefficient for High Pass Filter, Fs=48 KHz. Default* = 0x80f176 0.0-1.0 = b2 coefficient for High Pass Filter, Fs=48 KHz. Default* = 0x3f8745 0.0-1.0 = a1 coefficient for High Pass Filter, Fs=48 KHz. Default* = 0x7f0da6 Table 7. Dual-Precision Bass Manager (Continued) AN163GREV1 23 AN163G Index 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 Variable BASS_MGR_HPF_48_A2 BASS_MGR_SC1_48 BASS_MGR_SC2_48 BASS_MGR_LPF_44_B0 BASS_MGR_LPF_44_B1 BASS_MGR_LPF_44_B2 BASS_MGR_LPF_44_A1 BASS_MGR_LPF_44_A2 BASS_MGR_HPF_44_B0 BASS_MGR_HPF_44_B1 BASS_MGR_HPF_44_B2 BASS_MGR_HPF_44_A1 BASS_MGR_HPF_44_A2 BASS_MGR_SC1_44 BASS_MGR_SC2_44 BASS_MGR_LPF_32_B0 BASS_MGR_LPF_32_B1 BASS_MGR_LPF_32_B2 Dataword Content 0.0-1.0 = a2 coefficient for High Pass Filter, Fs=48 KHz. Default* = 0xc0f092 0.0-1.0 = Smoother coefficient 1, Fs=48 KHz. Applies to b0. Default* = 0x0000ae 0.0-1.0 = Smoother coefficient 2, Fs=48 KHz. Applies to a1. Default* = 0x7FFF51 0.0-1.0 = b0 coefficient for Low Pass Filter, Fs=44 KHz. Default* = 0x000087 0.0-1.0 = b1 coefficient for Low Pass Filter, Fs=44 KHz. Default* = 0x00010e 0.0-1.0 = b2 coefficient for Low Pass Filter, Fs=44 KHz. Default* = 0x000087 0.0-1.0 = a1 coefficient for Low Pass Filter, Fs=44 KHz. Default* = 0x7ef797 0.0-1.0 = a2 coefficient for Low Pass Filter, Fs=44 KHz. Default* = 0xc1064b 0.0-1.0 = b0 coefficient for High Pass Filter, Fs=44 KHz. Default* = 0x3f7ca3 0.0-1.0 = b1 coefficient for High Pass Filter, Fs=44 KHz. Default* = 0x8106ba 0.0-1.0 = b2 coefficient for High Pass Filter, Fs=44 KHz. Default* = 0x3f7ca3 0.0-1.0 = a1 coefficient for High Pass Filter, Fs=44 KHz. Default* = 0x7ef838 0.0-1.0 = a2 coefficient for High Pass Filter, Fs=44 KHz. Default* = 0xc105ad 0.0-1.0 = Smoother coefficient 1, Fs=44 KHz. Applies to b0. Default* = 0x0000ae 0.0-1.0 = Smoother coefficient 2, Fs=44 KHz. Applies to a1. Default* = 0x7FFF51 0.0-1.0 = b0 coefficient for Low Pass Filter, Fs=32 KHz. Default* = 0x000100 0.0-1.0 = b1 coefficient for Low Pass Filter, Fs=32 KHz. Default* = 0x000200 0.0-1.0 = b2 coefficient for Low Pass Filter, Fs=32 KHz. Default* =0x000100 Table 7. Dual-Precision Bass Manager (Continued) 24 AN163GREV1 AN163G Index 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 Variable BASS_MGR_LPF_32_A1 BASS_MGR_LPF_32_A2 BASS_MGR_HPF_32_B0 BASS_MGR_HPF_32_B1 BASS_MGR_HPF_32_B2 BASS_MGR_HPF_32_A1 BASS_MGR_HPF_32_A2 BASS_MGR_SC1_32 BASS_MGR_SC2_32 Dataword Content 0.0-1.0 = a1 coefficient for Low Pass Filter, Fs=32 KHz. Default* = 0x7e939f 0.0-1.0 = a2 coefficient for Low Pass Filter, Fs=32 KHz. Default* = 0xc1685f 0.0-1.0 = b0 coefficient for High Pass Filter, Fs=32 KHz. Default* = 0x2a77ee 0.0-1.0 = b1 coefficient for High Pass Filter, Fs=32 KHz. Default* = 0xf8c361 0.0-1.0 = b2 coefficient for High Pass Filter, Fs=32 KHz. Default* = 0x2a77ee 0.0-1.0 = a1 coefficient for High Pass Filter, Fs=32 KHz. Default* = 0x7e947c 0.0-1.0 = a2 coefficient for High Pass Filter, Fs=32 KHz. Default* = 0xc16787 0.0-1.0 = Smoother coefficient 1, Fs=32 KHz. Applies to b0. Default* = 0x0000ae 0.0-1.0 = Smoother coefficient 2, Fs=32 KHz. Applies to a1. Default* = 0x7FFF51 Table 7. Dual-Precision Bass Manager (Continued) Notes: See definition in AN163, page 28. "Default" vs. "Default*" See definition in AN163, page 28. AN163GREV1 25 AN163G 3.3.1 Understanding the Dual-Precision Bass Manager The Dual-Precision Bass Manager is best described with the use of a block diagram. Figure shows the topology of the filters used for both the low-pass and the high-pass filters. Note that the greyed boxes are registers of 48-bit precision, allowing extended precision, while the non-grey boxes are of 24-bit precision. The coefficients of LPF and HPF represent the second order digital filter H(z) = (b0 + b1z[-1]+ b2z[-2] ) / (1 - a1 z[-1] - a2[-2] ). The LPF implementation cascades 2 such identical filters to produce a 4th order filter Linkwitz-Riley filter. Therefore, the corner frequency of the LPF is 6dB. Hence, if it is important to ensure a particular overall 3 dB corner frequency (rather than other attenuation), it is required to specially design the individual LPF and HPF components to have appropriate attenuation at this desired corner frequency. The default values (shown in the Table 7) have been designed to result in an 3 dB corner frequency of 80 Hz for the HPF and 6 dB corner frequency of 80 Hz for LPF. Figure 3 shows the processing unit on each of the output channels (except the LFE). Figure 4 shows the summing module used to redirect bass to the subwoofer channel. For some typical Bass Manager configuration examples please refer to Section 4.2 "Generalized Bass Manager for Dolby Digital, DTS, MP3, MPEG Multichannel, AAC and Crystal Original Surround", AN163. b0 + Z-1 Z-1 b1 a1 Z-1 Z-1 b2 a2 Bass Manager High Pass Filter b0 + b0 + Z-1 Z-1 Z-1 Z-1 b1 a1 b1 a1 Z-1 Z-1 Z-1 Z-1 b2 a2 b2 a2 Bass Manager Low Pass Filter Figure 2. Filter Topology of Dual-Precision Bass Manager 26 AN163GREV1 AN163G Input_X_Level Input Channel X Output Channel X HPF_X_Enable Sum_Output_X_Level LFE_X_Level To Summing Module Summing Module LFE Figure 3. Bass Manager Processing Unit Sum_Input_(L~LFE)_Level L To Processing Unit C R Ls + LFE LPF_Enable Rs Limiter_Bass_Select Bass Limiter Bass_Limiter_Enable To Subwoofer Sb LFE_Only_To_Sub_Enable LFE Input_LFE_Level Figure 4. Subwoofer Summing Module AN163GREV1 27 AN163G 3.4 Tone Control and 3-Band Parametric Equalization Manger Write Opcode = 0x9A; Read Opcode = 0x1B; Read Response Opcode = 0x9B Write Message = 0x9A00HH 0xhhhhhh Read Request Message = 0x1B00HH; Read Response Message = 0x9B00HH 0xhhhhhh 0xHH = index, 0xhhhhhh = data value Index 0x00 Variable EQ_TONE_CONTROL Dataword Content Bit 4 = LCRLsRs_EQ_Enable = 0/1 = Disable/Enable 3-band Parametric EQ (pre-tone control) on L, C, R, Ls, and Rs output channels. Bit 0 = LCRLsRs_Tone_Control_Enable = 0/1 = Disable/Enable Tone Control (Bass/Treble) just before Bass Manager on L, C, R, Ls, and Rs output channels. Default = 0x000000 0x01 PRE_TONE_ATTENUATION -1.0 to 1.0 in 1.23 format = Pre-Tone Control attenuation scale factor to setup desired headroom for Tone control for all channels. Default* = 0.25 (0x200000) 0x02 L_BASS_LEVEL -4.0 to 4.0 in 3.21 format = L Channel Bass level setting = 10^(dB/20) - 1.0. Default* = 0.0 0x03 L_TREBLE_LEVEL -4.0 to 4.0 in 3.21 format = L Channel Treble level setting = 10^(dB/20) - 1.0. Default* = 0.0 0x04 C_BASS_LEVEL -4.0 to 4.0 in 3.21 format = C Channel Bass level setting = 10^(dB/20) - 1.0. Default* = 0.0 0x05 C_TREBLE_LEVEL -4.0 to 4.0 in 3.21 format = C Channel Treble level setting = 10^(dB/20) - 1.0. Default* = 0.0 0x06 R_BASS_LEVEL -4.0 to 4.0 in 3.21 format = R Channel Bass level setting = 10^(dB/20) - 1.0. Default* = 0.0 0x07 R_TREBLE_LEVEL -4.0 to 4.0 in 3.21 format = R Channel Treble level setting = 10^(dB/20) - 1.0. Default* = 0.0 0x08 LS_BASS_LEVEL -4.0 to 4.0 in 3.21 format = Ls Channel Bass level setting = 10^(dB/20) - 1.0. Default* = 0.0 Table 8. Tone Control + 3-Band Parametric EQ Manager 28 AN163GREV1 AN163G Index 0x09 Variable LS_TREBLE_LEVEL Dataword Content -4.0 to 4.0 in 3.21 format = Ls Channel Treble level setting = 10^(dB/20) - 1.0. Default* = 0.0 0x0a RS_BASS_LEVEL -4.0 to 4.0 in 3.21 format = Rs Channel Bass level setting = 10^(dB/20) - 1.0. Default* = 0.0 0x0b RS_TREBLE_LEVEL -4.0 to 4.0 in 3.21 format = Rs Channel Treble level setting = 10^(dB/20) - 1.0. Default* = 0.0 0x0c 0x0d 0x0e RESERVED RESERVED BASS_LPF_B0 Reserved. Reserved. -1.0 to 1.0 in 1.23 format = I order b0 filter coefficient for LPF (default corner=200 Hz at Fs=48 KHz). Note: b1 = b0 assumed for LPF. Default* = 0.01292157 (0x01a76a). 0x0f BASS_LPF_A1 -1.0 to 1.0 in 1.23 format = I order a1 filter coefficient for LPF (default corner=200 Hz at Fs=48 KHz). Default* = 0.9741567 (0x7cb12b) 0x10 TREBLE_HPF_B0 -1.0 to 1.0 in 1.23 format = I order b0 filter coefficient for HPF (default corner=6000 Hz at Fs=48 KHz). Note: b1 = - b0 assumed for HPF. Default* = 0.7071067 (0x5a8279). 0x11 TREBLE_HPF_A1 -1.0 to 1.0 in 1.23 format = I order a1 filter coefficient for HPF (default corner=6000 Hz at Fs=48 KHz). Default* = 0.41421353 (0x3504f3). 0x12 PRE_L_EQ_ATTENUATION -1.0 to 1.0 in 1.23 format = Pre-L_EQ attenuation scale factor to setup desired headroom for L_EQ filtering. Default* = 1.0 0x13 0x14 0x15 0x16 0x17 L_EQ0_B2 L_EQ0_B1 L_EQ0_B0 L_EQ0_A2 L_EQ0_A1 -4.0 to 4.0 in 3.21 format = Biquad coefficient for L_EQ Filter 0. Default* = 0.0 -4.0 to 4.0 in 3.21 format = Biquad coefficient for L_EQ Filter 0. Default* = 0.0 -4.0 to 4.0 in 3.21 format = Biquad coefficient for L_EQ Filter 0. Default* = 1.0 (0x200000) -4.0 to 4.0 in 3.21 format = Biquad coefficient for L_EQ Filter 0. Default* = 0.0 -4.0 to 4.0 in 3.21 format = Biquad coefficient for L_EQ Filter 0. Default* = 0.0 Table 8. Tone Control + 3-Band Parametric EQ Manager (Continued) AN163GREV1 29 AN163G Index 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 L_EQ1_B2 L_EQ1_B1 L_EQ1_B0 L_EQ1_A2 L_EQ1_A1 L_EQ2_B2 L_EQ2_B1 L_EQ2_B0 L_EQ2_A2 L_EQ2_A1 POST_L_EQ_GAIN Variable Default* = 0.0 Dataword Content -4.0 to 4.0 in 3.21 format = Biquad coefficient for L_EQ Filter 1. -4.0 to 4.0 in 3.21 format = Biquad coefficient for L_EQ Filter 1. Default* = 0.0 -4.0 to 4.0 in 3.21 format = Biquad coefficient for L_EQ Filter 1. Default* = 1.0 (0x200000) -4.0 to 4.0 in 3.21 format = Biquad coefficient for L_EQ Filter 1. Default* = 0.0 -4.0 to 4.0 in 3.21 format = Biquad coefficient for L_EQ Filter 1. Default* = 0.0 -4.0 to 4.0 in 3.21 format = Biquad coefficient for L_EQ Filter 2. Default* = 0.0 -4.0 to 4.0 in 3.21 format = Biquad coefficient for L_EQ Filter 2. Default* = 0.0 -4.0 to 4.0 in 3.21 format = Biquad coefficient for L_EQ Filter 2. Default* = 1.0 (0x200000) -4.0 to 4.0 in 3.21 format = Biquad coefficient for L_EQ Filter 2. Default* = 0.0 -4.0 to 4.0 in 3.21 format = Biquad coefficient for L_EQ Filter 2. Default* = 0.0 -32.0 to 32.0 in 6.18 format = Post-L_EQ gain scale factor to compensate for Pre-L_EQ attenuation and L_EQ filter gains. Default* = 1.0 (0x040000) 0x23 PRE_C_EQ_ATTENUATION -1.0 to 1.0 in 1.23 format = Pre-C_EQ attenuation scale factor to setup desired headroom for C_EQ filtering. Default* = 1.0 0x24 0x25 0x26 0x27 0x28 C_EQ0_B2 C_EQ0_B1 C_EQ0_B0 C_EQ0_A2 C_EQ0_A1 -4.0 to 4.0 in 3.21 format = Biquad coefficient for C_EQ Filter 0. Default* = 0.0 -4.0 to 4.0 in 3.21 format = Biquad coefficient for C_EQ Filter 0. Default* = 0.0 -4.0 to 4.0 in 3.21 format = Biquad coefficient for C_EQ Filter 0. Default* = 1.0 (0x200000) -4.0 to 4.0 in 3.21 format = Biquad coefficient for C_EQ Filter 0. Default* = 0.0 -4.0 to 4.0 in 3.21 format = Biquad coefficient for C_EQ Filter 0. Default* = 0.0 Table 8. Tone Control + 3-Band Parametric EQ Manager (Continued) 30 AN163GREV1 AN163G Index 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 Variable C_EQ1_B2 C_EQ1_B1 C_EQ1_B0 C_EQ1_A2 C_EQ1_A1 C_EQ2_B2 C_EQ2_B1 C_EQ2_B0 C_EQ2_A2 C_EQ2_A1 POST_C_EQ_GAIN Dataword Content -4.0 to 4.0 in 3.21 format = Biquad coefficient for C_EQ Filter 1. Default* = 0.0 -4.0 to 4.0 in 3.21 format = Biquad coefficient for C_EQ Filter 1. Default* = 0.0 -4.0 to 4.0 in 3.21 format = Biquad coefficient for C_EQ Filter 1. Default* = 1.0 (0x200000) -4.0 to 4.0 in 3.21 format = Biquad coefficient for C_EQ Filter 1. Default* = 0.0 -4.0 to 4.0 in 3.21 format = Biquad coefficient for C_EQ Filter 1. Default* = 0.0 -4.0 to 4.0 in 3.21 format = Biquad coefficient for C_EQ Filter 2. Default* = 0.0 -4.0 to 4.0 in 3.21 format = Biquad coefficient for C_EQ Filter 2. Default* = 0.0 -4.0 to 4.0 in 3.21 format = Biquad coefficient for C_EQ Filter 2. Default* = 1.0 (0x200000) -4.0 to 4.0 in 3.21 format = Biquad coefficient for C_EQ Filter 2. Default* = 0.0 -4.0 to 4.0 in 3.21 format = Biquad coefficient for C_EQ Filter 2. Default* = 0.0 -32.0 to 32.0 in 6.18 format = Post-C_EQ gain scale factor to compensate for Pre-C_EQ attenuation and C_EQ filter gains. Default* = 1.0 (0x040000) 0x34 PRE_R_EQ_ATTENUATION -1.0 to 1.0 in 1.23 format = Pre-R_EQ attenuation scale factor to setup desired headroom for R_EQ filtering. Default* = 1.0 0x35 0x36 0x37 0x38 0x39 R_EQ0_B2 R_EQ0_B1 R_EQ0_B0 R_EQ0_A2 R_EQ0_A1 -4.0 to 4.0 in 3.21 format = Biquad coefficient for R_EQ Filter 0. Default* = 0.0 -4.0 to 4.0 in 3.21 format = Biquad coefficient for R_EQ Filter 0. Default* = 0.0 -4.0 to 4.0 in 3.21 format = Biquad coefficient for R_EQ Filter 0. Default* = 1.0 (0x200000) -4.0 to 4.0 in 3.21 format = Biquad coefficient for R_EQ Filter 0. Default* = 0.0 -4.0 to 4.0 in 3.21 format = Biquad coefficient for R_EQ Filter 0. Default* = 0.0 Table 8. Tone Control + 3-Band Parametric EQ Manager (Continued) AN163GREV1 31 AN163G Index 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 Variable R_EQ1_B2 R_EQ1_B1 R_EQ1_B0 R_EQ1_A2 R_EQ1_A1 R_EQ2_B2 R_EQ2_B1 R_EQ2_B0 R_EQ2_A2 R_EQ2_A1 POST_R_EQ_GAIN Dataword Content -4.0 to 4.0 in 3.21 format = Biquad coefficient for R_EQ Filter 1. Default* = 0.0 -4.0 to 4.0 in 3.21 format = Biquad coefficient for R_EQ Filter 1. Default* = 0.0 -4.0 to 4.0 in 3.21 format = Biquad coefficient for R_EQ Filter 1. Default* = 1.0 (0x200000) -4.0 to 4.0 in 3.21 format = Biquad coefficient for R_EQ Filter 1. Default* = 0.0 -4.0 to 4.0 in 3.21 format = Biquad coefficient for R_EQ Filter 1. Default* = 0.0 -4.0 to 4.0 in 3.21 format = Biquad coefficient for R_EQ Filter 2. Default* = 0.0 -4.0 to 4.0 in 3.21 format = Biquad coefficient for R_EQ Filter 2. Default* = 0.0 -4.0 to 4.0 in 3.21 format = Biquad coefficient for R_EQ Filter 2. Default* = 1.0 (0x200000) -4.0 to 4.0 in 3.21 format = Biquad coefficient for R_EQ Filter 2. Default* = 0.0 -4.0 to 4.0 in 3.21 format = Biquad coefficient for R_EQ Filter 2. Default* = 0.0 -32.0 to 32.0 in 6.18 format = Post-R_EQ gain scale factor to compensate for Pre-R_EQ attenuation and R_EQ filter gains. Default* = 1.0 (0x040000) 0x45 PRE_LS_EQ_ATTENUATION -1.0 to 1.0 in 1.23 format = Pre-Ls_EQ attenuation scale factor to setup desired headroom for Ls_EQ filtering. Default* = 1.0 0x46 0x47 0x48 0x49 0x4a LS_EQ0_B2 LS_EQ0_B1 LS_EQ0_B0 LS_EQ0_A2 LS_EQ0_A1 -4.0 to 4.0 in 3.21 format = Biquad coefficient for Ls_EQ Filter 0. Default* = 0.0 -4.0 to 4.0 in 3.21 format = Biquad coefficient for Ls_EQ Filter 0. Default* = 0.0 -4.0 to 4.0 in 3.21 format = Biquad coefficient for Ls_EQ Filter 0. Default* = 1.0 (0x200000) -4.0 to 4.0 in 3.21 format = Biquad coefficient for Ls_EQ Filter 0. Default* = 0.0 -4.0 to 4.0 in 3.21 format = Biquad coefficient for Ls_EQ Filter 0. Default* = 0.0 Table 8. Tone Control + 3-Band Parametric EQ Manager (Continued) 32 AN163GREV1 AN163G Index 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 Variable LS_EQ1_B2 LS_EQ1_B1 LS_EQ1_B0 LS_EQ1_A2 LS_EQ1_A1 LS_EQ2_B2 LS_EQ2_B1 LS_EQ2_B0 LS_EQ2_A2 LS_EQ2_A1 POST_LS_EQ_GAIN Dataword Content -4.0 to 4.0 in 3.21 format = Biquad coefficient for Ls_EQ Filter 1. Default* = 0.0 -4.0 to 4.0 in 3.21 format = Biquad coefficient for Ls_EQ Filter 1. Default* = 0.0 -4.0 to 4.0 in 3.21 format = Biquad coefficient for Ls_EQ Filter 1. Default* = 1.0 (0x200000) -4.0 to 4.0 in 3.21 format = Biquad coefficient for Ls_EQ Filter 1. Default* = 0.0 -4.0 to 4.0 in 3.21 format = Biquad coefficient for Ls_EQ Filter 1. Default* = 0.0 -4.0 to 4.0 in 3.21 format = Biquad coefficient for Ls_EQ Filter 2. Default* = 0.0 -4.0 to 4.0 in 3.21 format = Biquad coefficient for Ls_EQ Filter 2. Default* = 0.0 -4.0 to 4.0 in 3.21 format = Biquad coefficient for Ls_EQ Filter 2. Default* = 1.0 (0x200000) -4.0 to 4.0 in 3.21 format = Biquad coefficient for Ls_EQ Filter 2. Default* = 0.0 -4.0 to 4.0 in 3.21 format = Biquad coefficient for Ls_EQ Filter 2. Default* = 0.0 -32.0 to 32.0 in 6.18 format = Post-Ls_EQ gain scale factor to compensate for Pre-Ls_EQ attenuation and Ls_EQ filter gains. Default* = 1.0 (0x040000) 0x56 PRE_RS_EQ_ATTENUATION -1.0 to 1.0 in 1.23 format = Pre-Rs_EQ attenuation scale factor to setup desired headroom for Rs_EQ filtering. Default* = 1.0 0x57 0x58 0x59 0x5a 0x5b RS_EQ0_B2 RS_EQ0_B1 RS_EQ0_B0 RS_EQ0_A2 RS_EQ0_A1 -4.0 to 4.0 in 3.21 format = Biquad coefficient for Rs_EQ Filter 0. Default* = 0.0 -4.0 to 4.0 in 3.21 format = Biquad coefficient for Rs_EQ Filter 0. Default* = 0.0 -4.0 to 4.0 in 3.21 format = Biquad coefficient for Rs_EQ Filter 0. Default* = 1.0 (0x200000) -4.0 to 4.0 in 3.21 format = Biquad coefficient for Rs_EQ Filter 0. Default* = 0.0 -4.0 to 4.0 in 3.21 format = Biquad coefficient for Rs_EQ Filter 0. Default* = 0.0 Table 8. Tone Control + 3-Band Parametric EQ Manager (Continued) AN163GREV1 33 AN163G Index 0x5c 0x5d 0x5e 0x5f 0x60 0x61 0x62 0x63 0x64 0x65 0x66 Variable RS_EQ1_B2 RS_EQ1_B1 RS_EQ1_B0 RS_EQ1_A2 RS_EQ1_A1 RS_EQ2_B2 RS_EQ2_B1 RS_EQ2_B0 RS_EQ2_A2 RS_EQ2_A1 POST_RS_EQ_GAIN Dataword Content -4.0 to 4.0 in 3.21 format = Biquad coefficient for Rs_EQ Filter 1. Default* = 0.0 -4.0 to 4.0 in 3.21 format = Biquad coefficient for Rs_EQ Filter 1. Default* = 0.0 -4.0 to 4.0 in 3.21 format = Biquad coefficient for Rs_EQ Filter 1. Default* = 1.0 (0x200000) -4.0 to 4.0 in 3.21 format = Biquad coefficient for Rs_EQ Filter 1. Default* = 0.0 -4.0 to 4.0 in 3.21 format = Biquad coefficient for Rs_EQ Filter 1. Default* = 0.0 -4.0 to 4.0 in 3.21 format = Biquad coefficient for Rs_EQ Filter 2. Default* = 0.0 -4.0 to 4.0 in 3.21 format = Biquad coefficient for Rs_EQ Filter 2. Default* = 0.0 -4.0 to 4.0 in 3.21 format = Biquad coefficient for Rs_EQ Filter 2. Default* = 1.0 (0x200000) -4.0 to 4.0 in 3.21 format = Biquad coefficient for Rs_EQ Filter 2. Default* = 0.0 -4.0 to 4.0 in 3.21 format = Biquad coefficient for Rs_EQ Filter 2. Default* = 0.0 -32.0 to 32.0 in 6.18 format = Post-Rs_EQ gain scale factor to compensate for Pre-Rs_EQ attenuation and Rs_EQ filter gains. Default* = 1.0 (0x040000) Table 8. Tone Control + 3-Band Parametric EQ Manager (Continued) See definition in AN163, page 28. Notes: "Default" vs. "Default*" See definition in AN163, page 28. 34 AN163GREV1 AN163G 3.4.1 Controlling the Level for Treble and Bass Boost/Cut When tone control is enabled, the pre-Bass Manager channel PCM (for L, C, R, Ls and Rs) is attenuated by the Pre_EQ_Attenuation scale factor and passed through tone control shelving filters for bass and treble. Notes: 1) Pre_EQ_Attenuation affects L, C, R, Ls, and Rs channels and leaves the other channel LFE untouched at the full level. Thus, in order to equalize all the levels coming out of CS49330, the controller should set the volumes of LFE to be the same as Pre_EQ_Attenuation. 2) Pre_EQ_Attenuation and the above matching volume setting will result in reduced level which has to be compensated by analog gain after the DACs. The controller has the knowledge of this attenuation setting at all times and can thus adjust the post-DAC analog gain accordingly. However, this increased digital headroom will result in smaller dynamic range numbers and thus it is recommended that a passthrough (disable Tone Control) mode be implemented for testing purposes. ranging from approximately -0.75 to 3.0 for a Shelf_Gain range of -12 to +12 dB. In order to accommodate this range in 24-bit signed fixed point binary, the Hex values are all represented in 3.21 format. The above table can be stored in the microcontroller and used to look up the dataword for each level in the CS49330 message for a given user setting. In order to conserve storage space, the lower byte of each 24-bit Hex dataword above can be forced to zero without significant loss of accuracy in the actual bass/treble cut or boost. For each channel (L, C, R, Ls, and Rs), the tone control module accepts independent parameters Bass_Level and Treble_Level to adjust the amount of cut/boost in the low and high frequency bands respectively for that channel. The relationship of these user level settings to the amount of cut/boost in dB is given by: Level = 10^(Shelf_Gain in dB/20) - 1.0 or equivalently, Shelf_Gain in dB = 20 * log_10( Level + 1.0) where Shelf_Gain is positive dB for boost and negative dB for cut. Level is a positive scale factor for boost and negative for cut. The following table lists the Level values in (Decimal and Hex) for each desired Shelf_Gain (dB). As can be seen, Level assumes values Shelf_Gain (dB) -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10 11 12 Level (Decimal) -0.74881136 -0.71816171 -0.68377223 -0.64518661 -0.60189283 -0.55331641 -0.49881277 -0.43765867 -0.36904266 -0.29205422 -0.20567177 -0.10874906 0.0 0.12201845 0.25892541 0.41253754 0.58489319 0.77827941 0.99526231 1.2387211 1.5118864 1.8183829 2.1622777 2.5481339 2.9810717 Level (Hex 3.21) 0xe809bd 0xe904d2 0xea1e8a 0xeb5aa2 0xecbd4b 0xee4b3b 0xf009ba 0xf1feb3 0xf430cd 0xf6a77e 0x f96b23 0xfc8521 0x000000 0x03e793 0x08491e 0x0d3382 0x12b772 0x18e7aa 0x1fd930 0x27a39a 0x306160 0x3a3031 0x453161 0x518a50 0x5f64f1 Table 9. Shelf Gain Values for Tone Control AN163GREV1 35 AN163G 3.4.2 Controlling the Corner Frequencies of the LPF/HPF for Bass and Treble Control The tone control module implements shelving filters using a I order LPF and a I order HPF whose default corner frequencies are 200 Hz and 6000 Hz respectively at Fs=48 KHz. Different filter coefficients can be downloaded (before kickstart only) for any desired corner frequencies or to match any change in Fs. Only b0 and a1 are required to be downloaded since it is assumed that b1 = b0 for the LPF, and b1 = -b0 for the HPF. These values can be obtained using any standard filter design procedure for I order LPF and HPF with unity gain in the passband. The coefficients are all expected to be downloaded in 1.23 format before kickstart. Note: LPF/HPF coefficients should be setup before kickstart and should not be modified on the fly during runtime. For each channel, the pre-Bass Manager output PCM is first scaled down by the Pre-EQ attenuation setting for the corresponding channel. The attenuated output is then processed by a cascade of three EQ biquads specified by the (b2, b1, b0, a2, a1) coefficients downloaded by the host controller before kickstart. The output of the cascade biquad stage is then gained up by the PostEQ gain setting for the corresponding channel. Note that the coefficients are specified in 3.21 format to allow for coefficient magnitudes of up to 8.0. For its input x(n) the output y(n) of each EQ biquad filter is given by: y(n) = x(n)*b0 + x(n-1)*b1 + x(n-2)*b2 + y(n-1)*a1 + y(n-2)*a2 The Pre-EQ input attenuation applied before the EQ filters is a scale factor specified in usual 1.23 format. The Post-EQ gain applied after the EQ filters is a scale factor specified in 6.18 format to allow for up to 30 dB of gain, i.e. scale factor of 32. Note: All biquad coefficients should be setup before kickstart and should not be modified during runtime. 3.4.3 Controlling the Three-band Parametric EQ An independent 3-band Parametric EQ is available for each output full-bandwidth channel (L, C, R, Ls, and Rs) with separately controllable Pre-EQ attenuation, Post-EQ gain, and downloadable biquad coefficients for each band. 36 AN163GREV1 * Notes * |
Price & Availability of AN163G
![]() |
|
|
All Rights Reserved © IC-ON-LINE 2003 - 2022 |
[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy] |
Mirror Sites : [www.datasheet.hk]
[www.maxim4u.com] [www.ic-on-line.cn]
[www.ic-on-line.com] [www.ic-on-line.net]
[www.alldatasheet.com.cn]
[www.gdcy.com]
[www.gdcy.net] |