Android7.1 VS Android8.1之音频流输出(八)

1.Android7.1
<1>.frameworks/av/services/audioflinger/AudioFlinger.cpp
sp AudioFlinger::openInput_l(audio_module_handle_t module,...)
{
  status = inHwHal->open_input_stream(inHwHal, *input, devices, &halconfig, &inStream, flags, address.string(), source); 
}

<2>.hardware/rockchip/audio/tinyalsa_hal/audio_hw.c
static int adev_open(const hw_module_t* module, const char* name, hw_device_t** device) 
{
  adev->hw_device.open_input_stream = adev_open_input_stream;
}

<3>.static int adev_open_input_stream(struct audio_hw_device *dev, struct audio_stream_in **stream_in, ....)
{
  *stream_in = &in->stream;
}


2.Android8.1 HIDL
<1>.frameworks/av/services/audioflinger/AudioFlinger.cpp
sp AudioFlinger::openInput_l(audio_module_handle_t module, ...)
{
  status_t status = inHwHal->openInputStream(*input, devices, &halconfig, flags, address.string(

你可能感兴趣的:(Android音频进阶)