wm8960linuxcodec代码,修改过了,支持录音.docVIP

wm8960linuxcodec代码,修改过了,支持录音.doc

  1. 1、本文档被系统程序自动判定探测到侵权嫌疑,本站暂时做下架处理。
  2. 2、如果您确认为侵权,可联系本站左侧在线QQ客服请求删除。我们会保证在24小时内做出处理,应急电话:400-050-0827。
  3. 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

文档评论(0)

haihang2017 + 关注
实名认证
文档贡献者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档