AUDIO_OUT not working when A10s is booted without HDMI display connected

Started by kbro, January 14, 2014, 09:51:06 PM

Previous topic - Next topic

kbro

When I boot my A10s board (the one with Android in the 4GB NAND) with an HDMI device connected then the display and output audio get directed to that device.  No great surprise.

But when I boot the board WITHOUT anything connected to HDMI then output audio is NOT directed to the 3.5mm AUDIO_OUT socket.  I don't know where it is going, but it is not going there.

Is there a setting I can change to get my desired result (audio going to AUDIO_OUT by default), or perhaps there's a command line I can run that does the equivalent of Settings > Sound > Audio Output Mode > AUDIO_CODEC?

I know about the script.bin file in the bootloader partition, and I know how to change it by mounting /dev/block/nanda, but I haven't had any success with that route for other hacks I've tried, so I suspect the script.bin file doesn't work as advertised for NAND-booted devices.

kbro

I came across this post - https://www.miniand.com/forums/forums/development--3/topics/setting-default-audio-output-mode-android - which seems to do the trick, but any other suggestions would be gratefully received.

Here's what the post said...

it is a matter of executing the command via a shell
          setprop audio.routing x
where x is 1024 for HDMI, 4096 for S/PDIF or 2 for codec (3.5mm audio connector).

Additionally, perform the following if HDMI is required:
            AudioManager am = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
            am.setParameters("audio_devices_out_active=AUDIO_HDMI");
or
            AudioManager am = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
            am.setParameters("audio_devices_out_active=AUDIO_CODEC");

for codec/3.5mm