Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
ac97c.c File Reference
#include <linux/init.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/device.h>
#include <linux/delay.h>
#include <linux/mutex.h>
#include <linux/platform_device.h>
#include <linux/suspend.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/initval.h>
#include <sound/soc.h>
#include <asm/mach-au1x00/au1000.h>
#include "psc.h"

Go to the source code of this file.

Macros

#define AC97_CONFIG   0x00
 
#define AC97_STATUS   0x04
 
#define AC97_DATA   0x08
 
#define AC97_CMDRESP   0x0c
 
#define AC97_ENABLE   0x10
 
#define CFG_RC(x)   (((x) & 0x3ff) << 13) /* valid rx slots mask */
 
#define CFG_XS(x)   (((x) & 0x3ff) << 3) /* valid tx slots mask */
 
#define CFG_SG   (1 << 2) /* sync gate */
 
#define CFG_SN   (1 << 1) /* sync control */
 
#define CFG_RS   (1 << 0) /* acrst# control */
 
#define STAT_XU   (1 << 11) /* tx underflow */
 
#define STAT_XO   (1 << 10) /* tx overflow */
 
#define STAT_RU   (1 << 9) /* rx underflow */
 
#define STAT_RO   (1 << 8) /* rx overflow */
 
#define STAT_RD   (1 << 7) /* codec ready */
 
#define STAT_CP   (1 << 6) /* command pending */
 
#define STAT_TE   (1 << 4) /* tx fifo empty */
 
#define STAT_TF   (1 << 3) /* tx fifo full */
 
#define STAT_RE   (1 << 1) /* rx fifo empty */
 
#define STAT_RF   (1 << 0) /* rx fifo full */
 
#define CMD_SET_DATA(x)   (((x) & 0xffff) << 16)
 
#define CMD_GET_DATA(x)   ((x) & 0xffff)
 
#define CMD_READ   (1 << 7)
 
#define CMD_WRITE   (0 << 7)
 
#define CMD_IDX(x)   ((x) & 0x7f)
 
#define EN_D   (1 << 1) /* DISable bit */
 
#define EN_CE   (1 << 0) /* clock enable bit */
 
#define AC97_RW_RETRIES   5
 
#define AC97_RATES   SNDRV_PCM_RATE_CONTINUOUS
 
#define AC97_FMTS   (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S16_BE)
 
#define ac97_to_ctx(x)   ac97c_workdata
 
#define AU1XPSCAC97_PMOPS   NULL
 

Functions

 EXPORT_SYMBOL_GPL (soc_ac97_ops)
 
 module_init (au1xac97c_load)
 
 module_exit (au1xac97c_unload)
 
 MODULE_LICENSE ("GPL")
 
 MODULE_DESCRIPTION ("Au1000/1500/1100 AC97C ASoC driver")
 
 MODULE_AUTHOR ("Manuel Lauss")
 

Variables

struct snd_ac97_bus_ops soc_ac97_ops
 

Macro Definition Documentation

#define AC97_CMDRESP   0x0c

Definition at line 30 of file ac97c.c.

#define AC97_CONFIG   0x00

Definition at line 27 of file ac97c.c.

#define AC97_DATA   0x08

Definition at line 29 of file ac97c.c.

#define AC97_ENABLE   0x10

Definition at line 31 of file ac97c.c.

Definition at line 62 of file ac97c.c.

#define AC97_RATES   SNDRV_PCM_RATE_CONTINUOUS

Definition at line 59 of file ac97c.c.

#define AC97_RW_RETRIES   5

Definition at line 57 of file ac97c.c.

#define AC97_STATUS   0x04

Definition at line 28 of file ac97c.c.

#define ac97_to_ctx (   x)    ac97c_workdata

Definition at line 69 of file ac97c.c.

#define AU1XPSCAC97_PMOPS   NULL

Definition at line 322 of file ac97c.c.

#define CFG_RC (   x)    (((x) & 0x3ff) << 13) /* valid rx slots mask */

Definition at line 33 of file ac97c.c.

#define CFG_RS   (1 << 0) /* acrst# control */

Definition at line 37 of file ac97c.c.

#define CFG_SG   (1 << 2) /* sync gate */

Definition at line 35 of file ac97c.c.

#define CFG_SN   (1 << 1) /* sync control */

Definition at line 36 of file ac97c.c.

#define CFG_XS (   x)    (((x) & 0x3ff) << 3) /* valid tx slots mask */

Definition at line 34 of file ac97c.c.

#define CMD_GET_DATA (   x)    ((x) & 0xffff)

Definition at line 49 of file ac97c.c.

#define CMD_IDX (   x)    ((x) & 0x7f)

Definition at line 52 of file ac97c.c.

#define CMD_READ   (1 << 7)

Definition at line 50 of file ac97c.c.

#define CMD_SET_DATA (   x)    (((x) & 0xffff) << 16)

Definition at line 48 of file ac97c.c.

#define CMD_WRITE   (0 << 7)

Definition at line 51 of file ac97c.c.

#define EN_CE   (1 << 0) /* clock enable bit */

Definition at line 54 of file ac97c.c.

#define EN_D   (1 << 1) /* DISable bit */

Definition at line 53 of file ac97c.c.

#define STAT_CP   (1 << 6) /* command pending */

Definition at line 43 of file ac97c.c.

#define STAT_RD   (1 << 7) /* codec ready */

Definition at line 42 of file ac97c.c.

#define STAT_RE   (1 << 1) /* rx fifo empty */

Definition at line 46 of file ac97c.c.

#define STAT_RF   (1 << 0) /* rx fifo full */

Definition at line 47 of file ac97c.c.

#define STAT_RO   (1 << 8) /* rx overflow */

Definition at line 41 of file ac97c.c.

#define STAT_RU   (1 << 9) /* rx underflow */

Definition at line 40 of file ac97c.c.

#define STAT_TE   (1 << 4) /* tx fifo empty */

Definition at line 44 of file ac97c.c.

#define STAT_TF   (1 << 3) /* tx fifo full */

Definition at line 45 of file ac97c.c.

#define STAT_XO   (1 << 10) /* tx overflow */

Definition at line 39 of file ac97c.c.

#define STAT_XU   (1 << 11) /* tx underflow */

Definition at line 38 of file ac97c.c.

Function Documentation

EXPORT_SYMBOL_GPL ( soc_ac97_ops  )
MODULE_AUTHOR ( "Manuel Lauss"  )
MODULE_DESCRIPTION ( "Au1000/1500/1100 AC97C ASoC driver )
module_exit ( au1xac97c_unload  )
module_init ( au1xac97c_load  )
MODULE_LICENSE ( "GPL"  )

Variable Documentation

struct snd_ac97_bus_ops soc_ac97_ops
Initial value:
= {
.read = au1xac97c_ac97_read,
.write = au1xac97c_ac97_write,
.reset = au1xac97c_ac97_cold_reset,
.warm_reset = au1xac97c_ac97_warm_reset,
}

Definition at line 182 of file ac97c.c.