HFP AUDIO routing in IMX8MP phytec Board on Android 11 PLATFORM using WM8960 codec

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

HFP AUDIO routing in IMX8MP phytec Board on Android 11 PLATFORM using WM8960 codec

1,028 Views
surya45
Contributor II

Specs:

BOARD :IMX8mp-phyboard-pollux

BT controller : RTL2288B (realtek)

Hi Nxp Community,

Im working on HFP bluetooth profile. Enabling hfp in overlays layer. and making the device voice capable in framework layer is done . but coming to audio i couldn't here any audio from device. when i checked for logs i could see that pcm cards created from wm8960 audio codec doesn't have support_hfp variable is set to 0. so as to get support for hfp we added btsco node in dts. so pcm cards created this time have support for hfp but later during invokation of SCO_TASK_CREATE in TinyALSA layer.

get_card_for_device is failed so pcm_open and output stream is also failed.

NOTE : we only have either BTSCO node or WM8960 codec node. at once as we pass sound-dai = <&sai2>; only for both nodes. only the first mentioned node is mapped.

 

 

errors in log:

01-30 10:47:47.128 376 439 D audio_hw_primary: adev_set_parameters: enter: hfp_set_sampling_rate=16000
01-30 10:47:47.128 376 439 I audio_hw_primary: hfp_set_sampling_rate, 16000
01-30 10:47:47.128 376 439 D audio_hw_primary: adev_set_parameters: exit with code(0)
01-30 10:47:47.129 376 439 D audio_hw_primary: adev_set_parameters: enter: hfp_enable=true
01-30 10:47:47.130 376 439 I audio_hw_primary: prepare bt rx task
01-30 10:47:47.130 376 439 D audio_hw_primary: HFP DEBUG: card list: 0
01-30 10:47:47.130 376 439 D audio_hw_primary: HFP DEBUG: support hfp: 1
01-30 10:47:47.130 376 439 D audio_hw_primary: HFP DEBUG: card list: 0
01-30 10:47:47.130 376 439 D audio_hw_primary: HFP DEBUG: support hfp: 1
01-30 10:47:47.130 376 439 D audio_hw_primary: get_card_for_hfp: card: 0
01-30 10:47:47.130 376 439 I audio_hw_primary: set pcm_config_sco_in.period_size to 64
01-30 10:47:47.130 376 439 I audio_hw_primary: open sco for read, card 0, port 0
01-30 10:47:47.130 376 439 I audio_hw_primary: rate 16000, channel 1, period_size 0x40, period_count 8
01-30 10:47:47.135 376 439 I audio_hw_primary: after pcm open, rate 16000, channel 1, period_size 0x40, period_count 8
01-30 10:47:47.139 376 439 I audio_hw_primary: create_resampler rsmpl_sco_rx, in rate 16000, out rate 48000
01-30 10:47:47.141 376 439 W libc : pthread_create sched_setscheduler(1, {3}) call failed: Operation not permitted
01-30 10:47:47.141 376 439 I audio_hw_primary: sco_rx_task create ret 0, tid_sco_rx -207371840
01-30 10:47:47.141 376 2411 I audio_hw_primary: enter sco_rx_task, pcm_sco_rx frames 64, szie 128
01-30 10:47:47.141 376 439 I audio_hw_primary: prepare bt tx task
01-30 10:47:47.141 376 2411 I audio_hw_primary: sco_rx_task: primary output is standy, open it
01-30 10:47:47.141 376 439 D audio_hw_primary: HFP DEBUG: card list: 0
01-30 10:47:47.141 376 2411 I audio_hw_primary: start_output_stream: primary: 1, out: 0xf40c6730, device: 2, address: , mode: 0, flags 0x2
01-30 10:47:47.141 376 439 D audio_hw_primary: HFP DEBUG: support hfp: 1
01-30 10:47:47.141 376 2411 I audio_hw_primary: select_output_device(), headphone 0 ,headset 0 ,speaker 2
01-30 10:47:47.141 376 2411 D audio_hw_primary: start_output_stream: pcm_open: out->device: 2, card: -1, pcm_device_id: 0, rate: 48000, channel: 2, format: 0, period_size: 0xc0, flag: 9
01-30 10:47:47.141 376 2411 E audio_hw_primary: start_output_stream: Invalid PCM card id: -1
01-30 10:47:47.141 376 439 D audio_hw_primary: HFP DEBUG: card list: 0
01-30 10:47:47.141 376 2411 E audio_hw_primary: sco_rx_task: start_output_stream failed, ret -22
01-30 10:47:47.141 376 2411 E audio_hw_primary: sco_rx_task, out_pcm is null
01-30 10:47:47.141 376 2411 I audio_hw_primary: leave sco_rx_task

 

attching full log and dtsi file.

can you please share your experience and support to crossing this challenge.

IMX8MPLUS

@igorpadykov @vinothkumars  @sungwon-kim @sandeshgowda 

@fasilyousaf@aravinthkumarja@anabait @diegoadrian @AlanZhang @pravverma 

0 Kudos
Reply
3 Replies

879 Views
surya45
Contributor II

Hi BookerE1,

the links you pasted here are some of the question asked by me. this posts didnt resolve the challenge im facing.can you help here @BookerE1 

0 Kudos
Reply

867 Views
JorgeCas
NXP TechSupport
NXP TechSupport

Hello, I hope you are doing well.

HFP configuration is described on UM11558 application note.

If this does not work for your design I suggest you contact Phythec to see if additional configuration is needed.

Best regards.

0 Kudos
Reply

861 Views
surya45
Contributor II

hi @JorgeCas ,

the document you provided helps in testing hfp not for enabling or routing audio. thankyou anyways

0 Kudos
Reply