| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
Normally this kind of nasty hack could go into libaudio, but on this
particular device, we have no access to the source code of libaudio.
Put the nasty hack into audioflinger and wrap it in ifdefs.
Change-Id: I5e3e495e3bd6b671823967b61ba5ceb49e59a401
|
|
|
|
|
|
|
|
|
| |
Cleaned it up, and fixed a misplaced ifdef that broke the whole damn
thing.
This reverts commit 568f674b8ef1a83b7ba948b0e53e0dd86207d115.
Change-Id: I99fde73b2cf283dde7e9bcb1e73cf86e553324d3
|
|
|
|
| |
This reverts commit c5358c4b94c2953290988be654b284840551b5bd.
|
|
|
|
| |
Change-Id: If140f0cd1232f927f4870c5de3f25deac73c3778
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Used rectangular probability distribution function before by accident,
depite calculating the high-passed triangular probability density function
I intended to use. This commit rectifies the mistake and also adds
noise-shaped error feedback similar to JACK.
|
|
|
|
|
| |
Also fixes reverb like I originally intended it and tweaks
parameters a little.
|
|
|
|
|
|
|
|
|
|
|
| |
Subtracting the left and right channels could be argued to
separate the center channel from the left/right channel and the
DSP therefore gets applied to panned sounds only. This halves the
cost of the filtering and eliminates the bass boost issue that bs2b
compensates for with a highboost filter.
I also adjusted the delay-to-level spatial filter to try to get slightly
more consistent perception of panning across the frequency spectrum.
|
|
|
|
| |
prevVolume is scaled by 16 because of the ramping performed with it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Update headset to a 2nd order shelf filter, drop allpass delays
A single shelf filter can give a time delay for low frequencies
and attenuation for high frequencies yielding a headphone virtualization
directly.
- Make equalizer out of high shelves.
Cascading 4 high shelves and one global gain gives me 5 controllable bands
with passthrough characteristics when not used.
- Set loudness target to 93 %
Also correcting a volume-ramping bug which sometimes caused a slow
adjustment to desired volume because of integer truncation and invalid
round down/up algorithm. This should eliminate cases where song starts
super loud.
|
|
|
|
| |
vol limit, audio focus requests.
|
|
|
|
|
|
| |
This admittedly sounds almost the same, but the advantage of
shelving is with more high-frequency content being mixed. That being
said, the used shelving is reasonably steep (16 dB).
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Bs2b uses the low-pass filter to generate the delay as a byproduct
of its operation. The filter is generally set around 700 Hz where
it produces about 250 microseconds of delay. In addition to that,
the crossfeed is now mixed at -6 dB level. The reverb is unchanged,
although the new configuration gives it larger role in forming
an impression of a soundstage.
The design is still not complete, but good enough for a commit.
|
|
|
|
| |
Take #2.
|
|
|
|
| |
Patchset is broken. Will recommit a single working patch.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Additionally move the estimation boost clamper into a more
sensible base in the codebase.
Signed-off-by: Antti S. Lankila <alankila@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Move dithering to actually happen in the ditherAndClamp() procedure to
reduce memory pressure.
- Make volume ramping occur according to opposite logic: increases of
volume are slow, decreases rapid. That is a balance that makes far
more sense and spares user's ears far better.
- Avoid extreme boosts by mapping the dynamic range boost curve on a
nonlinear function x - x^3/3, for -1 <= x <= 0. This cuts off 1/3rd
of the entire boosting region and avoids the artifacts arising from
hardclipping this function.
Signed-off-by: Antti S. Lankila <alankila@gmail.com>
|
|
|
|
|
|
| |
Add a reverb module based on the Haas stereo widening effect.
Signed-off-by: Antti S. Lankila <alankila@gmail.com>
|
|
|
|
|
|
|
|
| |
I noticed there was some distortion arising from the fixed bottom level
set in the level estimator, so I removed such limits. I also enhanced the
estimation quality for the nearly inaudible sound levels.
Signed-off-by: Antti S. Lankila <alankila@gmail.com>
|
|
|
|
|
| |
An integer truncation issue resulted in discontinuous estimates of sound
level when the audio stream sound level was very quiet.
|
|
|
|
| |
This change makes compression effect about 10 times faster.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use crude approximation of the equal loudness curves (a single 2nd
order bandpass at 1 kHz). Because we must be stateless, the filter
is always reset first, which somewhat damages the behavior.
Limit adjustment range to 30 dB to avoid problems when sound goes
very quiet.
Make ramp up fast and ramp down slow. This gives reasonable response
to transients between periods of silence.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Optimization:
- write ARM assembly routine for biquads, using one load per pair of
coefficients.
Correctness fix:
- clamp sound level estimate below at -50 dB because of integer truncation
at estimateLevel() method.
Cosmetic changes:
- add headings in .cpp to make it easier to keep track of file structure.
- remove trailing whitespace
- rearrange some functions in logical order.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Recover from partial sync with CyanogenMod. Sync to version 7:
- do not use thumb instruction set for AudioDSP
- fix up types at AudioDSP to optimal
- workaround low-volume rattling with AudioMixer's volume ramping.
Various fixes.
- speed up estimateLevel
- remove state from estimateLevel, as it may be used by multiple
tracks simultaneously.
- co-opt android's volum ramping mechanism to smoothly apply the
envelope for me.
- fix loud snap when enabling headphone effect by clearing the
allocated allpass buffer.
|
| |
|
|
|
|
|
|
|
| |
In case of A2DP write errors, there is an overflow in the calculation
of the sleep duration to simulate the timing of a successful write.
Change-Id: Ic4e570aebf07fac69735aab1bbc2fc73512ee795
|
|
|
|
|
|
|
| |
This changes fixes the issue for the direct output thread that was not
addressed by commit 71f37cd8a175ee00635cb91506d6810fd02b5b51.
Change-Id: I1bbe26be5f444415dd97270e49257650f5d2858f
|
|
|
|
|
|
|
|
|
|
| |
The problem is a bug in AudioFlinger::MixerThread::prepareTracks_l() that makes that even if the TrackHandle
is destroyed, the corresponding Track will remain active as long as frames are ready for mixing.
If the track uses shared memory (static mode) and the sound is looped, this track will play for ever.
The fix consists in removing the track from active list immediately if the track is terminated.
Change-Id: I4582aa1d981079ab79be442fb6185f5afaed5cf3
|
|
|
|
|
|
|
|
|
|
|
| |
- AudioPolicyManager: allow platform specific choice for opening a direct output.
Also fixed problems in direct output management.
- AudioFliinger: use shorter standby delay and track inactivity grace period for direct output
thread to free hardware resources as soon as possible.
- AudioSystem: do not use cached output selection in getOutput() when a direct output
can be selected.
Change-Id: If44b50d29237b8402ffd7a5ba1dc43c56f903e9b
|
|
|
|
| |
Change-Id: I5581702780308658415dc4ad19fbe409fdc5c368
|
|
|
|
| |
Change-Id: Ifa75a82884b99aeee139e055f40e7c510cf28213
|
|
|
|
| |
Also changed tabs to spaces in other audioflinger files.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Part 1 of the fix: when the user doesn't elect to use the car dock
for music and media, the APM was not aware of the device being
docked.
This is fixed by dissociating the notification for the APM of
the docking to the dock from the sink state change of the A2DP
device.
Also missing was forcing the volumes to be reevaluated whenever
the device is docked or undocked, as volumes for docks may
differ, even when the same output device is being used.
Change-Id: If5314e27821a71adbd6df6fdf887c45208241d96
|
|
|
|
| |
Modified audio policy manager so that wired headset has precedence over A2DP headset.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The problem is that AudioRecord never exits read() when a timeout occurs while trying
to get new PCM data from audio hardware input buffer: it just keeps waiting and retrying until stop() is called.
In the same time, opencore AndroidAudioInput::audin_thread_func() loop cannot be exited when stuck
in AudioRecord::read() because the iExitAudioThread flag can only be sampled when AudioRecord::read()
returns. We remain stuck with the audio input thread running.
The fix consists in modifying AudioRecord behavior in case of timeout when getting new PCM samples.
We now wait only one timeout period and try to restart audio record, in case the problem is due to a media_server
process crash. If this fails, we exit read() with a number of bytes read equals to 0 so that
AndroidAudioInput::audin_thread_func() loop can exit.
Also modified Audioflinger::RecordThread() loop so that we attempt to recover from HAL read errors.
In case of read error, the input stream is forced to standby so that next read attempt does a
reconfiguration and restart of the audio input device.
|
|
|
|
|
|
|
|
| |
sholes
Add API to retrieve number of frames dropped by audio input kernel driver.
Submitted on behalf of Masaki Sato <masaki.sato@motorola.com>
|
|
|
|
|
|
|
|
|
|
|
| |
call audio on BT hs.
This is not a real fix for the issue but a change to make sure that the behavior is consistent regardless of
external condidions (WIFI ON or OFF, music started before call or not, A2DP device same as SCO device...).
As there is now way to guaranty good quality audio over both SCO and A2DP simultaneously, especially when WIFI is on, We will stick to this behavior:
When music is playing and we are docked to the desk dock and a call is answered with a BT SCO headset, A2DP output will be suspended.
If music is restarted during the call, it will appear muted to the user until the call is terminated.
|
|
|
|
|
|
|
|
|
|
| |
headset connected.
The noise is the residual ring tone that is still playing while the call is answered and the
audio route changed to headset or earpiece.
The fix consists in muting the ringing tone when changing mode from ringtone to in call
and delaying the route change until the audio buffers are emptied.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
At some point the implementation became complicated because of
SurfaceFlinger's special needs, since we are now relying on gralloc
we can go back to much simpler MemoryDealer.
Removed HeapInterface and AllocatorInterface, since those don't need
to be paramterized anymore. Merged SimpleMemory and Allocation.
Made SimplisticAllocator non virtual.
Removed MemoryDealer flags (READ_ONLY, PAGE_ALIGNED)
Removed a lot of unneeded code.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added getRenderPosition() API to IAudioFlinger to retreive number of audio frames
written by AudioFlinger to audio HAL and by DSP to DAC.
Added getRenderPosition() API to AudioHardwareInterface to retreive number of audio frames
written by DSP to DAC.
Exposed AudioTrack::getPosition() to AudioSink() to make it available to media player.
Removed excessive log in AudioHardwareGeneric.
|
|
|
|
|
|
|
|
|
| |
STREAM_VOICE_CALL stream when STREAM_VOICE_CALL stream is active.
Modified AudioService.getActiveStreamType() so that STREAM_VOICE_CALL is selected when a track using this stream
type is playing.
Chanded isMusicActive() for a more generic isStreamActive(stream) method in AudioSystem, IAudioFlinger and AudioFlinger.
|
|
|
|
|
|
|
|
|
|
| |
First implementations of audio policy manager in Eclair branch have shown that most code is common to all platforms.
Creating AudioPolicyManagerBase base class will improve code maintainability and readability.
Audio policy manager code for platforms using generic audio previously in AudioPolicyManagerGeneric is replaced by AudioPolicyManagerBase.
Audio policy manager test code previously in AudioPolicyManagerGeneric is moved to AudioPolicyManagerBase.
Also added a wake lock for delayed commands in AudioPolicyService.
|
|\
| |
| |
| |
| |
| |
| | |
Merge commit '0c5cc224b052654ee38d39effce427a47697481b'
* commit '0c5cc224b052654ee38d39effce427a47697481b':
Fix issue 2323920: Notification & A2DP audio stutter.
|