NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

DA8xx Audio I/O Customization Software Structures

From Texas Instruments Wiki
Jump to: navigation, search

Please also check DA8xx_Audio_I/O_Customization

Description of the structures[edit]

Please also check DA8xx Audio I/O Customization.

McASP register configurations (dap_e17.c or dap_cus.c)[edit]

These are generic sets of register configurations that can be used for multiple inputs/outputs. These are not dependent on the McASP port number. For example:

static const MCASP_ConfigRcv rxConfigDIR =
{
   MCASP_RMASK_OF(0xFFFFFFFF),
   MCASP_RFMT_RMK(
       MCASP_RFMT_RDATDLY_1BIT,
       MCASP_RFMT_RRVRS_MSBFIRST,
       MCASP_RFMT_RPAD_RPBIT,
       MCASP_RFMT_RPBIT_OF(0),
       MCASP_RFMT_RSSZ_32BITS,
       MCASP_RFMT_RBUSEL_DAT,
       MCASP_RFMT_RROT_NONE),
   MCASP_AFSRCTL_RMK(
       MCASP_AFSRCTL_RMOD_OF(2),
       MCASP_AFSRCTL_FRWID_WORD,
       MCASP_AFSRCTL_FSRM_EXTERNAL,
       MCASP_AFSRCTL_FSRP_ACTIVELOW),
   MCASP_ACLKRCTL_RMK(
       MCASP_ACLKRCTL_CLKRP_RISING,
       MCASP_ACLKRCTL_CLKRM_EXTERNAL,
       MCASP_ACLKRCTL_CLKRDIV_DEFAULT),
   MCASP_AHCLKRCTL_RMK(
       MCASP_AHCLKRCTL_HCLKRM_EXTERNAL,
       MCASP_AHCLKRCTL_HCLKRP_RISING,
       MCASP_AHCLKRCTL_HCLKRDIV_DEFAULT),
   MCASP_RTDM_OF(3),
   MCASP_RINTCTL_DEFAULT,
   MCASP_RCLKCHK_DEFAULT
};

For details on the register configuration please check the TMS320C674x/OMAP-L1x Processor Multichannel Audio Serial Port (McASP) User's Guide.

You will need the information from the custom system to fill those. You can check and compare with the previous custom system for the same customer. Pay special attention to the clocks' configuration (INTERNAL/ ESTERNAL).

You will see these structures in the dap_e17.c or dap_cus.c files under:

// McASP Input Configuration Definitions

// McASP Output Configuration Definitions


McASP Input/Output Parameter Definitions (dap_e17.c or dap_cus.c)[edit]

These are structures that are specific for each input/output. These are dependent on the McASP port number and actual pins used for that I/O (pinmask). The McASP Input/Output Parameter Definitions point to a McASP register configuration. Multiple McASP Input/Output Parameter Definitions can use the same McASP register configuration if the parameters are common between I/Os.

Here is an example of McASP Input Parameter Definition:

const DAP_E17_Rx_Params DAP_E17_RX_DIR =
{
   sizeof (DAP_E17_Rx_Params),                 // size
   "DAP",                                      // name
   MCASP_DEV0,                                 // moduleNum --> mcasp #
   (Void *)&rxConfigDIR,                       // pConfig
   -1,                                         // wordSize (unused)
   -1,                                         // precision (unused)
   E17_dapControl,                             // control
   0xA0000200,                                 // pinMask
   (E17_MCLK_DIR << E17_MCLK_SHIFT),           // mode
   0,0                                         // unused[2]
};


Please note that the last fields are custom fields that are currently used for the EVM, you may add or remove fields to this structure (after pinmask) as needed:

   (E17_MCLK_DIR << E17_MCLK_SHIFT),           // mode
   0,0                                         // unused[2]


You will see these structures in the dap_e17.c or dap_cus.c files under:

// DAP Input Parameter Definitions

// DAP Output Parameter Definitions

The information of McASP port number and pinmask will come fromt he custom system's block diagram or schematic.

For pinmask information please check page 33 (Figure 22. McASP I/O Pin to Control Register Mapping) of the TMS320C674x/OMAP-L1x Processor Multichannel Audio Serial Port (McASP) User's Guide.

pg 33 of sprufm1

Input/Output device configurations' tables (io.c)[edit]

