Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
burgundy.c File Reference
#include <asm/io.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <sound/core.h>
#include "pmac.h"
#include "burgundy.h"

Go to the source code of this file.

Macros

#define BASE2ADDR(base)   ((base) << 12)
 
#define ADDR2BASE(addr)   ((addr) >> 12)
 
#define BURGUNDY_VOLUME_W(xname, xindex, addr, shift)
 
#define BURGUNDY_VOLUME_2B(xname, xindex, addr, off)
 
#define BURGUNDY_VOLUME_B(xname, xindex, addr, stereo, atten)
 
#define BURGUNDY_SWITCH_W(xname, xindex, addr, lbit, rbit, stereo)
 
#define BURGUNDY_SWITCH_B(xname, xindex, addr, lmask, rmask, stereo)
 

Functions

int __devinit snd_pmac_burgundy_init (struct snd_pmac *chip)
 

Macro Definition Documentation

#define ADDR2BASE (   addr)    ((addr) >> 12)

Definition at line 130 of file burgundy.c.

#define BASE2ADDR (   base)    ((base) << 12)

Definition at line 129 of file burgundy.c.

#define BURGUNDY_SWITCH_B (   xname,
  xindex,
  addr,
  lmask,
  rmask,
  stereo 
)
Value:
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .index = xindex,\
.info = snd_pmac_burgundy_info_switch_b,\
.get = snd_pmac_burgundy_get_switch_b,\
.put = snd_pmac_burgundy_put_switch_b,\
.private_value = ((lmask) | ((rmask) << 8)\
| (ADDR2BASE(addr) << 16) | ((stereo) << 24)) }

Definition at line 459 of file burgundy.c.

#define BURGUNDY_SWITCH_W (   xname,
  xindex,
  addr,
  lbit,
  rbit,
  stereo 
)
Value:
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .index = xindex,\
.info = snd_pmac_burgundy_info_switch_w,\
.get = snd_pmac_burgundy_get_switch_w,\
.put = snd_pmac_burgundy_put_switch_w,\
.private_value = ((lbit) | ((rbit) << 8)\
| (ADDR2BASE(addr) << 16) | ((stereo) << 24)) }

Definition at line 403 of file burgundy.c.

#define BURGUNDY_VOLUME_2B (   xname,
  xindex,
  addr,
  off 
)
Value:
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .index = xindex,\
.info = snd_pmac_burgundy_info_volume_2b,\
.get = snd_pmac_burgundy_get_volume_2b,\
.put = snd_pmac_burgundy_put_volume_2b,\
.private_value = ((ADDR2BASE(addr) & 0xff) | ((off) << 8)) }

Definition at line 286 of file burgundy.c.

#define BURGUNDY_VOLUME_B (   xname,
  xindex,
  addr,
  stereo,
  atten 
)
Value:
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .index = xindex,\
.info = snd_pmac_burgundy_info_gain,\
.get = snd_pmac_burgundy_get_gain,\
.put = snd_pmac_burgundy_put_gain,\
.private_value = (ADDR2BASE(addr) | ((stereo) << 24) | ((atten) << 25)) }

Definition at line 348 of file burgundy.c.

#define BURGUNDY_VOLUME_W (   xname,
  xindex,
  addr,
  shift 
)
Value:
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .index = xindex,\
.info = snd_pmac_burgundy_info_volume,\
.get = snd_pmac_burgundy_get_volume,\
.put = snd_pmac_burgundy_put_volume,\
.private_value = ((ADDR2BASE(addr) & 0xff) | ((shift) << 8)) }

Definition at line 210 of file burgundy.c.

Function Documentation

int __devinit snd_pmac_burgundy_init ( struct snd_pmac chip)

Definition at line 620 of file burgundy.c.