crdroidandroid / issue_tracker

all crDroid related issues should go here
13 stars 1 forks source link

bug: audio over usb crackly (buffer underflow), alioth #526

Open defvs opened 4 weeks ago

defvs commented 4 weeks ago

Issue type

Feature not working as intended

Device

alioth

crDroid version

crDroid 10

Exact version / Build date

10.8/2024-09-27

Bug description

Similar bug to #479

It seems to have been fixed for most apps, however some apps such as Plexamp still have issues with audio over a USB DAC (mine is a FIIO KA11).

Playing audio results in a logcat spam of:

09-28 18:43:21.487 W/audio_hw_primary(1128): out_get_presentation_position: avail:1008 > kernel_buffer_size:1008 clamping!
09-28 18:43:21.489 W/audio_hw_primary(1128): out_write: underrun(93639) frames_by_time(638) > out->last_fifo_frames_remaining(504)

As well as audio crackle, making it unusable.

Steps to reproduce

.

Relevant log (logcat/build log)

.

Screenshots or videos

No response

Solution

It seems like keeping the CPU busy (enabling the visualizer of Plexamp, for example) makes the issue disappear. However, I guess it is an issue with the buffer being too small by default.

Additional context

No response

Acknowledgements

raystef66 commented 1 week ago

Since I fixed most of the USB audio issues on previous builds (https://github.com/crdroidandroid/issue_tracker/issues/479) due to some changes in audio_policy_configuration.xml , this would be a tougher one since imo only app related and not a general issue atm. You stated all's working on VLC and no underruns, only Plexamp right? For what it's worth, did you try any other roms to rule out some source issue? Did it ever worked well on previous crDroid builds for that matter?