- 1、本文档被系统程序自动判定探测到侵权嫌疑,本站暂时做下架处理。
- 2、如果您确认为侵权,可联系本站左侧在线QQ客服请求删除。我们会保证在24小时内做出处理,应急电话:400-050-0827。
- 3、此文档由网友上传,因疑似侵权的原因,本站不提供该文档下载,只提供部分内容试读。如果您是出版社/作者,看到后可认领文档,您也可以联系本站进行批量认领。
查看更多
wm8960linuxcodec代码,修改过了,支持录音
/*
* wm8960.c -- WM8960 ALSA SoC Audio driver
*
* Copyright 2007-11 Wolfson Microelectronics, plc
*
* Author: Liam Girdwood
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#include linux/module.h
#include linux/moduleparam.h
#include linux/init.h
#include linux/delay.h
#include linux/pm.h
#include linux/i2c.h
#include linux/slab.h
#include sound/core.h
#include sound/pcm.h
#include sound/pcm_params.h
#include sound/soc.h
#include sound/initval.h
#include sound/tlv.h
#include sound/wm8960.h
#include wm8960.h
/* R25 - Power 1 */
#define WM8960_VMID_MASK 0x180
#define WM8960_VREF 0x40
/* R26 - Power 2 */
#define WM8960_PWR2_LOUT1 0x40
#define WM8960_PWR2_ROUT1 0x20
#define WM8960_PWR2_OUT3 0x02
/* R28 - Anti-pop 1 */
#define WM8960_POBCTRL 0x80
#define WM8960_BUFDCOPEN 0x10
#define WM8960_BUFIOEN 0x08
#define WM8960_SOFT_ST 0x04
#define WM8960_HPSTBY 0x01
/* R29 - Anti-pop 2 */
#define WM8960_DISOP 0x40
#define WM8960_DRES_MASK 0x30
/*
* wm8960 register cache
* We cant read the WM8960 register space when we are
* using 2 wire for device control, so we cache them instead.
*/
static const u16 wm8960_reg[WM8960_CACHEREGNUM] = {
0x0097, 0x0097, 0x0000, 0x0000,
0x0000, 0x0008, 0x0000, 0x000a,
0x01c0, 0x0000, 0x00ff, 0x00ff,
0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x007b, 0x0100, 0x0032,
0x0000, 0x00c3, 0x00c3, 0x01c0,
0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000,
0x0100, 0x0100, 0x0050, 0x0050,
0x0050, 0x0050, 0x0000, 0x0000,
0x0000, 0x0000, 0x0040, 0x0000,
0x0000, 0x0050, 0x0050, 0x0000,
0x0002, 0x0037, 0x004d, 0x0080,
0x0008, 0x0031, 0x0026, 0x00e9,
};
struct wm8960_priv {
enum snd_soc_control_type control_type;
int (*set_bias_level)(struct snd_soc_codec *,
enum snd_soc_bias_level level);
struct snd_soc_dapm_widget *lout1;
struct snd_soc_da
您可能关注的文档
- ENetwork_第九章练习答案.doc
- ENetwork_第七章练习答案.doc
- EDA重点.doc
- Excel2000试题库.doc
- Excel2007基础知识.docx
- FDM型精度研究.doc
- ERoutingChapter_第5章.doc
- Fe掺杂ZnO纳米粒子的结构和介电性能.doc
- flash作业.doc
- fpga笔记.docx
- 清新绿色简约励志商务年终年中工作总结述职汇报动态通用模板1.pptx
- 清新绿色简约励志商务年终年中工作总结述职汇报动态通用模板16.pptx
- 简约撕纸百叶窗式旅游相册旅行画册图片商务文化宣传通用模板32.pptx
- 清新绿色简约励志商务年终年中工作总结述职汇报动态通用模板4.pptx
- 简约撕纸百叶窗式旅游相册旅行画册图片商务文化宣传通用模板30.pptx
- 清新绿色简约励志商务年终年中工作总结述职汇报动态通用模板5.pptx
- 简约撕纸百叶窗式旅游相册旅行画册图片商务文化宣传通用模板35.pptx
- 清新绿色简约励志商务年终年中工作总结述职汇报动态通用模板7.pptx
- 简约撕纸百叶窗式旅游相册旅行画册图片商务文化宣传通用模板34.pptx
- 清新绿色简约励志商务年终年中工作总结述职汇报动态通用模板20.pptx
文档评论(0)