Page 1 of 1

OpenMax and AlsaSound

Posted: Mon Nov 05, 2018 1:44 pm
by shafayatnabi
When trying to run OpenMax video capture , encoding alongside with alsaaudio capture, OpenMAX Allocate buffer getiing OMX_HardWareError , is there any solution ?

Re: OpenMax and AlsaSound

Posted: Mon Nov 05, 2018 2:11 pm
by 6by9
Please be precise. I'm assuming you mean OMX_ErrorHardware, not OMX_HardWareError.
Does your application work without the ALSA side? There should be minimal interaction between those two subsystems.
Are you sure you haven't run out of gpu memory? Increase gpu_mem in /boot/config.txt.

Re: OpenMax and AlsaSound

Posted: Tue Nov 06, 2018 4:33 am
by shafayatnabi
Yeah I mean OMX_ErrorHardware, My bad, but my application works fine without alsa , is Alsa used gpu_memory , so OpenMax getting OMX_ErrorHardware error ?

Re: OpenMax and AlsaSound

Posted: Tue Nov 06, 2018 6:19 am
by robel.sharma
Hey people,
I am also getting the same error. The snippet I got from the PI OMX follows -

Code: Select all

Event status [OMX.broadcom.camera] - state: 1, disable: 4, enable: 0, flush: 0
Changing state 2 for OMX.broadcom.video_encode
Base EventHandlerCallback>>>

ComponentBase::OnEventCmdComplete>>>

Event status [OMX.broadcom.video_encode] - state: 1, disable: 2, enable: 0, flush: 0Timer thread created at 0x5de4b3d0
Audio RTP received: 172
Audio RTP received: 172
Audio RTP received: 172
Audio RTP received: 172
Audio RTP received: 172
OMX error: Stop Capture: 0x80001009 OMX_ErrorHardware

OMX error: disable port: 0x80001009 OMX_ErrorHardware
Disabling port 73 for OMX.broadcom.cameraAudio RTP received: 172

WaitForChange TIMEOUT!!! current 4, expected 5
OMX.broadcom.camera port 73 lost disable port event(s)

OMX error: disable port: 0x80001009 OMX_ErrorHardware
Disabling port 71 for OMX.broadcom.camera
WaitForChange TIMEOUT!!! current 4, expected 5
OMX.broadcom.camera port 71 lost disable port event(s)

OMX error: disable port: 0x80001009 OMX_ErrorHardware
Disabling port -1 for OMX.broadcom.video_encode
WaitForChange TIMEOUT!!! current 2, expected 4
OMX.broadcom.video_encode port 4294967295 lost disable port event(s)

OMX error: switch state: 0x80001009 OMX_ErrorHardware
Changing state 2 for OMX.broadcom.camera
WaitForChange TIMEOUT!!! current 1, expected 2
OMX.broadcom.camera lost state changed event

OMX error: switch state: 0x80001009 OMX_ErrorHardware
Changing state 2 for OMX.broadcom.video_encode
WaitForChange TIMEOUT!!! current 1, expected 2
OMX.broadcom.video_encode lost state changed event
It never works for me if I keep my G711U stream and H264 stream at the same time. Have not seen this issue only on H264 OMX. Any lights on this will be appreciated.

Thanks,
Robel