Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => A20 => Topic started by: deskwizard on September 18, 2014, 10:52:36 PM

Title: HOWTO: Audio Line out when using HDMI
Post by: deskwizard on September 18, 2014, 10:52:36 PM
Good afternoon everyone,
For developpement purposes, I am using an HDMI monitor which, when connected becomes the default audio device.

If like me you want to use the line out jack with an HDMI monitor connected, use this very simple line I figured out completely by accident:

setprop audio.routing 2

2 being Line out, 1024 being HDMI.

This will work until reboot/HDMI reconnection if disconnected.

I am working on a modified audio HAL that will check for a HDMI audio bypass property and output on the selected device accordingly that would work on reboots and HDMI connect/disconnect.

I'll keep you guys/gals posted.

DW

Title: Re: HOWTO: Audio Line out when using HDMI
Post by: rouvas on September 18, 2014, 11:47:56 PM
Check this out

https://www.olimex.com/forum/index.php?topic=3645.msg15369#msg15369

for another approach to using the line-out jack.
Title: Re: HOWTO: Audio Line out when using HDMI
Post by: deskwizard on September 19, 2014, 04:24:24 AM
Thanks for the heads up man, wish I saw that lol
Title: Re: HOWTO: Audio Line out when using HDMI (ANDROID)
Post by: deskwizard on September 19, 2014, 08:49:19 PM
I noticed I forgot to specify I was using Android.

There is no such file under Android.
I will go back to my first idea, at least for my own project.

DW
Title: Re: HOWTO: Audio Line out when using HDMI
Post by: deskwizard on September 19, 2014, 09:29:52 PM
Modified HAL @

http://pastebin.com/nrpFaPmb


Uses the property audio.hdmi_bypass to direct audio output to either HDMI monitor or Line out jack

Add to init.sun7i.rc:

setprop audio.hdmi_bypass 1

1 for bypass HDMI and output to line out
0 for HDMI audio

Default is 0, so no need to set the prop to 0 to use HDMI audio out by default.

Survives HDMI cable connection/deconnection.

DW