Bad FLAC codec on Android 11 ROM for /e/OS

I had issues before with systemside decode (hw or sw decode). Last time I faced that issue with Vorbis, moving the acodec outside hw offload made the system decode again.

I threw a few different flac files at 1.5-r-20221030230467-dev-FP3 and had mixed results - some played, some didn’t, and it didn’t hinge on bitrate/bitdepth/channels/samplingrate as far as I could determine.

Comparing when it fails, it goes into dsp (msm8974_platform - mixer path compress-offload-playback) hw decode when it fails, and uses system sw decode (c2.android.flac.decoder) when it works.

It did recover after a lot more than 10 sec and goes from offload to sw decode with at first failing files.

repeating error before doing sw decode:
D msm8974_platform: platform_split_snd_device: snd_device(2) num devices(0) new_snd_devices(0)
I msm8974_platform: platform_get_custom_mtmx_params: no matching param with id 0 ip_ch 2 op_ch 2 uc_id 3 snd_dev 2
D audio_hw_primary: enable_audio_route: apply mixer and update path: compress-offload-playback
D audio_route: Apply path: compress-offload-playback
D audio_hw_primary: select_devices: done
D audio_hw_primary: audio_enable_asm_bit_width_enforce_mode: DSP bitwidth feature is disabled.
I adsprpcd: vendor/qcom/proprietary/adsprpc/src/apps_std_imp.c:870: Successfully opened file /vendor/dsp/FlacDecoderModule.so.1
I aw8898_startup: enter
E q6asm_callback: cmd = 0x10d98 returned error = 0x2
E q6asm_stream_media_format_block_flac: DSP returned error[ADSP_EBADPARAM]
E msm_compr_send_media_format_block: CMD Format block failed ret -22
E         : msm_compr_configure_dsp_for_playback, failed to send media format block
E audio_hw_primary: start_output_stream: failed /w error cannot set device: Invalid argument

I think thats the line where it recovers, deciding to finnally not offload

D NuPlayer: restartAudio timeUs(69384), dontOffload(1), createDecoder(1)

TL;DR: So flac dsp hw offload is broken for xyz reason.

Last change to audio in FP3 was imho - FP3: Disable ALAC support (48623cff) · Commits · e / devices / android_device_fairphone_FP3 · GitLab (inlining the xml configs as a driveby commit)

1 Like