History log of /frameworks/av/services/audioflinger/AudioResampler.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
505fd3025855f424353ae084495e1855522cf65b 17-Feb-2016 Glenn Kasten <gkasten@google.com> Disable ARM assembly optimization of legacy linear resampler

It has magic numbers in the asm() that no longer work,
isn't used any more and not really much faster than the C version.

Bug: 13102576
Change-Id: I56398a749ee0a45f31de9317e0a57e38d7b68a69
/frameworks/av/services/audioflinger/AudioResampler.cpp
d79072e9dff59f767cce2cda1caab80ce5a0815b 06-Jan-2016 Glenn Kasten <gkasten@google.com> Remove TimedAudioTrack and associated code

Bug: 8278435
Change-Id: I095c1a4888e645e14d93b0b15fbef4524a831ca1
/frameworks/av/services/audioflinger/AudioResampler.cpp
6b3b7e304e0f8f167241b2c75f1eb04a9ef192ec 29-Mar-2015 Andy Hung <hunga@google.com> Return number of frames output from resample method

Change-Id: Ic297e2ed59839f1788c83e099ef1a9e4af29591f
/frameworks/av/services/audioflinger/AudioResampler.cpp
8a9737ce64a53f06a2c1774b4ea025897c63bff1 03-Dec-2014 Elliott Hughes <enh@google.com> __ARM_HAVE_HALFWORD_MULTIPLY is always true for __arm__.

And this is the only user of that macro...

Bug: 18556103
Change-Id: I1b515a54ac8530b150f4dd93070db60c701a5603
/frameworks/av/services/audioflinger/AudioResampler.cpp
5e58b0abe5b6c8f5bd96a8f78bbeeeb4d3892020 24-Jun-2014 Andy Hung <hunga@google.com> Add floating point volume handling to AudioMixer

Use floating point volume in AudioMixer mixing when floating
point input is used with the new mixer engine.
AudioResampler is updated to take floating point volume to match.
Both legacy integer and floating point mixer engines work.

For now, integer volume is used when the new mixer engine
runs in integer input mode, for backward compatibility with
the legacy mixer. The new mixer engine will generally run in
floating point input mode. When the legacy path is removed,
the integer volumes will be removed.

Change-Id: I79e80c292ae7c8b8bdd0aa371a1b2c3a1b618290
/frameworks/av/services/audioflinger/AudioResampler.cpp
3348e36c51e91e78020bcc6578eda83d97c31bec 07-Jul-2014 Andy Hung <hunga@google.com> Replace int bitDepth with audio_format_t in Resampler

Remove mBitDepth from class (not used).
Replace with audio_format_t in factory method to distinguish
between float and pcm 16-bit.

Change-Id: I166860796c68285077ef4458d8758d19b82523f9
/frameworks/av/services/audioflinger/AudioResampler.cpp
075abae2a954bf3edf18ad1705c2c0f188454ae0 10-Apr-2014 Andy Hung <hunga@google.com> Add and enable multichannel for audio resampler

Change-Id: I2b86fb73d70abc4c456f7567270a888086b301d4
Signed-off-by: Andy Hung <hunga@google.com>
/frameworks/av/services/audioflinger/AudioResampler.cpp
771386e6e6e79697e2d839ef0f25a242946ba1e5 09-Apr-2014 Andy Hung <hunga@google.com> Add and enable floating point option for audio resampler

Can be tested with test-resample.

Change-Id: I8339846d7c647444b6025d33cfa145d5d3658121
Signed-off-by: Andy Hung <hunga@google.com>
/frameworks/av/services/audioflinger/AudioResampler.cpp
24781fff62a4cf7279d3dac83c33e2ac612712ba 19-Feb-2014 Andy Hung <hunga@google.com> Fix resampler to allow output of single frame

Bug: 13073201
Change-Id: If7818a3389a191a37277bbd8e96a59ef8ce68509
Signed-off-by: Andy Hung <hunga@google.com>
/frameworks/av/services/audioflinger/AudioResampler.cpp
01d3acba9de861cb2b718338e787cff3566fc5ec 06-Feb-2014 Glenn Kasten <gkasten@google.com> Fix clang warnings in AudioFlinger

