Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals

tlv320dac.h File Reference


Detailed Description

TLV320AIC23B driver.

 *
 * $Log$
 *
 * 

Definition in file tlv320dac.h.

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Left Line Input Channel Volume Control Register

#define DAC_LLI_VOL   0x00
 Register address.
#define DAC_LLI_VOL_LRS   0x0100
 Left/right simultaneous volume/mute update.
#define DAC_LLI_VOL_LIM   0x0080
 Mute.
#define DAC_LLI_VOL_LIV   0x001F
 Volume control mask.
#define DAC_LLI_VOL_LIV_LSB   0
 Volume control LSB.

Right Line Input Channel Volume Control Register

#define DAC_RLI_VOL   0x01
 Register address.
#define DAC_RLI_VOL_RLS   0x0100
 Right/left simultaneous volume/mute update.
#define DAC_RLI_VOL_RIM   0x0080
 Mute.
#define DAC_RLI_VOL_RIV   0x001F
 Volume control mask.
#define DAC_RLI_VOL_RIV_LSB   0
 Volume control LSB.

Left Channel Headphone Volume Control

#define DAC_LHP_VOL   0x02
 Register address.
#define DAC_LHP_VOL_LRS   0x0100
 Left/right simultaneous volume/mute update.
#define DAC_LHP_VOL_LZC   0x0080
 Zero cross detect.
#define DAC_LHP_VOL_LHV   0x007F
 Volume control mask.
#define DAC_LHP_VOL_LHV_LSB   0
 Volume control LSB.

Right Channel Headphone Volume Control

#define DAC_RHP_VOL   0x03
 Register address.
#define DAC_RHP_VOL_RLS   0x0100
 Right/left simultaneous volume/mute update.
#define DAC_RHP_VOL_LZC   0x0080
 Zero cross detect.
#define DAC_RHP_VOL_LHV   0x007F
 Volume control mask.
#define DAC_RHP_VOL_LHV_LSB   0
 Volume control LSB.

Analog Audio Path Control

#define DAC_ANA_PATH   0x04
 Register address.
#define DAC_ANA_PATH_STA   0x01C0
 Side tone mask.
#define DAC_ANA_PATH_STA_LSB   6
 Side tone LSB.
#define DAC_ANA_PATH_STA_0DB   0x0100
 Added side tone of 0dB.
#define DAC_ANA_PATH_STA_M6DB   0x0000
 Added side tone of -6dB.
#define DAC_ANA_PATH_STA_M9DB   0x0040
 Added side tone of -9dB.
#define DAC_ANA_PATH_STA_M12DB   0x0080
 Added side tone of -12dB.
#define DAC_ANA_PATH_STA_M18DB   0x00C0
 Added side tone of -18dB.
#define DAC_ANA_PATH_STE   0x0020
 Side tone enable.
#define DAC_ANA_PATH_DAC   0x0010
 DAC select.
#define DAC_ANA_PATH_BYP   0x0008
 Bypass.
#define DAC_ANA_PATH_INSEL   0x0004
 ADC microphone input.
#define DAC_ANA_PATH_MICM   0x0002
 Microphone mute.
#define DAC_ANA_PATH_MICB   0x0001
 Microphone boost.

Digital Audio Path Control

#define DAC_DIG_PATH   0x05
 Register address.
#define DAC_DIG_PATH_DACM   0x0008
 DAC soft mute.
#define DAC_DIG_PATH_DEEMP   0x0006
 De-emphases control mask.
#define DAC_DIG_PATH_DEEMP_LSB   1
 De-emphases control LSB.
#define DAC_DIG_PATH_DEEMP_NONE   0x0000
 De-emphases disabled.
#define DAC_DIG_PATH_DEEMP_32KHZ   0x0002
 De-emphases 32 kHz.
#define DAC_DIG_PATH_DEEMP_44_1KHZ   0x0004
 De-emphases 44.1 kHz.
#define DAC_DIG_PATH_DEEMP_48KHZ   0x0006
 De-emphases 48 kHz.
#define DAC_DIG_PATH_ADCHP   0x0001
 ADC high-pass filter.

Digital Audio Path Control

#define DAC_PWRDN   0x06
 Register address.
#define DAC_PWRDN_OFF   0x0080
 Device power off.
#define DAC_PWRDN_CLK   0x0040
 Clock off.
#define DAC_PWRDN_OSC   0x0020
 Oscillator off.
#define DAC_PWRDN_OUT   0x0010
 Outputs off.
