Android的Audio系统中定义了一些输入输出设备, 它们是什么意思呢, 今天查了一下资料,查明了大部分,现分列如下:
1. 设备定义: ( /system/core/include/system/audio.h)
// output devices
DEVICE_OUT_EARPIECE = 0x1,
DEVICE_OUT_SPEAKER = 0x2,
DEVICE_OUT_WIRED_HEADSET = 0x4,
DEVICE_OUT_WIRED_HEADPHONE = 0x8,
DEVICE_OUT_BLUETOOTH_SCO = 0x10,
DEVICE_OUT_BLUETOOTH_SCO_HEADSET = 0x20,
DEVICE_OUT_BLUETOOTH_SCO_CARKIT = 0x40,
DEVICE_OUT_BLUETOOTH_A2DP = 0x80,
DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES = 0x100,
DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER = 0x200,
DEVICE_OUT_AUX_DIGITAL = 0x400,
DEVICE_OUT_ANLG_DOCK_HEADSET = 0x800,
DEVICE_OUT_DGTL_DOCK_HEADSET = 0x1000,
DEVICE_OUT_FM_HEADPHONE = 0x800,
DEVICE_OUT_FM_SPEAKER = 0x1000,
DEVICE_OUT_SPEAKER_SSPA2 = 0x2000,
DEVICE_OUT_HDMI = 0x4000,
DEVICE_OUT_FM_TRANSMITTER = 0x8000,
DEVICE_OUT_DEFAULT = 0x8000,
// input devices
DEVICE_IN_COMMUNICATION = 0x10000,
DEVICE_IN_AMBIENT = 0x20000,
DEVICE_IN_BUILTIN_MIC = 0x40000,
DEVICE_IN_BLUETOOTH_SCO_HEADSET = 0x80000,
DEVICE_IN_WIRED_HEADSET = 0x100000,
DEVICE_IN_AUX_DIGITAL = 0x200000,
DEVICE_IN_VOICE_CALL = 0x400000,
DEVICE_IN_BACK_MIC = 0x800000,
DEVICE_IN_VT_MIC = 0x1000000,
DEVICE_IN_FMRADIO = 0x2000000,
DEVICE_IN_DEFAULT = 0x80000000,
DEVICE_OUT_EARPIECE : 听筒
DEVICE_OUT_SPEAKER : 扬声器
DEVICE_OUT_WIRED_HEADSET : 带话筒的耳机
DEVICE_OUT_WIRED_HEADPHONE : 不带话筒的耳机
DEVICE_OUT_BLUETOOTH_SCO : 蓝牙.面向连接(SCO)方式:主要用于话音传输
DEVICE_OUT_BLUETOOTH_SCO_HEADSET : 蓝牙耳机,带话筒
DEVICE_OUT_BLUETOOTH_SCO_CARKIT : 蓝牙车载设备
DEVICE_OUT_BLUETOOTH_A2DP : 蓝牙立体声
DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES: 蓝牙立体声音耳机
DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER : 带话筒的
DEVICE_OUT_AUX_DIGITAL : The audio output device code for S/PDIF or HDMI. S/PDIF的全称是Sony/Philips Digital Interface Format
DEVICE_OUT_ANLG_DOCK_HEADSET : 通过基座连接的模拟有线耳机
DEVICE_OUT_DGTL_DOCK_HEADSET : 通过基座连接的数字有线耳机
DEVICE_OUT_FM_HEADPHONE :
DEVICE_OUT_FM_SPEAKER
DEVICE_OUT_SPEAKER_SSPA2
DEVICE_OUT_HDMI
DEVICE_OUT_FM_TRANSMITTER
2) 蓝牙解析
蓝牙基带技术支持两种连接方式:
面向连接(SCO)方式:主要用于话音传输;
无连接(ACL)方式:主要用于分组数据传输。
A2DP是Advanced Audio Distribution Profile, 是立体声的.
AV只管输出,立体的,没有输入; SCO管通讯,有输出也有接收,但是单声道的
3) 参考资料:
http://zhidao.baidu.com/question/186011381.html
http://zhidao.baidu.com/question/392379495.html
http://auction1.paipai.com/FD51190F00000000007D3A1606AFD424
http://baike.baidu.com/view/551149.htm
3. 输入设备
DEVICE_IN_COMMUNICATION : 手机上的话筒
DEVICE_IN_AMBIENT :
DEVICE_IN_BUILTIN_MIC : 蓝牙麦克
DEVICE_IN_BLUETOOTH_SCO_HEADSET : 蓝牙耳机上的话筒
DEVICE_IN_WIRED_HEADSET : 有线耳机上的话筒
DEVICE_IN_AUX_DIGITAL :
DEVICE_IN_VOICE_CALL :
DEVICE_IN_BACK_MIC :
DEVICE_IN_VT_MIC :
DEVICE_IN_FMRADIO : FM中的输入.
未完待续...