whatawurst / android_device_sony_lilac

This is the Android device configuration for Sony Xperia XZ1 Compact (yoshino platform).
23 stars 26 forks source link

Hi-Res output noisy and buggy (Poweramp) #61

Open multiwirth opened 3 months ago

multiwirth commented 3 months ago

Hi there,

this is probably very low priority but maybe you could take a look at this someday?

I'm using my xz1c as music player and I'm really amazed how great android 13 and 14 still run on this old phone.

However there's an minor issue since lineage-20 and continues with lineage-21 Was fine in previous lineage-19 builds.

So basically there's an increased noise floor when using the Hi-Res API via wired headphones. You can tell with low volume and very sensitive earbuds like IEMs or the like. Also when using the Hi-Res API and accidentally start to play a video or any other audio source, which uses a different audio API, the audio just stops completely until you either wait a few seconds or unplug/replug your headphones. This also happens with USB DACs, so it must be an issue with the Hi Res API implementation itself, not the actual driver for the built in audio hardware.

I collected some logs hopefully catching the issue, maybe there's something useful to debug this.

2024-07-21_05.14.zip

derfelot commented 3 months ago

Yes I will take a look at it.

As a matter of fact, I am also planning to use my lilac as a portable flac player. Already got my collection synced to a 1.5tb sdcard for that. My plan was actually to make a minimal "music player" build, with anything unnecessary (like mobile radio etc) ripped out to give the best battery life possible.

multiwirth commented 3 months ago

Hey that's good news! Thanks a lot for the reply. Let me know in case i can test something for you. I've got a spare device and a very fast pc for making test builds.

derfelot commented 3 months ago

Sure, I'll let you know. Once I finish the bring-up for A14 QPR3 I will start working on this. Annoyingly we need to switch to source built audio hal again (see my comments here: https://github.com/whatawurst/android_device_sony_yoshino-common/issues/117 ) which may cause issues with calls etc, but remains to be seen. But it should be the last major update yoshino will get most likely, so no more bring-ups to do ;)

multiwirth commented 1 month ago

Greetings, I just found something that might be interesting. So there are these files in /vendor/etc/acdbdata which seem to be some kind of additional DSP presets for specific situations (i guess?) I´ve just hidden the folder entirely (so it wouldn´t be loaded at boot) and the noise is entirely gone on my end. Have quickly tested speakers and calls, nothing seems to be broken. I´ll have a look into what specific file is affecting the headphone output and report back. I guess there´s a nicer solution to this though. The playback bug when switching audio output API keeps remaining, but Hi-Res is now crystal clear again.

I remember this post i made quite a while back with an very similar noise issue with an Z5 compact: https://xdaforums.com/t/rom-unofficial-11-r-lineageos-18-1-for-z5c-suzuran.4205135/post-86456893

Let me know what you think :)

EDIT: So it seems like the presence of the folder /vendor/etc/acdbdata/Sony alone is enough to influence into the sound. I´ve hidden all files inside the folder individually and altogether, still noisy output whatsoever. If the entire folder is hidden, the noise is noticeable lower, although it´s still not noise-free. A small noise floor is still remaining, but it´s definitely much better already.