#define DAC_PWRDN_DAC   0x0008
 DAC off.
#define DAC_PWRDN_ADC   0x0004
 ADC off.
#define DAC_PWRDN_MIC   0x0002
 Microphone input off.
#define DAC_PWRDN_LINE   0x0001
 Line input off.

Digital Audio Interface Format

#define DAC_DAI_FMT   0x07
 Register address.
#define DAC_DAI_FMT_MS   0x0040
 Maser mode.
#define DAC_DAI_FMT_LRSWAP   0x0020
 DAC left/right swap.
#define DAC_DAI_FMT_LRP   0x0010
 DAC left/right phase.
#define DAC_DAI_FMT_IWL   0x000C
 Input bit length mask.
#define DAC_DAI_FMT_IWL_LSB   2
 Input bit length LSB.
#define DAC_DAI_FMT_IWL_16   0x0000
 16 bit input length.
#define DAC_DAI_FMT_IWL_20   0x0004
 20 bit input length.
#define DAC_DAI_FMT_IWL_24   0x0008
 24 bit input length.
#define DAC_DAI_FMT_IWL_32   0x000C
 32 bit input length.
#define DAC_DAI_FMT_FOR   0x0003
 Data format mask.
#define DAC_DAI_FMT_FOR_LSB   0
 Data format LSB.
#define DAC_DAI_FMT_FOR_RA   0x0000
 MSB first, right aligned.
#define DAC_DAI_FMT_FOR_LA   0x0001
 MSB first, left aligned.
#define DAC_DAI_FMT_FOR_I2S   0x0002
 I2S format, MSB first, left 1 aligned.
#define DAC_DAI_FMT_FOR_DSP   0x0003
 DSP format, frame sync followed by two data words.

Sample Rate Control

#define DAC_SRATE   0x08
 Register address.
#define DAC_SRATE_CLKOUT   0x0080
 Clock output divider.
#define DAC_SRATE_CLKIN   0x0040
 Clock input divider.
#define DAC_SRATE_SR   0x003C
 Sampling rate mask.
#define DAC_SRATE_SR_LSB   2
 Sampling rate LSB.
#define DAC_SRATE_BOSR   0x0002
 Base oversampling rate.
#define DAC_SRATE_USB   0x0001
 USB clock mode.

Digital Interface Activation

#define DAC_DI_ACT   0x09
 Register address.
#define DAC_DI_ACT_ACT   0x0001
 Interface active.

Reset Register

#define DAC_RESET   0x0F
 Register address.

Defines

#define DAC_MAX_VOLUME   6
#define DAC_MIN_VOLUME   -73

Functions

__BEGIN_DECLS int Tlv320DacInit (u_int rate)
 Initialize TLV320AIC23B DAC interface.Register address.Register address. Line input off. Register address. Register address.Register address. DAC select. ADC microphone input. Microphone boost. Register address. Register address. Maser mode. I2S format, MSB first, left 1 aligned. Register address. Interface active. Register address. Left/right simultaneous volume/mute update. Volume control LSB.
int Tlv320DacWrite (void *buf, int len)
 Add audio samples to the TLV320AIC23B transmit queue.
int Tlv320DacFlush (void)
 Wait until all buffered samples have been transmitted.
u_char Tlv320DacReadReg (u_int reg)
 Read value from specified DAC register.
void Tlv320DacWriteReg (u_int reg, u_int val)
 Write value to specified DAC register.
int Tlv320DacSetVolume (int left, int right)
 Set volume.Register address. Register address.
int Tlv320DacSetRate (u_int rate)
 Register address. Sampling rate LSB. USB clock mode. Register address. Sampling rate LSB. Base oversampling rate. USB clock mode. Register address. Sampling rate LSB. Base oversampling rate. USB clock mode. Register address. Sampling rate LSB. USB clock mode. Register address. Sampling rate LSB. Base oversampling rate. USB clock mode. Register address. Sampling rate LSB. USB clock mode.


Define Documentation

#define DAC_LLI_VOL   0x00
 

Register address.

Definition at line 49 of file tlv320dac.h.

#define DAC_LLI_VOL_LRS   0x0100
 

Left/right simultaneous volume/mute update.

Definition at line 50 of file tlv320dac.h.

#define DAC_LLI_VOL_LIM   0x0080
 

Mute.

Definition at line 51 of file tlv320dac.h.

#define DAC_LLI_VOL_LIV   0x001F
 

Volume control mask.

From 0x00 (-34.5dB) to 0x1F (+12dB) in 1.5dB steps.

