〖Android〗/system/etc/audio_policy.conf
原文件注释说明:
# audio hardware module section: contains descriptors for all audio hw modules present on the
# device. Each hw module node is named after the corresponding hw module library base name.
# for instance, "primary" corresponds to audio.primary.<device>.so.
# the "primary" module is mandatory and must include at least one output with
# AUDIO_OUTPUT_FLAG_PRIMARY flag.
# Each module descriptor contains one or more output profile descriptors and zero or more
# input profile descriptors. Each profile lists all the parameters supported by a given output
# or input stream category.
# The "channel_masks", "formats", "devices" and "flags" are specified using strings corresponding
# to enums in audio.h and audio_policy.h. They are concatenated by use of "|" without space or "\n".
其中文翻译大致如下(不太精确,勿见怪~~):
音频设备模块部分:描述设备中包含所有音频设备模块。
每个音频设备节点有着相应的设备模块库基本名称;
例如:primary 对应着audio.primary.<devices>.so。
其中,"primary"是必须要有的,而且必须包含至少一个输出 AUDIO_OUTPUT_FLAG_PRIMARY 标志。
每个模块描述元包含一个或多个输出配置描述元和一或多个输入配置描述元。
每个配置通过给定的输出或输入流种类,列出所有支持的参数。
其中"channel_masks"、"formats"、"devices"和"flags"是由audio.h和audio_policy.h中相应的字符串指定的。
它们通过没有空格的"|"或"\n"联系起来。
其他博客的讲解:[Form: http://www.tuicool.com/articles/7J73ae]
不同的Android产品在音频的设计上通常是有差异的,利用配置文件的形式(audio_policy.conf)可以使厂商方便地描述其产品中所包含的音频设备,这个文件的存放路径有两处: #define AUDIO_POLICY_VENDOR_CONFIG_FILE "/vendor/etc/audio_policy.conf" #define AUDIO_POLICY_CONFIG_FILE"/system/etc/audio_policy.conf"
联想K860手机例子:
# Global configuration section: lists input and output devices always present on the device
# as well as the output device selected by default.
# Devices are designated by a string that corresponds to the enum in audio.h global_configuration {
attached_output_devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER
default_output_device AUDIO_DEVICE_OUT_SPEAKER
attached_input_devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_BACK_MIC
} # audio hardware module section: contains descriptors for all audio hw modules present on the
# device. Each hw module node is named after the corresponding hw module library base name.
# for instance, "primary" corresponds to audio.primary.<device>.so.
# the "primary" module is mandatory and must include at least one output with
# AUDIO_OUTPUT_FLAG_PRIMARY flag.
# Each module descriptor contains one or more output profile descriptors and zero or more
# input profile descriptors. Each profile lists all the parameters supported by a given output
# or input stream category.
# The "channel_masks", "formats", "devices" and "flags" are specified using strings corresponding
# to enums in audio.h and audio_policy.h. They are concatenated by use of "|" without space or "\n". audio_hw_modules {
primary {
outputs {
primary {
sampling_rates 48000
channel_masks AUDIO_CHANNEL_OUT_STEREO
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_LINEOUT1|AUDIO_DEVICE_OUT_LINEOUT2|AUDIO_DEVICE_OUT_FM
flags AUDIO_OUTPUT_FLAG_PRIMARY
}
}
inputs {
primary {
sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000
channel_masks AUDIO_CHANNEL_IN_MONO|AUDIO_CHANNEL_IN_STEREO
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET|AUDIO_DEVICE_IN_WIRED_HEADSET|AUDIO_DEVICE_IN_BACK_MIC|AUDIO_DEVICE_IN_LINEIN1|AUDIO_DEVICE_IN_LINEIN2
}
}
}
a2dp {
outputs {
a2dp {
sampling_rates 44100
channel_masks AUDIO_CHANNEL_OUT_STEREO
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_OUT_ALL_A2DP
}
}
}
}
〖Android〗/system/etc/audio_policy.conf的更多相关文章
- 〖Android〗/system/etc/event-log-tags
一博客中,一段的注释的解释:[From: http://blog.csdn.net/hustpzb/article/details/8525324] /** * Access to the syste ...
- 〖Android〗/system/etc/media_codecs.xml
其中的原文件中包含的注释如下: <?xml version="1.0" encoding="utf-8" ?> <!-- Copyright ...
- 〖Android〗/system/etc/recovery-resource.dat
源代码中的解释:[platform_build/tools/releasetools/ota_from_target_files] # Recovery is generated as a patch ...
- 〖Android〗/system/etc/fallback_fonts.xml
<?xml version="1.0" encoding="utf-8"?> <!-- Fallback Fonts This file sp ...
- 〖Android〗Android源代码所有目录生成的Target(编译生成文件反查)
=> build/tools/zipalign: out/host/linux-x86/bin/zipalign (host) => build/tools/atree: out/host ...
- 〖Android〗快速部署SSHD和Bash Shell(程序:DroidSSHD和BetterTerminalEmulatorPro)
--此文仅做个人配置记录-- 因为我经常需要sshd来连接设备,它抓取logcat日志太方便了,方便排查问题,及多人共享: 及有USB孔限制的人来说,这个更具有意义: 把超级终端增强包部署到内网,也是 ...
- 〖Android〗巧用/system/etc/mkshrc文件,把busybox常用命令映射(链接)出来;
在/system/etc/mkshrc文中尾部添加以下代码即可: # for busybox for n in $(busybox --list) do eval alias $n=\'busybox ...
- 〖Android〗查找Android中的/system/lib中增加的lib文件是否在apk文件中
#!/bin/bash - #=============================================================================== # # F ...
- 〖Android〗arm-linux-androideabi-gdb报 libpython2.6.so.1.0: cannot open shared object file错误的解决方法
执行: prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-gdb out/target/p ...
随机推荐
- 使用C#中的out关键字,用世界杯演绎
今年的世界杯好看至极,充满着故事性.戏剧性.无论你平常踢不踢球,也不管你是否懂球,你总能从中获得些许的情感释放.世界杯似乎超越了足球本身,成为世界各地人们的"情感总和",一场场比赛 ...
- TCP半连接和syn攻击(转)
TCP半连接和syn攻击 转载 2014年04月06日 21:36:10 4243 摘自:http://blog.sina.com.cn/s/blog_54b5ea250100g2r8.html SY ...
- Spring初始化完成后直接执行一个方法,初始化数据(解决方法被重复执行两次的情况)
在做WEB项目时,经常在项目第一次启动时利用WEB容器的监听.Servlet加载初始化等切入点为数据库准备数据,这些初始化数据 是系统开始运行前必须的数据,例如权限组.系统选项.默认管理员等等.但是项 ...
- jsondataobjects
jsondataobjects GITHUB: https://github.com/ahausladen/jsondataobjects.git 跨平台JSON库 Json Data Objects ...
- 基于非比較的排序:计数排序(countSort),桶排序(bucketSort),基数排序(radixSort)
计数排序 条件:要排序的数组的元素必须是在一定范围的,比方是1~100.在排序之前我们必须知道数组元素的范围. 思路:顾名思义:就是用一个数组来计数的. 步骤: 1.用一个数组来计数count[ ], ...
- jsp数据库连接大全和数据库操作封装到Javabean
一.jsp连接Oracle8/8i/9i数据库(用thin模式) testOracle.jsp如下: <%@ page contentType="text/html;charset=g ...
- 页面中checkbox返回的是一个数组,如何对数组进行操作
1. 仅仅利用javascript进行操作: //html代码如下: <form action="#" method="POST" onsubmit=&q ...
- Dom4j学习笔记
一.Loading XML Data 以下代码从File中或一个URL中读取一个XML文件,并产生一个Document对象.一个Document对象表示了内存中的一棵XML树,可以在这个XML树中进行 ...
- 在windows上搭建C语言开发环境——借助eclipse和MinGW
0. 前言 [本文目的] 近期在电脑上又一次安装了MinGW,发现MinGW的安装方法和之前的方法稍有差别,全部再写了一篇博文记录一下具体的安装方法. [本文主要内容] ...
- 《OpenStack部署实践》
<OpenStack部署实践> 基本信息 作者: 张子凡 丛书名: 图灵原创 出版社:人民邮电出版社 ISBN:9787115346797 上架时间:2014-2-27 出版日期:2014 ...