Logo Search packages:      
Sourcecode: linux-fsl-imx51 version File versions  Download package

mxc_asrc.c File Reference


Detailed Description

MXC Asynchronous Sample Rate Converter.

Definition in file mxc_asrc.c.

#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/clk.h>
#include <linux/fs.h>
#include <linux/slab.h>
#include <linux/ctype.h>
#include <linux/pagemap.h>
#include <linux/vmalloc.h>
#include <linux/types.h>
#include <linux/version.h>
#include <linux/interrupt.h>
#include <linux/proc_fs.h>
#include <linux/dma-mapping.h>
#include <linux/mxc_asrc.h>
#include <asm/irq.h>
#include <asm/memory.h>
#include <mach/dma.h>

Go to the source code of this file.

Defines

#define AICDA   3
#define AICDB   9
#define AICDC   3
#define AICPA   0
#define AICPB   6
#define AICPC   0
#define AOCDA   15
#define AOCDB   21
#define AOCDC   6
#define AOCPA   12
#define AOCPB   18
#define AOCPC   9
#define ASRC_PROC_PATH   "driver/asrc"
#define ASRC_RATIO_DECIMAL_DEPTH   26

Enumerations

enum  asrc_status {
  ASRC_ASRSTR_AIDEA = 0x01, ASRC_ASRSTR_AIDEB = 0x02, ASRC_ASRSTR_AIDEC = 0x04, ASRC_ASRSTR_AODFA = 0x08,
  ASRC_ASRSTR_AODFB = 0x10, ASRC_ASRSTR_AODFC = 0x20, ASRC_ASRSTR_AOLE = 0x40, ASRC_ASRSTR_FPWT = 0x80,
  ASRC_ASRSTR_AIDUA = 0x100, ASRC_ASRSTR_AIDUB = 0x200, ASRC_ASRSTR_AIDUC = 0x400, ASRC_ASRSTR_AODOA = 0x800,
  ASRC_ASRSTR_AODOB = 0x1000, ASRC_ASRSTR_AODOC = 0x2000, ASRC_ASRSTR_AIOLA = 0x4000, ASRC_ASRSTR_AIOLB = 0x8000,
  ASRC_ASRSTR_AIOLC = 0x10000, ASRC_ASRSTR_AOOLA = 0x20000, ASRC_ASRSTR_AOOLB = 0x40000, ASRC_ASRSTR_AOOLC = 0x80000,
  ASRC_ASRSTR_ATQOL = 0x100000, ASRC_ASRSTR_DSLCNT = 0x200000
}

Functions

int asrc_config_pair (struct asrc_config *config)
static void __exit asrc_exit (void)
static int asrc_get_asrck_clock_divider (int sample_rate)
static int asrc_get_output_buffer_size (int input_buffer_size, int input_sample_rate, int output_sample_rate)
void asrc_get_status (struct asrc_status_flags *flags)
static __init int asrc_init (void)
static void asrc_input_dma_callback (void *data, int error, unsigned int count)
static int asrc_ioctl (struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
static irqreturn_t asrc_isr (int irq, void *dev_id)
 asrc interrupt handler
static void asrc_output_dma_callback (void *data, int error, unsigned int count)
static void asrc_proc_create (void)
static int asrc_read_proc_attr (char *page, char **start, off_t off, int count, int *eof, void *data)
void asrc_release_pair (enum asrc_pair_index index)
int asrc_req_pair (int chn_num, enum asrc_pair_index *index)
static int asrc_set_clock_ratio (enum asrc_pair_index index, int input_sample_rate, int output_sample_rate)
static int asrc_set_process_configuration (enum asrc_pair_index index, int input_sample_rate, int output_sample_rate)
void asrc_start_conv (enum asrc_pair_index index)
void asrc_stop_conv (enum asrc_pair_index index)
static int asrc_write_proc_attr (struct file *file, const char *buffer, unsigned long count, void *data)
 DEFINE_SPINLOCK (output_int_lock)
 DEFINE_SPINLOCK (input_int_lock)
 DEFINE_SPINLOCK (data_lock)
 EXPORT_SYMBOL (asrc_get_status)
 EXPORT_SYMBOL (asrc_stop_conv)
 EXPORT_SYMBOL (asrc_start_conv)
 EXPORT_SYMBOL (asrc_config_pair)
 EXPORT_SYMBOL (asrc_release_pair)
 EXPORT_SYMBOL (asrc_req_pair)
 MODULE_AUTHOR ("Freescale Semiconductor, Inc.")
 MODULE_DESCRIPTION ("Asynchronous Sample Rate Converter")
 module_exit (asrc_exit)
 module_init (asrc_init)
 MODULE_LICENSE ("GPL")
static int mxc_allocate_dma_buf (struct asrc_pair_params *params)
static int mxc_asrc_close (struct inode *inode, struct file *file)
static int mxc_asrc_mmap (struct file *file, struct vm_area_struct *vma)
static int mxc_asrc_open (struct inode *inode, struct file *file)
static int mxc_asrc_probe (struct platform_device *pdev)
static int mxc_asrc_remove (struct platform_device *pdev)
static void mxc_free_dma_buf (struct asrc_pair_params *params)
static int mxc_init_asrc (void)

Variables

static struct class * asrc_class
static const unsigned char asrc_divider_table []
static struct file_operations asrc_fops
static int asrc_major
char * asrc_pair_id []
static const unsigned char asrc_process_table [][8][2]
static unsigned long asrc_vrt_base_addr
static struct asrc_data * g_asrc_data
static struct
mxc_asrc_platform_data * 
mxc_asrc_data
static struct platform_driver mxc_asrc_driver
static struct proc_dir_entry * proc_asrc


Generated by  Doxygen 1.6.0   Back to index