media icon indicating copy to clipboard operation
media copied to clipboard

PCM offload support

Open nift4 opened this issue 7 months ago • 2 comments

[REQUIRED] Use case description

ExoPlayer already supports compressed offload. But many devices like Google Pixels only support a few formats like MP3 or AAC, but not FLAC or even rarer formats like ALAC. But it would be nice to play less common audio formats as offload playback to save battery.

Proposed solution

Android 16's PCM offload: https://android-developers.googleblog.com/2025/05/building-delightful-android-camera-media-experiences.html The idea is to decode very large chucks of compressed audio as usual, and then feed all of them as PCM to DSP for playback.

Alternatives considered

N/A

nift4 avatar May 21 '25 10:05 nift4

@nift4 For formats not supported (decoding) by DSP, would decoding to PCM allow the CPU to go into a low-power state? Is the proposal of large chunks of PCM in relative terms? And with this proposal, would there be any additional buffer needs to store decoded PCM?

Ethan1983 avatar May 25 '25 17:05 Ethan1983

@Ethan1983

Based on my partial understanding,

For formats not supported (decoding) by DSP, would decoding to PCM allow the CPU to go into a low-power state?

Yes, the CPU decodes multiple seconds~minutes at once (depending on DSP PCM offload buffer size), sends all of it to DSP, and then sleeps until DSP buffer is about to run out.

And with this proposal, would there be any additional buffer needs to store decoded PCM?

Inside the DSP, yes.

nift4 avatar May 25 '25 17:05 nift4