Change-Id: I0fa61025c979709ad7d655bc717df5f194b6089e
/frameworks/av/services/audioflinger/AudioResampler.cpp
4a25471795b05ffcfcc079e9f9cb5ed549023d14 05-Feb-2014 Glenn Kasten <gkasten@android.com> am 5ef74dce: am d66cd743: Merge "audioflinger: conform inline ASM to UAL"

* commit '5ef74dce64a1b70534547c044a6d15533f4a9dca':
audioflinger: conform inline ASM to UAL
5f51ade2c290e239a125dc88943b240e1105fd97 04-Feb-2014 synergy dev <synergye@codefi.re> audioflinger: conform inline ASM to UAL

Clang requires some inline ASM to conform to the UAL standards (Unified Assembler Language).
This fixes a small issue in this inline asm to allow building.

Change-Id: Ifd9b1814343ab5ade636b9401a21d575559dac16
/frameworks/av/services/audioflinger/AudioResampler.cpp
9e0308c03d4e76d3146cbb6e30aeb3ac03f05cf5 30-Jan-2014 Andy Hung <hunga@google.com> Enable new dynamic audio resampler as default

The default may still be overridden by af.resampler.quality
in the local or build properties file. For the build properties
check the relevant device.mk files.

In the absence of being overridden, the 44.1 to 48kHz and
48 to 44.1kHz conversion will use the DYN_MED_QUALITY resamplers
and other conversion will use the DYN_LOW_QUALITY resamplers.

Change-Id: Icf9a4af5422cddc445e1904eef93984b0abe6a44
Signed-off-by: Andy Hung <hunga@google.com>
/frameworks/av/services/audioflinger/AudioResampler.cpp
ee931ff7d6620e5705f4dfba901fdb03fa4a35fd 28-Jan-2014 Andy Hung <hunga@google.com> Remove warnings in Audio mixer resampler compilation.

Change-Id: Ie68766142796772a54a90afdea188d0a5a78d4ac
Signed-off-by: Andy Hung <hunga@google.com>
/frameworks/av/services/audioflinger/AudioResampler.cpp
86eae0e5931103e040ac2cdd023ef5db252e09f6 09-Dec-2013 Andy Hung <hunga@google.com> Audio resampler update to add S16 filters

This does not affect the existing resamplers.
New resampler accessed through additional quality settings:

DYN_LOW_QUALITY = 5
DYN_MED_QUALITY = 6
DYN_HIGH_QUALITY = 7

Change-Id: Iebbd31871e808a4a6dee3f3abfd7e9dcf77c48e1
Signed-off-by: Andy Hung <hunga@google.com>
/frameworks/av/services/audioflinger/AudioResampler.cpp
6e2ebe97f2ad0a21907f20f9ee644c4eacbb7a40 13-Aug-2013 Glenn Kasten <gkasten@google.com> Use curly braces in 'if' to make it easier to add logs

Change-Id: I58b33fefdd8bf703647414157a99a3223be3531c
/frameworks/av/services/audioflinger/AudioResampler.cpp
51ba3c7c9a4a238cdef57ad75a2d8f406ffd4515 26-Oct-2012 Mathias Agopian <mathias@google.com> reenable the cubic resampler

cubic resampler was disabled because it hadn't been qualified,
however after I did some tests, it does improve significantly
the sound quality over the order-1 resampler, even if it is
still quite bad.

