Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations
maya44.c File Reference
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/io.h>
#include <sound/core.h>
#include <sound/control.h>
#include <sound/pcm.h>
#include <sound/tlv.h>
#include "ice1712.h"
#include "envy24ht.h"
#include "maya44.h"

Go to the source code of this file.

Data Structures

struct  snd_wm8776
 
struct  snd_maya44
 
struct  maya_vol_info
 

Macros

#define WM8776_REG_HEADPHONE_L   0x00
 
#define WM8776_REG_HEADPHONE_R   0x01
 
#define WM8776_REG_HEADPHONE_MASTER   0x02
 
#define WM8776_REG_DAC_ATTEN_L   0x03
 
#define WM8776_REG_DAC_ATTEN_R   0x04
 
#define WM8776_REG_DAC_ATTEN_MASTER   0x05
 
#define WM8776_REG_DAC_PHASE   0x06
 
#define WM8776_REG_DAC_CONTROL   0x07
 
#define WM8776_REG_DAC_MUTE   0x08
 
#define WM8776_REG_DAC_DEEMPH   0x09
 
#define WM8776_REG_DAC_IF_CONTROL   0x0a
 
#define WM8776_REG_ADC_IF_CONTROL   0x0b
 
#define WM8776_REG_MASTER_MODE_CONTROL   0x0c
 
#define WM8776_REG_POWERDOWN   0x0d
 
#define WM8776_REG_ADC_ATTEN_L   0x0e
 
#define WM8776_REG_ADC_ATTEN_R   0x0f
 
#define WM8776_REG_ADC_ALC1   0x10
 
#define WM8776_REG_ADC_ALC2   0x11
 
#define WM8776_REG_ADC_ALC3   0x12
 
#define WM8776_REG_ADC_NOISE_GATE   0x13
 
#define WM8776_REG_ADC_LIMITER   0x14
 
#define WM8776_REG_ADC_MUX   0x15
 
#define WM8776_REG_OUTPUT_MUX   0x16
 
#define WM8776_REG_RESET   0x17
 
#define WM8776_NUM_REGS   0x18
 
#define WM8776_CLOCK_RATIO_128FS   0
 
#define WM8776_CLOCK_RATIO_192FS   1
 
#define WM8776_CLOCK_RATIO_256FS   2
 
#define WM8776_CLOCK_RATIO_384FS   3
 
#define WM8776_CLOCK_RATIO_512FS   4
 
#define WM8776_CLOCK_RATIO_768FS   5
 
#define COMPOSE_SW_VAL(idx, reg, mask)   ((idx) | ((reg) << 8) | ((mask) << 16))
 
#define GET_SW_VAL_IDX(val)   ((val) & 0xff)
 
#define GET_SW_VAL_REG(val)   (((val) >> 8) & 0xff)
 
#define GET_SW_VAL_MASK(val)   (((val) >> 16) & 0xff)
 
#define maya_sw_info   snd_ctl_boolean_mono_info
 
#define GPIO_PHANTOM_OFF   2
 
#define GPIO_MIC_RELAY   4
 
#define GPIO_SPDIF_IN_INV   5
 
#define GPIO_MUST_BE_0   7
 
#define COMPOSE_GPIO_VAL(shift, inv)   ((shift) | ((inv) << 8))
 
#define GET_GPIO_VAL_SHIFT(val)   ((val) & 0xff)
 
#define GET_GPIO_VAL_INV(val)   (((val) >> 8) & 1)
 
#define maya_gpio_sw_info   snd_ctl_boolean_mono_info
 
#define MAYA_LINE_IN   1 /* in-2 */
 
#define MAYA_MIC_IN   3 /* in-4 */
 

Enumerations

enum  { WM_VOL_HP, WM_VOL_DAC, WM_VOL_ADC, WM_NUM_VOLS }
 
enum  { WM_SW_DAC, WM_SW_BYPASS, WM_NUM_SWITCHES }
 

Macro Definition Documentation

#define COMPOSE_GPIO_VAL (   shift,
  inv 
)    ((shift) | ((inv) << 8))

Definition at line 294 of file maya44.c.

#define COMPOSE_SW_VAL (   idx,
  reg,
  mask 
)    ((idx) | ((reg) << 8) | ((mask) << 16))

Definition at line 239 of file maya44.c.

#define GET_GPIO_VAL_INV (   val)    (((val) >> 8) & 1)

Definition at line 296 of file maya44.c.

#define GET_GPIO_VAL_SHIFT (   val)    ((val) & 0xff)

Definition at line 295 of file maya44.c.

#define GET_SW_VAL_IDX (   val)    ((val) & 0xff)

Definition at line 240 of file maya44.c.

