Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
abdac.c File Reference
#include <linux/clk.h>
#include <linux/bitmap.h>
#include <linux/dw_dmac.h>
#include <linux/dmaengine.h>
#include <linux/dma-mapping.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/types.h>
#include <linux/io.h>
#include <sound/core.h>
#include <sound/initval.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/atmel-abdac.h>

Go to the source code of this file.

Data Structures

struct  atmel_abdac_dma
 
struct  atmel_abdac
 

Macros

#define DAC_DATA   0x0000
 
#define DAC_CTRL   0x0008
 
#define DAC_INT_MASK   0x000c
 
#define DAC_INT_EN   0x0010
 
#define DAC_INT_DIS   0x0014
 
#define DAC_INT_CLR   0x0018
 
#define DAC_INT_STATUS   0x001c
 
#define DAC_SWAP_OFFSET   30
 
#define DAC_SWAP_SIZE   1
 
#define DAC_EN_OFFSET   31
 
#define DAC_EN_SIZE   1
 
#define DAC_UNDERRUN_OFFSET   28
 
#define DAC_UNDERRUN_SIZE   1
 
#define DAC_TX_READY_OFFSET   29
 
#define DAC_TX_READY_SIZE   1
 
#define DAC_BIT(name)   (1 << DAC_##name##_OFFSET)
 
#define DAC_BF(name, value)
 
#define DAC_BFEXT(name, value)
 
#define DAC_BFINS(name, value, old)
 
#define dac_readl(port, reg)   __raw_readl((port)->regs + DAC_##reg)
 
#define dac_writel(port, reg, value)   __raw_writel((value), (port)->regs + DAC_##reg)
 
#define MAX_NUM_RATES   6
 
#define RATE_MAX   192000
 
#define RATE_MIN   5112
 
#define get_dac(card)   ((struct atmel_abdac *)(card)->private_data)
 
#define ATMEL_ABDAC_PM_OPS   NULL
 

Enumerations

enum  { DMA_READY = 0 }
 

Functions

 module_init (atmel_abdac_init)
 
 module_exit (atmel_abdac_exit)
 
 MODULE_LICENSE ("GPL")
 
 MODULE_DESCRIPTION ("Driver for Atmel Audio Bitstream DAC (ABDAC)")
 
 MODULE_AUTHOR ("Hans-Christian Egtvedt <egtvedt@samfundet.no>")
 

Macro Definition Documentation

#define ATMEL_ABDAC_PM_OPS   NULL

Definition at line 567 of file abdac.c.

#define DAC_BF (   name,
  value 
)
Value:
(((value) & ((1 << DAC_##name##_SIZE) - 1)) \
<< DAC_##name##_OFFSET)

Definition at line 52 of file abdac.c.

#define DAC_BFEXT (   name,
  value 
)
Value:
(((value) >> DAC_##name##_OFFSET) \
& ((1 << DAC_##name##_SIZE) - 1))

Definition at line 55 of file abdac.c.

#define DAC_BFINS (   name,
  value,
  old 
)
Value:
(((old) & ~(((1 << DAC_##name##_SIZE) - 1) \
<< DAC_##name##_OFFSET)) \

Definition at line 58 of file abdac.c.

#define DAC_BIT (   name)    (1 << DAC_##name##_OFFSET)

Definition at line 50 of file abdac.c.

#define DAC_CTRL   0x0008

Definition at line 30 of file abdac.c.

#define DAC_DATA   0x0000

Definition at line 29 of file abdac.c.

#define DAC_EN_OFFSET   31

Definition at line 40 of file abdac.c.

#define DAC_EN_SIZE   1

Definition at line 41 of file abdac.c.

#define DAC_INT_CLR   0x0018

Definition at line 34 of file abdac.c.

#define DAC_INT_DIS   0x0014

Definition at line 33 of file abdac.c.

#define DAC_INT_EN   0x0010

Definition at line 32 of file abdac.c.

#define DAC_INT_MASK   0x000c

Definition at line 31 of file abdac.c.

#define DAC_INT_STATUS   0x001c

Definition at line 35 of file abdac.c.

#define dac_readl (   port,
  reg 
)    __raw_readl((port)->regs + DAC_##reg)

Definition at line 64 of file abdac.c.

#define DAC_SWAP_OFFSET   30

Definition at line 38 of file abdac.c.

#define DAC_SWAP_SIZE   1

Definition at line 39 of file abdac.c.

#define DAC_TX_READY_OFFSET   29

Definition at line 46 of file abdac.c.

#define DAC_TX_READY_SIZE   1

Definition at line 47 of file abdac.c.

#define DAC_UNDERRUN_OFFSET   28

Definition at line 44 of file abdac.c.

#define DAC_UNDERRUN_SIZE   1

Definition at line 45 of file abdac.c.

#define dac_writel (   port,
  reg,
  value 
)    __raw_writel((value), (port)->regs + DAC_##reg)

Definition at line 66 of file abdac.c.

#define get_dac (   card)    ((struct atmel_abdac *)(card)->private_data)

Definition at line 106 of file abdac.c.

#define MAX_NUM_RATES   6

Definition at line 74 of file abdac.c.

#define RATE_MAX   192000

Definition at line 76 of file abdac.c.

#define RATE_MIN   5112

Definition at line 77 of file abdac.c.

Enumeration Type Documentation

anonymous enum
Enumerator:
DMA_READY 

Definition at line 79 of file abdac.c.

Function Documentation

MODULE_AUTHOR ( "Hans-Christian Egtvedt <egtvedt@samfundet.no>"  )
MODULE_DESCRIPTION ( "Driver for Atmel Audio Bitstream DAC (ABDAC)"  )
module_exit ( atmel_abdac_exit  )
module_init ( atmel_abdac_init  )
MODULE_LICENSE ( "GPL"  )