also HIGH_QUALITY resampler was partially disabled, it's now
fully enabled. It's a big improvement over the cubic resampler
in terms of aliasing noise (it's not as good in the pass-band).

Change-Id: I70e3658c255896588642697be9eb594ff4ec0f8b
/frameworks/av/services/audioflinger/AudioResampler.cpp
93d0767a8a9ee9d649eea9afac59f778e29a6a54 26-Oct-2012 Mathias Agopian <mathias@google.com> reenable the cubic resampler

cubic resampler was disabled because it hadn't been qualified,
however after I did some tests, it does improve significantly
the sound quality over the order-1 resampler, even if it is
still quite bad.

also HIGH_QUALITY resampler was partially disabled, it's now
fully enabled. It's a big improvement over the cubic resampler
in terms of aliasing noise (it's not as good in the pass-band).

Change-Id: I70e3658c255896588642697be9eb594ff4ec0f8b
/frameworks/av/services/audioflinger/AudioResampler.cpp
f1b2a9b65a904b10f91482cc0389bea1f66a891f 23-Oct-2012 Glenn Kasten <gkasten@google.com> Increase allowed number of VHQ resamplers to 3

Bug: 7378660
Change-Id: I69e33ca2eb4bb9bd38e2c63df62cd1130d68baf6
/frameworks/av/services/audioflinger/AudioResampler.cpp
c4640c9eef850bb1c754bd6b477f1cc8350c6081 23-Oct-2012 Glenn Kasten <gkasten@google.com> Increase allowed number of VHQ resamplers to 3

Bug: 7378660
Change-Id: I69e33ca2eb4bb9bd38e2c63df62cd1130d68baf6
/frameworks/av/services/audioflinger/AudioResampler.cpp
a6d41334d25ffde12484eb28301352560a063ef6 01-Oct-2012 Glenn Kasten <gkasten@google.com> Integrate improved coefficient sinc resampler: VHQ

Summary:
Very high quality is enabled only for 44.1 -> 48 or 48 -> 44.1,
and uses low quality for all other use cases.
Track estimated CPU load and throttles the quality based on load;
as currently configured it should allow up to 2 instances of very high quality.
Medium quality and high quality are currently disabled unless explicitly requested.

Details:
Only load .so the first time it is needed.
Cleanup code style: formatting, indentation, whitespace.
Restore medium quality resampler, but it is not used (see next line).
Fix memory leak for sinc resampler.
Check sample rate in resampler constructor.
Add logs for debugging.
Rename DEFAULT to DEFAULT_QUALITY for consistency with other quality levels.
Renumber VERY_HIGH_QUALITY from 255 to 4.
Use enum src_quality consistently.
Improve parsing of property af.resampler.quality.
Fix reentrancy bug - allow an instance of high quality and an instance
of very high quality to both be active concurrently.

Bug: 7229644
Change-Id: I0ce6b913b05038889f50462a38830b61a602a9f7
/frameworks/av/services/audioflinger/AudioResampler.cpp
ac6020508acedd316391dee42329040bf45f8d90 01-Oct-2012 Glenn Kasten <gkasten@google.com> Integrate improved coefficient sinc resampler: VHQ

Summary:
Very high quality is enabled only for 44.1 -> 48 or 48 -> 44.1,
and uses low quality for all other use cases.
Track estimated CPU load and throttles the quality based on load;
as currently configured it should allow up to 2 instances of very high quality.
Medium quality and high quality are currently disabled unless explicitly requested.

Details:
Only load .so the first time it is needed.
Cleanup code style: formatting, indentation, whitespace.
Restore medium quality resampler, but it is not used (see next line).
Fix memory leak for sinc resampler.
Check sample rate in resampler constructor.
Add logs for debugging.
Rename DEFAULT to DEFAULT_QUALITY for consistency with other quality levels.
Renumber VERY_HIGH_QUALITY from 255 to 4.
Use enum src_quality consistently.
Improve parsing of property af.resampler.quality.
Fix reentrancy bug - allow an instance of high quality and an instance
of very high quality to both be active concurrently.

Bug: 7229644
Change-Id: I0ce6b913b05038889f50462a38830b61a602a9f7
/frameworks/av/services/audioflinger/AudioResampler.cpp
41dfd129a181a5b0b62628733cf96e0ce11d64d7 17-Jan-2012 SathishKumar Mani <smani@codeaurora.org> audioflinger: use resample coefficients from audio-resampler library.

-Add a separate quality VERY_HIGH_QUALITY in resampler
-Use resample coefficients audio-resampler library for
quality VERY_HIGH_QUALITY.
-This improves the quality of resampled output.

Bug: 7024293
Change-Id: Ia44142413bed5f5963d7eab7846eec877a2415e4
Signed-off-by: Iliyan Malchev <malchev@google.com>
/frameworks/av/services/audioflinger/AudioResampler.cpp
76b111685010e1fea7c0a865c038aee35507fde4 17-Jan-2012 SathishKumar Mani <smani@codeaurora.org> audioflinger: use resample coefficients from audio-resampler library.

-Add a separate quality VERY_HIGH_QUALITY in resampler
-Use resample coefficients audio-resampler library for
quality VERY_HIGH_QUALITY.
-This improves the quality of resampled output.

Bug: 7024293
Change-Id: Ia44142413bed5f5963d7eab7846eec877a2415e4
Signed-off-by: Iliyan Malchev <malchev@google.com>
/frameworks/av/services/audioflinger/AudioResampler.cpp
e53b9ead781c36e96d6b6f012ddffc93a3d80f0d 13-Mar-2012 Glenn Kasten <gkasten@google.com> Whitespace and indentation

Fix indentation to be multiple of 4.
Make it easier to search:
sp< not sp < to
"switch (...)" instead of "switch(...)" (also "if" and "while")
Remove redundant blank line at start or EOF.
Remove whitespace at end of line.
Remove extra blank lines where they don't add value.

Use git diff -b or -w to verify.

Change-Id: I966b7ba852faa5474be6907fb212f5e267c2874e
/frameworks/av/services/audioflinger/AudioResampler.cpp
4ff14bae91075eb274eb1c2975982358946e7e63 09-Feb-2012 John Grossman <johngro@google.com> Upintegrate Audio Flinger changes from ICS_AAH

Bring in changes to audio flinger made to support timed audio tracks
and HW master volume control.

Change-Id: Ide52d48809bdbed13acf35fd59b24637e35064ae
Signed-off-by: John Grossman <johngro@google.com>
/frameworks/av/services/audioflinger/AudioResampler.cpp
3a144d08b713e3c0f6b7b8e95bc42cef5886f4fa 11-Feb-2012 Glenn Kasten <gkasten@google.com> Merge "Disable HQ resamplers for now until qualified"
cdf2158f3b9498d6cd0eb228d8bee16e32399e16 02-Feb-2012 Glenn Kasten <gkasten@google.com> Disable HQ resamplers for now until qualified

This saves about 6500 bytes.

Change-Id: I87102fe561c95c19c9e615dea3de914f96639257
/frameworks/av/services/audioflinger/AudioResampler.cpp
90bebef5669a9385c706b042d146a31dca2e5d9b 28-Jan-2012 Glenn Kasten <gkasten@google.com> No newline or space at end of ALOG format string

Change-Id: I0bef580cbc818cb7c87aea23919d26f1446cec32
/frameworks/av/services/audioflinger/AudioResampler.cpp
d5e54f7a36daedc3b2a642d1499c262da04e6280 26-Jan-2012 Glenn Kasten <gkasten@google.com> Remove dead code

mFormat is unused in resampler
mClientTid is unused
local variable pid is unused in dump

Change-Id: Ib156e38029366620bfeff2a13e73471867155a5b
/frameworks/av/services/audioflinger/AudioResampler.cpp
c1dc1cb1d1eaf84e88669f1a5f22579a0d9237c2 09-Jan-2012 Steve Block <steveblock@google.com> Rename LOG_ASSERT to ALOG_ASSERT DO NOT MERGE

See https://android-git.corp.google.com/g/157519

Bug: 5449033
Change-Id: I8ceb2dba1b031a0fd68d15d146960d9ced62bbf3
/frameworks/av/services/audioflinger/AudioResampler.cpp
29357bc2c0dd7c43ad3bd0c8e3efa4e6fd9bfd47 06-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/#/c/157220

Bug: 5449033
Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c
/frameworks/av/services/audioflinger/AudioResampler.cpp
b8a805261bf0282e992d3608035e47d05a898710 20-Dec-2011 Steve Block <steveblock@google.com> Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/156016

Bug: 5449033
Change-Id: I4c4e33bb9df3e39e11cd985e193e6fbab4635298
/frameworks/av/services/audioflinger/AudioResampler.cpp
c23e2f2464eb3748599d47af7d8986b856f3c179 17-Nov-2011 Glenn Kasten <gkasten@google.com> Bug 5522189 re-enable ARM opts but disable inline

PIE did not work together with inlining. This change combines (almost
all of) the performance benefits of ARM optimizations together with PIE.

Change-Id: I4594d33ae5a0a7bac327ae08e30fb35343a06256
/frameworks/av/services/audioflinger/AudioResampler.cpp
305f4b6dabe500b97062e72049a296d0699243d7 28-Oct-2011 Glenn Kasten <gkasten@google.com> Bug 5522189 temporary workaround

Change-Id: I21d91d7a24df7bb6e7fc3d0fbc4786d55391fc0e
/frameworks/av/services/audioflinger/AudioResampler.cpp
3856b090cd04ba5dd4a59a12430ed724d5995909 20-Oct-2011 Steve Block <steveblock@google.com> Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/#/c/143865

Bug: 5449033
Change-Id: I0122812ed6ff6f5b59fe4a43ab8bff0577adde0a
/frameworks/av/services/audioflinger/AudioResampler.cpp
eb8b914ad9d4331e1cdf4346731770ce69fd0e77 16-Sep-2011 Nick Kralevich <nnk@google.com> AudioResampler: use relative instead of absolute labels

This change is needed to allow Android to compile with -fPIE
Bug: 5328392

Change-Id: I84d947975776800a7b79c6ac75a881af461a631c
/frameworks/av/services/audioflinger/AudioResampler.cpp
4d0243980123378e9dd69022bf4ddca729d84126 12-Apr-2011 Brad Fitzpatrick <bradfitz@android.com> am 4430670f: am ca7ad44a: Merge "audioflinger: Enable ARMv5TE optimized resampler"

* commit '4430670f48f75661293371dab8db55865f5f56e0':
audioflinger: Enable ARMv5TE optimized resampler
0c0a1c0c37dbd2646a732da706d6777283c83e44 06-Apr-2011 Jim Huang <jim.huang@linaro.org> audioflinger: Enable ARMv5TE optimized resampler

Previously, the optimized asm option is only enabled when
__ARM_ARCH_5E__ is defined, which is assigned in armv5te.mk
rather than armv7-a series targets. This patch checks the ARM CPU
feature about half-word multiply instructions to enable ARMv5TE
resampler optimization routines properly.

Change-Id: I4c5a5d8c932416f23bedb0b389db958349f21ea4
/frameworks/av/services/audioflinger/AudioResampler.cpp
243f5f91755c01614a8cafe90b0806396e22d553 01-Mar-2011 Eric Laurent <elaurent@google.com> Fix issue 3479042.

The problem is that when an AudioRecord using the resampler is restarted,
the resampler state is not reset (as there is no reset function in the resampler).
The consequence is that the first time the record thread loop runs, it calls the resampler
which consumes the remaining data in the input buffer and when this buffer is released
the input index is incremented over the limit.

The fix consists in implementing a reset function in the resampler.

A similar problem was also present for playback but unoticed because the track buffer is always
drained by the mixer when a track stops. The only problem for playback was that the initial
phase fraction was wrong when restarting a track after stop (it was correct after a pause).

Change-Id: Ifc2585d685f4402d29f4afc63f6efd1d69265de3
/frameworks/av/services/audioflinger/AudioResampler.cpp
65ab47156e1c7dfcd8cc4266253a5ff30219e7f0 15-Jul-2010 Mathias Agopian <mathias@google.com> move native services under services/

moved surfaceflinger, audioflinger, cameraservice

all native services should now reside in this location.

Change-Id: Iee42b83dd2a94c3bf5107ab0895fe2dfcd5337a8
/frameworks/av/services/audioflinger/AudioResampler.cpp