Ogg Vorbis audio decode not working in System

can anybody with an FP3 decode OGG Vorbis Audio with the default Music App? Here is an example file.

In my observation the file gets skipped and not played.

msm8916_platform: platform_check_codec_backend_cfg:becf: afe: Codec selected backend: 0 current bit width: 16 sample rate: 44100 channels: 2 usecase 3 device (speaker)

The log shows errors for msm8916_platform, while I expected msm8953_platform.

VLC and some other apps will play the file as they bring own software decoder libraries along.

Some Apps use Vorbis for voice, if you do not hear the counterparty I speculate this can be a reason.

Edit: the issue is tracked in LineageOS/android#549

A workaround suggested there is to remove the AUDIO_FORMAT_VORBIS profile audio/audio_policy_configuration.xml in the mixPort compressed_audio section.

This leaves the question open if hardware decoding on the msm8953’s integrated DSP is a possibility for the Vorbis Codec (or Opus for that matter). Would the OpenMax string in media/media_codecs_vendor_audio.xml be vendored instead of OMX.google.vorbis.decoder and needing Qualcomm firmware blobs?

Same here, the standard Music app seems to have a problem with OGG files, it starts but doesn’t really play them, you hear nothing. That’s why I use VLC which works very well with almost every file you give him.

Not all music player is compatible with the OGG encoding format. I personally use VLC and JoyoPlay. Both of them play all audios and videos. If you want to play OGG audio in your system, you can try to convert OGG to a more general format like MP3. For audio conversion, the all-in-one Joyoshare Media Cutter is worth a shot.

Hello.

(Simple) Music Player works fine with *.ogg. Light, easy to use, FOSS…

https://f-droid.org/en/packages/com.simplemobiletools.musicplayer/

@Karenina @trefix - while I appreciate your effort, I’m well aware that any App can bring software decoding capabilities. This issue is brought up specifically for system- and at best hardware assisted decoding. System because of compatability, hardware (DSP) because of energy savings.

For any messenger App (Signal, Whatsapp) that also does voice - you can talk for a longer time if for the audio decode the App relies on offered hardware offload by system level libraries as it is more energy efficient. If the specific codec is Vorbis on an FP3 and no alternative audio codec or in-software decode fallback is present in the App, the Apps Call feature can’t be used as the counterparty can’t be heard.

Using the proposed workaround in the Lineage issue ticket at least ensures an successful system level decode (but no DSP offload, as this is a workaround, and not a real fix yet).

To reiterate, the scope is not only music, but also Voice and thus App compatability. Android includes Vorbis support for ages, so it should work with the system media framework and is a bug if it’s dysfunctional.

1 Like

Hello,

in my case the Simple Music Player does not play ogg-files. Did i miss some configuration on this? I have not tested the recommended workaround with the audio_policy_configuration.xml file, because I don’t know how to do it at the moment. I have thousands of Vorbis-files and i don’t really want them converting to mp3. Are there any news on this problem? Recently i bought a Fairphone 4 and i thought it will work out of the box. When i change the xml-file like suggested, will this file be overwritten when i update the operating system?

Hello.

I don’t know if issue was solved. You can give a try to VLC, generally the most complete reader…

I can confirm this, and I, too, have thousands of OGG files, accumulated and carefully-tagged over many years. Neither the built-in music player nor Opus 1 (which on my old /e/ handset, a Samsung S9, played OGGs just fine) are able to play them. I would really appreciate some movement on this!

Like suggested as an “in-software decode fallback” I use VLC now and the player works fine with OGG files. I also like the capability having one software for music and video.

(as initially stated: this thread is explicitly not about 3rd party software like VLC that bring their own software decoders, it is about the Fairphone3 and the software/hardware decoders in system Android, that the apps like Eleven and the documentsui should pick up on, as they do not have any decoding ability)

FP3 on Android R /e/ 1.0 picks up the codec and plays .ogg, with either Vorbis or Opus, in the Music app (eleven) and via Files (documentsui). So this seems resolved to me @madhatter as soon as you can update

05-29 05:35:40.437  1023  7148 I CCodec  : Created component [c2.android.vorbis.decoder]
05-29 05:35:40.495   769  6495 I msm8974_platform: platform_check_codec_backend_cfg:becf: afe: Codec selected backend: 0 updated bit width: 16 and sample rate: 48000

@tcecyk thank you for the clarification! However, I realised that I missed the little wrinkle about “FP3” at the top of the post, as I have an FP4. I apologise for resuscitating an old post needlessly, and will continue to try to find clues about why it’s not working on my (brand-new) FP4.

ok, FP4 it is for you.

What fixed it for the FP3 was the removal of AUDIO_FORMAT_VORBIS from the hardware offload support. So the DSP of the sdm632 can’t do vorbis I suppose. To be sure one needs to dig into qualcomm specsheets or sdk to really find out - https://review.lineageos.org/c/LineageOS/android_device_fairphone_FP3/+/293283

The FP4 (qualcomm 750G → Hexagon 694 DSP) has the offload included and maybe has no hw support either, so a testbuild removing that is likely to fix it without knowing more about the specifics. It will move from dsp to cpu, but in the end supported by the system media libs.

(instructions akin to removing all instances of AUDIO_FORMAT_VORBIS · Search · GitLab in the files that have a search hit and advertise offload support)