MT6735平台收听在线音乐有杂音
时间:10-02
整理:3721RD
点击:
[DESCRIPTION]
现象如下:
1、播放在线音乐,出现“得得得”的杂音;
2、开启音控模式后,测试机来电,语音播报有破音。
如果从streamout pcm dump中看到断音的情况,即与该问题相同。
[SOLUTION]
vendor/mediatek/proprietary/platform/mt6735/hardware/audio/aud_drv/AudioALSAStreamOut.cpp
AudioALSAStreamOut::set():
修改
#ifdef mtk_DYNAMIC_CHANGE_HAL_BUFFER_SIZE
mStreamAttributeSource.buffer_size = LOW_power_HAL_BUFFER_SIZE; // TODO(Harvey): Query this
mStreamAttributeSource.latency = (LOW_LATENCY_HAL_BUFFER_SIZE * 1000) /
(mStreamAttributeSource.sample_rate * size_per_frame);
#else
//mStreamAttributeSource.buffer_size = 6144 * 2 * 2; // TODO(Harvey): Query this
mStreamAttributeSource.buffer_size = 8192;
mStreamAttributeSource.latency = (mStreamAttributeSource.buffer_size * 1000) /
(mStreamAttributeSource.sample_rate * size_per_frame);
#endif
为
#ifdef MTK_DYNAMIC_CHANGE_HAL_BUFFER_SIZE
mStreamAttributeSource.buffer_size = LOW_POWER_HAL_BUFFER_SIZE; // TODO(Harvey): Query this
mStreamAttributeSource.latency = (LOW_LATENCY_HAL_BUFFER_SIZE * 1000) /
(mStreamAttributeSource.sample_rate * size_per_frame);
#else
//mStreamAttributeSource.buffer_size = 6144 * 2 * 2; // TODO(Harvey): Query this
mStreamAttributeSource.buffer_size = 8192;
mStreamAttributeSource.latency = (32768 * 1000) / (mStreamAttributeSource.sample_rate *
size_per_frame);
#endif
现象如下:
1、播放在线音乐,出现“得得得”的杂音;
2、开启音控模式后,测试机来电,语音播报有破音。
如果从streamout pcm dump中看到断音的情况,即与该问题相同。
[SOLUTION]
vendor/mediatek/proprietary/platform/mt6735/hardware/audio/aud_drv/AudioALSAStreamOut.cpp
AudioALSAStreamOut::set():
修改
#ifdef mtk_DYNAMIC_CHANGE_HAL_BUFFER_SIZE
mStreamAttributeSource.buffer_size = LOW_power_HAL_BUFFER_SIZE; // TODO(Harvey): Query this
mStreamAttributeSource.latency = (LOW_LATENCY_HAL_BUFFER_SIZE * 1000) /
(mStreamAttributeSource.sample_rate * size_per_frame);
#else
//mStreamAttributeSource.buffer_size = 6144 * 2 * 2; // TODO(Harvey): Query this
mStreamAttributeSource.buffer_size = 8192;
mStreamAttributeSource.latency = (mStreamAttributeSource.buffer_size * 1000) /
(mStreamAttributeSource.sample_rate * size_per_frame);
#endif
为
#ifdef MTK_DYNAMIC_CHANGE_HAL_BUFFER_SIZE
mStreamAttributeSource.buffer_size = LOW_POWER_HAL_BUFFER_SIZE; // TODO(Harvey): Query this
mStreamAttributeSource.latency = (LOW_LATENCY_HAL_BUFFER_SIZE * 1000) /
(mStreamAttributeSource.sample_rate * size_per_frame);
#else
//mStreamAttributeSource.buffer_size = 6144 * 2 * 2; // TODO(Harvey): Query this
mStreamAttributeSource.buffer_size = 8192;
mStreamAttributeSource.latency = (32768 * 1000) / (mStreamAttributeSource.sample_rate *
size_per_frame);
#endif