I.MX6Q Mic. Recording Problem!!

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

I.MX6Q Mic. Recording Problem!!

4,519 Views
jasonoh
Contributor II

Good Day!

My name is Jason Oh from Korea(South).

I have ported android 7.1.2 successfully to our custom  i.mx6q board.

CPU       : i.MX6Q

OS         : Android 7.1.2 Nougat (N7.1.2_2.0.0, 4.9 kernel)

CODEC : WM8960

When I record microphone, it has recorded normally around 5 seconds, then errors occur.

Could someone help me to fix this problem?

If you need more infomation (schematic, source code, etc..), please tell me!

Thank You!!

*Logcat Output)

0-12 06:52:24.431   277   324 I audio_hw_primary: start_output_stream_primary... -1494403328, device 2
10-12 06:52:24.434   544   644 I MediaFocusControl:  AudioFocus  requestAudioFocus() from uid/pid 10051/1192 clientId=android.media.AudioManager@b96226f req=1 flags=0x0
10-12 06:52:24.460   277   605 W audio_hw_primary: get_input_buffer_size size = 48, channel_count = 1
10-12 06:52:24.461   277   605 W audio_hw_primary: In channels 1, rate 8000, devices 0x80000004
10-12 06:52:24.461   277   605 W audio_hw_primary: get_input_buffer_size size = 48, channel_count = 1
10-12 06:52:24.461   277   605 W audio_hw_primary: get_input_buffer_size size = 48, channel_count = 1
10-12 06:52:24.462   277  1230 I AudioFlinger: AudioFlinger's thread 0xa56833c0 ready to run
10-12 06:52:24.465   285   285 W AudioRecord: Server adjusted notificationFrames from 1024 to 160 for frameCount 2048
10-12 06:52:24.466   285  1231 I MediaPlayerService: MediaPlayerService::getOMX
10-12 06:52:24.467   285  1231 I OMXClient: MuxOMX ctor
10-12 06:52:24.467   282   297 I OMXMaster: makeComponentInstance(OMX.google.amrnb.encoder) in mediacodec process
10-12 06:52:24.470   285  1231 I MediaCodec: MediaCodec will operate in async mode
10-12 06:52:24.472   282   282 E OMXNodeInstance: setConfig(11a0038:google.amrnb.encoder, ConfigPriority(0x6f800002)) ERROR: Undefined(0x80001001)
10-12 06:52:24.472   285  1231 I ACodec  : codec does not support config priority (err -2147483648)
10-12 06:52:24.478   285   285 I MPEG4Writer: limits: 4294967295/0 bytes/us, bit rate: 12200 bps and the estimated moov size 3195 bytes
10-12 06:52:24.479   285  1227 I MediaCodecSource: MediaCodecSource (audio) starting
10-12 06:52:24.709   277   324 W audio_hw_primary: card 0, port 0 device 0x2
10-12 06:52:24.709   277   324 W audio_hw_primary: rate 44100, channel 2 period_size 0xc0
10-12 06:52:24.710   277  1230 W audio_hw_primary: in_set_parameters input_source=1;routing=-2147483644
10-12 06:52:24.711   277  1229 W audio_hw_primary: start_input_stream....
10-12 06:52:24.712   285  1227 I MediaCodecSource: MediaCodecSource (audio) started
10-12 06:52:24.717   277  1229 W audio_hw_primary: card 0, port 0 device 0x4
10-12 06:52:24.717   277  1229 W audio_hw_primary: rate 44100, channel 2 format 0, period_size 0xc0
10-12 06:52:24.726   277   324 W AudioFlinger: write blocked for 295 msecs, 4 delayed writes, thread 0xa6983640
10-12 06:52:24.767   285  1236 I MPEG4Writer: setStartTimestampUs: 9827
10-12 06:52:24.767   285  1236 I MPEG4Writer: Earliest track starting time: 9827
10-12 06:52:27.806   277   324 W audio_hw_primary: do_out_standby... -1494403328
10-12 06:52:43.248   277  1229 E audio_hw_primary: get_next_buffer() pcm_read_wrapper error -1
10-12 06:52:43.248   277  1229 E audio_hw_primary: get_next_buffer() pcm_read_convert error -1
10-12 06:52:43.248   277  1229 W audio_hw_primary: ret -1, pcm read error cannot read stream data: I/O error.
10-12 06:52:43.254   277  1229 E audio_hw_primary: get_next_buffer() pcm_read_wrapper error -16
10-12 06:52:43.254   277  1229 E audio_hw_primary: get_next_buffer() pcm_read_convert error -16
10-12 06:52:43.254   277  1229 W audio_hw_primary: ret -16, pcm read error cannot prepare channel: Device or resource busy.
10-12 06:52:43.260   277  1229 E audio_hw_primary: get_next_buffer() pcm_read_wrapper error -16
10-12 06:52:43.260   277  1229 E audio_hw_primary: get_next_buffer() pcm_read_convert error -16
10-12 06:52:43.260   277  1229 W audio_hw_primary: ret -16, pcm read error cannot prepare channel: Device or resource busy.
10-12 06:52:43.267   277  1229 E audio_hw_primary: get_next_buffer() pcm_read_wrapper error -16
10-12 06:52:43.267   277  1229 E audio_hw_primary: get_next_buffer() pcm_read_convert error -16
10-12 06:52:43.267   277  1229 W audio_hw_primary: ret -16, pcm read error cannot prepare channel: Device or resource busy.
10-12 06:52:43.273   277  1229 E audio_hw_primary: get_next_buffer() pcm_read_wrapper error -16
10-12 06:52:43.273   277  1229 E audio_hw_primary: get_next_buffer() pcm_read_convert error -16
10-12 06:52:43.273   277  1229 W audio_hw_primary: ret -16, pcm read error cannot prepare channel: Device or resource busy.
10-12 06:52:43.279   277  1229 E audio_hw_primary: get_next_buffer() pcm_read_wrapper error -16
10-12 06:52:43.279   277  1229 E audio_hw_primary: get_next_buffer() pcm_read_convert error -16
10-12 06:52:43.279   277  1229 W audio_hw_primary: ret -16, pcm read error cannot prepare channel: Device or resource busy.
10-12 06:52:43.285   277  1229 E audio_hw_primary: get_next_buffer() pcm_read_wrapper error -16
10-12 06:52:43.285   277  1229 E audio_hw_primary: get_next_buffer() pcm_read_convert error -16
10-12 06:52:43.285   277  1229 W audio_hw_primary: ret -16, pcm read error cannot prepare channel: Device or resource busy.
10-12 06:52:43.291   277  1229 E audio_hw_primary: get_next_buffer() pcm_read_wrapper error -16
10-12 06:52:43.291   277  1229 E audio_hw_primary: get_next_buffer() pcm_read_convert error -16
10-12 06:52:43.291   277  1229 W audio_hw_primary: ret -16, pcm read error cannot prepare channel: Device or resource busy.

