AnsweredAssumed Answered

HFP Noise issue: BCM4356 with imx8qm-mek on Android 9 automotive

Question asked by Amit Kulkarni on Apr 18, 2020
Latest reply on Apr 28, 2020 by Amit Kulkarni

We are working on imx8qm-mek board running with Android 9 automotive. We have integrated BCM4356 and it seems to be working fine. We could successfully run BT_Audio (A2DP). Audio gets played via CS42888 codec. 

However when we tried to make a call we are only getting Noise on the speaker connected to above codec. 

What could be the issue here ?  

Please find below logs. I see that proper sampling is taking place for the audio stream. 

I see that there is one warning for rx and tx threads as pthread_create sched_setscheduler(1, {3}) call failed: Operation not permitted . But at the same time i see that  threads are running successfully. 

Should this be a problem because of which we are getting the noise ?

 

I request you to throw some light here. 

 

04-17 07:00:49.041 1826 2029 D audio_hw_primary: adev_set_parameters: enter: hfp_enable=true
04-17 07:00:49.041 1826 2029 I audio_hw_primary: prepare bt rx task
04-17 07:00:49.041 1826 2029 D audio_hw_primary: get_card_for_name: name: bt-sai-audio, card: 2
04-17 07:00:49.041 1826 2029 I audio_hw_primary: set pcm_config_sco_in.period_size to 32
04-17 07:00:49.041 1826 2029 I audio_hw_primary: open sco for read, card 2, port 0
04-17 07:00:49.041 1826 2029 I audio_hw_primary: rate 8000, channel 2, period_size 0x20, period_count 8
04-17 07:00:49.048 1826 2029 I audio_hw_primary: after pcm open, rate 8000, channel 2, period_size 0x24, period_count 8
04-17 07:00:49.048 1826 2029 I audio_hw_primary: create_resampler rsmpl_sco_rx, in rate 8000, out rate 48000
04-17 07:00:49.049 1838 1936 E display : updateScreen invalid drmfd
04-17 07:00:49.050 1826 2029 W libc : pthread_create sched_setscheduler(1, {3}) call failed: Operation not permitted
04-17 07:00:49.050 1826 2029 I audio_hw_primary: sco_rx_task create ret 0, tid_sco_rx -261097104
04-17 07:00:49.050 1826 2029 I audio_hw_primary: prepare bt tx task
04-17 07:00:49.050 1826 2029 D audio_hw_primary: get_card_for_name: name: bt-sai-audio, card: 2
04-17 07:00:49.050 1826 2029 I audio_hw_primary: open sco for write, card 2, port 0
04-17 07:00:49.050 1826 2029 I audio_hw_primary: rate 8000, channel 2, period_size 0xc0
04-17 07:00:49.050 1826 3718 I audio_hw_primary: enter sco_rx_task, pcm_sco_rx frames 36, szie 144
04-17 07:00:49.050 1826 3718 I audio_hw_primary: SelectPcm, curDev 0x1000000, standby 1, hdmi pcm 0x0, normal pcm 0x0
04-17 07:00:49.050 1826 3718 I audio_hw_primary: SelectPcm, primary output is standy, open it
04-17 07:00:49.050 1826 3718 I audio_hw_primary: start_output_stream_primary... 0xf15d1000, device 16777216, address bus0_media_out, mode 2
04-17 07:00:49.053 1826 2029 W audio_hw_primary: open mic, card 0, port 0
04-17 07:00:49.053 1826 2029 W audio_hw_primary: rate 48000, channel 2, period_size 0x480
04-17 07:00:49.064 1838 1936 E display : updateScreen invalid drmfd
04-17 07:00:49.072 1826 3718 W audio_hw_primary: card 0, port 0 device 0x1000000
04-17 07:00:49.072 1826 3718 W audio_hw_primary: rate 48000, channel 2 period_size 0xc0
04-17 07:00:49.072 1826 2029 I audio_hw_primary: create_resampler rsmpl_sco_tx, in rate 48000, out rate 8000
04-17 07:00:49.073 1826 2029 W libc : pthread_create sched_setscheduler(1, {3}) call failed: Operation not permitted
04-17 07:00:49.073 1826 2029 I audio_hw_primary: sco_tx_task create ret 0, tid_sco_tx -262137488
04-17 07:00:49.073 1826 2029 I audio_hw_primary: sco_task_create, ret 0
04-17 07:00:49.073 1826 2029 D audio_hw_primary: adev_set_parameters: exit with code(0)
04-17 07:00:49.073 1826 3719 I audio_hw_primary: enter sco_tx_task, pcm_cap frames 1152, szie 4608
04-17 07:00:49.075 1965 2381 I MediaFocusControl: requestAudioFocus() from uid/pid 1002/2975 clientId=android.media.AudioManager@e6272de callingPack=com.android.bluetooth req=2 flags=0x0 sdk=28
04-17 07:00:49.076 1826 2029 D audio_hw_primary: adev_set_parameters: enter: hfp_volume=11
04-17 07:00:49.076 1826 2029 D audio_hw_primary: adev_set_parameters: exit with code(0)
04-17 07:00:49.077 1826 3718 V audio_hw_primary: sco_rx_task, resample_from_input, in frames 36, 36, out_frames 384, 216
04-17 07:00:49.078 2195 2472 D CachedBluetoothDevice: onProfileStateChanged: profile HEADSET_CLIENT newProfileState 2
04-17 07:00:49.078 3361 3361 D CachedBluetoothDevice: onProfileStateChanged: profile HEADSET_CLIENT newProfileState 2
04-17 07:00:49.081 1826 3718 V audio_hw_primary: sco_rx_task, resample_from_input, in frames 36, 36, out_frames 384, 216
04-17 07:00:49.090 1826 3718 I chatty : uid=1041(audioserver) HwBinder:1826_2 identical 2 lines
04-17 07:00:49.095 1826 3718 V audio_hw_primary: sco_rx_task, resample_from_input, in frames 36, 36, out_frames 384, 216
04-17 07:00:49.098 1826 3719 V audio_hw_primary: sco_tx_task, resample_from_input, in frames 1152, 1152, out_frames 384, 192
04-17 07:00:49.099 1826 3718 V audio_hw_primary: sco_rx_task, resample_from_input, in frames 36, 36, out_frames 384, 216
04-17 07:00:49.108 1826 3718 I chatty : uid=1041(audioserver) HwBinder:1826_2 identical 2 lines

Outcomes