AnsweredAssumed Answered

imx6q, help on alsa capture->play audio

Question asked by Angelo Dureghello on Jul 22, 2015
Latest reply on Jul 28, 2015 by jimmychan

Dear all,

 

i am in the need to play some audio, captured from a very similar si476x radio chip, and played with main cs42888 codec or hdmi.

My board is very similar to sabreauto.

 

While piping arecord | aplay from si476x -> cs42888 works fine, piping si476x -> hdmi-imx-soc have issues.

Likely, hdmi is too fast, and after some seconds i get a buffer underrun and hear a small cut.

 

Looking the 2 pcm stream details (si476x capture device and hdmi playing device), i see

 

Hardware PCM card 1 'imx-hdmi-soc' device 0 subdevice 0
Its setup is:
  stream       : PLAYBACK
  access       : RW_INTERLEAVED
  format       : S16_LE
  subformat    : STD
  channels     : 2
  rate         : 44100
  exact rate   : 44100 (44100/1)
  msbits       : 16
  buffer_size  : 6144
  period_size  : 768
  period_time  : 17414
  tstamp_mode  : NONE
  period_step  : 1
  avail_min    : 768
  period_event : 0
  start_threshold  : 2147483647
  stop_threshold   : 6144
  silence_threshold: 0
  silence_size : 0
  boundary     : 1610612736
  appl_ptr     : 0
  hw_ptr       : 0
Hardware PCM card 2 'imx-audio-si4745' device 0 subdevice 0
Its setup is:
  stream       : CAPTURE
  access       : RW_INTERLEAVED
  format       : S16_LE
  subformat    : STD
  channels     : 2
  rate         : 44100
  exact rate   : 44100 (44100/1)
  msbits       : 16
  buffer_size  : 2048
  period_size  : 1024
  period_time  : 23219
  tstamp_mode  : NONE
  period_step  : 1
  avail_min    : 1024
  period_event : 0
  start_threshold  : 2147483647
  stop_threshold   : 2048
  silence_threshold: 0
  silence_size : 0
  boundary     : 1073741824
  appl_ptr     : 0
  hw_ptr       : 0
Starting ...

As you can see, the 2 pcm devices have different period size.

This should means, as seen, that player is faster.

 

One thing i suspect is the fact the fm chip is clocked by 32768 Khz ext ref clock, while hdmi should be clocked from something derived from 24Mhz. Could this be an issue ?

 

thanks

Best regards

angelo

Outcomes