Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
spdif.c File Reference
#include <linux/clk.h>
#include <linux/io.h>
#include <linux/module.h>
#include <sound/soc.h>
#include <sound/pcm_params.h>
#include <linux/platform_data/asoc-s3c.h>
#include <mach/dma.h>
#include "dma.h"
#include "spdif.h"

Go to the source code of this file.

Data Structures

struct  samsung_spdif_info
 

Macros

#define CLKCON   0x00
 
#define CON   0x04
 
#define BSTAS   0x08
 
#define CSTAS   0x0C
 
#define DATA_OUTBUF   0x10
 
#define DCNT   0x14
 
#define BSTAS_S   0x18
 
#define DCNT_S   0x1C
 
#define CLKCTL_MASK   0x7
 
#define CLKCTL_MCLK_EXT   (0x1 << 2)
 
#define CLKCTL_PWR_ON   (0x1 << 0)
 
#define CON_MASK   0x3ffffff
 
#define CON_FIFO_TH_SHIFT   19
 
#define CON_FIFO_TH_MASK   (0x7 << 19)
 
#define CON_USERDATA_23RDBIT   (0x1 << 12)
 
#define CON_SW_RESET   (0x1 << 5)
 
#define CON_MCLKDIV_MASK   (0x3 << 3)
 
#define CON_MCLKDIV_256FS   (0x0 << 3)
 
#define CON_MCLKDIV_384FS   (0x1 << 3)
 
#define CON_MCLKDIV_512FS   (0x2 << 3)
 
#define CON_PCM_MASK   (0x3 << 1)
 
#define CON_PCM_16BIT   (0x0 << 1)
 
#define CON_PCM_20BIT   (0x1 << 1)
 
#define CON_PCM_24BIT   (0x2 << 1)
 
#define CON_PCM_DATA   (0x1 << 0)
 
#define CSTAS_MASK   0x3fffffff
 
#define CSTAS_SAMP_FREQ_MASK   (0xF << 24)
 
#define CSTAS_SAMP_FREQ_44   (0x0 << 24)
 
#define CSTAS_SAMP_FREQ_48   (0x2 << 24)
 
#define CSTAS_SAMP_FREQ_32   (0x3 << 24)
 
#define CSTAS_SAMP_FREQ_96   (0xA << 24)
 
#define CSTAS_CATEGORY_MASK   (0xFF << 8)
 
#define CSTAS_CATEGORY_CODE_CDP   (0x01 << 8)
 
#define CSTAS_NO_COPYRIGHT   (0x1 << 2)
 
#define spdif_suspend   NULL
 
#define spdif_resume   NULL
 

Functions

 module_platform_driver (samsung_spdif_driver)
 
 MODULE_AUTHOR ("Seungwhan Youn, <[email protected]>")
 
 MODULE_DESCRIPTION ("Samsung S/PDIF Controller Driver")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_ALIAS ("platform:samsung-spdif")
 

Macro Definition Documentation

#define BSTAS   0x08

Definition at line 29 of file spdif.c.

#define BSTAS_S   0x18

Definition at line 33 of file spdif.c.

#define CLKCON   0x00

Definition at line 27 of file spdif.c.

#define CLKCTL_MASK   0x7

Definition at line 36 of file spdif.c.

#define CLKCTL_MCLK_EXT   (0x1 << 2)

Definition at line 37 of file spdif.c.

#define CLKCTL_PWR_ON   (0x1 << 0)

Definition at line 38 of file spdif.c.

#define CON   0x04

Definition at line 28 of file spdif.c.

#define CON_FIFO_TH_MASK   (0x7 << 19)

Definition at line 42 of file spdif.c.

#define CON_FIFO_TH_SHIFT   19

Definition at line 41 of file spdif.c.

#define CON_MASK   0x3ffffff

Definition at line 40 of file spdif.c.

#define CON_MCLKDIV_256FS   (0x0 << 3)

Definition at line 48 of file spdif.c.

#define CON_MCLKDIV_384FS   (0x1 << 3)

Definition at line 49 of file spdif.c.

#define CON_MCLKDIV_512FS   (0x2 << 3)

Definition at line 50 of file spdif.c.

#define CON_MCLKDIV_MASK   (0x3 << 3)

Definition at line 47 of file spdif.c.

#define CON_PCM_16BIT   (0x0 << 1)

Definition at line 53 of file spdif.c.

#define CON_PCM_20BIT   (0x1 << 1)

Definition at line 54 of file spdif.c.

#define CON_PCM_24BIT   (0x2 << 1)

Definition at line 55 of file spdif.c.

#define CON_PCM_DATA   (0x1 << 0)

Definition at line 57 of file spdif.c.

#define CON_PCM_MASK   (0x3 << 1)

Definition at line 52 of file spdif.c.

#define CON_SW_RESET   (0x1 << 5)

Definition at line 45 of file spdif.c.

#define CON_USERDATA_23RDBIT   (0x1 << 12)

Definition at line 43 of file spdif.c.

#define CSTAS   0x0C

Definition at line 30 of file spdif.c.

#define CSTAS_CATEGORY_CODE_CDP   (0x01 << 8)

Definition at line 67 of file spdif.c.

#define CSTAS_CATEGORY_MASK   (0xFF << 8)

Definition at line 66 of file spdif.c.

#define CSTAS_MASK   0x3fffffff

Definition at line 59 of file spdif.c.

#define CSTAS_NO_COPYRIGHT   (0x1 << 2)

Definition at line 69 of file spdif.c.

#define CSTAS_SAMP_FREQ_32   (0x3 << 24)

Definition at line 63 of file spdif.c.

#define CSTAS_SAMP_FREQ_44   (0x0 << 24)

Definition at line 61 of file spdif.c.

#define CSTAS_SAMP_FREQ_48   (0x2 << 24)

Definition at line 62 of file spdif.c.

#define CSTAS_SAMP_FREQ_96   (0xA << 24)

Definition at line 64 of file spdif.c.

#define CSTAS_SAMP_FREQ_MASK   (0xF << 24)

Definition at line 60 of file spdif.c.

#define DATA_OUTBUF   0x10

Definition at line 31 of file spdif.c.

#define DCNT   0x14

Definition at line 32 of file spdif.c.

#define DCNT_S   0x1C

Definition at line 34 of file spdif.c.

#define spdif_resume   NULL

Definition at line 334 of file spdif.c.

#define spdif_suspend   NULL

Definition at line 333 of file spdif.c.

Function Documentation

MODULE_ALIAS ( "platform:samsung-spdif )
MODULE_AUTHOR ( "Seungwhan  Youn,
< sw.youn @samsung.com >"   
)
MODULE_DESCRIPTION ( "Samsung S/PDIF Controller Driver"  )
MODULE_LICENSE ( "GPL"  )
module_platform_driver ( samsung_spdif_driver  )