Definition at line 52 of file tlv320dac.h.

#define DAC_LLI_VOL_LIV_LSB   0
 

Volume control LSB.

Definition at line 56 of file tlv320dac.h.

#define DAC_RLI_VOL   0x01
 

Register address.

Definition at line 61 of file tlv320dac.h.

#define DAC_RLI_VOL_RLS   0x0100
 

Right/left simultaneous volume/mute update.

Definition at line 62 of file tlv320dac.h.

#define DAC_RLI_VOL_RIM   0x0080
 

Mute.

Definition at line 63 of file tlv320dac.h.

#define DAC_RLI_VOL_RIV   0x001F
 

Volume control mask.

From 0x00 (-34.5dB) to 0x1F (+12dB) in 1.5dB steps.

Definition at line 64 of file tlv320dac.h.

#define DAC_RLI_VOL_RIV_LSB   0
 

Volume control LSB.

Definition at line 68 of file tlv320dac.h.

#define DAC_LHP_VOL   0x02
 

Register address.

Definition at line 74 of file tlv320dac.h.

#define DAC_LHP_VOL_LRS   0x0100
 

Left/right simultaneous volume/mute update.

Definition at line 75 of file tlv320dac.h.

#define DAC_LHP_VOL_LZC   0x0080
 

Zero cross detect.

Definition at line 76 of file tlv320dac.h.

#define DAC_LHP_VOL_LHV   0x007F
 

Volume control mask.

From 0x30 (-73dB, mute) to 0x3F (+6dB).

Definition at line 77 of file tlv320dac.h.

#define DAC_LHP_VOL_LHV_LSB   0
 

Volume control LSB.

Definition at line 81 of file tlv320dac.h.

#define DAC_RHP_VOL   0x03
 

Register address.

Definition at line 86 of file tlv320dac.h.

#define DAC_RHP_VOL_RLS   0x0100
 

Right/left simultaneous volume/mute update.

Definition at line 87 of file tlv320dac.h.

#define DAC_RHP_VOL_LZC   0x0080
 

Zero cross detect.

Definition at line 88 of file tlv320dac.h.

#define DAC_RHP_VOL_LHV   0x007F
 

Volume control mask.

From 0x30 (-73dB, mute) to 0x3F (+6dB).

Definition at line 89 of file tlv320dac.h.

#define DAC_RHP_VOL_LHV_LSB   0
 

Volume control LSB.

Definition at line 93 of file tlv320dac.h.

#define DAC_ANA_PATH   0x04
 

Register address.

Definition at line 98 of file tlv320dac.h.

#define DAC_ANA_PATH_STA   0x01C0
 

Side tone mask.

Definition at line 99 of file tlv320dac.h.

#define DAC_ANA_PATH_STA_LSB   6
 

Side tone LSB.

Definition at line 100 of file tlv320dac.h.

#define DAC_ANA_PATH_STA_0DB   0x0100
 

Added side tone of 0dB.

Definition at line 101 of file tlv320dac.h.

#define DAC_ANA_PATH_STA_M6DB   0x0000
 

Added side tone of -6dB.

Definition at line 102 of file tlv320dac.h.

#define DAC_ANA_PATH_STA_M9DB   0x0040
 

Added side tone of -9dB.

Definition at line 103 of file tlv320dac.h.

#define DAC_ANA_PATH_STA_M12DB   0x0080
 

Added side tone of -12dB.

Definition at line 104 of file tlv320dac.h.

#define DAC_ANA_PATH_STA_M18DB   0x00C0
 

Added side tone of -18dB.

Definition at line 105 of file tlv320dac.h.

#define DAC_ANA_PATH_STE   0x0020
 

Side tone enable.

Definition at line 106 of file tlv320dac.h.

#define DAC_ANA_PATH_DAC   0x0010
 

DAC select.

Definition at line 107 of file tlv320dac.h.

#define DAC_ANA_PATH_BYP   0x0008
 

Bypass.

Definition at line 108 of file tlv320dac.h.

#define DAC_ANA_PATH_INSEL   0x0004
 

ADC microphone input.

Definition at line 109 of file tlv320dac.h.

#define DAC_ANA_PATH_MICM   0x0002
 

Microphone mute.

Definition at line 110 of file tlv320dac.h.

#define DAC_ANA_PATH_MICB   0x0001
 

Microphone boost.

Definition at line 111 of file tlv320dac.h.

#define DAC_DIG_PATH   0x05
 

