Hi
I am working on SabreAuto IMX6Q running Android Marshmallows(6.0.1). I am able to see HDMI video but my HDMI audio is not working. My bootargs are:
setenv bootargs console=ttymxc3,115200 androidboot.console=ttymxc3 consoleblank=0 vmalloc=320M init=/init video=mxcfb0:dev=hdmi,1920x1080M@60,bpp=32 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off androidboot.hardware=freescale cma=384M.
In the kernel logs I am getting the following:
imx-audio-hdmi sound-hdmi.22: hdmi-hifi <-> hdmi_audio.3 mapping ok
ALSA device list:
#0: cs42888-audio
#1: imx-spdif
#2: imx-hdmi-soc
I am unplay to listen to audio from HDMI.
In android console I am getting the following error :
root@sabreauto_6q:/ # logcat | grep audio_hw_primary
01-01 00:16:29.668 221 521 W audio_hw_primary: ret -1, pcm write 768 error cannot prepare channel: Device or resource busy
01-01 00:16:29.672 221 521 W audio_hw_primary: ret -1, pcm write 768 error cannot prepare channel: Device or resource busy
01-01 00:16:29.676 221 521 W audio_hw_primary: ret -1, pcm write 768 error cannot prepare channel: Device or resource busy
01-01 00:16:29.677 221 521 W audio_hw_primary: pcm_write_wrapper continues failed for pcm 1, standby
01-01 00:16:29.677 221 521 W audio_hw_primary: do_out_standby... -1241192256
01-01 00:16:29.682 221 521 I audio_hw_primary: start_output_stream... -1241192256, device 1024
01-01 00:16:29.685 221 521 W audio_hw_primary: card 2, port 0 device 0x400
01-01 00:16:29.685 221 521 W audio_hw_primary: rate 48000, channel 2 period_size 0x300
01-01 00:16:39.757 221 521 W audio_hw_primary: ret -1, pcm write 768 error cannot prepare channel: Device or resource busy
01-01 00:16:39.761 221 521 W audio_hw_primary: ret -1, pcm write 768 error cannot prepare channel: Device or resource busy
01-01 00:16:39.766 221 522 W audio_hw_primary: out_set_parameters routing=1024, ret 0, out -1241192256
I am not able to understand why are we getting device or resource busy error? Do we need to enable something else for HDMI audio
Thanks and regards
Deepika Teriar
Hi Deepika,
I think you can try it on kernel level before proceeding to Android through tinyplay. It may be that you are not selecting the HDMI as Audio source. Because by default it will be CS4288 Audio codec.
tinyplay Fools.wav -d 2
Thanks,
Maverick
Hi Vinod,
Thanks for your reply.
In Android if your HDMI is enabled the default audio route will be through HDMI.
Can audio codec and HDMI audio have outptut simultaneously at IMX6 android?
Check this link.
Thanks,
Deepika
Thanks for the update.
My concern was about to play the audio over HDMI/DP through command line(like gstreamer or tinyalsa). where we always need to specify the card number, otherwise it will select the card number 0.
Thanks,
Vinod
Hi Deepika
please try hdmi encoded audio with procedure described in
https://community.freescale.com/docs/DOC-93745#jive_content_id_4_Encoded_audio
note, audio on non-CEA modes is not officially supported, more details in :
https://boundarydevices.com/hdmi/
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Igor..
I tried all the steps above..but still i am getting the same error.
My HDMI is in CEA mode..1920X1080p.
I am still getting
01-01 00:16:39.761 221 521 W audio_hw_primary: ret -1, pcm write 768 error cannot prepare channel: Device or resource busy
Do u have any other suggestions?
Thanks and Regards
Deepika Teriar
Hi Deepika
is it working with linux ?
Board Support Packages (35)
L4.1.15_1.0.0_MX6QDLSOLO (REV L4.1.15_1.0.0)
Best regards
igor
Hi Igor
Sorry for late reply. I did not checked with only Linux as my system is running Android M.
Right now instead of HDMI audio I am trying to play audio from its audio codec CS42888.
Will need your help in it too :smileyhappy:
Thanks Igor
I will check this and let you know