#define GET_SW_VAL_MASK (   val)    (((val) >> 16) & 0xff)

Definition at line 242 of file maya44.c.

#define GET_SW_VAL_REG (   val)    (((val) >> 8) & 0xff)

Definition at line 241 of file maya44.c.

#define GPIO_MIC_RELAY   4

Definition at line 286 of file maya44.c.

#define GPIO_MUST_BE_0   7

Definition at line 288 of file maya44.c.

#define GPIO_PHANTOM_OFF   2

Definition at line 285 of file maya44.c.

#define GPIO_SPDIF_IN_INV   5

Definition at line 287 of file maya44.c.

#define maya_gpio_sw_info   snd_ctl_boolean_mono_info

Definition at line 309 of file maya44.c.

#define MAYA_LINE_IN   1 /* in-2 */

Definition at line 349 of file maya44.c.

#define MAYA_MIC_IN   3 /* in-4 */

Definition at line 350 of file maya44.c.

#define maya_sw_info   snd_ctl_boolean_mono_info

Definition at line 244 of file maya44.c.

#define WM8776_CLOCK_RATIO_128FS   0

Definition at line 66 of file maya44.c.

#define WM8776_CLOCK_RATIO_192FS   1

Definition at line 67 of file maya44.c.

#define WM8776_CLOCK_RATIO_256FS   2

Definition at line 68 of file maya44.c.

#define WM8776_CLOCK_RATIO_384FS   3

Definition at line 69 of file maya44.c.

#define WM8776_CLOCK_RATIO_512FS   4

Definition at line 70 of file maya44.c.

#define WM8776_CLOCK_RATIO_768FS   5

Definition at line 71 of file maya44.c.

#define WM8776_NUM_REGS   0x18

Definition at line 63 of file maya44.c.

#define WM8776_REG_ADC_ALC1   0x10

Definition at line 54 of file maya44.c.

#define WM8776_REG_ADC_ALC2   0x11

Definition at line 55 of file maya44.c.

#define WM8776_REG_ADC_ALC3   0x12

Definition at line 56 of file maya44.c.

#define WM8776_REG_ADC_ATTEN_L   0x0e

Definition at line 52 of file maya44.c.

#define WM8776_REG_ADC_ATTEN_R   0x0f

Definition at line 53 of file maya44.c.

#define WM8776_REG_ADC_IF_CONTROL   0x0b

Definition at line 49 of file maya44.c.

#define WM8776_REG_ADC_LIMITER   0x14

Definition at line 58 of file maya44.c.

#define WM8776_REG_ADC_MUX   0x15

Definition at line 59 of file maya44.c.

#define WM8776_REG_ADC_NOISE_GATE   0x13

Definition at line 57 of file maya44.c.

#define WM8776_REG_DAC_ATTEN_L   0x03

Definition at line 41 of file maya44.c.

#define WM8776_REG_DAC_ATTEN_MASTER   0x05

Definition at line 43 of file maya44.c.

#define WM8776_REG_DAC_ATTEN_R   0x04

Definition at line 42 of file maya44.c.

#define WM8776_REG_DAC_CONTROL   0x07

Definition at line 45 of file maya44.c.

#define WM8776_REG_DAC_DEEMPH   0x09

Definition at line 47 of file maya44.c.

#define WM8776_REG_DAC_IF_CONTROL   0x0a

Definition at line 48 of file maya44.c.

#define WM8776_REG_DAC_MUTE   0x08

Definition at line 46 of file maya44.c.

#define WM8776_REG_DAC_PHASE   0x06

Definition at line 44 of file maya44.c.

#define WM8776_REG_HEADPHONE_L   0x00

Definition at line 38 of file maya44.c.

#define WM8776_REG_HEADPHONE_MASTER   0x02

Definition at line 40 of file maya44.c.

#define WM8776_REG_HEADPHONE_R   0x01

Definition at line 39 of file maya44.c.

#define WM8776_REG_MASTER_MODE_CONTROL   0x0c

Definition at line 50 of file maya44.c.

#define WM8776_REG_OUTPUT_MUX   0x16

Definition at line 60 of file maya44.c.

#define WM8776_REG_POWERDOWN   0x0d

Definition at line 51 of file maya44.c.

#define WM8776_REG_RESET   0x17

Definition at line 61 of file maya44.c.

Enumeration Type Documentation

anonymous enum
Enumerator:
WM_VOL_HP 
WM_VOL_DAC 
WM_VOL_ADC 
WM_NUM_VOLS 

Definition at line 73 of file maya44.c.

anonymous enum
Enumerator:
WM_SW_DAC 
WM_SW_BYPASS 
WM_NUM_SWITCHES 

Definition at line 74 of file maya44.c.