Register address.

Definition at line 116 of file tlv320dac.h.

#define DAC_DIG_PATH_DACM   0x0008
 

DAC soft mute.

Definition at line 117 of file tlv320dac.h.

#define DAC_DIG_PATH_DEEMP   0x0006
 

De-emphases control mask.

Definition at line 118 of file tlv320dac.h.

#define DAC_DIG_PATH_DEEMP_LSB   1
 

De-emphases control LSB.

Definition at line 119 of file tlv320dac.h.

#define DAC_DIG_PATH_DEEMP_NONE   0x0000
 

De-emphases disabled.

Definition at line 120 of file tlv320dac.h.

#define DAC_DIG_PATH_DEEMP_32KHZ   0x0002
 

De-emphases 32 kHz.

Definition at line 121 of file tlv320dac.h.

#define DAC_DIG_PATH_DEEMP_44_1KHZ   0x0004
 

De-emphases 44.1 kHz.

Definition at line 122 of file tlv320dac.h.

#define DAC_DIG_PATH_DEEMP_48KHZ   0x0006
 

De-emphases 48 kHz.

Definition at line 123 of file tlv320dac.h.

#define DAC_DIG_PATH_ADCHP   0x0001
 

ADC high-pass filter.

Definition at line 124 of file tlv320dac.h.

#define DAC_PWRDN   0x06
 

Register address.

Definition at line 129 of file tlv320dac.h.

#define DAC_PWRDN_OFF   0x0080
 

Device power off.

Definition at line 130 of file tlv320dac.h.

#define DAC_PWRDN_CLK   0x0040
 

Clock off.

Definition at line 131 of file tlv320dac.h.

#define DAC_PWRDN_OSC   0x0020
 

Oscillator off.

Definition at line 132 of file tlv320dac.h.

#define DAC_PWRDN_OUT   0x0010
 

Outputs off.

Definition at line 133 of file tlv320dac.h.

#define DAC_PWRDN_DAC   0x0008
 

DAC off.

Definition at line 134 of file tlv320dac.h.

#define DAC_PWRDN_ADC   0x0004
 

ADC off.

Definition at line 135 of file tlv320dac.h.

#define DAC_PWRDN_MIC   0x0002
 

Microphone input off.

Definition at line 136 of file tlv320dac.h.

#define DAC_PWRDN_LINE   0x0001
 

Line input off.

Definition at line 137 of file tlv320dac.h.

#define DAC_DAI_FMT   0x07
 

Register address.

Definition at line 142 of file tlv320dac.h.

#define DAC_DAI_FMT_MS   0x0040
 

Maser mode.

Definition at line 143 of file tlv320dac.h.

#define DAC_DAI_FMT_LRSWAP   0x0020
 

DAC left/right swap.

Definition at line 144 of file tlv320dac.h.

#define DAC_DAI_FMT_LRP   0x0010
 

DAC left/right phase.

Definition at line 145 of file tlv320dac.h.

#define DAC_DAI_FMT_IWL   0x000C
 

Input bit length mask.

Definition at line 146 of file tlv320dac.h.

#define DAC_DAI_FMT_IWL_LSB   2
 

Input bit length LSB.

Definition at line 147 of file tlv320dac.h.

#define DAC_DAI_FMT_IWL_16   0x0000
 

16 bit input length.

Definition at line 148 of file tlv320dac.h.

#define DAC_DAI_FMT_IWL_20   0x0004
 

20 bit input length.

Definition at line 149 of file tlv320dac.h.

#define DAC_DAI_FMT_IWL_24   0x0008
 

24 bit input length.

Definition at line 150 of file tlv320dac.h.

#define DAC_DAI_FMT_IWL_32   0x000C
 

32 bit input length.

Definition at line 151 of file tlv320dac.h.

#define DAC_DAI_FMT_FOR   0x0003
 

Data format mask.

Definition at line 152 of file tlv320dac.h.

#define DAC_DAI_FMT_FOR_LSB   0
 

Data format LSB.

Definition at line 153 of file tlv320dac.h.

#define DAC_DAI_FMT_FOR_RA   0x0000
 

MSB first, right aligned.

Definition at line 154 of file tlv320dac.h.

#define DAC_DAI_FMT_FOR_LA   0x0001
 

MSB first, left aligned.

Definition at line 155 of file tlv320dac.h.

#define DAC_DAI_FMT_FOR_I2S   0x0002
 

I2S format, MSB first, left 1 aligned.

Definition at line 156 of file tlv320dac.h.

