PU2CLR Si4735 Arduino Library 2.1.4
Arduino Library for Si47XX Devices - By Ricardo Lima Caratti
Loading...
Searching...
No Matches
Audio setup

Functions

uint8_t SI4735::getCurrentVolume ()
 Get the Current Volume.
 
void SI4735::setVolumeUp ()
 Set the Volume Up.
 
void SI4735::setVolumeDown ()
 Set the Volume Down.
 
void SI4735::setAudioMode (uint8_t audioMode)
 Sets the Audio Mode. See table below.
 
void SI4735::setAmDelayNB (uint16_t value)
 Sets the delay before applying impulse blanking.
 
void SI4735::digitalOutputFormat (uint8_t OSIZE, uint8_t OMONO, uint8_t OMODE, uint8_t OFALL)
 Configures the digital audio output format.
 
void SI4735::digitalOutputSampleRate (uint16_t DOSR)
 Enables digital audio output and configures digital audio output sample rate in samples per second (sps).
 
void SI4735::setVolume (uint8_t volume)
 Sets volume level (0 to 63)
 
void SI4735::setAudioMute (bool off)
 Sets the audio on or off.
 
uint8_t SI4735::getVolume ()
 Gets the current volume level.
 
void SI4735::volumeUp ()
 Set sound volume level Up.
 
void SI4735::volumeDown ()
 Set sound volume level Down.
 

Detailed Description

Function Documentation

◆ getCurrentVolume()

uint8_t SI4735::getCurrentVolume ( )
inline

Get the Current Volume.

Returns the current volume level.

Returns
uint8_t

◆ setVolumeUp()

void SI4735::setVolumeUp ( )
inline

Set the Volume Up.

Same volumeUp()

See also
volumeUp

References SI4735::volumeUp().

◆ setVolumeDown()

void SI4735::setVolumeDown ( )
inline

Set the Volume Down.

Same volumeDown()

Returns
voi

References SI4735::volumeDown().

◆ setAudioMode()

void SI4735::setAudioMode ( uint8_t  audioMode)
inline

Sets the Audio Mode. See table below.

If you want to change the audio mode, call this function before call setAM(), setFM() or setSSB().

Sets the Si47XX device to use ANALOG or DIGITAL audio output. The table below shows the valid values.

This function will only take effect after calling setAM(), setFM() or setSSB().

Macro Value (Binary) Description
SI473X_ANALOG_AUDIO 0b00000101 Analog Audio Inputs
SI473X_DIGITAL_AUDIO1 0b00001011 Digital audio output (DCLK, LOUT/DFS, ROUT/DIO)
SI473X_DIGITAL_AUDIO2 0b10110000 Digital audio outputs (DCLK, DFS, DIO)
SI473X_DIGITAL_AUDIO3 0b10110101 Analog and digital audio outputs (LOUT/ROUT and DCLK, DFS,DIO)
See also
setAM(), setFM(), setSSB().
Parameters
audioModeOne of the values options above

◆ setAmDelayNB()

void SI4735::setAmDelayNB ( uint16_t  value)
inline

Sets the delay before applying impulse blanking.

Delay in micro-seconds before applying impulse blanking to the original samples. Default value is 172.

Parameters
valueDelay in micro-seconds

◆ digitalOutputFormat()

void SI4735::digitalOutputFormat ( uint8_t  OSIZE,
uint8_t  OMONO,
uint8_t  OMODE,
uint8_t  OFALL 
)

Configures the digital audio output format.

Options: DCLK edge, data format, force mono, and sample precision.

ATTENTION: The document AN383; "Si47XX ANTENNA, SCHEMATIC, LAYOUT, AND DESIGN GUIDELINES"; rev 0.8; page 6; there is the following note: Crystal and digital audio mode cannot be used at the same time. Populate R1 and remove C10, C11, and X1 when using digital audio.

See also
Si47XX PROGRAMINGGUIDE; AN332 (REV 1.0); page 195.
Si47XX ANTENNA, SCHEMATIC, LAYOUT, AND DESIGN GUIDELINES"; AN383; rev 0.8; page 6;
Parameters
uint8_tOSIZE Dgital Output Audio Sample Precision (0=16 bits, 1=20 bits, 2=24 bits, 3=8bits).
uint8_tOMONO Digital Output Mono Mode (0=Use mono/stereo blend ).
uint8_tOMODE Digital Output Mode (0=I2S, 6 = Left-justified, 8 = MSB at second DCLK after DFS pulse, 12 = MSB at first DCLK after DFS pulse).
uint8_tOFALL Digital Output DCLK Edge (0 = use DCLK rising edge, 1 = use DCLK falling edge)

◆ digitalOutputSampleRate()

void SI4735::digitalOutputSampleRate ( uint16_t  DOSR)

Enables digital audio output and configures digital audio output sample rate in samples per second (sps).

When DOSR[15:0] is 0, digital audio output is disabled. The over-sampling rate must be set in order to

satisfy a minimum DCLK of 1 MHz. To enable digital audio output, program DOSR[15:0] with the sample rate

in samples per second. The system controller must establish DCLK and DFS prior to enabling the digital

audio output else the device will not respond and will require reset. The sample rate must be set to 0

before the DCLK/DFS is removed. FM_TUNE_FREQ command must be sent after the POWER_UP command to start

the internal clocking before setting this property.

ATTENTION: The document AN383; "Si47XX ANTENNA, SCHEMATIC, LAYOUT, AND DESIGN GUIDELINES"; rev 0.8; page 6; there is the following note: Crystal and digital audio mode cannot be used at the same time. Populate R1 and remove C10, C11, and X1 when using digital audio.

See also
Si47XX PROGRAMINGGUIDE; AN332 (REV 1.0); page 196.
Si47XX ANTENNA, SCHEMATIC, LAYOUT, AND DESIGN GUIDELINES; AN383; rev 0.8; page 6
Parameters
uint16_tDOSR Digital Output Sample Rate(32–48 ksps .0 to disable digital audio output).

◆ setVolume()

void SI4735::setVolume ( uint8_t  volume)

Sets volume level (0 to 63)

See also
Si47XX PROGRAMMING GUIDE; AN332 (REV 1.0); pages 62, 123, 170, 173 and 204
Parameters
uint8_tvolume (domain: 0 - 63)

◆ setAudioMute()

void SI4735::setAudioMute ( bool  off)

Sets the audio on or off.

Useful to mute the audio output of the SI47XX device. This function does not work to reduce the pop in the speaker at start the system up.

If you want to remove the loud click or pop in the speaker at start, power down and power up commands, use setHardwareAudioMute with a external mute circuit.

See also
See Si47XX PROGRAMMING GUIDE; AN332 (REV 1.0); pages 62, 123, 171
setHardwareAudioMute
Parameters
valueif true, mute the audio; if false unmute the audio.

◆ getVolume()

uint8_t SI4735::getVolume ( )

Gets the current volume level.

See also
setVolume()
Returns
volume (domain: 0 - 63)

◆ volumeUp()

void SI4735::volumeUp ( )

Set sound volume level Up.

See also
setVolume()

Referenced by SI4735::setVolumeUp().

◆ volumeDown()

void SI4735::volumeDown ( )

Set sound volume level Down.

See also
setVolume()

Referenced by SI4735::setVolumeDown().