Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check AudioCapabilities channel count for passthrough mode #4690

Closed
bounmed opened this issue Aug 20, 2018 · 16 comments
Closed

Check AudioCapabilities channel count for passthrough mode #4690

bounmed opened this issue Aug 20, 2018 · 16 comments
Assignees

Comments

@bounmed
Copy link

bounmed commented Aug 20, 2018

Hi i'm getting this error when playing a movie.
The issue i get in some videos and not in others.

logcat ```

08-13 18:04:25.683 14114 14114 D EventLogger: videoEnabled [478.91]
08-13 18:04:25.686 14114 14114 D EventLogger: audioEnabled [478.92]
08-13 18:04:25.711 14114 14114 D EventLogger: Tracks [
08-13 18:04:25.711 14114 14114 D EventLogger: Renderer:0 [
08-13 18:04:25.711 14114 14114 D EventLogger: Group:0, adaptive_supported=N/A [
08-13 18:04:25.713 14114 14114 D EventLogger: [X] Track:0, id=0, mimeType=video/avc, bitrate=2325464, res=1280x720, supported=YES
08-13 18:04:25.713 14114 14114 D EventLogger: ]
08-13 18:04:25.713 14114 14114 D EventLogger: ]
08-13 18:04:25.713 14114 14114 D EventLogger: Renderer:2 [
08-13 18:04:25.713 14114 14114 D EventLogger: Group:0, adaptive_supported=N/A [
08-13 18:04:25.713 14114 14114 D EventLogger: [ ] Track:0, id=1/129, mimeType=audio/ac3, channels=6, sample_rate=48000, supported=YES
08-13 18:04:25.713 14114 14114 D EventLogger: ]
08-13 18:04:25.713 14114 14114 D EventLogger: Group:1, adaptive_supported=N/A [
08-13 18:04:25.713 14114 14114 D EventLogger: [X] Track:0, id=Français, mimeType=audio/ac3, channels=6, sample_rate=48000, language=fr, supported=YES
08-13 18:04:25.713 14114 14114 D EventLogger: ]
08-13 18:04:25.713 14114 14114 D EventLogger: Group:2, adaptive_supported=N/A [
08-13 18:04:25.713 14114 14114 D EventLogger: [ ] Track:0, id=English, mimeType=audio/ac3, channels=6, sample_rate=48000, language=en, supported=YES
08-13 18:04:25.713 14114 14114 D EventLogger: ]
08-13 18:04:25.713 14114 14114 D EventLogger: ]
08-13 18:04:25.713 14114 14114 D EventLogger: Renderer:4 [
08-13 18:04:25.713 14114 14114 D EventLogger: Group:0, adaptive_supported=N/A [
08-13 18:04:25.713 14114 14114 D EventLogger: [ ] Track:0, id=1/8219, mimeType=application/cea-608, supported=YES
08-13 18:04:25.713 14114 14114 D EventLogger: ]
08-13 18:04:25.714 14114 14114 D EventLogger: Group:1, adaptive_supported=N/A [
08-13 18:04:25.714 14114 14114 D EventLogger: [X] Track:0, id=Français, mimeType=text/vtt, language=fr, supported=YES
08-13 18:04:25.714 14114 14114 D EventLogger: ]
08-13 18:04:25.714 14114 14114 D EventLogger: ]
08-13 18:04:25.714 14114 14114 D EventLogger: Renderer:5 [
08-13 18:04:25.714 14114 14114 D EventLogger: Group:0, adaptive_supported=N/A [
08-13 18:04:25.714 14114 14114 D EventLogger: [X] Track:0, id=1/21, mimeType=application/id3, supported=YES
08-13 18:04:25.714 14114 14114 D EventLogger: ]
08-13 18:04:25.714 14114 14114 D EventLogger: Group:1, adaptive_supported=N/A [
08-13 18:04:25.714 14114 14114 D EventLogger: [ ] Track:0, id=1/21, mimeType=application/id3, supported=YES
08-13 18:04:25.714 14114 14114 D EventLogger: ]
08-13 18:04:25.714 14114 14114 D EventLogger: Group:2, adaptive_supported=N/A [
08-13 18:04:25.714 14114 14114 D EventLogger: [ ] Track:0, id=1/21, mimeType=application/id3, supported=YES
08-13 18:04:25.714 14114 14114 D EventLogger: ]
08-13 18:04:25.714 14114 14114 D EventLogger: ]
08-13 18:04:25.714 14114 14114 D EventLogger: ]
08-13 18:04:25.727 4066 4610 I MediaPlayerService: MediaPlayerService::getOMX
08-13 18:04:25.728 14114 15512 I OMXClient: MuxOMX ctor
08-13 18:04:25.732 4063 4063 I OMXMaster: makeComponentInstance(OMX.amlogic.avc.decoder.awesome) in mediacodec process
08-13 18:04:25.733 4063 4063 D OmxComponentManagerImpl: support frame mode
08-13 18:04:25.733 4063 4063 D OmxComponentManagerImpl: getEntryByName_2_num=0, componentName:OMX.amlogic.avc.decoder.awesome
08-13 18:04:25.733 4063 4063 V AmlogicVideoDecoderAwesome: AmlogicVideoDecoder:72 >
08-13 18:04:25.733 4063 4063 V AmlogicVideoDecoderAwesome: initializeState_l:1102 >
08-13 18:04:25.733 4063 4063 V AmlogicVideoDecoderAwesome: media.omx.latency is not set used def=1.000000
08-13 18:04:25.733 4063 4063 D AmlogicVideoDecoderAwesome: mCheckDvesDone = 1, mForceOpenDv=0
08-13 18:04:25.733 4063 4063 W OmxLogConf: Can not read property media.omx.log_levels, using 0
08-13 18:04:25.734 4063 4063 D OmxVideoDecoder: multi dec exist
08-13 18:04:25.734 4063 4063 D OmxVideoDecoder: Use frame mode for multidec.
08-13 18:04:25.734 4063 4063 D OmxVideoDecoder: Use min out buffer size
08-13 18:04:25.734 4063 4063 D OmxComponentManagerImpl: IncreaseEntryNumByName pEntry->mNum=0, pEntry->mMaxNum:9,componentName:OMX.amlogic.avc.decoder.awesome
08-13 18:04:25.734 4063 4063 I omx_core: OMX_getHandle_num=1
08-13 18:04:25.734 4063 4063 D OmxComponent: mApkName=/proc/14114/cmdline
08-13 18:04:25.743 14114 15511 I MediaCodec: [OMX.amlogic.avc.decoder.awesome] setting surface generation to 14452739
08-13 18:04:25.744 4063 4074 D OmxVideoDecoder: setParameter 631 0x1000017
08-13 18:04:25.745 14114 15512 D ACodec_amlogic: query systemComposer 1
08-13 18:04:25.745 4063 5179 D OmxComponent: getExtensionIndex 1099 name="OMX.google.android.index.storeANWBufferInMetadata"
08-13 18:04:25.746 4063 5179 D OmxComponent: getExtensionIndex 1099 name="OMX.google.android.index.storeMetaDataInBuffers"
08-13 18:04:25.746 4063 5179 D OmxVideoDecoder: setParameter 631 0x7f000002
08-13 18:04:25.746 4063 5179 D OmxVideoDecoder: setParameter 1054 OMX_IndexAndroidStoreMetadataInBuffers
08-13 18:04:25.746 4063 5179 E OMXNodeInstance: setParameter(fdf0083:amlogic.avc.decoder.awesome, OMX.google.android.index.storeMetaDataInBuffers(0x7f000002): Output:1 en=1 type=1) ERROR: BadPortIndex(0x8000101b)
08-13 18:04:25.746 14114 15512 E ACodec : [OMX.amlogic.avc.decoder.awesome] storeMetaDataInBuffers failed w/ err -2147483648
08-13 18:04:25.751 4063 5135 D OmxComponent: getExtensionIndex 1099 name="OMX.google.android.index.prepareForAdaptivePlayback"
08-13 18:04:25.751 4063 5135 D OmxVideoDecoder: setParameter 631 0x7f000004
08-13 18:04:25.751 4063 5135 D OmxVideoDecoder: setParameter 1068 OMX_IndexAndroidPrepareForAdaptivePlayback
08-13 18:04:25.751 4063 5135 D OmxVideoDecoder: AdaptivePlayback: max resolution is 1280 * 720
08-13 18:04:25.752 4063 4522 D OmxVideoDecoder: setParameter 631 0x6000001
08-13 18:04:25.752 4063 4522 D OmxVideoDecoder: setParameter nPortIndex 0 CompFmt 0x7 ColorFmt 0
08-13 18:04:25.756 4063 5150 D OmxVideoDecoder: setParameter 631 0x6000001
08-13 18:04:25.756 4063 5150 D OmxVideoDecoder: setParameter nPortIndex 1 CompFmt 0 ColorFmt 0x15
08-13 18:04:25.759 4063 13475 D OmxVideoDecoder: setParameter 631 0x2000001
08-13 18:04:25.759 4063 13475 D OmxVideoDecoder: newBufferCount = 3, outWidth=1280, outHeight=720
08-13 18:04:25.759 4063 13475 D OmxVideoDecoder: setParameter nPortIndex 0 nFrameWidth 1280 nFrameHeight 720 nSliceHeight 16
08-13 18:04:25.761 4063 4063 V OmxVideoDecoder: mUseNativeBuffers 0
08-13 18:04:25.762 4063 5179 D OmxVideoDecoder: setParameter 631 0x2000001
08-13 18:04:25.762 4063 5179 D OmxVideoDecoder: newBufferCount = 4, outWidth=1280, outHeight=720
08-13 18:04:25.762 4063 5179 D OmxVideoDecoder: setParameter mUseNativeBuffers=0
08-13 18:04:25.762 4063 5179 W OmxVideoDecoder: Can not read property media.omx.display_mode
08-13 18:04:25.762 4063 5179 D OmxVideoDecoder: setParameter nPortIndex 1 nFrameWidth 1280 nFrameHeight 720 nSliceHeight 720
08-13 18:04:25.762 4063 5179 V OmxVideoDecoder: mUseNativeBuffers 0
08-13 18:04:25.763 4063 5135 D OmxComponent: getExtensionIndex 1099 name="OMX.google.android.index.describeColorAspects"
08-13 18:04:25.763 4063 4546 D OmxComponent: getExtensionIndex 1099 name="OMX.google.android.index.describeHDRStaticInfo"
08-13 18:04:25.764 4063 5114 D OmxComponent: getExtensionIndex 1099 name="OMX.google.android.index.storeMetaDataInBuffers"
08-13 18:04:25.764 4063 5114 D OmxComponent: getExtensionIndex 1099 name="OMX.google.android.index.storeANWBufferInMetadata"
08-13 18:04:25.764 4063 5114 D OmxComponent: getExtensionIndex 1099 name="OMX.google.android.index.prepareForAdaptivePlayback"
08-13 18:04:25.764 4063 5114 D OmxComponent: getExtensionIndex 1099 name="OMX.google.android.index.configureVideoTunnelMode"
08-13 18:04:25.764 4063 5114 D OmxComponent: getExtensionIndex 1099 name="OMX.google.android.index.useAndroidNativeBuffer2"
08-13 18:04:25.764 4063 5114 D OmxComponent: getExtensionIndex 1099 name="OMX.google.android.index.useAndroidNativeBuffer"
08-13 18:04:25.764 4063 5114 D OmxComponent: getExtensionIndex 1099 name="OMX.google.android.index.enableAndroidNativeBuffers"
08-13 18:04:25.764 4063 5114 D OmxComponent: getExtensionIndex 1099 name="OMX.google.android.index.allocateNativeHandle"
08-13 18:04:25.764 4063 5114 D OmxComponent: getExtensionIndex 1099 name="OMX.google.android.index.getAndroidNativeBufferUsage"
08-13 18:04:25.765 4063 5114 D OmxVideoDecoder: setConfig 1376 0x7f000009
08-13 18:04:25.765 4063 5114 D OmxVideoDecoder: HDRStaticInfo: R=0 0; G=0 0; B=0 0; W=0 0; MaxDisplayLuminance:0, MinDisplayLuminance=0, mMaxContentLightLevel=0, MaxContentLightLevel=0
08-13 18:04:25.765 4063 5114 D OmxVideoDecoder: HDRStaticInfo: all parmeter is 0, set mHasHDRStaticInfo to false
08-13 18:04:25.766 4063 4522 D OmxComponent: getExtensionIndex 1099 name="OMX.google.android.index.enableAndroidNativeBuffers"
08-13 18:04:25.766 4063 4522 D OmxVideoDecoder: setParameter 631 0x7f000000
08-13 18:04:25.766 4063 4522 V OmxVideoDecoder: setParameter 1048 EnableNativeBuffers 1
08-13 18:04:25.766 4063 4522 V OmxVideoDecoder: mUseNativeBuffers 1
08-13 18:04:25.766 4063 4522 D AmlogicVideoDecoderAwesome: get native buffer info NV:w:1280,h:720..
08-13 18:04:25.766 4063 4522 V OmxVideoDecoder: updatePort:portDef.format.video.nFrameWidth=1280,portDef.format.video.nFrameHeight=720
08-13 18:04:25.770 4063 5134 D OmxVideoDecoder: setConfig 1376 0x6f800002
08-13 18:04:25.770 4063 5134 V OmxVideoDecoder: setConfig 1448 nIndex 0x6f800002
08-13 18:04:25.770 4063 5134 D OmxComponent: setConfig 1092
08-13 18:04:25.770 4063 5134 E OMXNodeInstance: setConfig(fdf0083:amlogic.avc.decoder.awesome, ConfigPriority(0x6f800002)) ERROR: UnsupportedIndex(0x8000101a)
08-13 18:04:25.771 14114 15512 I ACodec : codec does not support config priority (err -1010)
08-13 18:04:25.774 4063 13475 V OmxVideoDecoder: mUseNativeBuffers 1
08-13 18:04:25.775 4063 13475 D AmlogicVideoDecoderAwesome: get native buffer info NV:w:1280,h:720..
08-13 18:04:25.775 4063 13475 V OmxVideoDecoder: updatePort:portDef.format.video.nFrameWidth=1280,portDef.format.video.nFrameHeight=720
08-13 18:04:25.776 4063 5150 D OmxVideoDecoder: getConfig 1300 0x700000f
08-13 18:04:25.776 4063 5150 D OmxVideoDecoder: getConfig 1303 nIndex 0x700000f
08-13 18:04:25.776 4063 5150 D OmxVideoDecoder: getConfig OMX_IndexConfigCommonOutputCrop pRect->nWidth=1280, pRect->nHeight=720
08-13 18:04:25.777 4063 5179 D OmxVideoDecoder: getConfig 1300 0x7f000009
08-13 18:04:25.781 4063 15513 I OmxComponent: OMX_CommandStateSet 716 Cmd 0 nParam1 0x2
08-13 18:04:25.781 4063 15513 I OmxComponent: STATE_SET: OMX_StateLoaded => OMX_StateIdle : OMX.amlogic.avc.decoder.awesome
08-13 18:04:25.781 4063 15513 I OmxComponent: STATE_TRANS: OMX_StateLoaded => OMX_StateIdle : OMX.amlogic.avc.decoder.awesome
08-13 18:04:25.785 4063 15513 I OmxComponent: STATE_TRANS: OMX_StateLoaded => OMX_StateIdle : OMX.amlogic.avc.decoder.awesome
08-13 18:04:25.785 4063 15513 I OmxComponent: STATE_TRANS: OMX_StateLoaded => OMX_StateIdle : OMX.amlogic.avc.decoder.awesome
08-13 18:04:25.786 4063 15513 I OmxComponent: STATE_TRANS: OMX_StateLoaded => OMX_StateIdle : OMX.amlogic.avc.decoder.awesome
08-13 18:04:25.787 4063 5133 V OmxVideoDecoder: mUseNativeBuffers 1
08-13 18:04:25.787 4063 5133 D AmlogicVideoDecoderAwesome: get native buffer info NV:w:1280,h:720..
08-13 18:04:25.787 4063 5133 V OmxVideoDecoder: updatePort:portDef.format.video.nFrameWidth=1280,portDef.format.video.nFrameHeight=720
08-13 18:04:25.788 4063 5134 V OmxVideoDecoder: mUseNativeBuffers 1
08-13 18:04:25.788 4063 5134 D AmlogicVideoDecoderAwesome: get native buffer info NV:w:1280,h:720..
08-13 18:04:25.789 4063 5134 V OmxVideoDecoder: updatePort:portDef.format.video.nFrameWidth=1280,portDef.format.video.nFrameHeight=720
08-13 18:04:25.789 4063 4063 D OmxComponent: getExtensionIndex 1099 name="OMX.google.android.index.getAndroidNativeBufferUsage"
08-13 18:04:25.794 14114 15512 D SurfaceUtils: set up nativeWindow 0xc1acd808 for 1280x720, color 0x11, rotation 0, usage 0x2002900
08-13 18:04:25.796 4063 5150 D OmxVideoDecoder: setParameter 631 0x2000001
08-13 18:04:25.796 4063 5150 D OmxVideoDecoder: newBufferCount = 8, outWidth=1280, outHeight=720
08-13 18:04:25.797 4063 5150 E OmxVideoDecoder: set output error, new BufferCountActual = 8
08-13 18:04:25.797 4063 5150 E OMXNodeInstance: setParameter(fdf0083:amlogic.avc.decoder.awesome, ParamPortDefinition(0x2000001)) ERROR: UnsupportedSetting(0x80001019)
08-13 18:04:25.797 14114 15512 W ACodec : [OMX.amlogic.avc.decoder.awesome] setting nBufferCountActual to 8 failed: -1010
08-13 18:04:25.798 4063 5179 D OmxVideoDecoder: setParameter 631 0x2000001
08-13 18:04:25.798 4063 5179 D OmxVideoDecoder: newBufferCount = 7, outWidth=1280, outHeight=720
08-13 18:04:25.798 4063 5179 E OmxVideoDecoder: set output error, new BufferCountActual = 7
08-13 18:04:25.798 4063 5179 E OMXNodeInstance: setParameter(fdf0083:amlogic.avc.decoder.awesome, ParamPortDefinition(0x2000001)) ERROR: UnsupportedSetting(0x80001019)
08-13 18:04:25.799 14114 15512 W ACodec : [OMX.amlogic.avc.decoder.awesome] setting nBufferCountActual to 7 failed: -1010
08-13 18:04:25.799 4063 4546 D OmxVideoDecoder: setParameter 631 0x2000001
08-13 18:04:25.799 4063 4546 D OmxVideoDecoder: newBufferCount = 6, outWidth=1280, outHeight=720
08-13 18:04:25.799 4063 4546 D OmxVideoDecoder: setParameter mUseNativeBuffers=1
08-13 18:04:25.799 4063 4546 W OmxVideoDecoder: Can not read property media.omx.display_mode
08-13 18:04:25.799 4063 4546 D OmxVideoDecoder: setParameter nPortIndex 1 nFrameWidth 1280 nFrameHeight 720 nSliceHeight 720
08-13 18:04:25.799 4063 4546 V OmxVideoDecoder: mUseNativeBuffers 1
08-13 18:04:25.799 4063 4546 D AmlogicVideoDecoderAwesome: get native buffer info NV:w:1280,h:720..
08-13 18:04:25.800 4063 4546 V OmxVideoDecoder: updatePort:portDef.format.video.nFrameWidth=1280,portDef.format.video.nFrameHeight=720
08-13 18:04:25.801 4045 4431 E ion : ioctl c0144900 failed with code -1: Out of memory
08-13 18:04:25.809 4063 4074 D OmxComponent: getExtensionIndex 1099 name="OMX.google.android.index.useAndroidNativeBuffer2"
08-13 18:04:25.809 4063 4074 V OmxVideoDecoder: mUseNativeBuffers 1
08-13 18:04:25.809 4063 4074 D AmlogicVideoDecoderAwesome: get native buffer info NV:w:1280,h:720..
08-13 18:04:25.810 4063 4074 V OmxVideoDecoder: updatePort:portDef.format.video.nFrameWidth=1280,portDef.format.video.nFrameHeight=720
08-13 18:04:25.810 4063 15513 I OmxComponent: STATE_TRANS: OMX_StateLoaded => OMX_StateIdle : OMX.amlogic.avc.decoder.awesome
08-13 18:04:25.811 4045 4368 E ion : ioctl c0144900 failed with code -1: Out of memory
08-13 18:04:25.817 4063 4522 D OmxComponent: getExtensionIndex 1099 name="OMX.google.android.index.useAndroidNativeBuffer2"
08-13 18:04:25.817 4063 4522 V OmxVideoDecoder: mUseNativeBuffers 1
08-13 18:04:25.817 4063 4522 D AmlogicVideoDecoderAwesome: get native buffer info NV:w:1280,h:720..
08-13 18:04:25.817 4063 4522 V OmxVideoDecoder: updatePort:portDef.format.video.nFrameWidth=1280,portDef.format.video.nFrameHeight=720
08-13 18:04:25.818 4063 15513 I OmxComponent: STATE_TRANS: OMX_StateLoaded => OMX_StateIdle : OMX.amlogic.avc.decoder.awesome
08-13 18:04:25.818 4045 4369 E ion : ioctl c0144900 failed with code -1: Out of memory
08-13 18:04:25.826 4063 5133 D OmxComponent: getExtensionIndex 1099 name="OMX.google.android.index.useAndroidNativeBuffer2"
08-13 18:04:25.826 4063 5133 V OmxVideoDecoder: mUseNativeBuffers 1
08-13 18:04:25.826 4063 5133 D AmlogicVideoDecoderAwesome: get native buffer info NV:w:1280,h:720..
08-13 18:04:25.826 4063 5133 V OmxVideoDecoder: updatePort:portDef.format.video.nFrameWidth=1280,portDef.format.video.nFrameHeight=720
08-13 18:04:25.826 4063 15513 I OmxComponent: STATE_TRANS: OMX_StateLoaded => OMX_StateIdle : OMX.amlogic.avc.decoder.awesome
08-13 18:04:25.827 4045 4369 E ion : ioctl c0144900 failed with code -1: Out of memory
08-13 18:04:25.831 4063 13475 D OmxComponent: getExtensionIndex 1099 name="OMX.google.android.index.useAndroidNativeBuffer2"
08-13 18:04:25.831 4063 13475 V OmxVideoDecoder: mUseNativeBuffers 1
08-13 18:04:25.831 4063 13475 D AmlogicVideoDecoderAwesome: get native buffer info NV:w:1280,h:720..
08-13 18:04:25.831 4063 13475 V OmxVideoDecoder: updatePort:portDef.format.video.nFrameWidth=1280,portDef.format.video.nFrameHeight=720
08-13 18:04:25.831 4063 15513 I OmxComponent: STATE_TRANS: OMX_StateLoaded => OMX_StateIdle : OMX.amlogic.avc.decoder.awesome
08-13 18:04:25.832 4045 4369 E ion : ioctl c0144900 failed with code -1: Out of memory
08-13 18:04:25.845 4063 5135 D OmxComponent: getExtensionIndex 1099 name="OMX.google.android.index.useAndroidNativeBuffer2"
08-13 18:04:25.845 4063 5135 V OmxVideoDecoder: mUseNativeBuffers 1
08-13 18:04:25.845 4063 5135 D AmlogicVideoDecoderAwesome: get native buffer info NV:w:1280,h:720..
08-13 18:04:25.845 4063 5135 V OmxVideoDecoder: updatePort:portDef.format.video.nFrameWidth=1280,portDef.format.video.nFrameHeight=720
08-13 18:04:25.845 4063 15513 I OmxComponent: STATE_TRANS: OMX_StateLoaded => OMX_StateIdle : OMX.amlogic.avc.decoder.awesome
08-13 18:04:25.846 4045 4368 E ion : ioctl c0144900 failed with code -1: Out of memory
08-13 18:04:25.861 4063 5134 D OmxComponent: getExtensionIndex 1099 name="OMX.google.android.index.useAndroidNativeBuffer2"
08-13 18:04:25.861 4063 5134 V OmxVideoDecoder: mUseNativeBuffers 1
08-13 18:04:25.861 4063 5134 D AmlogicVideoDecoderAwesome: get native buffer info NV:w:1280,h:720..
08-13 18:04:25.861 4063 5134 V OmxVideoDecoder: updatePort:portDef.format.video.nFrameWidth=1280,portDef.format.video.nFrameHeight=720
08-13 18:04:25.861 4063 15513 I OmxComponent: STATE_TRANS: OMX_StateLoaded => OMX_StateIdle : OMX.amlogic.avc.decoder.awesome
08-13 18:04:25.861 4063 15513 V AmlogicVideoDecoderAwesome: acquireResources:276 >
08-13 18:04:25.861 4063 15513 D AmlogicVideoDecoderAwesome: setUp mVideoDisplay =0, mDisplayMode=0
08-13 18:04:25.861 4063 15513 V AmlogicVideoDecoderAwesome: enable osd or video ...0
08-13 18:04:25.861 4063 15513 D AmlogicVideoDecoderAwesome: mDoubleWriteMode 16
08-13 18:04:25.861 4063 15513 V AmlogicVideoDecoderAwesome: get video layer sync version error, ret =-1
08-13 18:04:25.862 4063 15513 I AmlogicVideoDecoderAwesome: video layer sync version is 1
08-13 18:04:25.862 4063 15513 V debugSetup: media.omx.dumpRecv is disabled
08-13 18:04:25.862 4063 15513 V debugSetup: media.omx.dumpCodec is disabled
08-13 18:04:25.862 4063 15513 V AmlogicVideoDecoderAwesome: *Input Frame Rate is 0..
08-13 18:04:25.862 4063 15513 V AmlogicVideoDecoderAwesome: videoDefine.xFramerate:0
08-13 18:04:25.862 4063 15513 D AmlogicVideoDecoderAwesome: decoder_type = 1
08-13 18:04:25.862 4063 15513 D AmlogicVideoDecoderAwesome: AmlogicVideoDecoder::setUp, mUseFrameMode 1, video_path 0
08-13 18:04:25.862 4063 15513 D AmlogicVideoDecoderAwesome: alloc ION Video device instance ID:0
08-13 18:04:25.869 14114 14114 D EventLogger: videoDecoderInitialized [479.10, OMX.amlogic.avc.decoder.awesome]
08-13 18:04:25.872 14114 14114 D EventLogger: videoFormatChanged [479.10, id=1/27, mimeType=video/avc, res=1280x720]
08-13 18:04:25.884 4066 8305 I MediaPlayerService: MediaPlayerService::getOMX
08-13 18:04:25.888 14114 15517 I OMXClient: MuxOMX ctor
08-13 18:04:25.893 4063 15513 V AmlogicVideoDecoderAwesome: mFlvFlag=0
08-13 18:04:25.893 4063 15513 V AmlogicVideoDecoderAwesome: mOutBufferCount =6
08-13 18:04:25.893 4063 15513 V AmlogicVideoDecoderAwesome: mIsNativeBuffers =1
08-13 18:04:25.893 4063 15513 D AmlogicVideoDecoderAwesome: mAmvideoDev->use_frame_mode=0
08-13 18:04:25.893 4063 15513 D AmlogicVideoDecoderAwesome: mAmvideoDev->use_frame_mode=1, mUseFrameMode=1
08-13 18:04:25.894 4063 15513 I amvdec : amvideo_init ret=0
08-13 18:04:25.894 4063 15513 D AmlogicVideoDecoderAwesome: output buffer:mWidth:1280, mHeight:720, mVideoDevId:0
08-13 18:04:25.895 4063 15513 I OmxComponent: STATE_DONE: OMX_StateLoaded => OMX_StateIdle : OMX.amlogic.avc.decoder.awesome
08-13 18:04:25.899 4063 5150 I OMXMaster: makeComponentInstance(OMX.google.raw.decoder) in mediacodec process
08-13 18:04:25.903 4063 15513 I OmxComponent: OMX_CommandStateSet 716 Cmd 0 nParam1 0x3
08-13 18:04:25.903 4063 15513 I OmxComponent: STATE_SET: OMX_StateIdle => OMX_StateExecuting : OMX.amlogic.avc.decoder.awesome
08-13 18:04:25.903 4063 15513 V AmlogicVideoDecoderAwesome: prepare:212 >
08-13 18:04:25.903 4063 15513 D AmlogicVideoDecoderAwesome: mVideo mDisplayTread start
08-13 18:04:25.903 4063 15513 D AmlogicVideoDecoderAwesome: mDTaskStatus=0
08-13 18:04:25.904 4063 15513 V AmlogicVideoDecoderAwesome: start:225 >
08-13 18:04:25.905 4063 15513 D AmlogicVideoDecoderAwesome: mVideo start
08-13 18:04:25.905 4063 15513 I OmxComponent: STATE_TRANS: OMX_StateIdle => OMX_StateExecuting : OMX.amlogic.avc.decoder.awesome
08-13 18:04:25.905 4063 15513 I OmxComponent: STATE_DONE: OMX_StateIdle => OMX_StateExecuting : OMX.amlogic.avc.decoder.awesome
08-13 18:04:25.907 4063 15522 V OMX_WorkerPeer: hardware/amlogic/omx/omx_framework/WorkerPeer.cpp:runWorkerStatic:152 --------------------
08-13 18:04:25.907 4063 15522 V OMX_WorkerPeer: hardware/amlogic/omx/omx_framework/WorkerPeer.cpp:runWorker:158 --------------------
08-13 18:04:25.914 4063 15522 V AmlogicVideoDecoderAwesome: doCodecSpec csd_len=31
08-13 18:04:25.916 4063 15522 V AmlogicVideoDecoderAwesome: doCodecSpec csd_len=10
08-13 18:04:25.918 4063 4074 E OMXNodeInstance: setConfig(fdf0084:google.raw.decoder, ConfigPriority(0x6f800002)) ERROR: Undefined(0x80001001)
08-13 18:04:25.919 14114 15517 I ACodec : codec does not support config priority (err -2147483648)
08-13 18:04:25.939 14114 14114 D EventLogger: audioDecoderInitialized [479.17, OMX.google.raw.decoder]
08-13 18:04:25.940 14114 14114 D EventLogger: audioFormatChanged [479.17, id=1/129, mimeType=audio/ac3, channels=6, sample_rate=48000]
08-13 18:04:25.955 4063 15522 D AmlogicVideoDecoderAwesome: =7, =1280, =720, =1280, =720, =83433, =250433, =166433, =995, =47, =44
08-13 18:04:25.998 4057 4645 W APM_AudioPolicyManager: getOutput() could not find output for stream 3, samplingRate 48000,format 150994944, channels 3f, flags 1
08-13 18:04:25.999 14114 14299 E AudioTrack: Could not get audio output for session 601, stream type -1, usage 1, sample rate 48000, format 0x9000000, channel mask 0x3f, flags 0x1
08-13 18:04:26.000 14114 14299 E AudioTrack-JNI: Error -22 initializing AudioTrack
08-13 18:04:26.001 14114 14299 E android.media.AudioTrack: Error code -20 when initializing AudioTrack.
08-13 18:04:26.005 14114 14299 E ExoPlayerImplInternal: Playback error.
08-13 18:04:26.005 14114 14299 E ExoPlayerImplInternal: com.google.android.exoplayer2.ExoPlaybackException
08-13 18:04:26.005 14114 14299 E ExoPlayerImplInternal: at com.google.android.exoplayer2.audio.MediaCodecAudioRenderer.processOutputBuffer(MediaCodecAudioRenderer.java:535)
08-13 18:04:26.005 14114 14299 E ExoPlayerImplInternal: at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.drainOutputBuffer(MediaCodecRenderer.java:1088)
08-13 18:04:26.005 14114 14299 E ExoPlayerImplInternal: at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:573)
08-13 18:04:26.005 14114 14299 E ExoPlayerImplInternal: at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:518)
08-13 18:04:26.005 14114 14299 E ExoPlayerImplInternal: at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:301)
08-13 18:04:26.005 14114 14299 E ExoPlayerImplInternal: at android.os.Handler.dispatchMessage(Handler.java:98)
08-13 18:04:26.005 14114 14299 E ExoPlayerImplInternal: at android.os.Looper.loop(Looper.java:154)
08-13 18:04:26.005 14114 14299 E ExoPlayerImplInternal: at android.os.HandlerThread.run(HandlerThread.java:61)
08-13 18:04:26.005 14114 14299 E ExoPlayerImplInternal: Caused by: com.google.android.exoplayer2.audio.AudioSink$InitializationException: AudioTrack init failed: 0, Config(48000, 252, 20480)
08-13 18:04:26.005 14114 14299 E ExoPlayerImplInternal: at com.google.android.exoplayer2.audio.DefaultAudioSink.initializeAudioTrack(DefaultAudioSink.java:1130)
08-13 18:04:26.005 14114 14299 E ExoPlayerImplInternal: at com.google.android.exoplayer2.audio.DefaultAudioSink.initialize(DefaultAudioSink.java:561)
08-13 18:04:26.005 14114 14299 E ExoPlayerImplInternal: at com.google.android.exoplayer2.audio.DefaultAudioSink.handleBuffer(DefaultAudioSink.java:617)
08-13 18:04:26.005 14114 14299 E ExoPlayerImplInternal: at com.google.android.exoplayer2.audio.MediaCodecAudioRenderer.processOutputBuffer(MediaCodecAudioRenderer.java:529)
08-13 18:04:26.005 14114 14299 E ExoPlayerImplInternal: ... 7 more
08-13 18:04:26.008 4063 15513 I OmxComponent: OMX_CommandStateSet 716 Cmd 0 nParam1 0x2
08-13 18:04:26.008 4063 15513 I OmxComponent: STATE_SET: OMX_StateExecuting => OMX_StateIdle : OMX.amlogic.avc.decoder.awesome
08-13 18:04:26.008 4063 15513 I OmxComponent: OMX.amlogic.avc.decoder.awesome: flush input
08-13 18:04:26.008 4063 15513 V AmlogicVideoDecoderAwesome: flushInput:690 >
08-13 18:04:26.008 4063 15513 V OMX_WorkerPeer: hardware/amlogic/omx/omx_framework/WorkerPeer.cpp:flushInput:56 --------------------
08-13 18:04:26.008 4063 15513 V AmlogicVideoDecoderAwesome: pause:217 >
08-13 18:04:26.012 4063 15513 V AmlogicVideoDecoderAwesome: reset:257 >
08-13 18:04:26.012 4063 15513 D AmlogicVideoDecoderAwesome: reset_1
08-13 18:04:26.013 4063 15513 I amcodec : AMSTREAM_SET_OMX_RUNNING ret=0
08-13 18:04:26.167 4063 15513 I amcodec : [codec_reset:1075]ret=0
08-13 18:04:26.168 4063 15513 D AmlogicVideoDecoderAwesome: reset_2
08-13 18:04:26.170 4063 15513 D AmlogicVideoDecoderAwesome: mDTaskStatus=1
08-13 18:04:26.172 4063 15513 V AmlogicVideoDecoderAwesome: start:225 >
08-13 18:04:26.172 4063 15513 E ThreadWorker: pthread on exit wait clean
08-13 18:04:26.174 4063 15513 D AmlogicVideoDecoderAwesome: mVideo start
08-13 18:04:26.174 4063 15513 V AmlogicVideoDecoderAwesome: flushInput:715 >
08-13 18:04:26.174 4063 15513 I OmxComponent: OMX.amlogic.avc.decoder.awesome: flush output
08-13 18:04:26.174 4063 15513 V AmlogicVideoDecoderAwesome: flushOutput:718 >
08-13 18:04:26.174 4063 15526 V OMX_WorkerPeer: hardware/amlogic/omx/omx_framework/WorkerPeer.cpp:runWorkerStatic:152 --------------------
08-13 18:04:26.174 4063 15513 D AmlogicVideoDecoderAwesome: displayThread__flushOutput__fillBufferDone
08-13 18:04:26.174 4063 15513 D AmlogicVideoDecoderAwesome: displayThread__flushOutput__fillBufferDone
08-13 18:04:26.174 4063 15513 D AmlogicVideoDecoderAwesome: displayThread__flushOutput__fillBufferDone
08-13 18:04:26.174 4063 15513 D AmlogicVideoDecoderAwesome: displayThread__flushOutput__fillBufferDone
08-13 18:04:26.174 4063 15526 V OMX_WorkerPeer: hardware/amlogic/omx/omx_framework/WorkerPeer.cpp:runWorker:158 --------------------
08-13 18:04:26.183 4063 15513 V AmlogicVideoDecoderAwesome: flushOutput:771 >
08-13 18:04:26.183 4063 15513 D AmlogicVideoDecoderAwesome: mVideo stop
08-13 18:04:26.185 4063 15513 V AmlogicVideoDecoderAwesome: stop:247 >
08-13 18:04:26.187 4063 15513 I OmxComponent: STATE_TRANS: OMX_StateExecuting => OMX_StateIdle : OMX.amlogic.avc.decoder.awesome
08-13 18:04:26.187 4063 15513 I OmxComponent: STATE_TRANS: OMX_StateExecuting => OMX_StateIdle : OMX.amlogic.avc.decoder.awesome
08-13 18:04:26.187 4063 15513 I OmxComponent: STATE_TRANS: OMX_StateExecuting => OMX_StateIdle : OMX.amlogic.avc.decoder.awesome
08-13 18:04:26.187 4063 15513 I OmxComponent: STATE_TRANS: OMX_StateExecuting => OMX_StateIdle : OMX.amlogic.avc.decoder.awesome
08-13 18:04:26.187 4063 15513 I OmxComponent: STATE_TRANS: OMX_StateExecuting => OMX_StateIdle : OMX.amlogic.avc.decoder.awesome
08-13 18:04:26.187 4063 15513 I OmxComponent: STATE_DONE: OMX_StateExecuting => OMX_StateIdle : OMX.amlogic.avc.decoder.awesome
08-13 18:04:26.189 4063 15513 I OmxComponent: OMX_CommandStateSet 716 Cmd 0 nParam1 0x1
08-13 18:04:26.189 4063 15513 I OmxComponent: STATE_SET: OMX_StateIdle => OMX_StateLoaded : OMX.amlogic.avc.decoder.awesome
08-13 18:04:26.189 4063 15513 V AmlogicVideoDecoderAwesome: releaseResources:290 >
08-13 18:04:26.189 4063 15513 V AmlogicVideoDecoderAwesome: tearDown:596 >
08-13 18:04:26.189 4063 15513 V AmlogicVideoDecoderAwesome: tearDown:1050 >
08-13 18:04:26.189 4063 15513 V AmlogicVideoDecoderAwesome: initializeState_l:1102 >
08-13 18:04:26.201 4063 15513 D AmlogicVideoDecoderAwesome: free ION Video device instance ID:0
08-13 18:04:26.202 4063 15513 V AmlogicVideoDecoderAwesome: get def maping [decoder ppmgr deinterlace amvideo]
08-13 18:04:26.202 4063 15513 V AmlogicVideoDecoderAwesome: disable osd video ...0
08-13 18:04:26.202 4063 15513 I OmxComponent: STATE_TRANS: OMX_StateIdle => OMX_StateLoaded : OMX.amlogic.avc.decoder.awesome
08-13 18:04:26.202 4063 15513 I OmxComponent: STATE_DONE: OMX_StateIdle => OMX_StateLoaded : OMX.amlogic.avc.decoder.awesome
08-13 18:04:26.214 4063 5133 D OmxComponentManagerImpl: DecreaseEntryNumByName pEntry->mNum=1, pEntry->mMaxNum:9,componentName:OMX.amlogic.avc.decoder.awesome
08-13 18:04:26.214 4063 5133 I omx_core: OMX_freeHandle_num_= 0
08-13 18:04:26.215 4063 5133 D AmlogicVideoDecoderAwesome: ~AmlogicVideoDecoderAwesome
08-13 18:04:26.216 4063 5133 D AmlogicVideoDecoderAwesome: ~AmlogicVideoDecoder
08-13 18:04:26.228 14114 14114 D EventLogger: videoDisabled [479.46]
08-13 18:04:26.253 14114 14114 D EventLogger: audioDisabled [479.48]
08-13 18:04:26.276 14114 14114 E EventLogger: playerFailed [479.51]
08-13 18:04:26.276 14114 14114 E EventLogger: com.google.android.exoplayer2.ExoPlaybackException
08-13 18:04:26.276 14114 14114 E EventLogger: at com.google.android.exoplayer2.audio.MediaCodecAudioRenderer.processOutputBuffer(MediaCodecAudioRenderer.java:535)
08-13 18:04:26.276 14114 14114 E EventLogger: at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.drainOutputBuffer(MediaCodecRenderer.java:1088)
08-13 18:04:26.276 14114 14114 E EventLogger: at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:573)
08-13 18:04:26.276 14114 14114 E EventLogger: at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:518)
08-13 18:04:26.276 14114 14114 E EventLogger: at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:301)
08-13 18:04:26.276 14114 14114 E EventLogger: at android.os.Handler.dispatchMessage(Handler.java:98)
08-13 18:04:26.276 14114 14114 E EventLogger: at android.os.Looper.loop(Looper.java:154)
08-13 18:04:26.276 14114 14114 E EventLogger: at android.os.HandlerThread.run(HandlerThread.java:61)
08-13 18:04:26.276 14114 14114 E EventLogger: Caused by: com.google.android.exoplayer2.audio.AudioSink$InitializationException: AudioTrack init failed: 0, Config(48000, 252, 20480)
08-13 18:04:26.276 14114 14114 E EventLogger: at com.google.android.exoplayer2.audio.DefaultAudioSink.initializeAudioTrack(DefaultAudioSink.java:1130)
08-13 18:04:26.276 14114 14114 E EventLogger: at com.google.android.exoplayer2.audio.DefaultAudioSink.initialize(DefaultAudioSink.java:561)
08-13 18:04:26.276 14114 14114 E EventLogger: at com.google.android.exoplayer2.audio.DefaultAudioSink.handleBuffer(DefaultAudioSink.java:617)
08-13 18:04:26.276 14114 14114 E EventLogger: at com.google.android.exoplayer2.audio.MediaCodecAudioRenderer.processOutputBuffer(MediaCodecAudioRenderer.java:529)
08-13 18:04:26.276 14114 14114 E EventLogger: ... 7 more
08-13 18:04:26.277 14114 14114 D EventLogger: loading [false]
08-13 18:04:26.289 14114 14114 D EventLogger: state [479.52, true,

</details>
@bounmed bounmed changed the title android.media.AudioTrack: Error code -20 when initializing AudioTrack. #23 android.media.AudioTrack: Error code -20 when initializing AudioTrack. Aug 20, 2018
@andrewlewis andrewlewis self-assigned this Aug 20, 2018
@andrewlewis
Copy link
Collaborator

Please could you provide the information requested in the issue template? In particular, which ExoPlayer version you're using, and a full bug report (adb bugreport).

@bounmed
Copy link
Author

bounmed commented Sep 6, 2018

@andrewlewis Any update on this? i sent the information requested with the bugreport.

@andrewlewis
Copy link
Collaborator

Thanks. Could you log the AudioCapabilities instance and paste the output here? I wonder if the problem is that only stereo AC-3 is supported and we need to add a check for the channel count too.

@bounmed
Copy link
Author

bounmed commented Sep 15, 2018

@andrewlewis Any idea how to do that? i don't use AudioCapabilities
Can this do the trick:

//for logging
  CodecCapabilities capabilities = new CodecCapabilities();
  AudioCapabilities audioCapabilities = capabilities.getAudioCapabilities();
  Log.d("audioCapabilities:", audioCapabilities.toString());

@andrewlewis
Copy link
Collaborator

com.google.android.exoplayer2.audio.AudioCapabilities.getCapabilities(context) should work (these are different audio capabilities!). If you're connecting an audio receiver via HDMI this needs to be called while the receiver is connected.

@bounmed
Copy link
Author

bounmed commented Sep 18, 2018

This this what i got:
09-18 20:01:13.660 9742 9742 E Log audioCapabilities: : AudioCapabilities[maxChannelCount=2, supportedEncodings=[2, 5, 13]]
I got it from this code:

import com.google.android.exoplayer2.audio.AudioCapabilities;
....
AudioCapabilities audioCapabilities = AudioCapabilities.getCapabilities(getApplicationContext());
Log.e("audioCapabilities: ", audioCapabilities.toString());

@andrewlewis andrewlewis changed the title android.media.AudioTrack: Error code -20 when initializing AudioTrack. Check AudioCapabilities channel count for passthrough mode Sep 21, 2018
ojw28 pushed a commit that referenced this issue Nov 14, 2018
Issue: #4690

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220640737
ojw28 pushed a commit that referenced this issue Nov 28, 2018
Issue: #4690

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220640737
@ebr11
Copy link

ebr11 commented Jan 10, 2019

Hi. We're experiencing a problem we believe is related to this change. On an Android TV device (Sony xbr55x850d) with Exoplayer 2.9.1 the max audio channels is reported correctly as 2.

But, with 2.9.3 that same TV is reporting a max audio channels of 8 (incorrect).

It appears the commit referenced above assumes a default of 8 channels.

@andrewlewis
Copy link
Collaborator

@ebr11 Is this for PCM output or encoded audio output (passthrough)? The commit assumes that the platform should be able to downmix to stereo as needed.

@andrewlewis
Copy link
Collaborator

Could you also give some more details about what error you're seeing (preferably with a full bug report)? Thanks.

@ebr11
Copy link

ebr11 commented Jan 10, 2019

Hi. It is with DD pass thru.

There isn't actually an error being generated by Exo here. Rather, our app is querying for channel capability and where previously the platform returned 2 it now returns 8. This is causing our app to make a wrong decision.

@andrewlewis
Copy link
Collaborator

What's the max channel count in the ACTION_HDMI_AUDIO_PLUG Intent?

@ebr11
Copy link

ebr11 commented Jan 10, 2019

Unfortunately, I don't have the device so can't be sure. I'm working with the user to try and investigate. He did have a soundbar connected to the TV but NOT powered on. I'm asking him to disconnect that to see if that changes the behavior. Thanks.

@ebr11
Copy link

ebr11 commented Jan 10, 2019

Okay, I cannot confirm that exact value at this time but I can confirm that on this same system Exo 2.9.1 returned 2 from AudioCapabilities.getMaxChannelCount() and with 2.9.3 the same method on the same system is returning 8.

This system is reporting no support for any advanced audio - no DD no DTS so I believe the 2 number was correct and 8 seems to be erroneous...

@andrewlewis
Copy link
Collaborator

It sounds like you are trying to determine the DD passthrough max channel count but are using the max channel count from the default (PCM) capabilities. For passthrough mode, I think your app needs to be checking for AudioCapabilities with ENCODING_AC3, and looking at the max channel count when that encoding is present.

I think returning '2 channel PCM' as the maximum default supported audio capabilities was wrong, as all devices (even phones) should support downmixing PCM from 8 channels as needed.

One possibility is that the device has a decoder for AC-3 that only supports stereo input, but doesn't advertise this limitation. This is not relevant if you're definitely using passthrough mode, however.

Another possibility is that there's an audio device that supports passthrough but it's not being advertised via the HDMI audio plug intent. In that case we'd need to check AudioDeviceInfos to get the capabilities (related to #1993).

@ebr11
Copy link

ebr11 commented Jan 10, 2019

We aren't trying to determine pass-thru capability based on this but were using the default channel count as an overall "gauge" of the channel output capabilities of the device/system.

If the system only reported support for stereo, then we did internal mix-down of any multi-channel formats as an efficiency move.

We'll have to adjust to look at specific codec channel counts as you indicated.

Thanks.

@ChiragRedixibit

This comment has been minimized.

@google google locked and limited conversation to collaborators May 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants