PCM period_size different from before and after setting

cancel
Showing results for 
Search instead for 
Did you mean: 

PCM period_size different from before and after setting

98 Views
Contributor IV

We are working on IMX8QM MEK running on Android 9 auto. Following logs are collected during the BT call.  Here i see that ALSA is trying to set period size to 32 (0x24) but after pcm_open call, period size gets set to 36 (0x24). What could be the reason for this ? How this will impact on audio during the BT Call ?

05-05 05:25:26.727 1813 2009 I audio_hw_primary: prepare bt rx task
05-05 05:25:26.727 1813 2009 D audio_hw_primary: get_card_for_name: name: bt-sai-audio, card: 1
05-05 05:25:26.727 1813 2009 I audio_hw_primary: Period_size: 192, in_rate: 8000, out_rate: 48000, out_period_count: 8
05-05 05:25:26.727 1813 2009 I audio_hw_primary: set pcm_config_sco_in.period_size to 32
05-05 05:25:26.727 1813 2009 I audio_hw_primary: open sco for read, card 1, port 0
05-05 05:25:26.727 1813 2009 I audio_hw_primary: rate 8000, channel 2, period_size 0x20, period_count 8
05-05 05:25:26.733 1813 2009 I audio_hw_primary: after pcm open, rate 8000, channel 2, period_size 0x24, period_count 8

0 Kudos
2 Replies

3 Views
NXP TechSupport
NXP TechSupport

Hi Amit

seems android hal may require that some parameters must be multiples of predefined values

peripheral/alsa/tinyalsa_hal.c - platform/hardware/bsp/freescale - Git at Google 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

3 Views
Contributor IV

Thank you Igor for you reply.

Could you please give a brief about your reply? Which parameters you are referring to ? 

So android hal is requesting to set period_size to 24 but after pcm_open we are getting period_size as 26

So there is difference between what is asked and what we got. How does this impact on the audio ? 

Will it be responsible for noise during the HFP ? 

0 Kudos