Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
sgio2audio.c File Reference
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/spinlock.h>
#include <linux/interrupt.h>
#include <linux/dma-mapping.h>
#include <linux/platform_device.h>
#include <linux/io.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <asm/ip32/ip32_ints.h>
#include <asm/ip32/mace.h>
#include <sound/core.h>
#include <sound/control.h>
#include <sound/pcm.h>
#include <sound/initval.h>
#include <sound/ad1843.h>

Go to the source code of this file.

Data Structures

struct  snd_sgio2audio_chan
 
struct  snd_sgio2audio
 

Macros

#define SNDRV_GET_ID
 
#define AUDIO_CONTROL_RESET   BIT(0) /* 1: reset audio interface */
 
#define AUDIO_CONTROL_CODEC_PRESENT   BIT(1) /* 1: codec detected */
 
#define CODEC_CONTROL_WORD_SHIFT   0
 
#define CODEC_CONTROL_READ   BIT(16)
 
#define CODEC_CONTROL_ADDRESS_SHIFT   17
 
#define CHANNEL_CONTROL_RESET   BIT(10) /* 1: reset channel */
 
#define CHANNEL_DMA_ENABLE   BIT(9) /* 1: enable DMA transfer */
 
#define CHANNEL_INT_THRESHOLD_DISABLED   (0 << 5) /* interrupt disabled */
 
#define CHANNEL_INT_THRESHOLD_25   (1 << 5) /* int on buffer >25% full */
 
#define CHANNEL_INT_THRESHOLD_50   (2 << 5) /* int on buffer >50% full */
 
#define CHANNEL_INT_THRESHOLD_75   (3 << 5) /* int on buffer >75% full */
 
#define CHANNEL_INT_THRESHOLD_EMPTY   (4 << 5) /* int on buffer empty */
 
#define CHANNEL_INT_THRESHOLD_NOT_EMPTY   (5 << 5) /* int on buffer !empty */
 
#define CHANNEL_INT_THRESHOLD_FULL   (6 << 5) /* int on buffer empty */
 
#define CHANNEL_INT_THRESHOLD_NOT_FULL   (7 << 5) /* int on buffer !empty */
 
#define CHANNEL_RING_SHIFT   12
 
#define CHANNEL_RING_SIZE   (1 << CHANNEL_RING_SHIFT)
 
#define CHANNEL_RING_MASK   (CHANNEL_RING_SIZE - 1)
 
#define CHANNEL_LEFT_SHIFT   40
 
#define CHANNEL_RIGHT_SHIFT   8
 

Functions

 MODULE_AUTHOR ("Vivien Chappelier <[email protected]>")
 
 MODULE_DESCRIPTION ("SGI O2 Audio")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_SUPPORTED_DEVICE ("{{Silicon Graphics, O2 Audio}}")
 
 module_param (index, int, 0444)
 
 MODULE_PARM_DESC (index,"Index value for SGI O2 soundcard.")
 
 module_param (id, charp, 0444)
 
 MODULE_PARM_DESC (id,"ID string for SGI O2 soundcard.")
 
 module_platform_driver (sgio2audio_driver)
 

Macro Definition Documentation

#define AUDIO_CONTROL_CODEC_PRESENT   BIT(1) /* 1: codec detected */

Definition at line 61 of file sgio2audio.c.

#define AUDIO_CONTROL_RESET   BIT(0) /* 1: reset audio interface */

Definition at line 60 of file sgio2audio.c.

#define CHANNEL_CONTROL_RESET   BIT(10) /* 1: reset channel */

Definition at line 67 of file sgio2audio.c.

#define CHANNEL_DMA_ENABLE   BIT(9) /* 1: enable DMA transfer */

Definition at line 68 of file sgio2audio.c.

#define CHANNEL_INT_THRESHOLD_25   (1 << 5) /* int on buffer >25% full */

Definition at line 70 of file sgio2audio.c.

#define CHANNEL_INT_THRESHOLD_50   (2 << 5) /* int on buffer >50% full */

Definition at line 71 of file sgio2audio.c.

#define CHANNEL_INT_THRESHOLD_75   (3 << 5) /* int on buffer >75% full */

Definition at line 72 of file sgio2audio.c.

#define CHANNEL_INT_THRESHOLD_DISABLED   (0 << 5) /* interrupt disabled */

Definition at line 69 of file sgio2audio.c.

#define CHANNEL_INT_THRESHOLD_EMPTY   (4 << 5) /* int on buffer empty */

Definition at line 73 of file sgio2audio.c.

#define CHANNEL_INT_THRESHOLD_FULL   (6 << 5) /* int on buffer empty */

Definition at line 75 of file sgio2audio.c.

#define CHANNEL_INT_THRESHOLD_NOT_EMPTY   (5 << 5) /* int on buffer !empty */

Definition at line 74 of file sgio2audio.c.

#define CHANNEL_INT_THRESHOLD_NOT_FULL   (7 << 5) /* int on buffer !empty */

Definition at line 76 of file sgio2audio.c.

#define CHANNEL_LEFT_SHIFT   40

Definition at line 82 of file sgio2audio.c.

#define CHANNEL_RIGHT_SHIFT   8

Definition at line 83 of file sgio2audio.c.

#define CHANNEL_RING_MASK   (CHANNEL_RING_SIZE - 1)

Definition at line 80 of file sgio2audio.c.

#define CHANNEL_RING_SHIFT   12

Definition at line 78 of file sgio2audio.c.

#define CHANNEL_RING_SIZE   (1 << CHANNEL_RING_SHIFT)

Definition at line 79 of file sgio2audio.c.

#define CODEC_CONTROL_ADDRESS_SHIFT   17

Definition at line 65 of file sgio2audio.c.

#define CODEC_CONTROL_READ   BIT(16)

Definition at line 64 of file sgio2audio.c.

#define CODEC_CONTROL_WORD_SHIFT   0

Definition at line 63 of file sgio2audio.c.

#define SNDRV_GET_ID

Definition at line 41 of file sgio2audio.c.

Function Documentation

MODULE_AUTHOR ( "Vivien Chappelier <[email protected]>"  )
MODULE_DESCRIPTION ( "SGI O2 Audio )
MODULE_LICENSE ( "GPL"  )
module_param ( index  ,
int  ,
0444   
)
module_param ( id  ,
charp  ,
0444   
)
MODULE_PARM_DESC ( index  ,
"Index value for SGI O2 soundcard."   
)
MODULE_PARM_DESC ( id  ,
"ID string for SGI O2 soundcard."   
)
module_platform_driver ( sgio2audio_driver  )
MODULE_SUPPORTED_DEVICE ( "{{Silicon Graphics, O2 Audio}}"  )

Variable Documentation

Definition at line 767 of file sgio2audio.c.

int idx

Definition at line 764 of file sgio2audio.c.

int irq

Definition at line 765 of file sgio2audio.c.

irqreturn_t(* isr)(int, void *)

Definition at line 766 of file sgio2audio.c.