Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
cs4231.c File Reference
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/delay.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/moduleparam.h>
#include <linux/irq.h>
#include <linux/io.h>
#include <linux/of.h>
#include <linux/of_device.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/info.h>
#include <sound/control.h>
#include <sound/timer.h>
#include <sound/initval.h>
#include <sound/pcm_params.h>
#include <sound/cs4231-regs.h>

Go to the source code of this file.

Data Structures

struct  cs4231_dma_control
 
struct  snd_cs4231
 

Macros

#define CS4231_FLAG_EBUS   0x00000001
 
#define CS4231_FLAG_PLAYBACK   0x00000002
 
#define CS4231_FLAG_CAPTURE   0x00000004
 
#define CS4231_MODE_NONE   0x0000
 
#define CS4231_MODE_PLAY   0x0001
 
#define CS4231_MODE_RECORD   0x0002
 
#define CS4231_MODE_TIMER   0x0004
 
#define CS4231_MODE_OPEN
 
#define CS4231U(chip, x)   ((chip)->port + ((c_d_c_CS4231##x) << 2))
 
#define APCCSR   0x10UL /* APC DMA CSR */
 
#define APCCVA   0x20UL /* APC Capture DMA Address */
 
#define APCCC   0x24UL /* APC Capture Count */
 
#define APCCNVA   0x28UL /* APC Capture DMA Next Address */
 
#define APCCNC   0x2cUL /* APC Capture Next Count */
 
#define APCPVA   0x30UL /* APC Play DMA Address */
 
#define APCPC   0x34UL /* APC Play Count */
 
#define APCPNVA   0x38UL /* APC Play DMA Next Address */
 
#define APCPNC   0x3cUL /* APC Play Next Count */
 
#define APCVA   0x0UL /* APC DMA Address */
 
#define APCC   0x4UL /* APC Count */
 
#define APCNVA   0x8UL /* APC DMA Next Address */
 
#define APCNC   0xcUL /* APC Next Count */
 
#define APC_PLAY   0x30UL /* Play registers start at 0x30 */
 
#define APC_RECORD   0x20UL /* Record registers start at 0x20 */
 
#define APC_INT_PENDING   0x800000 /* Interrupt Pending */
 
#define APC_PLAY_INT   0x400000 /* Playback interrupt */
 
#define APC_CAPT_INT   0x200000 /* Capture interrupt */
 
#define APC_GENL_INT   0x100000 /* General interrupt */
 
#define APC_XINT_ENA   0x80000 /* General ext int. enable */
 
#define APC_XINT_PLAY   0x40000 /* Playback ext intr */
 
#define APC_XINT_CAPT   0x20000 /* Capture ext intr */
 
#define APC_XINT_GENL   0x10000 /* Error ext intr */
 
#define APC_XINT_EMPT   0x8000 /* Pipe empty interrupt (0 write to pva) */
 
#define APC_XINT_PEMP   0x4000 /* Play pipe empty (pva and pnva not set) */
 
#define APC_XINT_PNVA   0x2000 /* Playback NVA dirty */
 
#define APC_XINT_PENA   0x1000 /* play pipe empty Int enable */
 
#define APC_XINT_COVF   0x800 /* Cap data dropped on floor */
 
#define APC_XINT_CNVA   0x400 /* Capture NVA dirty */
 
#define APC_XINT_CEMP   0x200 /* Capture pipe empty (cva and cnva not set) */
 
#define APC_XINT_CENA   0x100 /* Cap. pipe empty int enable */
 
#define APC_PPAUSE   0x80 /* Pause the play DMA */
 
#define APC_CPAUSE   0x40 /* Pause the capture DMA */
 
#define APC_CDC_RESET   0x20 /* CODEC RESET */
 
#define APC_PDMA_READY   0x08 /* Play DMA Go */
 
#define APC_CDMA_READY   0x04 /* Capture DMA Go */
 
#define APC_CHIP_RESET   0x01 /* Reset the chip */
 
#define EBDMA_CSR   0x00UL /* Control/Status */
 
#define EBDMA_ADDR   0x04UL /* DMA Address */
 
#define EBDMA_COUNT   0x08UL /* DMA Count */
 
#define CS4231_SINGLE(xname, xindex, reg, shift, mask, invert)
 
#define CS4231_DOUBLE(xname, xindex, left_reg, right_reg, shift_left, shift_right, mask, invert)
 

