Android 5.1-s5p6818平台音频无输出的问题

在s5p6818平台的Android 5.1系统中,遇到音频无输出的问题,经过与硬件工程师的配合,发现问题是由于新板子移除耳机插孔导致耳机检测引脚电平变化。音频流程涉及NAU8822J解码和AW8733放大。AW8733有四种不同的驱动模式,主要区别在于增益和防破音功能。在排查过程中,找到了驱动文件`nxp-wm8979.c`,并关注到"MCU_HP_DET"引脚的定义。
摘要由CSDN通过智能技术生成


继续6818平台的外设驱动修改,其中音频输出的问题困扰了好几天,一直没有找到原因(按照原DEMO版相同电路相同代码但是新板子上面的音频就是没有输出~),在和硬件工程师的不断沟通当中,不断地思考到底问题在哪里。主要一个难以查找原因的原因是新的硬件把耳机插孔去掉了,但是这个原因似乎就是因为耳机检测的引脚电平和DEMO版的电平不一样导致的(后来证实的确是)。

音频的处理流程大致是系统输出数据流由NAU8822J进行解码,然后通过AW8733进行放大,最后将信号给喇叭。(当然了,这里讲的不是具体的音频系统组成和工作原理,请参考:http://blog.chinaunix.net/xmlrpc.php?r=blog/article&uid=27570663&id=4432842http://www.2cto.com/kf/201409/337057.html等)

根据AW8733 放大器数据手册,驱动是控制模式分为四种,不同点就是分贝不一样以及是否防破音。具体是这样讲的:

AW8733 采用一线脉冲方式控制四个状态,实现不同增益和NCN 模式的选择。状态1 的增益为12dB,没有防破音功能;状态2 的增益为16dB,开启防破音功能;状态3 的增益为24dB,
没有防破音功能;状态4 的增益为27.5dB,开启防破音功能。


首先找到驱动文件以及AW8733驱动的路径:~/kernel/sound/soc/nexell/nxp-wm8979.c。文件代码如下:

/*
 * (C) Copyright 2009
 * jung hyun kim, Nexell Co, <jhkim@nexell.co.kr>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

#include <linux/module.h>
#include <linux/platform_device.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/soc-dai.h>
#include <sound/jack.h>
#include <linux/gpio.h>
#include <mach/platform.h>

#include <
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值