Hello Moto Mod Community,
we try to play System Audio through our Mod (raw I2S) as a first demo.
So we got a MDK and designed our Personality-Card. We flashed our Firmware to the MDK and connected it to a Moto Z2.
We are using a TLV320AIC3104 Codec directly connected to the I2S (DIP A2 = ON).
With every Playback-Use-Case activated (none, music, voice call, ringtone, sonification) the Moto Z2 no longer plays audio through its speakers and we can observe the following outputs during playing a mp3 over a Generic Audio Player App:
Moto Mod:
[D]: gb_i2s_mgmt_protocol_stop: 0
[D]: gb_aud_protocol_enable_devices()-in0-out0
aud_dev_enable_devices: .
[D]: gb_aud_protocol_enable_devices: 0
[D]: gb_aud_protocol_enable_devices()-in0-out1
aud_dev_enable_devices: .
[D]: gb_aud_protocol_enable_devices: 0
[D]: gb_i2s_mgmt_protocol_start() port type 1:
i2s_op_dai_start: .
[D]: gb_i2s_mgmt_protocol_start: 0
[D]: gb_i2s_mgmt_protocol_stop() port type 1:
i2s_op_dai_stop: .
[D]: gb_i2s_mgmt_protocol_stop: 0
[D]: gb_aud_protocol_enable_devices()-in0-out0
aud_dev_enable_devices: .
[D]: gb_aud_protocol_enable_devices: 0
[D]: gb_aud_protocol_enable_devices()-in0-out1
aud_dev_enable_devices: .
[D]: gb_aud_protocol_enable_devices: 0
[D]: gb_i2s_mgmt_protocol_start() port type 1:
i2s_op_dai_start: .
[D]: gb_i2s_mgmt_protocol_start: 0
[D]: gb_i2s_mgmt_protocol_stop() port type 1:
i2s_op_dai_stop: .
[D]: gb_i2s_mgmt_protocol_stop: 0
[D]: gb_aud_protocol_enable_devices()-in0-out0
aud_dev_enable_devices: .
[D]: gb_aud_protocol_enable_devices: 0
[D]: gb_aud_protocol_enable_devices()-in0-out1
aud_dev_enable_devices: .
[D]: gb_aud_protocol_enable_devices: 0
[D]: gb_i2s_mgmt_protocol_start() port type 1:
i2s_op_dai_start: .
[D]: gb_i2s_mgmt_protocol_start: 0
[D]: gb_i2s_mgmt_protocol_stop() port type 1:
i2s_op_dai_stop: .
[D]: gb_i2s_mgmt_protocol_stop: 0
Logcat:
09-11 10:32:55.604 E: start_output_stream: cannot set hw params: Invalid argument
09-11 10:32:55.604 D: disable_audio_route: reset and update mixer path: deep-buffer-playback mod
09-11 10:32:55.605 D: disable_snd_device: snd_device(35: mod-speaker)
09-11 10:32:55.630 D: mods_get_speaker_snd_device(): Selecting device 35 instead of 2
09-11 10:32:55.630 D: select_devices: out_snd_device(35: mod-speaker) in_snd_device(0: none)
09-11 10:32:55.630 D: platform_send_audio_calibration: sending audio calibration for snd_device(35) acdb_id(215)
09-11 10:32:55.630 D: ACDB -> send_audio_cal, acdb_id = 215, path = 0, app id = 0x11130, sample rate = 48000
ACDB -> send_asm_topology
ACDB -> ACDB_CMD_GET_AUDPROC_STREAM_TOPOLOGY_ID
ACDB -> send_adm_topology
ACDB -> ACDB_CMD_GET_AUDPROC_COMMON_TOPOLOGY_ID
ACDB -> send_audtable
ACDB -> ACDB_CMD_GET_AUDPROC_COMMON_TABLE_SIZE
09-11 10:32:55.630 D: ACDB -> ACDB_CMD_GET_AUDPROC_COMMON_TABLE
09-11 10:32:55.630 D: ACDB -> AUDIO_SET_AUDPROC_CAL
ACDB -> send_audvoltable
ACDB -> ACDB_CMD_GET_AUDPROC_GAIN_DEP_STEP_TABLE, vol index 0
09-11 10:32:55.631 D: ACDB -> AUDIO_SET_VOL_CAL cal type = 12
ACDB -> send_audstrmtable
ACDB -> ACDB_CMD_GET_AUDPROC_STREAM_TABLE_V2
ACDB -> audstrm_cal->cal_type.cal_data.cal_size = 16
ACDB -> send_afe_topology
ACDB -> ACDB_CMD_GET_AFE_TOPOLOGY_ID
ACDB -> GET_AFE_TOPOLOGY_ID for adcd_id 215, Topology Id 112fc
ACDB -> send_afe_cal
ACDB -> ACDB_CMD_GET_AFE_COMMON_TABLE
Failed to fetch the lookup information of the device 000000D7
09-11 10:32:55.631 D: ACDB -> AUDIO_SET_AFE_CAL
ACDB -> send_hw_delay : acdb_id = 215 path = 0
ACDB -> ACDB_AVSYNC_INFO: ACDB_CMD_GET_DEVICE_PROPERTY
09-11 10:32:55.631 D: enable_snd_device: snd_device(35: mod-speaker)
09-11 10:32:55.636 D: enable_audio_route: apply and update mixer path: deep-buffer-playback mod
09-11 10:32:55.638 I: audio_extn_utils_send_app_type_cfg PLAYBACK app_type 69936, acdb_dev_id 215, sample_rate 48000
09-11 10:32:55.656 E: start_output_stream: cannot set hw params: Invalid argument
Hardware:
The clock signal on I2S_BCLK Line is interrupted (about 3-5ms bursts every 50ms).
This constantly repeats during the audio playing.
Every tip can help. And please ask if you need some additional information.