Functions

 module_param_array (index, int, NULL, 0444)
 
 MODULE_PARM_DESC (index,"Index value for Sun CS4231 soundcard.")
 
 module_param_array (id, charp, NULL, 0444)
 
 MODULE_PARM_DESC (id,"ID string for Sun CS4231 soundcard.")
 
 module_param_array (enable, bool, NULL, 0444)
 
 MODULE_PARM_DESC (enable,"Enable Sun CS4231 soundcard.")
 
 MODULE_AUTHOR ("Jaroslav Kysela, Derrick J. Brashear and David S. Miller")
 
 MODULE_DESCRIPTION ("Sun CS4231")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_SUPPORTED_DEVICE ("{{Sun,CS4231}}")
 
 MODULE_DEVICE_TABLE (of, cs4231_match)
 
 module_platform_driver (cs4231_driver)
 

Macro Definition Documentation

#define APC_CAPT_INT   0x200000 /* Capture interrupt */

Definition at line 155 of file cs4231.c.

#define APC_CDC_RESET   0x20 /* CODEC RESET */

Definition at line 171 of file cs4231.c.

#define APC_CDMA_READY   0x04 /* Capture DMA Go */

Definition at line 173 of file cs4231.c.

#define APC_CHIP_RESET   0x01 /* Reset the chip */

Definition at line 174 of file cs4231.c.

#define APC_CPAUSE   0x40 /* Pause the capture DMA */

Definition at line 170 of file cs4231.c.

#define APC_GENL_INT   0x100000 /* General interrupt */

Definition at line 156 of file cs4231.c.

#define APC_INT_PENDING   0x800000 /* Interrupt Pending */

Definition at line 153 of file cs4231.c.

#define APC_PDMA_READY   0x08 /* Play DMA Go */

Definition at line 172 of file cs4231.c.

#define APC_PLAY   0x30UL /* Play registers start at 0x30 */

Definition at line 148 of file cs4231.c.

#define APC_PLAY_INT   0x400000 /* Playback interrupt */

Definition at line 154 of file cs4231.c.

#define APC_PPAUSE   0x80 /* Pause the play DMA */

Definition at line 169 of file cs4231.c.

#define APC_RECORD   0x20UL /* Record registers start at 0x20 */

Definition at line 149 of file cs4231.c.

#define APC_XINT_CAPT   0x20000 /* Capture ext intr */

Definition at line 159 of file cs4231.c.

#define APC_XINT_CEMP   0x200 /* Capture pipe empty (cva and cnva not set) */

Definition at line 167 of file cs4231.c.

#define APC_XINT_CENA   0x100 /* Cap. pipe empty int enable */

Definition at line 168 of file cs4231.c.

#define APC_XINT_CNVA   0x400 /* Capture NVA dirty */

Definition at line 166 of file cs4231.c.

#define APC_XINT_COVF   0x800 /* Cap data dropped on floor */

Definition at line 165 of file cs4231.c.

#define APC_XINT_EMPT   0x8000 /* Pipe empty interrupt (0 write to pva) */

Definition at line 161 of file cs4231.c.

#define APC_XINT_ENA   0x80000 /* General ext int. enable */

Definition at line 157 of file cs4231.c.

#define APC_XINT_GENL   0x10000 /* Error ext intr */

Definition at line 160 of file cs4231.c.

#define APC_XINT_PEMP   0x4000 /* Play pipe empty (pva and pnva not set) */

Definition at line 162 of file cs4231.c.

#define APC_XINT_PENA   0x1000 /* play pipe empty Int enable */

Definition at line 164 of file cs4231.c.

#define APC_XINT_PLAY   0x40000 /* Playback ext intr */

Definition at line 158 of file cs4231.c.

#define APC_XINT_PNVA   0x2000 /* Playback NVA dirty */

Definition at line 163 of file cs4231.c.

#define APCC   0x4UL /* APC Count */

Definition at line 145 of file cs4231.c.

#define APCCC   0x24UL /* APC Capture Count */

Definition at line 134 of file cs4231.c.

#define APCCNC   0x2cUL /* APC Capture Next Count */

Definition at line 136 of file cs4231.c.

#define APCCNVA   0x28UL /* APC Capture DMA Next Address */

Definition at line 135 of file cs4231.c.