Labels (5)
0 Kudos
Reply
12 Replies

3,298 Views
ffffff2
Contributor I

Hi Jason,

I meet the same issue. Would you please share your solution with me?

I run android recording application and the error -16 occur.

my e-mail:  tech.win@outlook.com

Thank you so much!

0 Kudos
Reply

3,298 Views
WeiWeiBo
Contributor II

Hi Jason

I meet same question, could you share some useful information with me?

My email: victor851219@gmail.com

really thx

0 Kudos
Reply

3,298 Views
zhouhuafeng
Contributor I

Hi, Jason,

I meet the same issue. Could you share your solution with me? thank you so much!

my e-mail:  huafeng121@126.com

0 Kudos
Reply

3,298 Views
huzehua1985
Contributor I

Hi, Jason,

I meet the same issue. Could you share your solution with me? thank you so much!

my e-mail:  huzehua1985@163.com

I run my own recording APP for several days and the error -16 occur.

0 Kudos
Reply

3,302 Views
jasonoh
Contributor II

Hi bo.li,

This is Jason.

Please check your e-mail.

I hope it helps.

If you need more information, please let me know.

Thank you.

Jason Oh

0 Kudos
Reply

3,302 Views
nxf39234
NXP Employee
NXP Employee

Hi, Jason:

  Could you share your solution with me! Thank you so much!

  My e-mail: yuan.liu_2@nxp.com

BR

Yuan Liu

0 Kudos
Reply

3,302 Views
WeiWeiBo
Contributor II

Hi Ivy

I meet the similar question, could you provide useful information with me

my email: victor851219@gmail.com

really thx

0 Kudos
Reply

3,302 Views
zhouhuafeng
Contributor I

Hi, lvy:

I meet the same issue. Could you share this issue solution with me? thank you.

my e-mail: huafeng121@126.com

0 Kudos
Reply

3,302 Views
jasonoh
Contributor II

This is Jason Oh.

I have solved this issue.

1. S/W : Driver update.

2. H/W : 1 point ECO.

If you have any trouble like this, please tell me.

Thanks everyone.

Jason Oh.

Attached file is my solution.

I hope this help you.

Jason Oh.

0 Kudos
Reply

3,302 Views
cxx2050
Contributor I

Hi, Jason,

I meet the same issue. Could you share your solution with me? Many thanks!

my e-mail: cxx2050@163.com

I run my own recording APP for several days and the error occur.

0 Kudos
Reply

3,302 Views
bo_li
Contributor I

Hi Jason,

I meet the same issue.Could you share your solution with me? Thank you.

0 Kudos
Reply

3,302 Views
igorpadykov
NXP Employee
NXP Employee

Hi Jason

please check Android audio codec porting guide on

How to port new audio codec into Android.doc

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

0 Kudos
Reply