Hi
If what you are trying to do is to render the same audio trough both hdmi and spdif at same time. You can add something like this in your /system/etc/asound.conf
================ /system/etc/asound.conf ====================
pcm.both { # change name "pcm.both" for pcm.!default to make it the default configuration
type plug;
slave.pcm {
type multi;
slaves.a.pcm "hw:0,0"; #in your case hw:1,0 for spdif (card1, dev 0)
slaves.b.pcm "hw:2,0"; # hdmi card 2, dev 0
slaves.a.channels 2; # this is for stereo, you can set 4, 6, or 8 channels spdif
slaves.b.channels 2; # this is for stereo, you can set 4, 6, or 8 channels spdif
bindings.0.slave a; # binding channels to slave a, Add bindings if you add channels
bindings.0.channel 0;
bindings.1.slave a;
bindings.1.channel 1;
bindings.2.slave b; # binding channels to slave a. Add bindings if you add channels
bindings.2.channel 0;
bindings.3.slave b;
bindings.3.channel 1;
}
ttable.0.0 1;
ttable.1.1 1;
ttable.0.2 1;
ttable.1.3 1;
}
=====================================================
The you can play audio with alsa like
aplay -Dboth file.wav (I think in android is alsa_aplay)
If you replace the pcm.both name with pcm.!default then the command is just like
aplay file.wav
I tested this using cs42888 in card0 and hdmi as card2 and I was able to hear same audio in my headphones and in the hdmi monitor at same time. Also I did it in a Gnome FS, not Android but I guess should be similar.