Part Number Hot Search : 
VT536507 IRFSL D2FS6 1N2158 CD431690 GL8PR22 GS880F36 BXXXXXXB
Product Description
Full Text Search
 

To Download AN120 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
 AN120
Application Note
DOLBY DIGITALTM USER'S GUIDE FOR THE CS4923/4/5/6 FAMILY
Contents
l Dolby
Description
(R)
Digital Description
l Software
Naming Convention l Document Strategy l Hardware Configurations Supported by the CS4923/4/5/6 and the AC-3(R) Code l Understanding Application Messaging l How to Control Application Modules such as:
- Audio Manager - AC-3 Manager - Pro Logic Manager - Generalized Bass Manager
l Application
This document includes a brief description of hardware configuration and in depth descriptions of the application messaging protocol, application control modules, and application configuration examples. The main body of this document covers all the features included in the standard Dolby Digital application for IEC61937 compliant bitstreams. Special versions of the Dolby Digital decoder exist with different features, such as Virtual Dolby DigitalTM, QSurroundTM and Harman VMAx VirtualTheaterTM. For each such version of Dolby Digital decode, a separate appendix covers the incremental changes with respect to this application note and are available to licensed customers. This document covers code supported by CS4923/4/5/6 rev D silicon.
DIGITAL SOUND
TM
Configuration Examples
CRYSTAL
(R)
PR OC ES SIN G
ProLogic Enable & ACMOD==2 5 Channels (Ls=Rs)
2 Channels (Lt & Rt)
Autodetect Enable AC-3 Enable
Pro Logic Decode Downmix
5.1 Channels 5.1 Channels
Autodetect (AC-3) CMPDAT/ DAI
AC-3 Decode 5 Discrete Channels Output Mode Control
Bass Manager
Audio Manager
0.1 (Sub)
LFE Enable
Bass Parameter Output Mode
Volume/Mute Channel Remap Delay
P.O. Box 17847, Austin, Texas 78760 (512) 445 7222 FAX: (512) 445 7581 http://www.cirrus.com
Copyright (c) Cirrus Logic, Inc. 1999 (All Rights Reserved)
NOV `99 AN120REV2 1
AN120
TABLE OF CONTENTS
1.0 OVERVIEW ............................................................................................................................. 4 1.1 Multi-Channel Decoder Family of Parts ............................................................................. 4 1.2 Document Strategy ............................................................................................................ 5 1.2.1 Hardware Documentation ..................................................................................... 5 1.2.2 CS4923/4/5/6/7/8/9 Application Code User's Guides ........................................... 5 1.3 Using the CS4923/4/5/6/7/8/9 ............................................................................................ 6 1.4 Software Naming Convention ............................................................................................ 6 1.5 Dolby Digital Description .................................................................................................... 6 2.0 HARDWARE CONFIGURATION ............................................................................................ 8 2.1 Supported Input/Output Modes .......................................................................................... 8 3.0 APPLICATION MESSAGING ................................................................................................. 9 3.1 Indexed Module Communication Protocol ......................................................................... 9 3.1.1 Write Session ........................................................................................................ 9 3.1.2 Solicited Read Message Format ........................................................................... 9 3.2 Unsolicited Read Message Format .................................................................................. 10 4.0 APPLICATION MODULES ................................................................................................... 11 4.1 Audio Manager ................................................................................................................ 12 4.1.1 Audio_Control: (Index 0x00) ................................................................................ 14 4.1.2 Noise_Control (Index 0x01): ................................................................................ 15 4.1.3 Sampling Frequency Code (Index 0x14):............................................................. 16 4.2 AC-3 Manager .................................................................................................................. 17 4.2.1 Output_Mode_Control (Index 0x01)..................................................................... 20 4.2.2 AC-3 Stream Information: .................................................................................... 20 4.2.3 Special Considerations For AC-3......................................................................... 20 4.3 Pro Logic Manager ........................................................................................................... 21 4.4 Generalized Bass Manager ............................................................................................. 22 4.4.1 Dolby Digital Bass Management Configurations ................................................. 26 4.5 PCM Processor ................................................................................................................ 34 4.5.1 Karaoke Capable Function................................................................................... 36 4.5.2 Special Considerations For PCM ......................................................................... 36 4.6 Unsolicited Messages (Read-Only) ................................................................................. 37 4.6.1 Autodetect Operation .......................................................................................... 38 4.6.2 Special Considerations For Autodetect ............................................................... 40 5.0 APPLICATION CONFIGURATION EXAMPLES .................................................................. 42 5.1 AC-3 decode with Autodetect .......................................................................................... 42
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/
AC-3, Dolby Digital, Dolby Pro Logic, the Dolby Digital Logo, Dolby and the double-D symbol are registered trademarks of Dolby Laboratories Licensing Corporation. DTS is a registered trademark of DTS, Inc. QSurround is a trademark of QSound Labs, Inc. Virtual Dolby Digital is a trademark of Dolby Laboratories Licensing Corporation. VMAx is a trademark of Harman International Industries, 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
AN120REV2
AN120
5.2 AC-3 with Pro Logic Decode and Autodetect .................................................................. 43 5.3 Pro Logic decode of 48 kHz input PCM ........................................................................... 43 5.4 PCM Pass-through of 44.1 kHz input PCM ..................................................................... 43 5.5 Pink/White Noise Generation ......................................................................................... 44 5.5.1 Special Considerations For Pink/White Noise .................................................... 44 5.6 Using the PLL ................................................................................................................. 45
LIST OF FIGURES
Figure 1. AC3 Code configured for AC3 input ......................................................................... 7 Figure 2. AC-3 Code Configured For PCM .............................................................................. 7 Figure 3. Filter Topology ........................................................................................................ 25 Figure 4. Bass Manager Processing Unit .............................................................................. 25 Figure 5. Subwoofer Summing Module ................................................................................. 25 Figure 6. Autodetect Flow Chart ............................................................................................ 41 Figure 7. Autodetect Flow Chart ............................................................................................ 41 Figure 8. Typical Download and Configuration ...................................................................... 41 Figure 9. Pseudocode Example to Configure Part AC-3 Decode with Autodetect ................ 42
LIST OF TABLES
Table 1. Input/Output Configurations Supported by AC-3 ........................................................ 8 Table 2. Input/Output Configurations Supported by PCM ........................................................ 8 Table 3. Write Message Format ............................................................................................... 9 Table 4. Read Command Message Format ........................................................................... 10 Table 5. Read Response Message Format............................................................................ 10 Table 6. Unsolicited Read Message Format .......................................................................... 11 Table 7. Audio Manager ......................................................................................................... 12 Table 8. AC-3 Manager .......................................................................................................... 17 Table 9. Pro Logic Manager ................................................................................................... 21 Table 10. Bass Manager ........................................................................................................ 22 Table 11. Dolby Configuration 0 ............................................................................................. 26 Table 12. Dolby Configuration 1 ............................................................................................. 27 Table 13. Dolby Configuration 2 ............................................................................................. 28 Table 14. Dolby Alternative Configuration 2 ........................................................................... 29 Table 15. Dolby Configuration 3 (Normal - No Sub Out) ........................................................ 30 Table 16. Dolby Configuration 3 (Sub Out) ............................................................................ 31 Table 17. Dolby DVD Configuration (Bass to L/R) ................................................................. 32 Table 18. Dolby DVD Configuration (Bass to Subwoofer) ...................................................... 33 Table 19. PCM Processor ...................................................................................................... 34 Table 20. Unsolicited Messages............................................................................................. 37 Table 21. Enabling AC-3 Decode with Autodetect ................................................................. 42 Table 22. Enabling AC-3 with Pro Logic Decode with Autodetect .......................................... 43 Table 23. Enabling Pro Logic Decode of 48 kHz PCM ........................................................... 43 Table 24. Enabling Pro Logic Decode of 44.1 kHz PCM ........................................................ 44 Table 25. Enabling Pink/White Noise Generation .................................................................. 44 Table 26. Pink/White Noise Generation for All 5.1 Channel ................................................... 44 Table 27. Configuring the PLL for 11.2896 MHz CLKIN......................................................... 45
AN120REV2
3
AN120
1.0 OVERVIEW
The CS4923/4/5/6/7/8/9 is a family of system on a chip solutions for multi-channel audio decompression and digital signal processing. Since the part is RAM-based, a download of application software is required each time the CS4923/4/5/6/7/8/9 is powered up. These parts are generally targeted at two different market segments. The broadcast market where audio/video (A/V) synchronization is required, and the outboard decoder markets where audio/video synchronization is not required. The important differentiation is the format in which the data will be received by the CS4923/4/5/6/7/8/9. In systems where A/V synchronization is required from the CS4923/4/5/6/7/8/9, the incoming data is typically PES encoded. In an outboard decoder application the data typically comes in the IEC61937 format (as specified by the DVD consortium). An important point to remember is that the CS4923/4/5/6/7/8/9 will support both environments, but different downloads are required depending on the input data type. Broadcast applications include (but are not limited to) set top box applications, DVDs and digital TVs. Outboard decoder applications include stand-alone decoders and audio/video receivers. Often times a system may be a hybrid between an outboard decoder and a broadcast system depending on its functionality. This users guide covers code that provides AC-3 decoding for IEC61937 compliant bitstreams. IEC61937 is a protocol for delivering compressed audio over a consumer IEC60958 or S/PDIF interface. cludes bass management, delays and Dolby Pro Logic(R) decoding. Separate downloads can also be used to support stereo to 5.1 channel effects processing and stereo MPEG decoding. CS4924 - Dolby Digital Source Product Decoder. The CS4924 is the stereo version of the CS4923 designed for source products such as DVD, HDTV, and set top boxes. CS4925 - International Multi-Channel DVD Audio Decoder. The CS4925 supports both Dolby Digital and MPEG-2 multi-channel formats. For both Dolby Digital and MPEG-2 multi-channel, post processing includes bass management and Dolby Pro Logic decoding. The Dolby Digital code and MPEG code take separate code downloads. Another code load can be used to support stereo to 5.1 channel effects processing. CS4926 - DTS(R)/Dolby Multi-Channel Audio Decoder. The CS4926 supports both Dolby Digital and DTS, or Digital Theater Surround. For Dolby Digital, post processing includes bass management and Dolby Pro Logic. The Dolby Digital code and DTS code take separate code downloads. Separate downloads can also be used to support stereo to 5.1 channel effects processing and stereo MPEG decoding. CS4927 - MPEG-2 Multi-Channel Decoder. The CS4927 supports MPEG-2 multi-channel decoding and should be used in applications where Dolby Digital decoding is not necessary. For MPEG-2 multi-channel decoding, post processing includes bass management and Dolby Pro Logic decoding. Another code load can be used to support stereo to 5.1 channel effects processing. CS4928 - DTS Multi-Channel Decoder. The CS4928 supports DTS multi-channel decoding and should be used in applications where Dolby Digital decoding is not necessary. For DTS multi-channel decoding, post processing includes bass management. Separate downloads can also be used to sup-
1.1 Multi-Channel Decoder Family of Parts
CS4923 - Dolby Digital Audio Decoder. The CS4923 is the original member of the family and is intended to be used if only Dolby Digital decoding is required. For Dolby Digital, post processing in4
AN120REV2
AN120
port stereo to 5.1 channel effects processing and stereo MPEG decoding. CS4929 - AAC 2-Channel, (Low Complexity) and MPEG-2 Stereo Decoder. The CS4929 is capable of decoding both 2-channel AAC and MPEG-2 audio. The CS4929 supports both elementary and PES formats. ferred to, it should be assumed that one or more of the below documents are being referenced. The following list covers currently released application notes. This list will grow with each new application released. For a current list of released user's guides please see www.crystal.com and search for the part number. AN120 - Dolby Digital User's Guide for the CS4923/4/5/6. This document covers the features available in the Dolby Digital code including delays, pink noise, bass management, Pro Logic, PCM pass through and Dolby Digital processing features. Optional appendices are available that document code for Virtual Dolby Digital, Q-Surround and VMAx. AN121 - MPEG User's Guide for the CS4925. This document covers the features available in the MPEG Multi-Channel code including delays, bass management, Pro Logic, and MPEG processing features. AN122 - DTS User's Guide for the CS4926, CS4928. This document covers the features available in the DTS code including bass management and DTS processing features. AN123 - Surround User's Guide for the CS4923/4/5/6/7/8. This code covers the different Stereo PCM to surround effects processing code. Optional appendices are available that document Crystal Original Surround, Circle Surround and Lexicon Logic. AN140 - Broadcast Systems Guide for the CS4923/4/5/6/7/8/9. This guide describes all application code (e.g. Dolby Digital, MPEG, AAC) designed for broadcast systems such as HDTV and set-top box receivers. This document also provides a discussion of broadcast system considerations and dependencies.
1.2 Document Strategy
Multiple documents are needed to fully define, understand and implement the functionality of the CS4923/4/5/6/7/8/9. They can be split up into two basic groups: hardware and application code documentation. It should be noted that hardware and application code are co-dependent and one can not successfully use the part without an understanding of both. The `ANXXX' notation denotes the application note number under which the respective user's guide was released.
1.2.1 Hardware Documentation
CS4923/4/5/6/7/8/9 Family Data Sheet - This document describes the electrical characteristics of the device from timing to base functionality. This is the hardware designers tool to learn the part's electrical and systems requirements. AN115 - CS4923/4/5/6/7/8/9 Hardware User's Guide - describes the functional aspects of the device. An in depth description of communication, boot procedure, external memory and hardware configuration are given in this document. This document will be valuable to both the hardware designer and the system programmer.
1.2.2 CS4923/4/5/6/7/8/9 Application Code User's Guides
The following application notes describe the application codes used with the CS4923/4/5/6/7/8/9. Whenever an application code user's guide is re-
AN120REV2
5
AN120
1.3 Using the CS4923/4/5/6/7/8/9
No matter what application is being used on the chip, the following four steps are always followed to use the CS4923/4/5/6/7/8/9 in system. 1) Reset and/or Download Code - Detailed information can be found in AN115. 2) Hardware Configuration - Detailed information can be found in AN115. 3) Application configuration - Detailed information can be found in the appropriate Application Code User's Guide. 4) Kickstart - This is the "Go" command to the CS4923/4/5/6 once the system is properly configured. Detailed information can be found in the appropriate Application Code User's Guide. AAAA == AC3_, and CC== 23, 24, 25, 26 as described in the previous section. Other versions of AC-3 decoders with different feature sets (3D virtualizers etc.) are covered in corresponding appendices to this document. Each appendix specifies code name, and the changes with respect to this document. Along with Dolby Digital, this document will describe how to use the code for Dolby Pro Logic Decode, pink/white noise generation, bass management and PCM pass through among other features. It is assumed that the reader is familiar with the requirements and features of Dolby Digital as specified in: * Dolby AC-3 Specification: Digital Audio Compression Standard (AC-3), Advanced Television Systems Committee, Dec. 20, 1995 Licensee Information Manual: Dolby Digital Multichannel Digital Audio Decoding for Consumer Products, Licensee Information Manual, Version 2.0, April, 1997
1.4 Software Naming Convention
To keep up with the different applications, parts, hardware revisions and software revisions the following naming convention has been adopted for the CS4923/4/5/6/7/8/9 software: AAAACCRV.LD where: AAAA = three or four letter Application description (e.g. AC3_) CC = Chip suffix for hardware (e.g. for CS4923 CC=23) R = ROM ID specification V = actual version release of particular code
*
The block diagram in Figure 1 is a functional block diagram of the application code when configured for Dolby Digital. It gives an idea of the interaction between the various application modules when AC-3 is enabled. Figure 2 is a functional block diagram of the application code when configured for PCM passthrough. It gives an idea of the interaction between the various application modules when PCM is enabled. AC-3 and PCM should be considered as separate applications when using this code This document uses Dolby Digital and AC-3 interchangeably. For this document CS4923/4/5/6 has been replaced in certain places with CS4923/4/5/6 for readability. Unless otherwise specified, CS4923/4/5/6 should be interpreted as applying to the CS4923, CS4924, CS4925 and CS4926.
1.5 Dolby Digital Description
Dolby Digital, also known as AC-3, is a digital audio compression algorithm developed by Dolby Laboratories for up to 5.1 channels of audio. This users guide covers the software designed to run on the CS4923/4/5/6 that decodes Dolby Digital. This user's guide covers all code that is named with
6
AN120REV2
AN120
ProLogic Enable & ACMOD==2 5 Channels (Ls=Rs)
2 Channels (Lt & Rt)
Autodetect Enable AC-3 Enable
Pro Logic Decode Downmix
5.1 Channels 5.1 Channels
Autodetect (AC-3) CMPDAT/ DAI
AC-3 Decode 5 Discrete Channels Output Mode Control
Bass Manager
Audio Manager
0.1 (Sub)
LFE Enable
Bass Parameter Output Mode
Volume/Mute Channel Remap Delay
Figure 1. AC3 Code configured for AC3 input
ProLogic Enable Pink Noise Control (Autodetect should be disabled when using pink noise) 5.1 Channels 5.1 Channels CMPDAT/ DAI 5 Channels Output Mode Control Volume/Mute Channel Remap Delay Downmix Bass Manager Audio Manager
Autodetect Enable PCM Enable
2 Channels (Lt & Rt)
5 Channels (Ls=Rs)
Autodetect (PCM)
PCM Decode
Pro Logic Decode
Pink Noise
0.1 (Sub)
Bass Parameter Output Mode
Figure 2. AC-3 Code Configured For PCM
AN120REV2
7
AN120
2.0 HARDWARE CONFIGURATION
After download or soft reset, and before kickstarting the application, the host has the option of changing the default hardware configuration (see Section 4.1, Audio Manager, for more information on kickstarting). 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 or soft reset.
2.1 Supported Input/Output Modes
The CS4923/4/5/6 has two input ports and one output port. AN115 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 AN115 although all configurations are not supported by all applications. Each Software Application User's Guide specifies the exact input/output modes supported by the application. Referring to AN115, Table 1 shows the input/output modes supported by the MPEG application. Table 2 shows the input/output modes supported by the PCM pass-through portion of the application.
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 0,1 0,1 0,1 0,1 0,1,2,3 0,1,2,3 0,1,2 0,1
Table 1. Input/Output Configurations Supported by AC-3 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 0,1,2 0,1 0,1 0,1 0,1,2,3 0,1,2,3 0,1,2 0,1
Table 2. Input/Output Configurations Supported by PCM
8
AN120REV2
AN120
3.0 APPLICATION MESSAGING
While using the CS4923/4/5/6 it may be necessary to control or monitor the application to take full advantage of the rich feature set employed by the CS4923/4/5/6 and its software. Application messaging allows the user to do this. Whether it be configuring the part after download, e.g. enabling AC3 decode, or changing run-time parameters, e.g. controlling digital volume, the host will use application messaging to communicate with the CS4923/4/5/6. While communicating with the CS4923/4/5/6 using indexed modules, a strict software protocol must be used in conjunction with the hardware protocol discussed in the CS4923/4/5/6/7/8/9 Hardware User's Guide. This section will cover both the format of the messages and the different configuration modules available with the CS4923/4/5/6. It must be stressed that the host must strictly adhere to the hardware and software protocols to insure successful communication. index are combined, a unique variable can be read or written. This section covers how to communicate with the CS4923/4/5/6 using indexed modules. The software protocol is presented for the following types of messages: Write, Solicited Read, Read Response, and Unsolicited Read Response. When the protocol presented in this section is used with the application modules in Section 4.0, Application Modules, the host will be able to fully configure the application running on the CS4923/4/5/6.
3.1.1 Write Session
A write session with the CS4923/4/5/6 consists of one 6 byte message from the host to the CS4923/4/5/6. The write message consists of a command word followed by an associated data word. Table 3 shows the format of a write message.
3.1.2 Solicited Read Message Format
A solicited read session consists of one 3-byte Read Request message from the host to the CS4923/4/5/6, followed by a 6 byte Read Response message from the CS4923/4/5/6 to the host. The read request message simply consists of a Read command word whose format is shown in Table 4.
3.1 Indexed Module Communication Protocol
Each indexed module of the application can be thought of as a block of software registers or variables. The index identifies a unique variable within the module. When the opcode for a module and an
Write Command Word:
23 22 21 20 19 18 17 16 15 OPCODE[7:0]
Write Data Word:
14 13 12
11
10
9
8 7 6 INDEX[15:0] 8 7 6
5
4
3
2
1
0
23 22 21 20 19
18 17 16 15
14 13 12 11 10 DATA[23:0]
9
5
4
3
2
1
0
OPCODE[7:0] - 8 bit (1 byte) field containing opcode for targeted application module. This field will choose which module is written. INDEX[15:0] - 16 bit (2 byte) field containing the index for the desired variable in the module chosen by OPCODE. This field will choose the actual variable to be altered. DATA[23:0] - 24 bit (3 byte) data word to be written into the variable specified by INDEX in the module specified by OPCODE. Table 3. Write Message Format
AN120REV2
9
AN120
After the host sends the read command word it should wait for the INTREQ line to fall. See the CS4923/4/5/6/7/8/9 Hardware User's Guide for more on hardware communication with the CS4923/4/5/6. After INTREQ falls the host should read out the 6-byte Read Response message which consists of a 3 byte Read Response Command word followed by the requested data word. The format of the Read Response message is shown in Table 5. dressed. One example is when the part is in autodetect mode and detects a new stream. An unsolicited read message will be sent by the CS4923/4/5/6 to indicate the new stream type. The 6-byte unsolicited read messages from the CS4923/4/5/6 consist of a 3-byte read command word which defines the type of unsolicited message (as described in section 4.6) and a 3-byte associated data word that contains more information describing a system condition. Every time the existence of a message is detected (by sensing that INTREQ is low), the host should read out the 6- byte read unsolicited message. Table 6 shows the format of an unsolicited read message.
3.2 Unsolicited Read Message Format
Unsolicited messages will typically be used in systems where INTREQ can generate interrupts. These messages will come from the CS4923/4/5/6 to indicate a change in the system that must be ad-
Read Command Word:
23 22 21 20 19 18 17 16 15 14 13 12 OPCODE[7:0]
11
10
9
8 7 6 INDEX[15:0]
5
4
3
2
1
0
OPCODE[7:0] - 8 bit (1 byte) field containing opcode for targeted application module. This field will choose which module is to be read from. INDEX[15:0] - 16 bit (2 byte) field containing the index for the desired variable in the module chosen by OPCODE. This field will choose the actual variable to be read. Table 4. Read Command Message Format
Read Response Command Word:
23 22 21 20 19 18 17 16 15 14 13 12 OPCODE[7:0]
Read Response Data Word:
11
10
9
8 7 6 INDEX[15:0] 8 7 6
5
4
3
2
1
0
23 22 21 20 19 18 17 16 15 14 13 12 11 10 DATA[23:0]
9
5
4
3
2
1
0
OPCODE[7:0] - 8 bit (1 byte) field containing the Read Response opcode for the targeted application module. This field will show which module was read. INDEX[15:0] - 16 bit (2 byte) field containing the index for the desired variable in the module chosen by OPCODE. This field will show the actual variable that was read. DATA[23:0] - 24 bit (3 byte) data word that was read from the variable specified by INDEX in the module specified by OPCODE. Table 5. Read Response Message Format
10
AN120REV2
AN120
Unsolicited Read Command Word:
23 22 21 20 19 18 17 16 15 OPCODE[7:0]
Unsolicited Read Data Word:
14 13 12
11
10
9
8 7 6 INDEX[15:0]
5
4
3
2
1
0
23 22 21 20 19
18 17 16 15
14 13 12 11 10 DATA[23:0]
9
8
7
6
5
4
3
2
1
0
OPCODE[7:0] - 8 bit (1 byte) field containing opcode for the Unsolicited Messages module. INDEX[15:0] - 16 bit (2 byte) field containing the index for the variable in the module designated by OPCODE. DATA[23:0] - 24 bit (3 byte) data word that corresponds to the variable specified by INDEX in the module specified by OPCODE. Table 6. Unsolicited Read Message Format
4.0 APPLICATION MODULES
Figures 1 and 2 accurately portray the interaction between the various application modules of the AC3 code. 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 or application restart. Variables marked by `Default' will be reinitialized to the values shown in this application note after download, soft reset or application restart. 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 CS4923/4/5/6 should be converted to hexadecimal. Likewise all values read from the part are in hexadecimal.
AN120REV2
11
AN120
4.1 Audio Manager
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 15: Audio_Config_Change_Notification_Enable = 0/1= Disable/Enable unsolicited message notification of any change in audio configuration of input bitstream (Valid only for AC-3 application). See "Unsolicited Messages (Read-Only)" on page 37 for more details Bit 14: Startup_Autodetect_Bypass_Enable= 0/1= Disable/Enable bypassing of autodetection at start-up, i.e. for the first time after download/reset. (Valid only with Autodetect_Enable==1). NOTE: If Bit 14 is enabled, during readback this bit is reserved and may read 0 or 1. Bit 12: Autodetect_Enable = 0/1= Disable/Enable autodetect functionality. Bit 8: Application_Restart_Enable = 0/1= Disable/Enable restart of software application. Bit 4: PLL_Enable = 0/1 = Disable/Enable Phase Locked Loop generation of DSP clock. It is MANDATORY that the PLL be enabled for Rev D CS4923/4/5/6. Bit 0: Kickstart_Enable = 0/1 = Disable/Enable Kickstart of application. Default = 0x000000
0x01
Noise_Control
Bit 5: Level_Select = 0/1 = Default output levels/10.5dB boosted output level. Note that this bit MUST be disabled for Dolby testing. Bit 4: White_Noise_Enable = 0/1 = Pink/White Noise output. Bits 3:0 = Output _Channel = 0...5 = L, C, R, Ls, Rs, LFE channel output. Disabled if > 5. NOTE: Noise can only be enabled in PCM pass-through mode. Default = 0x7FFFFF
0x02 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b
C_Delay Ls_Delay Rs_Delay Master_Volume L_Volume C_Volume R_Volume Ls_Volume Rs_Volume
0...5 = mS delay. Default* = 0 0...15 = mS delay (automatic +15 for Pro Logic). Default* = 0 0...15 = mS delay (automatic +15 for Pro Logic). Default* = 0 0x800001-0x7FFFFF (-1.0 to 1.0). Default* = 0x7FFFFF 0x800001-0x7FFFFF (-1.0 to 1.0). Default* = 0x7FFFFF 0x800001-0x7FFFFF (-1.0 to 1.0). Default* = 0x7FFFFF 0x800001-0x7FFFFF (-1.0 to 1.0). Default* = 0x7FFFFF 0x800001-0x7FFFFF (-1.0 to 1.0). Default* = 0x7FFFFF 0x800001-0x7FFFFF (-1.0 to 1.0). Default* = 0x7FFFFF Table 7. Audio Manager
12
AN120REV2
AN120
Index
0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 Mute DAO0_Channel1 DAO1_Channel1 DAO2_Channel1 DAO3_Channel1 DAO4_Channel1 DAO5_Channel1
Variable
LFE_Volume
Dataword Content
0x800001-0x7FFFFF (-1.0 to 1.0). Default* = 0x7FFFFF 0/1 = Unmute/mute audio. This is a soft mute. Default = 0 0...5 = Channel type1 for Digital Audio Output 0. Each channel must be mapped to one and only one unique output. Default* = 0(L) 0...5 = Channel type1 for Digital Audio Output 1. Each channel must be mapped to one and only one unique output.Default* = 2(R) 0...5 = Channel type1 for Digital Audio Output 2. Each channel must be mapped to one and only one unique output.Default* = 3(Ls) 0...5 = Channel type1 for Digital Audio Output 3. Each channel must be mapped to one and only one unique output.Default* = 4(Rs) 0...5 = Channel type1 for Digital Audio Output 4. Each channel must be mapped to one and only one unique output.Default* = 1(C) 0...5 = Channel type1 for Digital Audio Output 5. Each channel must be mapped to one and only one unique output.Default* = 5(LFE)
Sampling_Frequency_Code 0..2 = Sampling Frequency code to be set by host in case of PCM-only input applications. Irrelevant for non-PCM processing. This sampling frequency will be used for Fs dependent filters such as those in the bass manager. 0 = 48 KHz 1 = 44.1 KHz 2 = 32 KHz Default* = 0
0x15
PCM_Autodetect_Silence_ Threshold
0..8388606 = Number of samples of silence after which CS4923/4/5/6 will declare Out-Of-PCM while playing PCM with autodetection enabled. 8388607 (0x7fffff) = Disable silence detection when playing PCM. CS4923/4/5/6 will never declare Out-Of-PCM once it starts playing PCM (equivalent to infinite threshold). NOTE: Valid only for PCM pass-through. Default* = 48000
0x16 0x17 0x18
Last_Unsolicited_Message PLL_Register_1 PLL_Register_2
Last Unsolicited Message Value (see Section 4.6) READ ONLY Default=0x000000 Register 1 value for Phase Locked Loop (no Fs generation). Default* = 0x07f270 (CLKIN=12.288MHz, DSPCLK=60MHz) Register 2 value for Phase Locked Loop (no Fs generation). Default* = 0x0001fe (CLKIN=12.288MHz, DSPCLK=60MHz)
Notes: 1. Mapping should be setup before kickstart of application and should always be complete and one-toone, i.e. each DAO should be mapped to one and only Channel type. Channel type 0...5 corresponds to Channels L, C, R, Ls, Rs and LFE respectively. Table 7. Audio Manager (Continued)
AN120REV2
13
AN120
4.1.1 Audio_Control: (Index 0x00)
Bit_15
Audio_Config_Change_Notification_Enable Makes the CS4923/4/5/6 sensitive to changes in the Audio configuration reported in the input bitstream. If any of acmod, lfeon, dsurmod, or dialnorm variables change, CS4923/4/5/6 will issue an unsolicited message (see Unsolicited Messages (Read-Only), Section 4.6).
0 - Disables Audio_Config_Change_Notification 1 - Enables Audio_Config_Change_Notification
Bit 14
Startup_Autodetect_Bypass_Enable Maintains the CS4923/4/5/6 in autodetect mode, but bypasses autodetection (directly enters input data processing) at start-up, i.e. for the first time after download/reset. This bit should only be changed after download, soft reset, or Application Restart. The state of autodetect should not be modified during run-time.
0 - Disables Startup_Autodetect_Bypass 1 - Enables Startup_Autodetect_Bypass No unsolicited message is generated by CS4923/4/5/6 if the processing is successful. However, if the data format is subsequently found to be the wrong type, autodetect messaging will be generated by CS4923/4/5/6 as usual. The above Startup_Autodetect_Bypass mode is useful in saving the autodetect latency when the controller already knows that the current input data format is decodable by the downloaded application. The controller is usually aware of this due to the autodetection message from the previous (most recent) downloaded application. Notes:If this mode is enabled, Bit 14 readback value is reserved (either 0 or 1 may be received and should be ignored).
Bit 12
Autodetect_Enable Puts the CS4923/4/5/6 into autodetect mode (see Section 4.6, Unsolicited Messages (ReadOnly), Section 4.6). This bit should only be changed after download, soft reset, or Application Restart. The state of autodetect should not be modified during run-time.
0 - Disables Autodetect 1 - Enables Autodetect
Bit 8
Application_Restart_Enable Used along with Kickstart_Enable Restarts the downloaded software application.
0 - Disables Application_Restart 1 - Enables Application_Restart This is intended to allow change of input unit settings on the fly without resetting the output unit (which may cause clicks on the DAC if in master mode). This also allows on-the-fly changes of processing parameters (such as filter coefficients) without resetting the output unit. Application Restart effectively places the CS4923/4/5/6 in a start-up state as though it were issued a hardware reset + soft reset, except that the preset output and control port configuration (address checking for serial control) is maintained. Except for issuing output and host initialization messages, after an Application_Restart, the host should treat the CS4923/4/5/6 as it would at startup, i.e. issue input unit initialization, setup application parameters and then kickstart. Notes:Just as with Soft Reset, all Default* settings are untouched by Application Restart.
14
AN120REV2
AN120
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 60 MHz DSPCLK from a 12.288 MHz external CLKIN. For a CLKIN of 11.2896 MHz, PLL_Register_1=0x24BC34 and PLL_Register_2 = 0x0001fe should be used. These register values should be downloaded prior to Kickstart with PLL_Enable.
Bit 0
Kickstart Enable Puts CS4923/4/5/6 into run-time mode. Indicates that all hardware and software configuration has been completed and CS4923/4/5/6 can start the application.
0 - Application continues waiting for kickstart. 1 - Application is kickstarted
4.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 application code is configured for PCM and the Output Channel is set to a value in the range 0x0 - 0x5. Autodetect must NOT be enabled when using Pink Noise. Bit 5
Level_Select Sets up output level.
0 - Default level (Dolby-compatible) 1 - 10.5 dB boosted with respect to default level.
Bit 4
White_Noise_Enable Enables white noise if set (otherwise output is Pink noise).
0 - Pink Noise 1 - White Noise
Bits 3:0 Output Channel Selects channel for noise output. 0x0- Left 0x1- Center 0x2 - Right 0x3 - Left Surround (This value controls both Ls and Rs in Pro Logic Mode) 0x4 - Right Surround (This value has no effect in Pro Logic mode) 0x5 - LFE 0x6..0xf - disabled
AN120REV2
15
AN120
4.1.3 Sampling Frequency Code (Index 0x14):
This parameter controls the sampling frequency for PCM applications. This must be set by the host during PCM applications, including PCM Pro Logic, for proper operation of filters. For compressed input, such as AC-3, the decoder application will setup sampling frequency information based on the information parsed from the bitstream so this field should not be set. Bits 2:0 Sampling_Frequency_Code 0x0 - 48 kHz 0x1 - 44.1 kHz 0x2 - 32 kHz For 96 kHz PCM support, the host should set the Fs to 48 kHz and download the correct 96 kHz coefficients in the bass manager in the place of the 48 kHz coefficients.
16
AN120REV2
AN120
4.2 AC-3 Manager
Write Opcode = 0x8A; Read Opcode = 0x0B; Read Response Opcode = 0x8B Write = 0x8A00HH 0xhhhhhh Read Request = 0x0B00HH; Read Response = 0x8B00HH 0xhhhhhh 0xHH = index 0xhhhhhh = data value
Index
0x00
Variable
AC3_Control
Dataword Content
Bit 4: LFE_Enable = 0/1 = Disable/Enable LFE channel decoding (if it exists in the stream) Bit 0: AC3_Enable = 0/1 = Disable/Enable AC-3 decoding. Default = 0x000000
0x01
Output_Mode_Control Bit 8: Karaoke_Capable_Enable = 0/1 = Enable/Disable Karaoke capable downmixing (see Section 4.5 for Karaoke Capable user settings). Bits 5:4: Dualmode = 0...3 = -u setting of Dolby C decoder. Valid only if acmod=0 (dual mono). 00b = Stereo 01b = Left Mono 10b = Right Mono 11b = Mixed-Mono. Bits 3:0: Output_Mode = 0...7 = -o setting of Dolby C decoder 0x0 = 2/0 L, R Dolby Surround compatible 0x1 = 1/0 C 0x2 = 2/0 L, R 0x3 = 3/0 L, C, R 0x4 = 2/1 L, R, S (Ls = S) 0x5 = 3/1 L, C, R, S (Ls = S) 0x6 = 2/2 L, R, Ls, Rs (with Pro Logic decode, Ls = Rs = S - 3 dB) 0x7 = 3/2 L, C, R, Ls, Rs (with Pro Logic decode, Ls = Rs = S - 3 dB) Default* = 0x000007 NOTE: Undesired Channel outputs must be explicitly muted by setting the corresponding Ch_Vol (see Audio Manager) to 0.0
0x02
Compression_Control Bits 1:0: 0...3 = -k setting of Dolby C decoder 00b = Custom Mode 0 (Analog Dialnorm) 01b = Custom Mode 1 (Digital Dialnorm) 10b = Line Out Mode (This mode is typical for most AVR systems - however the choice of compression is entirely up to the system designer) 11b = RF Remodulation Mode Default* = 1 Table 8. AC-3 Manager
AN120REV2
17
AN120
Index
0x03 Cut_x
Variable
Dataword Content
0x000000-0x7FFFFF = Compression cut scale factor = -x setting of Dolby C decoder. Cut_x is a scaling factor used on the absolute compression limits. The absolute compression limits are set during the encoding process. Default* = 0 0x000000-0x7FFFFF = Compression boost scale factor = -y setting of Dolby C decoder. Boost_y is a scaling factor used on the absolute compression limits. The absolute compression limits are set during the encoding process. Default* = 0 Bits 1:0: Current Sample Rate Code (fscod) value. 00b = 48kHz 01b = 44.1kHz 10b = 32kHz 11b = Reserved
0x04
Boost_y
0x05
fscod
READ-ONLY
0x06 bsmod Bits 3:0: Current Bit Stream (bsmod) value. 0x0 = main audio service: complete main (CM) 0x1 = main audio service: music and effects (ME) 0x2 = associated service: visually impaired (VI) 0x3 = associated service: hearing impaired (HI) 0x4 = associated service: dialogue (D) 0x5 = associated service: commentary (C) 0x6 = associated service: emergency (E) 0x7: if ACMOD == 1: associated service: voice over (VO) if ACMOD == 010b to 111b: main audio service: karaoke READ-ONLY 0x07 acmod Bits 3:0: Current Audio Coding Mode (acmod) value 0x0 = 1+1 Ch1, Ch2 0x1 = 1/0 C 0x2 = 2/0 L, R 0x3 = 3/0 L, C, R 0x4 = 2/1 L, R, S 0x5 = 3/1 L, C, R, S 0x6 = 2/2 L, R, Ls, Rs 0x7 = 3/2 L, C, R, Ls, Rs READ-ONLY Table 8. AC-3 Manager (Continued)
18
AN120REV2
AN120
Index
0x08
Variable
dsurmod
Dataword Content
Bits 1:0: Current Dolby Surround Mode (dsurmod value) valid only when (acmod=2). 00b = not indicated 01b = NOT Dolby Surround encoded 10b = Dolby Surround Encoded 11b = Reserved READ-ONLY
0x09 0x0a 0x0b
clev slev lfeon
0x000000-0x7FFFFF = Current center mixing level (interpreted stream value). Valid only if 3 front channels exist. READ-ONLY 0x000000-0x7FFFFF = Current surround mixing level (interpreted stream value). Valid only if a surround channel exists. READ-ONLY Bit 0: Current lfeon value 0 = LFE channel is off 1 = LFE channel is on READ-ONLY
0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14
dialnorm compr dialnorm2 compr2 bsid langcod mixlevel_roomtyp langcod2 mixlevel2_roomtyp2
0...31 = Current dialnorm value. READ-ONLY 0xFFFFFF = Nonexistent in stream. 0x00-0xFF = Current compr value. READ-ONLY 0...31 = Current dialnorm2 value. Valid only in 1+1 dual mono mode (acmod=0). READ-ONLY 0xFFFFFF = Nonexistent in stream. 0x00-0xFF = Current compr2 value. Valid only in 1+1 dual mono mode (acmod=0). READ-ONLY 0...31 = Current bsid value. READ-ONLY 0xFFFFFF = Nonexistent in stream. 0...255 = Current langcod value. READ-ONLY 0xFFFFFF = Nonexistent in stream. 0x00...0x7F: Bits 6:2: current mixlevel. Bits 1:0: current roomtyp. READ-ONLY 0xFFFFFF = Nonexistent in stream. 0...255 = Current langcod value. Valid only in 1+1 dual mono mode (acmod=0). READ-ONLY 0xFFFFFF = Nonexistent in stream. 0x00...0x7F: Bits 6:2: current mixlevel2. Bits 1:0: current roomtyp2. Valid only in 1+1 dual mono mode (acmod=0). READ-ONLY 0/1 = Current copyrightb value. READ-ONLY 0/1 = Current origbs value. READ-ONLY Current frame size code. READ-ONLY Table 8. AC-3 Manager (Continued)
0x15 0x16 0x17
copyrightb origbs frmsizcod
AN120REV2
19
AN120
4.2.1 Output_Mode_Control (Index 0x01)
Sets up particular output speaker downmix configuration for AC-3 decode and Pro Logic decode. When configuring the Output _Mode_Control, first the individual volumes of each undesired channel should be set to 0. Next, the desired output mode should be specified. This should typically be done before kickstart of the application. For example, if output mode 3/0 (L, C, R) is chosen, Ls and Rs volume must be explicitly set to 0 in the Audio Manager module to guarantee no output on those channels. Bit 8
Karaoke_Capable_Enable If set, downmixing of Karaoke streams (bsmod=7, acmod=2...7) will be performed according to Karaoke Capable decoder specification by employing user settings (see Section 4.5, PCM Processor, for more details of the user settings).
If Karaoke_Capable_Enable is not set, then CS4923/4/5/6 defaults to a Karaoke Aware downmix using levels indicated in the stream.
Bits 5:4 Dualmode = 0...3 = -u setting of Dolby C decoder Valid only if acmod=0 (dual mono). 00b = Stereo 01b = Left Mono 10b = Right Mono 11b = Mixed-Mono. Bits 3:0 Output_Mode = 0...7 = -o setting of Dolby C decoder 0x0 = 2/0 L, R Dolby Surround compatible 0x1 = 1/0 C 0x2 = 2/0 L, R 0x3 = 3/0 L, C, R 0x4 = 2/1 L, R, S (Ls = S) 0x5 = 3/1 L, C, R, S (Ls = S) 0x6 = 2/2 L, R, Ls, Rs (with Pro Logic decode, Ls = Rs = S - 3 dB) 0x7 = 3/2 L, C, R, Ls, Rs (with Pro Logic decode, Ls = Rs = S - 3 dB)
4.2.2 AC-3 Stream Information:
Table 8 lists all READ-ONLY variables that are reported to the host by the AC-3 Decoder module. These can be read out using the appropriate Read Request, Read Response sessions. For example, to read the acmod value, host should issue the 3-byte Read Request 0x0b0007 and then read the 6-byte Read Response 0x9b0007, 0x00000h, where the dataword (latter 3 bytes) indicates the reported value of acmod. Please refer to the Dolby AC-3 Specification for more information on these stream variables.
4.2.3 Special Considerations For AC-3
When using the AC-3 code it should be noted that AC-3 and PCM are completely independent applications. The host must treat them as such and only enable either AC-3 or PCM at any one time. Transitions from AC-3 to PCM or vice-versa should be done with a soft reset followed by complete hardware configuration and application configuration. Conversely, an Application Restart message could be used which would only require that a new input port configuration and application configuration be sent -- output clocks would not be affected. For more information on Application Restart, please see Section 4.1, Audio Manager.
20
AN120REV2
AN120
4.3 Pro Logic Manager
Write Opcode = 0x8E; Read Opcode = 0x0F; Read Response Opcode = 0x8F Write = 0x8E00HH 0xhhhhhh Read Request = 0x0F00HH; Read Response = 0x8F00HH 0xhhhhhh 0xHH = index 0xhhhhhh = data value
Index
0x00
Variable
ProLogic_Control
Dataword Content
Bit 8: Autobalance_Enable = 0/1= Disable/Enable Autobalance. Bit 4: Btype_NR_Enable = 0/1= Disable/Enable B-Type Noise Reduction. Bit 0: ProLogic_Enable = 0/1 = Disable/Enable Pro Logic decoding. Default = 0x000000 Table 9. Pro Logic Manager
Note that control of the output mode (which channels are configured to provide audio) is done through the Output_Mode_Control index (0x01) of the AC-3 Manager. Phantom modes are enabled by selecting output modes which do not include a center channel output. The center channel audio is mixed into the left and right speakers. Phantom modes would include: Output_Mode = 0x4 2/1 L, R, S (Ls = S) Output_Mode = 0x6 2/2 L, R, Ls, Rs (Ls = Rs = S - 3dB) Wide mode is used for audio outputs which are connected to a full-bandwidth speaker. Wide mode for a particular channel can be obtained by disabling the high pass filter for that channel within the bass manager module.
AN120REV2
21
AN120
4.4 Generalized 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_Only_Sub = 0/1 = Disable/Enable LFE Only to subwoofer. Bit 14: 4th_Order_LPF = 0/1 = Disable/Enable 4th order LPF at output of summer. Bit 12 must be set in addition to Bit 14 to enable the 4th order LPF. Bit 12: LPF = 0/1 = Disable/Enable LPF at output of summer. Bit 8: HPF_L = 0/1 = Disable/Enable L channel HPF. Bit 7: HPF_C = 0/1 = Disable/Enable C channel HPF. Bit 6: HPF_R = 0/1 = Disable/Enable R channel HPF. Bit 5: HPF_Ls = 0/1 = Disable/Enable Ls channel HPF. Bit 4: HPF_Rs = 0/1 = Disable/Enable Rs channel HPF. Bit 0: Bass_Mgr = 0/1 = Disable/Enable Bass Manager post-processing. Default = 0x000000
0x01 0x02 0x03 0x04 0x05 0x06 0x07
Input_L_Level Input_C_Level Input_R_Level Input_Ls_Level Input_Rs_Level Input_LFE_Level Sum_Output_L_Level
0x000000-0x7FFFFF = Level adjustment for input L channel pass-through. Default* = 0x7FFFFF (0 dB) 0x000000-0x7FFFFF = Level adjustment for input C channel input pass-through. Default* = 0x7FFFFF (0 dB) 0x000000-0x7FFFFF = Level adjustment for input R channel input pass-through. Default* = 0x7FFFFF (0 dB) 0x000000-0x7FFFFF = Level adjustment for input Ls channel pass-through. Default* = 0x7FFFFF (0 dB) 0x000000-0x7FFFFF = Level adjustment for input Rs channel pass-through. Default* = 0x7FFFFF (0 dB) 0x000000-0x7FFFFF = Level adjustment for input LFE channel pass-through. Default* = 0x7FFFFF (0 dB) 0x000000-0x7FFFFF = Level adjustment for bass summer output contribution to L channel output.
Default* = 0x000000 (- dB)
0x08 Sum_Output_C_Level 0x000000-0x7FFFFF = Level adjustment for bass summer output contribution to C channel output.
Default* = 0x000000 (- dB)
Table 10. Bass Manager
22
AN120REV2
AN120
Index
0x09
Variable
Sum_Output_R_Level
Dataword Content
0x000000-0x7FFFFF = Level adjustment for bass summer output contribution to R channel output.
Default* = 0x000000 (- dB)
0x0a Sum_Output_Ls_Level 0x000000-0x7FFFFF = Level adjustment for bass summer output contribution to Ls channel output.
Default* = 0x000000 (- dB)
0x0b Sum_Output_Rs_Level 0x000000-0x7FFFFF = Level adjustment for bass summer output contribution to Rs channel output. Default* = 0x000000 (- dB) 0x0c LFE_L_Level 0x000000-0x7FFFFF = Level adjustment for input LFE contribution to L channel output.
Default* = 0x000000 (- dB)
0x0d LFE_C_Level 0x000000-0x7FFFFF = Level adjustment for input LFE contribution to C channel output.
Default* = 0x000000 (- dB)
0x0e LFE_R_Level 0x000000-0x7FFFFF = Level adjustment for input LFE contribution to R channel output.
Default* = 0x000000 (- dB)
0x0f LFE_Ls_Level 0x000000-0x7FFFFF = Level adjustment for input LFE contribution to Ls channel output.
Default* = 0x000000 (- dB)
0x10 LFE_Rs_Level 0x000000-0x7FFFFF = Level adjustment for input LFE contribution to Rs channel output.
Default* = 0x000000 (- dB)
0x11 Sum_Input_L_Level 0x000000-0x7FFFFF = Level adjustment for input L channel contribution to bass summer input. Default* = 0x16C311 (-15 dB) 0x12 Sum_Input_C_Level 0x000000-0x7FFFFF = Level adjustment for input C channel contribution to bass summer input. Default* = 0x16C311 (-15 dB) 0x13 Sum_Input_R_Level 0x000000-0x7FFFFF = Level adjustment for input R channel contribution to bass summer input. Default* = 0x16C311 (-15 dB) 0x14 Sum_Input_Ls_Level 0x000000-0x7FFFFF = Level adjustment for input Ls channel contribution to bass summer input. Default* = 0x16C311 (-15 dB) 0x15 Sum_Input_Rs_Level 0x000000-0x7FFFFF = Level adjustment for input Rs channel contribution to bass summer input. Default* = 0x16C311 (-15 dB) Table 10. Bass Manager (Continued)
AN120REV2
23
AN120
Index
0x16
Variable
Dataword Content
Sum_Input_LFE_Level 0x000000-0x7FFFFF = Level adjustment for input LFE channel contribution to bass summer. Default* = 0x47FACD (-5 dB) LPF_48_b0 LPF_48_b1 LPF_48_a1 HPF_48_b0 HPF_48_b1 HPF_48_a1 LPF_44_b0 LPF_44_b1 LPF_44_a1 HPF_44_b0 HPF_44_b1 HPF_44_a1 LPF_32_b0 LPF_32_b1 LPF_32_a1 HPF_32_b0 HPF_32_b1 HPF_32_a1 0x000000-0x7FFFFF = b0 coefficient for Low Pass Filter, Fs=48 KHz. Default* = 0x014D4C 0x000000-0x7FFFFF = b1 coefficient for Low Pass Filter, Fs=48 KHz. Default* = 0x014D4C 0x000000-0x7FFFFF = a1 coefficient for Low Pass Filter, Fs=48 KHz. Default* = 0x7D6567 0x000000-0x7FFFFF = b0 coefficient for High Pass Filter, Fs=48 KHz. Default* = 0x7F7750 0x000000-0x7FFFFF = b1 coefficient for High Pass Filter, Fs=48 KHz. Default* = 0x8088B0 0x000000-0x7FFFFF = a1 coefficient for High Pass Filter, Fs=48 KHz. Default* = 0x7EEEA0 0x000000-0x7FFFFF = b0 coefficient for Low Pass Filter, Fs=44 KHz. Default* = 0x016A73 0x000000-0x7FFFFF = b1 coefficient for Low Pass Filter, Fs=44 KHz. Default* = 0x016A73 0x000000-0x7FFFFF = a1 coefficient for Low Pass Filter, Fs=44 KHz. Default* = 0x7D2B19 0x000000-0x7FFFFF = b0 coefficient for High Pass Filter, Fs=44 KHz. Default* = 0x7F6B48 0x000000-0x7FFFFF = b1 coefficient for High Pass Filter, Fs=44 KHz. Default* = 0x8094B8 0x000000-0x7FFFFF = a1 coefficient for High Pass Filter, Fs=44 KHz. Default* = 0x7ED68F 0x000000-0x7FFFFF = b0 coefficient for Low Pass Filter, Fs=32 KHz. Default* = 0x01F171 0x000000-0x7FFFFF = b1 coefficient for Low Pass Filter, Fs=32 KHz. Default* = 0x01F171 0x000000-0x7FFFFF = a1 coefficient for Low Pass Filter, Fs=32 KHz. Default* = 0x7C1D1F 0x000000-0x7FFFFF = b0 coefficient for High Pass Filter, Fs=32 KHz. Default* = 0x7F3365 0x000000-0x7FFFFF = b1 coefficient for High Pass Filter, Fs=32 KHz. Default* = 0x80CC9B 0x000000-0x7FFFFF = a1 coefficient for High Pass Filter, Fs=32 KHz. Default* = 0x7E66CA Table 10. Bass Manager (Continued)
0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28
24
AN120REV2
AN120
The Bass Manager is best described with the use of a block diagram. Figure 3 shows the topology of the filter used for both the low pass and the high pass filters. This filter represents two first order filters cascaded to implement a second order filter. For the 4th order LPF two filters as in Figure 2 are implemented back to back. Depending on the coefficient values, either a second order low pass or second order high pass can be implemented. The default 3 dB frequency for this filter is 100 Hz. The corner frequency can be changed by downloading new values for the coefficients a1, b0 and b1. Note
b0 X
that since two first order filters are cascaded to obtain the second order filter, the corner frequency design of the first order prototype has to be adjusted to obtain the desired overall 3 dB frequency when two such first order filters are cascaded. In effect, the first order filter should be designed to yield 1.5 dB at the desired overall 3 dB corner frequency. Figure 4 shows the processing unit on each of the output channels (except the LFE) and Figure 5 shows the summing module used to redirect bass to the subwoofer channel.
b0 Y
-1 Z
-1
-1
b1
a1
Z
b1
Z
a1
Figure 3. Filter Topology
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 4. Bass Manager Processing Unit
Sum_Input_X_Level L C R Ls To Subwoofer Rs LFE LFE Input_LFE_Level LFE_Only_Sub_Enable To Processing Unit
LPF_Enable
Figure 5. Subwoofer Summing Module AN120REV2 25
AN120
4.4.1 Dolby Digital Bass Management Configurations
Tables 11 through 18 show the values that need to be written for the different Dolby Digital Bass Management configurations. These are in no way inclusive of all of the different modes possible, they are just presented to show the different configurations required for Dolby Digital Certification. Different configurations are required depending on the level of certification that is desired. Any questions regarding certification should be directed towards Dolby Laboratories.
Write Opcode
0x940000
Bass Manager Variables
Bass_Mgr_Control
Values
LFE_Only_Sub Disabled LPF Disabled HPF_L Disabled HPF_C Disabled HPF_R Disabled HPF_Ls Disabled HPF_Rs Disabled Bass_Mgr Enabled 0 dB 0 dB 0 dB 0 dB 0 dB 0 dB - dB - dB - dB - dB - dB - dB - dB - dB - dB - dB -15 dB -15 dB -15 dB -15 dB -15 dB -5 dB Table 11. Dolby Configuration 0
HEX Value
0x000001
Input_L_Level Input_C_Level Input_R_Level Input_Ls_Level Input_Rs_Level Input_LFE_Level Sum_Output_L_Level Sum_Output_C_Level Sum_Output_R_Level Sum_Output_Ls_Level Sum_Output_Rs_Level LFE_L_Level LFE_C_Level LFE_R_Level LFE_Ls_Level LFE_Rs_Level Sum_Input_L_Level Sum_Input_C_Level Sum_Input_R_Level Sum_Input_Ls_Level Sum_Input_Rs_Level Sum_Input_LFE_Level
0x940001 0x940002 0x940003 0x940004 0x940005 0x940006 0x940007 0x940008 0x940009 0x94000A 0x94000B 0x94000C 0x94000D 0x94000E 0x94000F 0x940010 0x940011 0x940012 0x940013 0x940014 0x940015 0x940016
0x7FFFFF 0x7FFFFF 0x7FFFFF 0x7FFFFF 0x7FFFFF 0x7FFFFF 0x000000 0x000000 0x000000 0x000000 0x000000 0x000000 0x000000 0x000000 0x000000 0x000000 0x16C311 0x16C311 0x16C311 0x16C311 0x16C311 0x47FACD
26
AN120REV2
AN120
Write Opcode
0x940000
Bass Manager Variables
Bass_Mgr_Control
Values
LFE_Only_Sub Disabled LPF Enabled HPF_L Enabled HPF_C Enabled HPF_R Enabled HPF_Ls Enabled HPF_Rs Enabled Bass_Mgr Enabled 0 dB 0 dB 0 dB 0 dB 0 dB 0 dB - dB - dB - dB - dB - dB - dB - dB - dB - dB - dB -15 dB -15 dB -15 dB -15 dB -15 dB -5 dB Table 12. Dolby Configuration 1
HEX Value
0x0011F1
Input_L_Level Input_C_Level Input_R_Level Input_Ls_Level Input_Rs_Level Input_LFE_Level Sum_Output_L_Level Sum_Output_C_Level Sum_Output_R_Level Sum_Output_Ls_Level Sum_Output_Rs_Level LFE_L_Level LFE_C_Level LFE_R_Level LFE_Ls_Level LFE_Rs_Level Sum_Input_L_Level Sum_Input_C_Level Sum_Input_R_Level Sum_Input_Ls_Level Sum_Input_Rs_Level Sum_Input_LFE_Level
0x940001 0x940002 0x940003 0x940004 0x940005 0x940006 0x940007 0x940008 0x940009 0x94000A 0x94000B 0x94000C 0x94000D 0x94000E 0x94000F 0x940010 0x940011 0x940012 0x940013 0x940014 0x940015 0x940016
0x7FFFFF 0x7FFFFF 0x7FFFFF 0x7FFFFF 0x7FFFFF 0x7FFFFF 0x000000 0x000000 0x000000 0x000000 0x000000 0x000000 0x000000 0x000000 0x000000 0x000000 0x16C311 0x16C311 0x16C311 0x16C311 0x16C311 0x47FACD
AN120REV2
27
AN120
Write Opcode
0x940000
Bass Manager Variables
Bass_Mgr_Control
Values
LFE_Only_Sub Disabled LPF Enabled HPF_L Disabled HPF_C Enabled HPF_R Disabled HPF_Ls Enabled HPF_Rs Enabled Bass_Mgr Enabled -12 dB ADJ, default = 0 dB -12 dB ADJ, default = 0 dB ADJ, default = 0 dB 0 dB -1.5 dB - dB -1.5 dB - dB - dB - dB - dB - dB - dB - dB - dB -15 dB - dB -15 dB -15 dB -5 dB Table 13. Dolby Configuration 2
HEX Value
0x0010B1
Input_L_Level Input_C_Level Input_R_Level Input_Ls_Level Input_Rs_Level Input_LFE_Level Sum_Output_L_Level Sum_Output_C_Level Sum_Output_R_Level Sum_Output_Ls_Level Sum_Output_Rs_Level LFE_L_Level LFE_C_Level LFE_R_Level LFE_Ls_Level LFE_Rs_Level Sum_Input_L_Level Sum_Input_C_Level Sum_Input_R_Level Sum_Input_Ls_Level Sum_Input_Rs_Level Sum_Input_LFE_Level
0x940001 0x940002 0x940003 0x940004 0x940005 0x940006 0x940007 0x940008 0x940009 0x94000A 0x94000B 0x94000C 0x94000D 0x94000E 0x94000F 0x940010 0x940011 0x940012 0x940013 0x940014 0x940015 0x940016
0x2026F2 0x7FFFFF 0x2026F2 0x7FFFFF 0x7FFFFF 0x7FFFFF 0x6BB2D5 0x000000 0x6BB2D5 0x000000 0x000000 0x000000 0x000000 0x000000 0x000000 0x000000 0x000000 0x16C311 0x000000 0x16C311 0x16C311 0x47FACD
28
AN120REV2
AN120
Write Opcode
0x940000
Bass Manager Variables
Bass_Mgr_Control
Values
LFE_Only_Sub Disabled LPF Enabled HPF_L Disabled HPF_C Enabled HPF_R Disabled HPF_Ls Enabled HPF_Rs Enabled Bass_Mgr Enabled 0 dB 0 dB 0 dB 0 dB 0 dB 0 dB - dB - dB - dB - dB - dB - dB - dB - dB - dB - dB - dB -15 dB - dB -15 dB -15 dB -5 dB
HEX Value
0x0010B1
Input_L_Level Input_C_Level Input_R_Level Input_Ls_Level Input_Rs_Level Input_LFE_Level Sum_Output_L_Level Sum_Output_C_Level Sum_Output_R_Level Sum_Output_Ls_Level Sum_Output_Rs_Level LFE_L_Level LFE_C_Level LFE_R_Level LFE_Ls_Level LFE_Rs_Level Sum_Input_L_Level Sum_Input_C_Level Sum_Input_R_Level Sum_Input_Ls_Level Sum_Input_Rs_Level Sum_Input_LFE_Level
0x940001 0x940002 0x940003 0x940004 0x940005 0x940006 0x940007 0x940008 0x940009 0x94000A 0x94000B 0x94000C 0x94000D 0x94000E 0x94000F 0x940010 0x940011 0x940012 0x940013 0x940014 0x940015 0x940016
0x7FFFFF 0x7FFFFF 0x7FFFFF 0x7FFFFF 0x7FFFFF 0x7FFFFF 0x000000 0x000000 0x000000 0x000000 0x000000 0x000000 0x000000 0x000000 0x000000 0x000000 0x000000 0x16C311 0x000000 0x16C311 0x16C311 0x47FACD
Table 14. Dolby Alternative Configuration 2
AN120REV2
29
AN120
Write Opcode
0x940000
Bass Manager Variables
Bass_Mgr_Control
Values
LFE_Only_Sub Disabled LPF Enabled HPF_L Disabled HPF_C Enabled HPF_R Disabled HPF_Ls Disabled HPF_Rs Disabled Bass_Mgr Enabled -8 dB -8 dB -8 dB -8 dB -8 dB -8 dB -4.5 dB - dB -4.5 dB - dB - dB -8 dB - dB -8 dB -8 dB -8 dB - dB -8 dB - dB - dB - dB - dB
HEX Value
0x001081
Input_L_Level Input_C_Level Input_R_Level Input_Ls_Level Input_Rs_Level Input_LFE_Level Sum_Output_L_Level Sum_Output_C_Level Sum_Output_R_Level Sum_Output_Ls_Level Sum_Output_Rs_Level LFE_L_Level LFE_C_Level LFE_R_Level LFE_Ls_Level LFE_Rs_Level Sum_Input_L_Level Sum_Input_C_Level Sum_Input_R_Level Sum_Input_Ls_Level Sum_Input_Rs_Level Sum_Input_LFE_Level
0x940001 0x940002 0x940003 0x940004 0x940005 0x940006 0x940007 0x940008 0x940009 0x94000A 0x94000B 0x94000C 0x94000D 0x94000E 0x94000F 0x940010 0x940011 0x940012 0x940013 0x940014 0x940015 0x940016
0x32F52C 0x32F52C 0x32F52C 0x32F52C 0x32F52C 0x32F52C 0x4C3EA7 0x000000 0x4C3EA7 0x000000 0x000000 0x32F52C 0x000000 0x32F52C 0x32F52C 0x32F52C 0x000000 0x32F52C 0x000000 0x000000 0x000000 0x000000
Table 15. Dolby Configuration 3 (Normal - No Sub Out)
30
AN120REV2
AN120
Write Opcode
0x940000
Bass Manager Variables
Bass_Mgr_Control
Values
LFE_Only_Sub Disabled LPF Enabled HPF_L Disabled HPF_C Enabled HPF_R Disabled HPF_Ls Disabled HPF_Rs Disabled Bass_Mgr Enabled -4 dB -4 dB -4 dB -4 dB -4 dB -4 dB -4.5 dB - dB -4.5 dB - dB - dB - dB - dB - dB - dB - dB - dB -4 dB - dB - dB - dB - dB Table 16. Dolby Configuration 3 (Sub Out)
HEX Value
0x011081
Input_L_Level Input_C_Level Input_R_Level Input_Ls_Level Input_Rs_Level Input_LFE_Level Sum_Output_L_Level Sum_Output_C_Level Sum_Output_R_Level Sum_Output_Ls_Level Sum_Output_Rs_Level LFE_L_Level LFE_C_Level LFE_R_Level LFE_Ls_Level LFE_Rs_Level Sum_Input_L_Level Sum_Input_C_Level Sum_Input_R_Level Sum_Input_Ls_Level Sum_Input_Rs_Level Sum_Input_LFE_Level
0x940001 0x940002 0x940003 0x940004 0x940005 0x940006 0x940007 0x940008 0x940009 0x94000A 0x94000B 0x94000C 0x94000D 0x94000E 0x94000F 0x940010 0x940011 0x940012 0x940013 0x940014 0x940015 0x940016
0x50C335 0x50C335 0x50C335 0x50C335 0x50C335 0x50C335 0x4C3EA7 0x000000 0x4C3EA7 0x000000 0x000000 0x000000 0x000000 0x000000 0x000000 0x000000 0x000000 0x50C335 0x000000 0x000000 0x000000 0x000000
AN120REV2
31
AN120
Write Opcode
0x940000
Bass Manager Variables
Bass_Mgr_Control
Values
LFE_Only_Sub Enabled LPF Enabled HPF_L Disabled HPF_C Enabled HPF_R Disabled HPF_Ls Enabled HPF_Rs Enabled Bass_Mgr Enabled 0 dB 0 dB 0 dB 0 dB 0 dB -5 dB 0 dB - dB 0 dB - dB - dB - dB - dB - dB - dB - dB - dB -4.5 dB - dB -4.5 dB -4.5 dB - dB
HEX Value
0x0110B1
Input_L_Level Input_C_Level Input_R_Level Input_Ls_Level Input_Rs_Level Input_LFE_Level Sum_Output_L_Level Sum_Output_C_Level Sum_Output_R_Level Sum_Output_Ls_Level Sum_Output_Rs_Level LFE_L_Level LFE_C_Level LFE_R_Level LFE_Ls_Level LFE_Rs_Level Sum_Input_L_Level Sum_Input_C_Level Sum_Input_R_Level Sum_Input_Ls_Level Sum_Input_Rs_Level Sum_Input_LFE_Level
0x940001 0x940002 0x940003 0x940004 0x940005 0x940006 0x940007 0x940008 0x940009 0x94000A 0x94000B 0x94000C 0x94000D 0x94000E 0x94000F 0x940010 0x940011 0x940012 0x940013 0x940014 0x940015 0x940016
0x7FFFFF 0x7FFFFF 0x7FFFFF 0x7FFFFF 0x7FFFFF 0x47FACC 0x7FFFFF 0x000000 0x7FFFFF 0x000000 0x000000 0x000000 0x000000 0x000000 0x000000 0x000000 0x000000 0x4C3EA7 0x000000 0x4C3EA7 0x4C3EA7 0x000000
Table 17. Dolby DVD Configuration (Bass to L/R)
32
AN120REV2
AN120
Write Opcode
0x940000
Bass Manager Variables
Bass_Mgr_Control
Values
LFE_Only_Sub Disabled LPF Enabled HPF_L Disabled HPF_C Enabled HPF_R Disabled HPF_Ls Enabled HPF_Rs Enabled Bass_Mgr Enabled 0 dB 0 dB 0 dB 0 dB 0 dB 0 dB - dB - dB - dB - dB - dB - dB - dB - dB - dB - dB - dB -15 dB - dB -15 dB -15 dB -5 dB
HEX Value
0x0010B1
Input_L_Level Input_C_Level Input_R_Level Input_Ls_Level Input_Rs_Level Input_LFE_Level Sum_Output_L_Level Sum_Output_C_Level Sum_Output_R_Level Sum_Output_Ls_Level Sum_Output_Rs_Level LFE_L_Level LFE_C_Level LFE_R_Level LFE_Ls_Level LFE_Rs_Level Sum_Input_L_Level Sum_Input_C_Level Sum_Input_R_Level Sum_Input_Ls_Level Sum_Input_Rs_Level Sum_Input_LFE_Level
0x940001 0x940002 0x940003 0x940004 0x940005 0x940006 0x940007 0x940008 0x940009 0x94000A 0x94000B 0x94000C 0x94000D 0x94000E 0x94000F 0x940010 0x940011 0x940012 0x940013 0x940014 0x940015 0x940016
0x7FFFFF 0x7FFFFF 0x7FFFFF 0x7FFFFF 0x7FFFFF 0x7FFFFF 0x000000 0x000000 0x000000 0x000000 0x000000 0x000000 0x000000 0x000000 0x000000 0x000000 0x000000 0x16C310 0x000000 0x16C310 0x16C310 0x47FACC
Table 18. Dolby DVD Configuration (Bass to Subwoofer)
AN120REV2
33
AN120
4.5 PCM Processor
Write Opcode = 0x9C; Read Opcode = 0x1D; Read Response Opcode = 0x9D Write = 0x9C00HH 0xhhhhhh Read Request = 0x1D00HH; Read Response = 0x9D00HH 0xhhhhhh 0xHH = index 0xhhhhhh = data value
Index
0x00
Variable
PCM_Control
Dataword Content
Bit 4: Deemphasis_Enable = 0/1 = Disable/Enable PCM Deemphasis. Bit 0: PCM_Enable = 0/1 = Disable/Enable PCM. This bit should only be enabled if AC-3 is disabled. Default = 0x000000
0x01
K_Cpl_mlev_1_F
M level for Karaoke capable 1 front output channel. 0 <= K_Cpl_mlev_1_F <= 0x7fffff. *Default = 0x1e2a53
0x02
K_Cpl_v1lev_1_F
V1 level for Karaoke capable 1 front output channel. 0 <= K_Cpl_v1lev_1_F <= 0x7fffff. *Default = 0x1e2a53
0x03
K_Cpl_v2lev_1_F
V2 level for Karaoke capable 1 front output channel. 0 <= K_Cpl_v2lev_1_F <= 0x7fffff. *Default = 0x1e2a53
0x04
K_Cpl_mllev_2_F
m L level for Karaoke capable 2 front output channels. 0 <= K_Cpl_mllev_2_F <= 0x7fffff. *Default = 0x34b4b3
0x05
K_Cpl_v1llev_2_F
V1 L level for Karaoke capable 2 front output channels. 0 <= K_Cpl_v1llev_2_F <= 0x7fffff. *Default = 0x4b4b4a
0x06
K_Cpl_v2llev_2_F
V2 L level for Karaoke capable 2 front output channels. 0 <= K_Cpl_v2llev_2_F <= 0x7fffff. *Default = 0x0
0x07
K_Cpl_mrlev_2_F
M R level for Karaoke capable 2 front output channels. 0 <= K_Cpl_mrlev_2_F <= 0x7fffff. *Default = 0x34b4b3
0x08
K_Cpl_v1rlev_2_F
V1 R level for Karaoke capable 2 front output channels. 0 <= K_Cpl_v1rlev_2_F <= 0x7fffff. *Default = 0x0 Table 19. PCM Processor
34
AN120REV2
AN120
Index
0x09
Variable
K_Cpl_v2rlev_2_F
Dataword Content
V2 R level for Karaoke capable 2 front output channels. 0 <= K_Cpl_v2rlev_2_F <= 0x7fffff. *Default = 0x4b4b4a
0x0a
K_Cpl_mcpan_3_F
M C level for Karaoke capable 3 front output channels. 0 <= K_Cpl_mcpan_3_F <= 0x7fffff. *Default = 0x7fffff
0x0b
K_Cpl_v1cpan_3_F
V1 C level for Karaoke capable 3 front output channels. 0 <= K_Cpl_v1cpan_3_F <= 0x7fffff. *Default = 0x0
0x0c
K_Cpl_v2cpan_3_F
V2 C level for Karaoke capable 3 front output channels. 0 <= K_Cpl_v2cpan_3_F <= 0x7fffff. *Default = 0x0
0x0d
K_Cpl_mlpan_3_F
M L level for Karaoke capable 3 front output channels. 0 <= K_Cpl_mlpan_3_F <= 0x7fffff. *Default = 0x0
0x0e
K_Cpl_v1lpan_3_F
V1 L level for Karaoke capable 3 front output channels. 0 <= K_Cpl_v1lpan_3_F <= 0x7fffff. *Default = 0x7fffff
0x0f
K_Cpl_v2lpan_3_F
V2 L level for Karaoke capable 3 front output channels. 0 <= K_Cpl_v2lpan_3_F <= 0x7fffff. *Default = 0x0
0x10
K_Cpl_mrpan_3_F
M R level for Karaoke capable 3 front output channels. 0 <= K_Cpl_mrpan_3_F <= 0x7fffff. *Default = 0x0
0x11
K_Cpl_v1rpan_3_F
V1 R level for Karaoke capable 3 front output channels. 0 <= K_Cpl_v1rpan_3_F <= 0x7fffff. *Default = 0x0
0x12
K_Cpl_v2rpan_3_F
V2 R level for Karaoke capable 3 front output channels. 0 <= K_Cpl_v2rpan_3_F <= 0x7fffff. *Default = 0x7fffff Table 19. PCM Processor (Continued)
AN120REV2
35
AN120
4.5.1 Karaoke Capable Function
Karaoke Capable functionality is enabled when Bit 8 of Output_Mode_Control in AC3_Manager is set to 1. If Karaoke_Capable_Enable is not set, then CS4923/4/5/6 defaults to a Karaoke Aware downmix using levels indicated in the stream. In a karaoke bit stream (bsmod=7, acmod=2...7), 3 special channels have to be downmixed according to user specification. They are M (guide melody), and V1, V2 (vocal tracks one and two). In Karaoke Aware mode (default mode where Karaoke_Capable_Enable=0), CS4923/4/5/6 downmixes these channels according to the clev/slev values indicated in the bitstream. This Karaoke Aware downmix reproduces all the program content in the front speakers according to the programmed levels and audio configuration of the bitstream. In Karaoke Capable mode, the downmix coefficients are setup by the user according to the number of output front channels: 1, 2, or 3. Independent settings are available for each of these 3 cases as indicated in Table 19. The following equations define the downmixing performed for each of the 3 cases: 1 front channel: Ck = mlev * M + v1lev * V1 + v2lev * V2. Co = 0.707 * L + Ck + 0.707 * R. 2 front channels: Lk = mllev * M + v1llev * V1 +v2llev * V2. Rk = mrlev * M + v1rlev * V1 + v2rlev * V2. Lo = L + Lk. Ro = R + Rk. 3 front channels: Ck = mcpan * M + v1cpan * V1 + v2cpan * V2. Lk = mlpan * M + v1lpan * V1 + v2lpan * V2. Rk = mrpan * M + v1rpan * V1 + v2rpan * V2. Lo = L + Lk. Co = Ck. Ro = R + Rk.
4.5.2 Special Considerations For PCM
When using the AC-3 code it should be noted that AC-3 and PCM are completely independent applications. The host must treat them as such and only enable either AC-3 or PCM at any one time. Transitions from AC-3 to PCM or vice-versa should be done with a soft reset followed by complete hardware configuration and application configuration. Conversely, an Application Restart message could be used which would only require that a new input port configuration and application configuration be sent -- output clocks and address checking for serial control modes will not be affected.
36
AN120REV2
AN120
4.6 Unsolicited Messages (Read-Only)
No Write Message. No Read Request. Unsolicited Read Response = 0x8700HH 0xhhhhhh 0xHH = index, 0xhhhhhh = data value
Index
0x00
Variable
Autodetect_Response
Dataword Content
Bit 23 = Decodable_Stream_Flag= 0/1 = This stream is not/is decodable by the application (no need for new download if 1). Bits 22:6 = Reserved. Bit 5 = Non_IEC61937_Stream_Flag= 1/0 = This stream is not/is IEC61937 compressed data. If Non_IEC61937_Stream_Flag=1 Bits 4:0 = Non_IEC61937 Stream Descriptor. 0x00 = Silent Input Data (Out of Application Sync) 0x01 = DTS Format-16 elementary stream 0x02 = DTS Format-14 elementary stream 0x03 = Linear PCM stream 0x04 = HDCD PCM stream (only available in HDCD application) 0x05-0x1F = Reserved If Non_IEC61937_Stream_Flag=0 Bits 4:0 = IEC61937 Stream Descriptor = Identical to bits [4:0] of the Pc burst datatype descriptor in IEC61937 specification. Description of the data-type field of Pc reproduced below from IEC61937 spec.(current as of 11/97): 0x00 = Never Reported. (Null data is ignored by CS4923/4/5/6) 0x01 = AC-3 data 0x02 = Reserved. 0x03 = Never Reported. (Pause is ignored by CS4923/4/5/6) 0x04 = MPEG-1 Layer 1 data 0x05 = MPEG-1 Layer 2 or 3 data or MPEG-2 without extension. 0x06 = MPEG-2 data with extension 0x07 = Reserved. 0x08 = MPEG-2 Layer 1 Low sampling frequency 0x09 = MPEG-2 Layer 2 or 3 Low sampling frequency 0x0A = Reserved 0x0B = DTS-1 data (512-sample bursts). 0x0C = DTS-2 data (1024-sample bursts). 0x0D = DTS-3 data (2048-sample bursts). 0x0E - 0x1F = Reserved Bits 23:0 = Reserved. The DSP will send out this message to indicate that one of the following has changed in the AC3 stream: ACMOD, LFEON, DSURMOD, DIALNORM. It is the host's responsibility to check exactly what has changed. Bit 23 = 1. Bits 22:0 = Reserved. Table 20. Unsolicited Messages
0x03
Audio_Configuration_C hanged
0x10
PLL_Out_Of_Lock
AN120REV2
37
AN120
4.6.1 Autodetect Operation
The sequence of events involving autodetection are described below from the host's perspective. This is a general example for the CS4923/4/5/6, when using MPEG code or DTS code application restart is not available and thus should not be used. 1) Host downloads CS4923/4/5/6 with a tentative application code, for this example we will use AC3_****.LD. 2) Host then configures the CS4923/4/5/6 hardware appropriately and sets up application parameters as desired - including enable of the desired application. For this example we will say the code is configured for AC-3 decode. 3) Host then kickstarts CS4923/4/5/6 with Autodetect enabled (see Section 4.1, Audio Manager, for details). 4) The autodetect module of the enabled application of the CS4923/4/5/6 analyzes the input for a maximum of 500 ms of non-silent/non-pause data and determines the content of the input bitstream. 5) (a) If the enabled application can play the detected input (i.e. if AC-3 was detected in this case), then the CS4923/4/5/6 issues an Unsolicited Message to the host indicating the datatype with Decodable_Bitstream_Flag=1. In our example of the AC-3 stream, the message would be 0x870000 0x800001. CS4923/4/5/6 then goes ahead and processes it according to the application parameters as setup in Step 2 above. (b) If the enabled application cannot play the detected input (say Non-IEC61937 LD DTS was detected), then the CS4923/4/5/6 soft mutes the outputs, and issues an Unsolicited Message to the host indicating the datatype with Decodable_Bitstream_Flag=0. In our example, the message would be 0x870000 0x000021. On receiving this message, host repeats Steps 1 onwards but this time downloads the DTS code
38
to the CS4923/4/5/6 (along with correct hardware configuration and application configuration for DTS with autodetect enabled). Subsequently, DTS will be detected within 500 mS and successfully played by the new DTS code, after sending the corresponding unsolicited message (0x870000 0x800021).
Note: This example assumes CS4926 or CS4928 are being used since only it can play DTS. In the case of DTS being detected on CS4923/4/5/7/9 or MPEG detected on CS4923/4/6/8/9, the host should display an appropriate user message to the front panel stating that the detected stream (DTS/MPEG) cannot be played on this receiver.
6) After the above steps and while CS4923/4/5/6 is successfully playing the input bitstream (still AC-3 in our example), if the host receives external information that the input has been changed (e.g. the user selects a new source using the front panel buttons), then before switching the input data to the CS4923/4/5/6, the host should send an Application Restart message (see Section 4.1, Audio Manager) or a Soft Reset. If application restart is used, this effectively puts CS4923/4/5/6 in Step 2, without changing the output hardware configuration (i.e. output clocks are not interrupted). The input configuration would need to be changed if it is different than the default. If Soft Reset is issued then the entire hardware configuration needs to be resent. The host should then repeat Steps 2, 3, 4, 5a/b as described above after delivering the new input stream to the CS4923/4/5/6. If the new input content is detected as unchanged (still AC3 in our example), the CS4923/4/5/6 responds and continues processing it as in Step 5a. This situation will happen if the new stream selected by the user is also AC-3. If the input content is detected as different (non-AC-3 in our example), the CS4923/4/5/6 responds as in Step 5b and continues
AN120REV2
AN120
monitoring the input stream for change in content. 7) During runtime, while successfully playing the input bitstream, the CS4923/4/5/6 also simultaneously monitors the input. Note that the CS4923/4/5/6 has only one active input. The `input' is defined as the pin receiving data for which the application is configured (e.g. If the application is configured for PCM, the pin receiving PCM data is the input. If the application is configured for compressed data, the pin receiving compressed data is the input). As soon as the CS4923/4/5/6 detects a change in the bitstream (no longer AC-3, in our original example), then the CS4923/4/5/6 automatically reverts to Step 4., i.e. analyzes the input to determine the content. This is an automatic version of Step 6 above, but is intended to only cover the cases where the host is not aware of any possible upstream content changes. Whenever possible, the host should convey information about a possible change in input as in Step 6. If the input content is detected as different (non-AC-3 in our example), the CS4923/4/5/6 reverts to Step 5b. For compressed data streams the code will also report the Unsolicited Message 0x870000 0x800020 to indicate an out-of-sync condition when the decoder loses sync with the incoming stream due to silent input data. This is an informative message and no action is needed by the host. If the input content is detected as unchanged (still AC-3 in our example), CS4923/4/5/6 continues processing it like in Step 5a, without requiring any further action from the host. This situation could arise due to a pause or track change upstream in the source, like from a player. In the case of compressed data being played currently (like AC-3 in our example), the host could see an out-of-sync Unsolicited Message followed by an Unsolicited Message indicating AC-3 data. The presence of out-ofsync messages due to `special' functions like pause or track change is completely dependent upon the audio source (such as the DVD player). In the case of a PCM application that is currently active, if the silence is less than PCM_Autodetect_Silence_Threshold (default 48000 samples, i.e. 1 Second at 48 KHz) before transitioning to new PCM, the CS4923/4/5/6 continues to process the input data as if no change had occurred. However, during PCM processing, if the silence is more than PCM_Autodetect_ Silence_Threshold, the CS4923/4/5/6 jumps to a Silent Input Data state, and the output is muted (transparent due to silent input anyway). Transition to this Silent Input Data state is reported via an Unsolicited Message (0x870000 0x800020). This message is informative only, and no action should be taken by the host. CS4923/4/5/6 is effectively in Step 4 above now, waiting to autodetect the input once non-silent data appears. Once input data is successfully detected, a corresponding Unsolicited Message is issued to the host and the process continues as above. Please see Figure 6, for an overview of the previously described flow.
AN120REV2
39
AN120
4.6.2 Special Considerations For Autodetect
Autodetect should only be enabled or disabled when sending the kickstart command. Changing the state of Autodetect at any other time can produce unpredictable results as it is a function of the input and the application that is currently enabled. If the host needs to change the state of Autodetect at run time for some reason, a soft reset or Application Restart should be sent. The application must be enabled before sending the autodetect enable with kickstart. Particularly, for the AC-3 code, either AC-3 or PCM must be enabled before the autodetect message is sent with the kickstart. If the Autodetect function senses the data for the enabled application, then the appropriate Unsolicited Message is sent and decode (or PCM pass-through) will start automatically without any direction from the host. In summary, the following is the recommended procedure when using autodetect. Please see Figure 7, for an overview of the previously described summary. 1) Download code (or Soft Reset or Application Restart) 2) Hardware Configuration (for download or Soft Reset) / Input Configuration (for Application Restart) 3) Application Configuration (including enable of desired application) 4) Kickstart with autodetection enabled.
40
AN120REV2
AN120
Perform Kickstart with Autodetect
Run Time (Autodetect Enabled) INTREQ goes LOW User Reads Unsolicited Response
Try one/all of the follwing: See Notes 1,2 No
Download Application Code (AC-3, PCM, DTS, MPEG, etc.)
Last Input = Current Input OR Current Input = Silence
Host Does Nothing Yes
Download Successful
Yes
No
Last Input = Compressed Bitstream AND Current Input = Different Compressed Bitstream
Configure Hardware
Host Loads Corresponding AC-3, DTS or MPEG Code, Configures Hardware and Performs Kickstart with Autodetect Bypass
Yes
No
Configure Application (Audio Manager, etc.)
Last Input = PCM Bitstream AND Current Input = Compressed Bitstream
Host Loads Corresponding AC-3, DTS or MPEG Code, Configures Hardware Yes and Performs Kickstart Note 1
Perform Kickstart with Autodetect
No
Run Time (Autodetect Enabled)
Host Loads Corresponding PCM Code, Configures Hardware Yes and Performs Kickstart Note 2
Last Input = Compressed Bitstream AND Current Input = PCM Bitstream
Figure 6. Autodetect Flow Chart
Figure 7. Typical Download and Configuration
Notes: 1. Host need not load AC-3 code if AC-3 is already loaded and passing-through PCM. Host need only perform a Soft Reset, Configure the Hardware and perform a Kickstart OR perform an Application Restart, Configure the Inputs, and perform a Kickstart. 2. Host need not reload AC-3 code if AC-3 is already loaded, as it will pass-through PCM. Host need only perform a Soft Reset, Configure the Hardware and perform a Kickstart OR perform an Application Restart, Configure the Inputs, and perform a Kickstart.
Notes: 1. Check .LD file version. Contact your FAE for the most recent version. 2. Check to make sure .LD file is correct for chip being used.
AN120REV2
41
AN120
5.0 APPLICATION CONFIGURATION EXAMPLES
This section covers various application modes available with the CS4923/4/5/6. Although many application modes are possible, only the most common modes have been presented here as examples. This should not be considered the complete list of modes in which the part will operate, as the system designer can configure the application parameters of the CS4923/4/5/6 as desired in order to differentiate the system. Tables 21-27 provide the message to be sent and a description of what the message is doing. Care should be taken to guarantee that the correct value is sent directly after the associated opcode and index word. The command to kickstart the application should always be sent last. When switching between applications (i.e. from AC-3 to PCM) the host should perform either a soft reset (See the CS4923/4/5/6/7/8/9 Hardware User's Guide) or application restart (see Section 4.1, Audio Manager). This will reset all application configuration.
5.1 AC-3 decode with Autodetect
In this mode the input should be compressed AC-3. The data will be taken from the compressed input port as designated by the hardware configuration message. Table 21 gives a description of AC-3 decode with Autodetect. If the input on this port is not AC-3 the Autodetect function will notify the host as described in Section 4.6, Unsolicited Messages (Read-Only). Figure 7 gives an example of pseudocode to configure the part AC-3 decode with autodetect. This pseudocode can be used as a template for other configurations by swapping out the message array and the size.
Module AC-3 AC-3 Audio Manager
Index AC-3 Control
Description
AC-3 Enabled LFE Enabled Compression_Control Set to Line Out Mode Audio Manager Control Autodetect Enabled PLL Enabled Kickstart Application Table 21. Enabling AC-3 Decode with Autodetect
Opcode & Index 0x8A0000 0x8A0002 0x880000
Value 0x000011 0x000002 0x001011
void AC-3_AD_Config() { unsigned char AC-3_AD_config_message[] = {0x8A, 0x00, 0x00, 0x00, 0x00, 0x11, 0x8A, 0x00, 0x02 0x00, 0x00, 0x02 0x88, 0x00, 0x00, 0x00, 0x10, 0x11}; Write_*(AC-3_AD_config_message,18); /* Replace * with I2C or SPI depending on protocol */ }
Figure 7. Pseudocode Example to Configure Part AC-3 Decode with Autodetect
42
AN120REV2
AN120
5.2 AC-3 with Pro Logic Decode and Autodetect
In this mode the input should be two-channel compressed AC-3 (acmod = 2) with Pro Logic encoded data (dsurmod = 2). The data will be taken from the compressed input port as designated by the hardware configuration message. Table 22 gives a description of AC-3 Pro Logic and Autodetect. If the input on this port is not AC-3 the Autodetect function will notify the host as described in section , Unsolicited Messages (Read-Only).
5.3 Pro Logic decode of 48 kHz input PCM
In this mode the input should be 48 kHz Pro Logic encoded PCM data. The data will be taken from the PCM input port as designated by the hardware configuration message. Table 23 gives a description of Pro Logic decode of 48 MHz input PCM.
5.4 PCM Pass-through of 44.1 kHz input PCM
In this mode the input should be 44.1 kHz PCM data. The data will be taken from the PCM input port as designated by the hardware configuration message. Table 25 gives a description of PCM Passthrough of 44.1 kHz input PCM.
Module Pro Logic
Index ProLogic Control
Description Enabled Autobalance Enabled B Type NR Enabled AC-3 Enabled LFE Enabled Set to Line Out Mode Autodetect Enabled PLL Enabled Kickstart Application
Opcode & Index 0x8e0000
Value 0x000111
AC-3 AC-3 Audio Manager
AC-3 Control Compression_Control Audio Manager Control
0x8A0000 0x8A0002 0x880000
0x000011 0x000002 0x001011
Table 22. Enabling AC-3 with Pro Logic Decode with Autodetect
Module PCM Pro Logic
Index PCM Control ProLogic Control
Description Enabled Enabled Autobalance Enabled B-Type NR Enabled 48 kHz Autodetect Enabled PLL Enabled Kickstart Application
Opcode & Index 0x9c0000 0x8e0000
Value 0x000001 0x000111
Audio Manager Audio Manager
Sampling Frequency Audio Manager Control
0x880014 0x880000
0x000000 0x001011
Table 23. Enabling Pro Logic Decode of 48 kHz PCM
AN120REV2
43
AN120
5.5 Pink/White Noise Generation
To cycle through the channels (after sending the above messages) the host would send the following sequence of commands pausing between each command to hold the pink noise on a particular channel. White noise can be generated by additionally setting Bit 4 of Noise_Control in the above messages. In the same message, if Bit 5 is set, a 10.5dB boosted noise is received. Tables 25 and 26 give descriptions of Pink/White Noise Generation.
5.5.1 Special Considerations For Pink/White Noise
Pink/White Noise is controlled by three parameters. These parameters are the currently configured application (i.e. PCM), the channel selected by the Noise_Control variable, and the state of the autodetect enable. In order to use Pink/White Noise, the code should be configured strictly for PCM before kickstart. If Pro Logic is enabled, the host loses independent control of Pink/White Noise on the Ls and Rs channels -- the surround channels operate in unison.
Module PCM Audio Manager Audio Manager
Index PCM Control Sampling Frequency Audio Manager Control
Description Enabled 44.1 kHz Autodetect Enabled PLL Enabled Kickstart Application
Opcode & Index 0x9c0000 0x880014 0x880000
Value 0x000001 0x000001 0x001011
Table 24. Enabling Pro Logic Decode of 44.1 kHz PCM
Module PCM Audio Manager Audio Manager
Index PCM Control Noise Control Audio Manager Control Enabled
Description Pink Noise On Left Channel Kickstart Application Autodetect Disabled
Opcode & Index 0x9c0000 0x880001 0x880000
Value 0x000001 0x000000 0x000011
Table 25. Enabling Pink/White Noise Generation
Module Audio Manager Audio Manager Audio Manager Audio Manager Audio Manager Audio Manager
Index Noise Control Noise Control Noise Control Noise Control Noise Control Noise Control
Description Pink Noise On Left Channel Pink Noise On Center Channel Pink Noise On Right Channel Pink Noise On Left Surround Channel Pink Noise On Right Surround Channel Pink Noise On LFE Channel
Opcode & Index 0x880001 0x880001 0x880001 0x880001 0x880001 0x880001
Value 0x000000 0x000001 0x000002 0x000003 0x000004 0x000005
Table 26. Pink/White Noise Generation for All 5.1 Channel 44 AN120REV2
AN120
5.6 Using the PLL
All the application modes described use the PLL to generate DSP clock from an external oscillator (CLKIN) assuming a 12.288 MHz clock. Thus, if using a 12.288 MHz oscillator, one could just skip the first and second messages in Table 27, and simply send in the last message (0x880000, 0x001011) with Bits 23:8 set according to the desired application mode. However, if CLKIN is a 11.2896 MHz oscillator, simply substitute the Kickstart Application message in any of the previous examples (Opcode & Index 0x880000, typically the last message) with the messages specified above. The value 0xmmmm11 in the bottom row and last column denotes that Bits 7:0 should be forced to 11, and the remaining bits be maintained as specified in the original application mode above.
Module Audio Manager Audio Manager Audio Manager
Index PLL_Register_1 PLL_Register_2 Audio Manager Control
Description PLL Setup for 11.2896 MHz CLKIN PLL Setup for 11.2896 MHz CLKIN Kickstart Application with PLL enabled.
Opcode & Index 0x880017 0x880018 0x880000
Value 0x24BC34 0x0001fe 0xHHHH11
Table 27. Configuring the PLL for 11.2896 MHz CLKIN
AN120REV2
45


▲Up To Search▲   

 
Price & Availability of AN120

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]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X