#define APCCSR   0x10UL /* APC DMA CSR */

Definition at line 132 of file cs4231.c.

#define APCCVA   0x20UL /* APC Capture DMA Address */

Definition at line 133 of file cs4231.c.

#define APCNC   0xcUL /* APC Next Count */

Definition at line 147 of file cs4231.c.

#define APCNVA   0x8UL /* APC DMA Next Address */

Definition at line 146 of file cs4231.c.

#define APCPC   0x34UL /* APC Play Count */

Definition at line 138 of file cs4231.c.

#define APCPNC   0x3cUL /* APC Play Next Count */

Definition at line 140 of file cs4231.c.

#define APCPNVA   0x38UL /* APC Play DMA Next Address */

Definition at line 139 of file cs4231.c.

#define APCPVA   0x30UL /* APC Play DMA Address */

Definition at line 137 of file cs4231.c.

#define APCVA   0x0UL /* APC DMA Address */

Definition at line 144 of file cs4231.c.

#define CS4231_DOUBLE (   xname,
  xindex,
  left_reg,
  right_reg,
  shift_left,
  shift_right,
  mask,
  invert 
)
Value:
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), .index = (xindex), \
.info = snd_cs4231_info_double, \
.get = snd_cs4231_get_double, .put = snd_cs4231_put_double, \
.private_value = (left_reg) | ((right_reg) << 8) | ((shift_left) << 16) | \
((shift_right) << 19) | ((mask) << 24) | ((invert) << 22) }

Definition at line 1493 of file cs4231.c.

#define CS4231_FLAG_CAPTURE   0x00000004

Definition at line 90 of file cs4231.c.

#define CS4231_FLAG_EBUS   0x00000001

Definition at line 88 of file cs4231.c.

#define CS4231_FLAG_PLAYBACK   0x00000002

Definition at line 89 of file cs4231.c.

#define CS4231_MODE_NONE   0x0000

Definition at line 101 of file cs4231.c.

#define CS4231_MODE_OPEN
Value:
CS4231_MODE_TIMER)

Definition at line 105 of file cs4231.c.

#define CS4231_MODE_PLAY   0x0001

Definition at line 102 of file cs4231.c.

#define CS4231_MODE_RECORD   0x0002

Definition at line 103 of file cs4231.c.

#define CS4231_MODE_TIMER   0x0004

Definition at line 104 of file cs4231.c.

#define CS4231_SINGLE (   xname,
  xindex,
  reg,
  shift,
  mask,
  invert 
)
Value:
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), .index = (xindex), \
.info = snd_cs4231_info_single, \
.get = snd_cs4231_get_single, .put = snd_cs4231_put_single, \
.private_value = (reg) | ((shift) << 8) | ((mask) << 16) | ((invert) << 24) }

Definition at line 1487 of file cs4231.c.

#define CS4231U (   chip,
  x 
)    ((chip)->port + ((c_d_c_CS4231##x) << 2))

Definition at line 128 of file cs4231.c.

#define EBDMA_ADDR   0x04UL /* DMA Address */

Definition at line 179 of file cs4231.c.

#define EBDMA_COUNT   0x08UL /* DMA Count */

Definition at line 180 of file cs4231.c.

#define EBDMA_CSR   0x00UL /* Control/Status */

Definition at line 178 of file cs4231.c.

Function Documentation

MODULE_AUTHOR ( "Jaroslav  Kysela,
Derrick J.Brashear and David S.Miller"   
)
MODULE_DESCRIPTION ( "Sun CS4231 )
MODULE_DEVICE_TABLE ( of  ,
cs4231_match   
)
MODULE_LICENSE ( "GPL"  )
module_param_array ( index  ,
int  ,
NULL  ,
0444   
)
module_param_array ( id  ,
charp  ,
NULL  ,
0444   
)
module_param_array ( enable  ,
bool  ,
NULL  ,
0444   
)
MODULE_PARM_DESC ( index  ,
"Index value for Sun CS4231 soundcard."   
)
MODULE_PARM_DESC ( id  ,
"ID string for Sun CS4231 soundcard."   
)
MODULE_PARM_DESC ( enable  ,
"Enable Sun CS4231 soundcard."   
)
module_platform_driver ( cs4231_driver  )
MODULE_SUPPORTED_DEVICE ( "{{Sun,CS4231}}"  )