Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
tumbler.c File Reference
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/i2c.h>
#include <linux/kmod.h>
#include <linux/slab.h>
#include <linux/interrupt.h>
#include <linux/string.h>
#include <sound/core.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/machdep.h>
#include <asm/pmac_feature.h>
#include "pmac.h"
#include "tumbler_volume.h"

Go to the source code of this file.

Data Structures

struct  pmac_gpio
 
struct  pmac_tumbler
 
struct  tumbler_mono_vol
 

Macros

#define DBG(fmt...)
 
#define IS_G4DA   (of_machine_is_compatible("PowerMac3,4"))
 
#define TAS_I2C_ADDR   0x34
 
#define TAS_REG_MCS   0x01 /* main control */
 
#define TAS_REG_DRC   0x02
 
#define TAS_REG_VOL   0x04
 
#define TAS_REG_TREBLE   0x05
 
#define TAS_REG_BASS   0x06
 
#define TAS_REG_INPUT1   0x07
 
#define TAS_REG_INPUT2   0x08
 
#define TAS_REG_PCM   TAS_REG_INPUT1
 
#define TAS_REG_LMIX   TAS_REG_INPUT1
 
#define TAS_REG_RMIX   TAS_REG_INPUT2
 
#define TAS_REG_MCS2   0x43 /* main control 2 */
 
#define TAS_REG_ACS   0x40 /* analog control */
 
#define do_gpio_write(gp, val)   pmac_call_feature(PMAC_FTR_WRITE_GPIO, NULL, (gp)->addr, val)
 
#define do_gpio_read(gp)   pmac_call_feature(PMAC_FTR_READ_GPIO, NULL, (gp)->addr, 0)
 
#define tumbler_gpio_free(gp)   /* NOP */
 
#define TAS3001_DRC_MAX   0x5f
 
#define TAS3004_DRC_MAX   0xef
 
#define DEFINE_MONO(xname, type)
 
#define DEFINE_SNAPPER_MONO(xname, type)
 
#define DEFINE_SNAPPER_MIX(xname, idx, ofs)
 

Enumerations

enum  { VOL_IDX_PCM_MONO, VOL_IDX_BASS, VOL_IDX_TREBLE, VOL_IDX_LAST_MONO }
 
enum  { VOL_IDX_PCM, VOL_IDX_PCM2, VOL_IDX_ADC, VOL_IDX_LAST_MIX }
 
enum  { TUMBLER_MUTE_HP, TUMBLER_MUTE_AMP, TUMBLER_MUTE_LINE }
 

Functions

int __devinit snd_pmac_tumbler_init (struct snd_pmac *chip)
 

Macro Definition Documentation

#define DBG (   fmt...)

Definition at line 47 of file tumbler.c.

#define DEFINE_MONO (   xname,
  type 
)
Value:
{ \
.name = xname, \
.info = tumbler_info_mono, \
.get = tumbler_get_mono, \
.put = tumbler_put_mono, \
.private_value = (unsigned long)(&tumbler_##type##_vol_info), \
}

Definition at line 611 of file tumbler.c.

#define DEFINE_SNAPPER_MIX (   xname,
  idx,
  ofs 
)
Value:
{ \
.name = xname, \
.info = snapper_info_mix, \
.get = snapper_get_mix, \
.put = snapper_put_mix, \
.index = idx,\
.private_value = ofs, \
}

Definition at line 834 of file tumbler.c.

#define DEFINE_SNAPPER_MONO (   xname,
  type 
)
Value:
{ \
.name = xname, \
.info = tumbler_info_mono, \
.get = tumbler_get_mono, \
.put = tumbler_put_mono, \
.private_value = (unsigned long)(&snapper_##type##_vol_info), \
}

Definition at line 620 of file tumbler.c.

#define do_gpio_read (   gp)    pmac_call_feature(PMAC_FTR_READ_GPIO, NULL, (gp)->addr, 0)

Definition at line 173 of file tumbler.c.

#define do_gpio_write (   gp,
  val 
)    pmac_call_feature(PMAC_FTR_WRITE_GPIO, NULL, (gp)->addr, val)

Definition at line 171 of file tumbler.c.

#define IS_G4DA   (of_machine_is_compatible("PowerMac3,4"))

Definition at line 50 of file tumbler.c.

#define TAS3001_DRC_MAX   0x5f

Definition at line 333 of file tumbler.c.

#define TAS3004_DRC_MAX   0xef

Definition at line 368 of file tumbler.c.

#define TAS_I2C_ADDR   0x34

Definition at line 53 of file tumbler.c.

#define TAS_REG_ACS   0x40 /* analog control */

Definition at line 71 of file tumbler.c.

#define TAS_REG_BASS   0x06

Definition at line 60 of file tumbler.c.

#define TAS_REG_DRC   0x02

Definition at line 57 of file tumbler.c.

#define TAS_REG_INPUT1   0x07

Definition at line 61 of file tumbler.c.

#define TAS_REG_INPUT2   0x08

Definition at line 62 of file tumbler.c.

#define TAS_REG_LMIX   TAS_REG_INPUT1

Definition at line 68 of file tumbler.c.

#define TAS_REG_MCS   0x01 /* main control */

Definition at line 56 of file tumbler.c.

#define TAS_REG_MCS2   0x43 /* main control 2 */

Definition at line 70 of file tumbler.c.

#define TAS_REG_PCM   TAS_REG_INPUT1

Definition at line 65 of file tumbler.c.

#define TAS_REG_RMIX   TAS_REG_INPUT2

Definition at line 69 of file tumbler.c.

#define TAS_REG_TREBLE   0x05

Definition at line 59 of file tumbler.c.

#define TAS_REG_VOL   0x04

Definition at line 58 of file tumbler.c.

#define tumbler_gpio_free (   gp)    /* NOP */

Definition at line 175 of file tumbler.c.

Enumeration Type Documentation

anonymous enum
Enumerator:
VOL_IDX_PCM_MONO 
VOL_IDX_BASS 
VOL_IDX_TREBLE 
VOL_IDX_LAST_MONO 

Definition at line 74 of file tumbler.c.

anonymous enum
Enumerator:
VOL_IDX_PCM 
VOL_IDX_PCM2 
VOL_IDX_ADC 
VOL_IDX_LAST_MIX 

Definition at line 81 of file tumbler.c.

anonymous enum
Enumerator:
TUMBLER_MUTE_HP 
TUMBLER_MUTE_AMP 
TUMBLER_MUTE_LINE 

Definition at line 724 of file tumbler.c.

Function Documentation

int __devinit snd_pmac_tumbler_init ( struct snd_pmac chip)

Definition at line 1352 of file tumbler.c.