#define DAC_DAI_FMT_FOR_DSP   0x0003
 

DSP format, frame sync followed by two data words.

Definition at line 157 of file tlv320dac.h.

#define DAC_SRATE   0x08
 

Register address.

Definition at line 162 of file tlv320dac.h.

Referenced by Tlv320DacSetRate().

#define DAC_SRATE_CLKOUT   0x0080
 

Clock output divider.

Definition at line 163 of file tlv320dac.h.

#define DAC_SRATE_CLKIN   0x0040
 

Clock input divider.

Definition at line 164 of file tlv320dac.h.

#define DAC_SRATE_SR   0x003C
 

Sampling rate mask.

Definition at line 165 of file tlv320dac.h.

#define DAC_SRATE_SR_LSB   2
 

Sampling rate LSB.

Definition at line 166 of file tlv320dac.h.

Referenced by Tlv320DacSetRate().

#define DAC_SRATE_BOSR   0x0002
 

Base oversampling rate.

USB mode : 0=250 fs, 1=272 fs Normal mode: 0=256 fs, 1=384 fs

Definition at line 167 of file tlv320dac.h.

Referenced by Tlv320DacSetRate().

#define DAC_SRATE_USB   0x0001
 

USB clock mode.

Definition at line 172 of file tlv320dac.h.

Referenced by Tlv320DacSetRate().

#define DAC_DI_ACT   0x09
 

Register address.

Definition at line 177 of file tlv320dac.h.

#define DAC_DI_ACT_ACT   0x0001
 

Interface active.

Definition at line 178 of file tlv320dac.h.

#define DAC_RESET   0x0F
 

Register address.

Writing zero to this register triggers reset.

Definition at line 183 of file tlv320dac.h.

#define DAC_MAX_VOLUME   6
 

Definition at line 189 of file tlv320dac.h.

#define DAC_MIN_VOLUME   -73
 

Definition at line 190 of file tlv320dac.h.


Function Documentation

__BEGIN_DECLS int Tlv320DacInit u_int  rate  ) 
 

Initialize TLV320AIC23B DAC interface.Register address.Register address. Line input off. Register address. Register address.Register address. DAC select. ADC microphone input. Microphone boost. Register address. Register address. Maser mode. I2S format, MSB first, left 1 aligned. Register address. Interface active. Register address. Left/right simultaneous volume/mute update. Volume control LSB.

Parameters:
rate Sample rate.
Returns:
0 on success, -1 otherwise.
<

Writing zero to this register triggers reset.

<

Writing zero to this register triggers reset.

Definition at line 339 of file tlv320dac.c.

00360 {
00361     NutIrqDisable(&sig_SSC);
00362     I2sPdcFill();
00363     outr(SSC_IER, SSC_ENDTX);
00364     outr(SSC_CR, SSC_TXEN);
00365     NutIrqEnable(&sig_SSC);
00366 
00367     return 0;
00368 }
00369 

int Tlv320DacWrite void *  buf,
int  len
 

Add audio samples to the TLV320AIC23B transmit queue.

Parameters:
buf Points to PCM data.
len Number of samples.
Returns:
0 on success or -1 if out of memory.

Definition at line 413 of file tlv320dac.c.

References _PCM_BUFFER::wbf_dat, and _PCM_BUFFER::wbf_siz.

00417                                      {
00418         if (pcm_bufq[idx].wbf_siz) {
00419             free(pcm_bufq[idx].wbf_dat);
00420             pcm_bufq[idx].wbf_siz = 0;
00421         }
00422         pcm_bufq[idx].wbf_dat = malloc(len * 2);
00423         if (pcm_bufq[idx].wbf_dat == NULL) {
00424             /* Out of memory. */
00425             return -1;
00426         }
00427         pcm_bufq[idx].wbf_siz = len;
00428     }
00429 
00430     /*
00431      * At this point we got an available buffer with sufficient size.
00432      * Move the data to it, set the number of valid bytes and update
00433      * the write (producer) index.
00434      */
00435     memcpy(pcm_bufq[idx].wbf_dat, buf, len * 2);
00436     pcm_bufq[idx].wbf_len = len;
00437     bwr_idx = idx;
00438 
00439     return 0;
00440 }
00441 
00452 int Tlv320DacSetVolume(int left, int right)
00453 {
00454     /* Cut to limits. */
00455     if (left > DAC_MAX_VOLUME) {
00456         left = DAC_MAX_VOLUME;
00457     }

int Tlv320DacFlush void   ) 
 

