Hello,
We porting Android4.3 JB on custom board,
and desired output two channel at the same time (sgtl5000 & spdif)
on config_sgtl5000.h
static struct audio_card sgtl5000_card ={
.name = "sgtl5000-audio",
.driver_name = "sgtl5000-audio",
.supported_out_devices=
AUDIO_DEVICE_OUT_SPEAKER|
AUDIO_DEVICE_OUT_WIRED_HEADPHONE|
AUDIO_DEVICE_OUT_DEFAULT|
on config_spdif.h
static struct audio_card spdif_card ={
.name = "imx-spdif",
.driver_name = "imx-spdif",
.supported_out_devices=
AUDIO_DEVICE_OUT_AUX_DIGITAL,
when boot device
sgtl5000 1-000a: sgtl5000 revision 17
asoc: sgtl5000 <-> imx-ssi.1 mapping ok
asoc: mxc-spdif <-> imx-spdif-dai.0 mapping ok
ALSA device list:
#0: sgtl5000-audio
#1: imx-spdif
and we can use tinyplay test output
tinyplay a.wav -D 0 -> sgtl5000 output audio
tinyplay a.wav -D 1 -> spdif output audio
and it's fine !
when we define audio_policy.conf
global_configuration {
attached_output_devices AUDIO_DEVICE_OUT_SPEAKER
default_output_device AUDIO_DEVICE_OUT_SPEAKER
attached_input_devices AUDIO_DEVICE_IN_BUILTIN_MIC
}
Default channel is sgtl5000
and
global_configuration {
attached_output_devices AUDIO_DEVICE_OUT_AUX_DIGITAL
default_output_device AUDIO_DEVICE_OUT_AUX_DIGITAL
attached_input_devices AUDIO_DEVICE_IN_BUILTIN_MIC
}
Default channel is spdif
how to output two channel audio at the same time?
Thanks.