PebbleOS v4.45.0-50-g17e860a43
Loading...
Searching...
No Matches
DA7212 codec

Audio codec: Dialog DA7212, playing to its line output. More...

Data Structures

struct  pbl_audio_da7212
 DA7212 codec. More...
 

Macros

#define PBL_AUDIO_DA7212_DEFINE(sym, _name, _bus, _addr, _vdd)
 Define a DA7212 codec.
 

Detailed Description

Audio codec: Dialog DA7212, playing to its line output.

The codec runs its PLL from a 4 MHz master clock on the link and is the I2S master, deriving an exact 16 kHz frame clock. Its DAC gain runs from -78 to +12 dB in 0.75 dB steps.

PBL_AUDIO_DA7212_DEFINE(s_da7212, "da7212", &s_i2c.bus, 0x1a, &s_ldo.reg);
static const struct pbl_audio_link s_speaker_link = {
.codec = &s_da7212.codec,
};
#define PBL_AUDIO_DA7212_DEFINE(sym, _name, _bus, _addr, _vdd)
Define a DA7212 codec.
Definition da7212.h:52
const struct pbl_audio_codec * codec
Codec on the link, or NULL.
Definition audio.h:277
#define PBL_AUDIO_FMT_CODEC_MASTER
The codec drives the bit and frame clocks.
Definition audio.h:126
#define PBL_AUDIO_FMT_I2S
I2S framing.
Definition audio.h:124

Data Structure Documentation

◆ pbl_audio_da7212

struct pbl_audio_da7212

DA7212 codec.

Data Fields
struct pbl_audio_codec codec Codec.
struct pbl_i2c_dev i2c Control port.
const struct pbl_regulator * vdd Supply of the digital and analogue circuits, to reset the codec if needed.

Macro Definition Documentation

◆ PBL_AUDIO_DA7212_DEFINE

#define PBL_AUDIO_DA7212_DEFINE (   sym,
  _name,
  _bus,
  _addr,
  _vdd 
)
Value:
static const struct pbl_audio_da7212 sym = { \
.codec = \
{ \
.dev = PBL_DEVICE_INIT(sym, _name, pbl_audio_da7212_init, &(_bus)->dev, nullptr), \
.ops = &pbl_audio_da7212_ops, \
}, \
.i2c = PBL_I2C_DEV(_bus, _addr), \
.vdd = (_vdd), \
}; \
PBL_DEVICE_REGISTER(sym, &sym.codec.dev)
struct pbl_audio_codec codec
Codec.
Definition da7212.h:31
DA7212 codec.
Definition da7212.h:29
struct pbl_device dev
Device.
Definition audio.h:253
#define PBL_DEVICE_STATE_DEFINE(sym)
Define the runtime state of device instance sym.
Definition device.h:129
#define PBL_DEVICE_INIT(sym, _name, _init, _parent, _deps)
Initializer for the struct pbl_device of device instance sym.
Definition device.h:162
#define PBL_I2C_DEV(_bus, _addr)
Initializer for a struct pbl_i2c_dev.
Definition i2c.h:136

Define a DA7212 codec.

Parameters
symSymbol of the codec.
_nameDevice name.
_busI2C bus.
_addr7-bit I2C address.
_vddSupply of the digital and analogue circuits, always on.