Android 6.0 There is a beeping sound while playing a video.

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

Android 6.0 There is a beeping sound while playing a video.

1,881 Views
ruei_chang
Contributor III

Hello there,

   I hope you're all doing good. Here I have a weird issue. We porting a wm8962 codec on i.xm6 duallite. We use a UVC camera for snapshot and video recording. And this camera hasn't any DMIC or AMIC.

   We take an Analog MIC to connect the wm8962 for recording audio. I think there is no hardware concern.

   Here is the issue. We use a different kind of Voice Recorder applications to record voice. And Everything is fine. There is no noise or beeping sound while we playback the recording file.

   But after I used a variety of camera applications to film video. Then we can clearly hear there is a beeping sound in my video. It's so weird. I didn't play any audio file while the camera is recording. But the video always has the beeping sound.

   Here I attach a video link for demonstrating this issue.  https://www.dropbox.com/s/tkes68vkcpj5b4g/VID_20190306_050948.mp4?dl=0

  Have you guys met this issue before... This issue totally makes me crazy...

My operating environment: 

 CPU i.mx6 duallite

 OS: Android 6.0 (m6.0.1_2.0.0-ga)

  Kernel : 4.1.15

I also attached my wm8962.c for reference.

Labels (1)
0 Kudos
4 Replies

1,400 Views
minamino22x2
Contributor I

This is also what I want to find and recommend for you about movies and movie apps at cine vision v4 download

0 Kudos

1,731 Views
ruei_chang
Contributor III

Hello there, I hope you're all doing well.

Finally, I fixed this issue up. I personally think this method is informal. But anyway...here is my solution.

I captured two logcats, one is the only audio record, another is video record.

After comparing these two logcats, I found there is a difference between audio record and video record.

logcat of Video record

StagefrightRecorder: setAudioSource: 5
StagefrightRecorder: fix the Audio source
StagefrightRecorder: setVideoSource: 1
StagefrightRecorder: setOutputFormat: 1
StagefrightRecorder: setVideoFrameRate: 30
StagefrightRecorder: setVideoSize: 1280x720
StagefrightRecorder: setParameters: video-param-encoding-bitrate=3000000
StagefrightRecorder: setParameter: key (video-param-encoding-bitrate) => value (3000000)
StagefrightRecorder: setParamVideoEncodingBitRate: 3000000
StagefrightRecorder: setVideoEncoder: 2
StagefrightRecorder: setParameters: audio-param-encoding-bitrate=96000
StagefrightRecorder: setParameter: key (audio-param-encoding-bitrate) => value (96000)
StagefrightRecorder: setParamAudioEncodingBitRate: 96000
StagefrightRecorder: setParameters: audio-param-number-of-channels=1
StagefrightRecorder: setParameter: key (audio-param-number-of-channels) => value (1)
StagefrightRecorder: setParamAudioNumberOfChannels: 1
StagefrightRecorder: setParameters: audio-param-sampling-rate=44100
StagefrightRecorder: setParameter: key (audio-param-sampling-rate) => value (44100)
StagefrightRecorder: setParamAudioSamplingRate: 44100
StagefrightRecorder: setAudioEncoder: 3

logcat of only audio record

StagefrightRecorder: init
StagefrightRecorder: setAudioSource: 1
StagefrightRecorder: fix the Audio source
StagefrightRecorder: setOutputFormat: 1
StagefrightRecorder: setAudioEncoder: 1
StagefrightRecorder: setParameters: audio-param-encoding-bitrate=12200
StagefrightRecorder: setParameter: key (audio-param-encoding-bitrate) => value (12200)
StagefrightRecorder: setParamAudioEncodingBitRate: 12200
StagefrightRecorder: setOutputFile: 36, 0, 0
StagefrightRecorder: start
StagefrightRecorder: prepare
StagefrightRecorder: clipAudioBitRate: encoder 1
StagefrightRecorder: clipAudioSampleRate: encoder 1

As you can see the StagefrightRecorder will set different parameters between audio record and video record.

 

Video record used AUDIO_SOURCE_CAMCORDER and AUDIO_ENCODER_AAC_ELD  parameters.

And audio record used AUDIO_SOURCE_MIC  and AUDIO_ENCODER_AMR_NB.

So I suspected the main bug is here. I tried to set the audio source and audio encoder parameters in AUDIO_SOURCE_MIC and AUDIO_ENCODER_AMR_NB no matter what kind of the application I launched. Then the beeping sound is gone. :smileyhappy: 

This issue can be solved although this method is not the best way. But I'm still not able to understand how come does it happen when I use AUDIO_SOURCE_CAMCORDER  and AUDIO_ENCODER_AAC_ELD.

If there is a good idea or experience, please feel free to let me know. Thank you.

0 Kudos

1,731 Views
igorpadykov
NXP Employee
NXP Employee

Hi RueiChang

one can try to rebuild image from scratch or (if possible) try with Demo Image

Demo Images - SABRE Platform and SABRE Board based on i.MX 6QuadPlus, i.MX 6Quad and i.MX 6DualLite

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

0 Kudos

1,731 Views
ruei_chang
Contributor III

Thank you so much, igorpadykov. I tried to take your advice. But the audio record function in the demo image shows me an internal error message. I can't verify it with the demo image. This is sad...

0 Kudos