Flac HD 192 KHz and multichannel

179 views
Skip to first unread message

Kumar Rounak

unread,
Nov 20, 2013, 12:07:24 PM11/20/13
to android...@googlegroups.com
I have been trying to port Flac HD (192Khz 24 bit) on android 4.2.2 but don't know how to proceed, I came across some change list in which you enabled multi channel flac on android.
Can someone give me some pointer on how to start also if possible on how to enable downsampling support in AudioFLinger.

Thanks,
Rounak

Glenn Kasten

unread,
Nov 20, 2013, 1:00:10 PM11/20/13
to android...@googlegroups.com
The internal audio framework data path is currently mostly stereo 44.1 or 48 kHz and 16-bit depth, 
with notable exceptions for specific use cases (in particular multi-channel and HDMI).
If you wanted to add 192 kHz and 24-bit throughout the whole framework, that would be a significant project.
But as I understand you just want to convert your FLAC HD content to a form that rest of system can handle.
So I think you'll need to implement a 24-bit -> 16-bit dither, and a 192 -> 44.1 or 48 downsampler with lowpass filter to remove any high-frequency components.
As far as multi-channel, there is already a multi-channel to stereo virtualizer/downmixer effect so you shouldn't need to implement that.

Kumar Rounak

unread,
Nov 25, 2013, 1:03:30 AM11/25/13
to android...@googlegroups.com
Thanks for your reply.

As you said:
If you wanted to add 192 kHz and 24-bit throughout the whole framework, that would be a significant project.
What it would take to do this?
We are having a 5.1 channel HD DAC which is connected to the system we want the decoded data to go to this DAC.

Glenn Kasten

unread,
Nov 26, 2013, 10:06:30 AM11/26/13
to android...@googlegroups.com
In addition to the tasks listed in my 11/24 post, then you'll also need a new audio HAL (hardware abstraction layer) and may need to update the HAL interface.

I would start by studying the code in these projects, along with any of their dependencies (not a complete list):
frameworks/av/services/audioflinger
hardware/libhardware/include/*audio*
frameworks/media/libmedia/AudioTrack*
frameworks/av/include/media/*Audio*
system/media/audio_utils
frameworks/av/media/libeffects
system/core/include/system/audio.h

Again, I don't mean to discourage you, but this is a significant project.
Reply all
Reply to author
Forward
0 new messages