src/ssm2602.c File Reference

More...

#include <stdio.h>
#include "ssm2602.h"
#include <sys/exception.h>
#include "tll_sport.h"
#include <bf52xI2cMaster.h>
#include <isrDisp.h>
#include <tll6527_core_timer.h>

Include dependency graph for ssm2602.c:


Defines

#define DELAY_TIME   0x20000
 .c This file contains the implementation of the analog loopback, digital loop back and digital playback features using SSM2602 Audio codec.

Functions

void ssm2602_rxInit (void)
void ssm2602_txInit (void)
int ssm2602_txDma (unsigned char *address, int count)
 Set the tx DMA.
static int ssm2602_registerWrite (unsigned char addr, unsigned int value)
 Function to set SSM2602 control registers Internal function only.
int ssm2602_setVolume (eSsm2602Channel channel, unsigned char left, unsigned char right)
 SSM2602 set volume.
int ssm2602_setSamplingFeq (eSsm2602Channel channel, eSsm2602SampleFreq freq)
 SSM2602 set sampling fequency.
int ssm2602_init (isrDisp_t *pIsrDisp, int volumeOut, int frequency, int flags)
 Initialize the i2c interface and SSM2602 reset.

Detailed Description

Target: TLL6527v1-0 Compiler: VDSP++ Output format: VDSP++ "*.dxe"

Author:
Gunar Schirner Rohan Kangralkar
LastChange:
Id
ssm2602.c 1075 2013-03-11 04:11:52Z ovaskevi

Define Documentation

#define DELAY_TIME   0x20000

.c This file contains the implementation of the analog loopback, digital loop back and digital playback features using SSM2602 Audio codec.

SSM2602 Audio codec is connected to the BF527 over I2C (control) and SPORT0 (data) interfaces. This modules try to configure & use SPORT0 for data transfer.


Function Documentation

int ssm2602_init ( isrDisp_t pIsrDisp,
int  volumeOut,
int  frequency,
int  flags 
)

Initialize the i2c interface and SSM2602 reset.

This function:- 1. Initalizes the i2c interface as the master. 2. Soft resets the SSM2602 audio codec.

Pre-conditions:

Post condtions:

Parameters:

Parameters:
None. 
Returns:
Zero on success. Negative value on failure.

register own ISR with isr dispatcher

static int ssm2602_registerWrite ( unsigned char  addr,
unsigned int  value 
) [static]

Function to set SSM2602 control registers Internal function only.

Pre-conditions:

Post condtions:

Parameters:

Parameters:
addr register address within the SSM2602 to write
value new register value
Returns:
Zero on success. Negative value on failure.

void ssm2602_rxInit ( void   ) 

int ssm2602_setSamplingFeq ( eSsm2602Channel  channel,
eSsm2602SampleFreq  freq 
)

SSM2602 set sampling fequency.

Pre-conditions:

Post condtions:

Parameters:

Parameters:
srFreq sampling frequency
Returns:
void

int ssm2602_setVolume ( eSsm2602Channel  channel,
unsigned char  left,
unsigned char  right 
)

SSM2602 set volume.

Pre-conditions:

Post condtions:

Parameters:

Parameters:
channel input or output channel
left left volume (0 softest 127 loudest +6dB)
right right volume (0 softest 127 loudest +6dB)
Note for output volume <64 channel is muted
Returns:
void

int ssm2602_txDma ( unsigned char *  address,
int  count 
)

Set the tx DMA.

This function provides a user interface to set the TX dma

Pre-conditions:

Post condtions:

Parameters:

Parameters:
Memory location, count
Returns:
Zero if passed. Negative value if failed.

void ssm2602_txInit ( void   ) 


Generated on 3 Mar 2014 for PAL bare-c Library by  doxygen 1.4.7