Wait until all buffered samples have been transmitted.

Returns:
Always 0.

Definition at line 392 of file tlv320dac.c.

00397 {
00398     u_int idx;
00399 
00400     /* Move to the next buffer to write to. */
00401     idx = bwr_idx + 1;
00402     if (idx >= SAMPLE_BUFFERS) {
00403         idx = 0;

u_char Tlv320DacReadReg u_int  reg  ) 
 

Read value from specified DAC register.

Not implemented, because the TLV320AIC23B is a write-only device.

Parameters:
reg DAC register address.
Returns:
Always 0xFF.

Definition at line 182 of file tlv320dac.c.

00184 {
00185     return 0xFF;

void Tlv320DacWriteReg u_int  reg,
u_int  val
 

Write value to specified DAC register.

Communicates with the DAC chip via TWI.

Parameters:
reg DAC register address.
val Value to store in specified register.

Definition at line 195 of file tlv320dac.c.

Referenced by Tlv320DacSetRate().

00197 {
00198     u_char txdata[2];
00199 
00200     txdata[0] = (u_char)(reg << 1) | (u_char)(val >> 8);
00201     txdata[1] = (u_char)val;
00202     TwMasterTransact(TWI_SLA_DAC, txdata, 2, NULL, 0, 0);

int Tlv320DacSetVolume int  left,
int  right
 

Set volume.Register address. Register address.

Sets the master playback gain. Range is +6..-73 dB.

Parameters:
left Left channel gain in dB.
right Right channel gain in dB.
Returns:
0 on success, -1 otherwise.

Definition at line 469 of file tlv320dac.c.

Referenced by CgiControl().

int Tlv320DacSetRate u_int  rate  ) 
 

Register address. Sampling rate LSB. USB clock mode. Register address. Sampling rate LSB. Base oversampling rate. USB clock mode. Register address. Sampling rate LSB. Base oversampling rate. USB clock mode. Register address. Sampling rate LSB. USB clock mode. Register address. Sampling rate LSB. Base oversampling rate. USB clock mode. Register address. Sampling rate LSB. USB clock mode.

<

<

USB mode : 0=250 fs, 1=272 fs Normal mode: 0=256 fs, 1=384 fs

<

USB mode : 0=250 fs, 1=272 fs Normal mode: 0=256 fs, 1=384 fs

<

USB mode : 0=250 fs, 1=272 fs Normal mode: 0=256 fs, 1=384 fs

Definition at line 289 of file tlv320dac.c.

References DAC_SRATE, DAC_SRATE_BOSR, DAC_SRATE_SR_LSB, DAC_SRATE_USB, and Tlv320DacWriteReg().

00291 {
00292     switch(rate) {
00293     case 8000:
00294 #ifdef AT91SAM7X_EK
00295         Tlv320DacWriteReg(DAC_SRATE, (3 << DAC_SRATE_SR_LSB));
00296 #else
00297         Tlv320DacWriteReg(DAC_SRATE, (3 << DAC_SRATE_SR_LSB) | DAC_SRATE_USB);
00298 #endif
00299         break;
00300     case 8021:      
00301         Tlv320DacWriteReg(DAC_SRATE, (11 << DAC_SRATE_SR_LSB) | DAC_SRATE_BOSR | DAC_SRATE_USB);
00302         break;
00303     case 44100:     
00304         Tlv320DacWriteReg(DAC_SRATE, (8 << DAC_SRATE_SR_LSB) | DAC_SRATE_BOSR | DAC_SRATE_USB);
00305         break;
00306     case 48000:     
00307         Tlv320DacWriteReg(DAC_SRATE, (0 << DAC_SRATE_SR_LSB) | DAC_SRATE_USB);
00308         break;
00309     case 88200:     
00310         Tlv320DacWriteReg(DAC_SRATE, (15 << DAC_SRATE_SR_LSB) | DAC_SRATE_BOSR | DAC_SRATE_USB);
00311         break;
00312     case 96000:     
00313         Tlv320DacWriteReg(DAC_SRATE, (7 << DAC_SRATE_SR_LSB) | DAC_SRATE_USB);
00314         break;
00315     default:        
00316         return -1;
00317     }
00318     return 0;
00319 }
00320 
00328 int Tlv320DacInit(u_int rate)
00329 {
00330     /* Initialize TWI. */

Here is the call graph for this function:


Generated on Fri Feb 23 17:29:00 2007 for SAM Internet Radio by  doxygen 1.4.4