资源简介
IIS音频试验
Redhat9
ARMlinux
代码片段和文件信息
/*
* Philips UDA1341 Audio Device Driver for S3C2410 Linux
*
* Copyright (C) 2002 MIZI Research Inc.
*
*/
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#undef DEBUG
#ifdef DEBUG
#define DPRINTK( x... ) printk( ##x )
#else
#define DPRINTK( x... )
#endif
/* UDA1341 Register bits */
#define UDA1341_ADDR 0x14
#define UDA1341_REG_DATA 0x0
#define UDA1341_REG_STATUS 0x2
#define SC_512fs (0x0 << 4)
#define SC_384fs (0x1 << 4)
#define SC_256fs (0x2 << 4)
#define IF_IIS (0x0 << 1)
#define IF_LSB_16 (0x1 << 1)
#define IF_LSB_18 (0x2 << 1)
#define IF_LSB_20 (0x3 << 1)
#define IF_MSB (0x4 << 1)
#define MUTE (0x1 << 2)
#define NO_DE_EMPHASIS (0x10 << 3)
#define DE_EMPHASIS_32 (0x11 << 3)
#define DE_EMPHASIS_441 (0x12 << 3)
#define DE_EMPHASIS_48 (0x13 << 3)
#define GPIO_L3CLOCK (GPIO_MODE_OUT | GPIO_PULLUP_DIS | GPIO_B4)
#define GPIO_L3DATA (GPIO_MODE_OUT | GPIO_PULLUP_DIS | GPIO_B3)
#define GPIO_L3MODE (GPIO_MODE_OUT | GPIO_PULLUP_DIS | GPIO_B2)
#define AUDIO_NAME “UDA1341“
#define AUDIO_NAME_VERBOSE “UDA1341 audio driver“
#define AUDIO_FMT_MASK (AFMT_S16_LE)
#define AUDIO_FMT_DEFAULT (AFMT_S16_LE)
#define AUDIO_CHANNELS_DEFAULT 2
#define AUDIO_RATE_DEFAULT 22050
#define AUDIO_NBFRAGS_DEFAULT 8
#define AUDIO_FRAGSIZE_DEFAULT 8192
#define S_CLOCK_FREQ 384
#define PCM_ABS(a) (a < 0 ? -a : a)
typedef struct {
int size; /* buffer size */
char *start; /* point to actual buffer */
dma_addr_t dma_addr; /* physical buffer address */
struct semaphore sem; /* down before touching the buffer */
int master; /* owner for buffer allocation contain size when true */
} audio_buf_t;
typedef struct {
audio_buf_t *buffers; /* pointer to audio buffer structures */
audio_buf_t *buf; /* current buffer used by read/write */
u_int buf_idx; /* index for the pointer above */
u_int fragsize; /* fragment i.e. buffer size */
u_int nbfrags; /* nbr of fragments */
dmach_t dma_ch; /* DMA channel (channel2 for audio) */
} audio_stream_t;
static audio_stream_t output_stream;
#define NEXT_BUF(_s__b_) { \
(_s_)->_b_##_idx++; \
(_s_)->_b_##_idx %= (_s_)->nbfrags; \
(_s_)->_b_ = (_s_)->buffers + (_s_)->_b_##_idx; }
static u_int audio_rate;
static int audio_channels;
static int audio_fmt;
static u_int audio_fragsize;
static u_int audio_nbfrags;
static int audio_rd_refcount;
static int audio_wr_refcount;
#define audio_active (audio_rd_refcount | audio_wr_refcount)
static int audio_dev_dsp;
static int
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 33792 2010-06-20 13:21 312007080605211尤静嵌入式课程设计\音频驱动移植任务书.doc
文件 172196 2008-04-22 04:00 312007080605211尤静嵌入式课程设计\jk.wav
文件 2860544 2010-06-21 17:44 312007080605211尤静嵌入式课程设计\音频驱动程序移植报告.doc
文件 21050 2010-06-18 09:36 312007080605211尤静嵌入式课程设计\s3c2410-uda1341.c
目录 0 2010-06-20 13:21 312007080605211尤静嵌入式课程设计
----------- --------- ---------- ----- ----
3087582 5
相关资源
- Sed & Awk 2nd edition
- seLinux详解
- 庞丽萍-操作系统原理与Linux系统实验
- linux-sys.zh.pdf
- 老男孩linux
- busybox-1.18.4
- bcm_wireless_dirver_linux
- GEC210 Linux驱动源码
- 君正Linux_开发指南.pdf
- Linux-Arm(嵌入式开发参考).pdf
- GB28181 代码Linux
- Tomcat WEB服务器实战
- linux文件完整性监控的实现
- 实现一个简单的shell命令行解释器,类
- 向Linux内核增加一个系统调用
- Linux操作系统管理课程设计
- Linux系统编程中文版.pdf
- Linux环境下OPC服务端&客户端
- Linux服务器性能调整
- Interprocess.Communications.in.Linux.The.Nooks
- petalinux编译uboot、kernel、rootfs方法
- openssl-1.0.1e-57.el6.x86_64.rpm
- zeromq-2.1.7.tar.gz
- 《Linux+C编程从初学到精通》源码和实
- Linux运维入门到高级全套
- Tiny6410流水灯——在已经启动的ARM L
- 老男孩linux讲义
- yum-3.2.29-40.el6.centos.noarch.rpm和yum-3.2.
- linux操作系统 基于内核模块的进程信
- CRF++-0.58 Linux版本,CRF++安装包
评论
共有 条评论