wm8731.h File Reference

WM8731 Audio codec 2 wire driver. More...

#include <cpu/types.h>
#include <drv/i2c.h>

Go to the source code of this file.

Defines

#define WM8731_INSEL   2
 Input selector.
#define WM8731_BYPASS   BV(3)
 Input to output.
#define WM8731_SIDEATT_MASK   0xC0
 Side tone attenuation.
#define WM8731_DEEMP_MASK   0x6
 De-emphasis control.
#define WM8731_LINEINPD   BV(0)
 LineIn power down.
#define WM8731_MICPD   BV(1)
 Mic power down.
#define WM8731_ADCPD   BV(2)
 ADC power down.
#define WM8731_DACPD   BV(3)
 DAC power down.
#define WM8731_OUTPD   BV(4)
 OUT power down.
#define WM8731_OSCBIT   BV(5)
 OSC power down.
#define WM8731_CLKOUTPD   BV(6)
 CLKOUT powerdown.
#define WM8731_FORMAT_BITS_MASK   0x3
 Audio format.
#define WM8731_IWL_BITS   0xC
 Audio format.
#define WM8731_NORMAL_256FS_48KHZ   0
 Sampling rate control.

Functions

void wm8731_setVolume (Wm8731 *ctx, uint16_t device, uint8_t volume)
 Set the volume of select device line in or Headphone.

Detailed Description

WM8731 Audio codec 2 wire driver.

Author:
Daniele Basile <asterix@develer.com>

Definition in file wm8731.h.


Define Documentation

#define WM8731_BYPASS   BV(3)

Input to output.

Definition at line 93 of file wm8731.h.

#define WM8731_DEEMP_MASK   0x6

De-emphasis control.

Definition at line 114 of file wm8731.h.

#define WM8731_FORMAT_BITS_MASK   0x3

Audio format.

Definition at line 138 of file wm8731.h.

#define WM8731_INSEL   2

Input selector.

Definition at line 86 of file wm8731.h.

#define WM8731_IWL_BITS   0xC

Audio format.

Definition at line 147 of file wm8731.h.

#define WM8731_NORMAL_256FS_48KHZ   0

Sampling rate control.

Definition at line 168 of file wm8731.h.

#define WM8731_SIDEATT_MASK   0xC0

Side tone attenuation.

Definition at line 100 of file wm8731.h.


Function Documentation

void wm8731_setVolume ( Wm8731 *  ctx,
uint16_t  device,
uint8_t  volume 
)

Set the volume of select device line in or Headphone.

The volume is express in %, and the volume range is 0-100%.

Definition at line 71 of file wm8731.c.