each McASP Input/Output Parameter Definition should be placed in the Input/Output device configurations' tables - patchs_devinp and patchs_devout.


For example:

patchs_devinp[1] =
{
   DEVINP_N,
       // These values reflect the definitions DEVINP_* in pa*io_a.h:
       NULL,                                               // InNone
       (const PAF_SIO_Params *) &DAP_E17_RX_DIR,           // InDigital
       (const PAF_SIO_Params *) &DAP_E17_RX_ADC_48000HZ,   // InAnalog
       (const PAF_SIO_Params *) &DAP_E17_RX_ADC_STEREO_48000HZ,    // InAnalogStereo
       (const PAF_SIO_Params *) &DAP_E17_RX_1394_STEREO,   // In1394Stereo
       (const PAF_SIO_Params *) &DAP_E17_RX_1394,          // In1394
       (const PAF_SIO_Params *) &DRI_RINGIO,                // InRingIO
	(const PAF_SIO_Params *) &DAP_E17_RX_HDMI,   		// InHDMI
       (const PAF_SIO_Params *) &DAP_E17_RX_HDMI_STEREO   // InHDMIStereo
};

The order in this table should match defines DEVOUT_* in pa*io_a.h:

#define DEVINP_NULL             0
#define DEVINP_DIR              1
#define DEVINP_ADC1             2
#define DEVINP_ADC_STEREO       3
#define DEVINP_1394_STEREO      4
#define DEVINP_1394             5
#define DEVINP_RIO              6
#define DEVINP_HDMI             7
#define DEVINP_HDMI_STEREO      8
#define DEVINP_N  

Shortcuts definitions and Alpha commands (pa*io_a.h and io.c)[edit]

The last 2 digits of the value defined for execPA* shortcuts/alpha commands should match the shortcut definition # in io.c. For example, for digital input in pa_y13_evmda830_io_a.h is:

#define  execPAYInDigital       0xf121 

And 0x21 = 33 (in 0xf121). So in io.c the digital input will have the shortcut CUS_SIGMA33_S:

// execPAYInDigital
#define CUS_SIGMA33_S \
   writePRCInputSelectMCASP, \
   writeDECSourceSelectNone, \
   writePA3Await(rb32DECSourceDecode,ob32DECSourceDecodeNone), \
   writeIBUnknownTimeoutN(2*2048), \
   writeIBScanAtHighSampleRateModeDisable, \
   writePCMChannelConfigurationProgramStereoUnknown, \
   writePCMScaleVolumeN(0), \
   writeDECChannelMapFrom16(0,1,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3), \
   writeIBEmphasisOverrideDisable, \
   writeIBPrecisionDefaultOriginal, \
   writeIBPrecisionOverrideDetect, \
   writeIBSampleRateOverrideStandard, \
   writeIBSioSelectN(DEVINP_DIR), \
   writeDTSHDSpeakerRemapModeDisable, \
   wroteDECSourceProgramUnknown, \
   writeDECSourceSelectAuto, \
   0xcdf0,execPAYInDigital

#pragma DATA_SECTION(cus_sigma33_s0, ".none")
const ACP_Unit cus_sigma33_s0[] = {
   0xc900 + 0 - 1,
   CUS_SIGMA33_S,
};

const ACP_Unit cus_sigma33_s[] = {
   0xc900 + sizeof (cus_sigma33_s0) / 2 - 1,
   CUS_SIGMA33_S,
};


Also please notice that the shortcut definitions CUS_SIGMA##_S use DEVOUT_* to specify the I/O channel used:

writeIBSioSelectN(DEVINP_DIR)

That is the link to the McASP Input/Output Parameter Definition.

Overview of the structures[edit]

DA8xx Audio I/O Customization Software Structures
E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article DA8xx Audio I/O Customization Software Structures here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article DA8xx Audio I/O Customization Software Structures here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article DA8xx Audio I/O Customization Software Structures here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article DA8xx Audio I/O Customization Software Structures here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article DA8xx Audio I/O Customization Software Structures here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article DA8xx Audio I/O Customization Software Structures here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article DA8xx Audio I/O Customization Software Structures here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article DA8xx Audio I/O Customization Software Structures here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article DA8xx Audio I/O Customization Software Structures here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity