summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* AudioFX: Fix possible RuntimeExceptioncm-14.0Michael W2016-11-041-1/+3
| | | | | | | | | | Seems like mSessionManager is not initialised in some cases, and the call to destroy() causes a RuntimeException. Wrap with a null check to prevent the failure. Change-Id: I4713e303f3223d60a6674a0a1096c7b7f37a9814 Reference: BugDumps 13-20161014-20 L#3 (cherry picked from commit 57e73c474580531513c016f76bb486190685173d)
* AudioFX: Fix possible NPEMichael W2016-11-041-1/+3
| | | | | | | | | | | The only reliable thing is the initialisation with null -> if it will not be overriden in any of the loops, the call to setChecked() causes an NPE. Wrap the operation with a null check Change-Id: I7aaacf9f5ae53434643df1c477c8ea536f8602ff Reference: BugDumps 13-20161014-20 L#11 (cherry picked from commit b1c9efb6550a7e39ec41c00b08f853279b855ce9)
* AudioFX: fix missing virtualizerRoman Birg2016-10-164-9/+11
| | | | | | | | | | | | | If the device doesn't have headphones plugged in, and the speaker reports that it doesn't support virtualizer strength in speaker mode, we made the assumption it was never available. Just check for a valid refernce to the effect, all AndroidEffects _should_ have a virtualizer. Also moved the prefs version to the prefs manager. Change-Id: Id44087c509ece3d55b42c985660a61222bbdfe17 Ticket: AUDIO-152 Signed-off-by: Roman Birg <roman@cyngn.com>
* audiofx: Don't check if strength is supported for bass boostSteve Kondik2016-09-302-2/+2
| | | | | | | | | | | | | * New Qualcomm DSP supports Psychoacoustic Bass Enhancement for the speaker. When the effect is created in this mode, it does not have a strength control. Since the effects are discovered by attaching to the global session, likely on speaker, the user will end up with the effect disabled. * Ideally we want to show a toggle switch for these kinds of effects, but that can come later. * Bump the prefs version so nothing stays cached. Change-Id: I85b6f504d9037ff290f18724dfc201392b9f46b4
* audiofx: Remove AmbientSteve Kondik2016-09-309-338/+0
| | | | | | * Not needed in OSS Change-Id: I44a93fab6888d37dce41a402f8603ae9952857d1
* AudioFX: Update copyright after OSSZhao Wei Liew2016-09-301-5/+1
| | | | | | | The CYNGN AudioFX has been open-sourced, so the original copyright header no longer holds true. Change-Id: Id15e14f5037cf8e1914139477edf12ffaae27833
* AudioFX: Fix possible NPEMichael W2016-09-171-1/+1
| | | | | | | | | | In case updateQsTile() has not been executed before (or been interrupted), mLastLocale has never been set and therefore results in an NPE. Turn around the logic to prevent this Change-Id: Iee6f8fede51c5002820e1ebe9045be79fcd54223 Reference: BugDumps 13-20160902-8 L#8 (cherry picked from commit dfc3f3691163ff3fd254a1ccda720daaecbb38ed)
* AudioFX: Resync with AOSP translationsMichael Bestas2016-09-042-5/+5
| | | | Change-Id: I87b3725f993f2d5601ef7d919853667fc6d0cfb2
* AudioFX: finish rename; persist processRoman Birg2016-08-2944-246/+670
| | | | | | | | | | | - Set persistent flag for app in the manifest, this backing process shouldn't be dying when the user swipes away the UI - Fix package structure to be org.cyanogenmod.audiofx - Add missing java license headers Change-Id: I03d37b6ca0548d881aaf46754c776da923e1ef59
* Merge "AudioFX: disable debug logging" into cm-13.0Roman Birg2016-08-251-1/+1
|\
| * AudioFX: disable debug loggingRoman Birg2016-08-251-1/+1
| | | | | | | | | | Change-Id: If69e8ad96bab87d5f73290a9e9aaa3e05da40c33 Signed-off-by: Roman Birg <roman@cyngn.com>
* | Fix strings.Danny Baumann2016-08-251-1/+1
|/ | | | | | Remove unused strings and use the correct app name. Change-Id: Ie4d14ec6009edadc2391240b4842f192fcbb4f93
* AudioFX: rename package to org.cyanogenmod.audiofxRoman Birg2016-08-2342-0/+0
| | | | | | | For internal builds we'll keep the com.cyngn.audiofx package name Change-Id: I28703a66308c1018ea0a6f82b73a53959f9b7412 Signed-off-by: Roman Birg <roman@cyngn.com>
* ModioFX: split backend implementationsRoman Birg2016-08-236-85/+29
| | | | | Change-Id: Ib6f345000b25a17a5c7520ea47355f1d96936522 Signed-off-by: Roman Birg <roman@cyngn.com>
* AudioFX: iniitalize services with current deviceRoman Birg2016-06-143-4/+8
| | | | | | | | | | | If the user clears app data while not on the speaker device, we won't catch the state properly when the app comes back up and will not serve the proper values to the backend service. Ticket: AUDIO-152 Change-Id: I3ed48edb3bae51bd70bc1aad5b96216b9c77a335 Signed-off-by: Roman Birg <roman@cyngn.com>
* AudioFX: fix first boot listener regressionRoman Birg2016-06-011-0/+4
| | | | | Change-Id: I47693ae45e7fb99fae3aa7f7487d17160b369db9 Ticket: OPO-343
* Revert "AudioFX: create audio output change listener after it's dependencies"Roman Birg2016-06-011-3/+3
| | | | | | | | | | This reintroduced the first boot race of not getting audio change callbacks Ticket: OPO-343 This reverts commit f3954b74ef01463592aa3c89099d95bac4cd1bab. Change-Id: I23d1f3c6ffc732c29e63e4d471954960bccf4f09
* modiofx: Reintroduce deferred release for MaxxAudioSteve Kondik2016-05-252-21/+61
| | | | | | | * And guard against races correctly by adding a death marker. Change-Id: I28b56e7326163d28293f8f5e9b10a53e7c34a2c0 Fixes: AUDIO-139
* AudioFX: fix qs tile updatingRoman Birg2016-05-231-2/+2
| | | | | | | | | | | | | We need to actually update the prefs after a tile toggle. Also we aren't coming from background, so that was not the right flag for the receiver. Instead we need to tell the receiver to come to the FOREGROUND! Ticket: FEIJ-747, FEIJ-695 Change-Id: I43843739958579932ff57c3d83a2e4bce65c33c9 Signed-off-by: Roman Birg <roman@cyngn.com>
* AudioFX: create audio output change listener after it's dependenciesScott Mertz2016-05-231-3/+3
| | | | | | | | | | | | | | | | | | | There is a chance the AudioOutputChangeListener calls back to AudioFxService via it's callbacks before the DevicePreferenceManager is insantiated. Ensure the DevicePreferenceManager is created before registering the callback. Fixes the following error: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.cyngn.audiofx.service.DevicePreferenceManager.isGlobalEnabled()' on a null object reference at com.cyngn.audiofx.service.AudioFxService.updateQsTile(AudioFxService.java:272) at com.cyngn.audiofx.service.AudioFxService.onAudioOutputChanged(AudioFxService.java:249) at com.cyngn.audiofx.service.AudioOutputChangeListener$1.run(AudioOutputChangeListener.java:80) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:148) at android.os.HandlerThread.run(HandlerThread.java:61) OPO-743 Change-Id: I6cb52e676f4e91934e151b1d95b5f45a2dc85993
* AudioFX: Disable Ok button if rename text is emptyKeith Mok2016-05-201-1/+25
| | | | | | | | | Disable the ok button using addTextChangedListener when the rename text editable is of zero length. FEIJ-727 Change-Id: I1cd8eadb21bbbf7f3dd7bd693a414a61f71796f7
* AudioFX: finish swipe animation if hitting off during itRoman Birg2016-05-191-2/+5
| | | | | | | | | | It was possible for the view pager to pause in between presets and did not allow the user to touch it. Ticket: AUDIO-151 Change-Id: I5a73e8c2e6a7f1953e3abb9c8376a121946f4f07 Signed-off-by: Roman Birg <roman@cyngn.com>
* AudioFX: fix output listener regressionRoman Birg2016-05-041-2/+2
| | | | | | | | | | We need to register with Audio Manager before doing anything else to receive callbacks properly. Ticket: OPO-343 Change-Id: I5533b02b533ec160f3ca357692709294c118263f Signed-off-by: Roman Birg <roman@cyngn.com>
* modiofx: Add a default preset for headphones on Android effectsSteve Kondik2016-04-281-0/+12
| | | | Change-Id: I1542577007a479b82c4907d81315a058e72df849
* audiofx: Fix the QS tileSteve Kondik2016-04-284-85/+124
| | | | | | * And clean up device tracking. Change-Id: I4dc935c6a1e17b7dd346b1197876089c3436c7a5
* audiofx: Update for CMAudioService changesSteve Kondik2016-04-283-26/+67
| | | | | | * Switch to the new broadcast mechanism for audiosessions. Change-Id: Ibf0a8cf04a80762f3e44642cbbe8c56468197035
* modiofx: Stop being clever with Android effectsSteve Kondik2016-04-261-42/+2
| | | | | | | * This breaks the UI Ticket: AUDIO-147 Change-Id: I090fdf19767baa57e192f3ecfa55e20963ae3155
* modiofx: Fix various issues with Android FXSteve Kondik2016-04-193-34/+100
| | | | | | | * Add device selection and internal effect tracking * Stop calling setGlobalEnabled unconditionally Change-Id: I617a03b12275c16b0efef6d215b5b7499cd98524
* modiofx: Bump prefs versionSteve Kondik2016-04-181-1/+1
| | | | | | | * Some of the first-run code changed to ensure our custom presets get created. Change-Id: I6f53a03157f36bedad59bfc366445e78270b67d5
* audiofx: Don't auto-attach if a recording is activeSteve Kondik2016-04-151-0/+7
| | | | | | | | * Some apps use loopback over the headphone path to perform various functions and tests. Disable auto-attach if this is detected since we don't want to interfere with it. Change-Id: I5143fb5b10abc5840331b3393cd12d78c6c43091
* AudioFX: don't assume stream typeRoman Birg2016-04-153-35/+37
| | | | | | | | | We always assume new sessions are always content type of MUSIC. Actually parse the incoming intent and set the value correctly so we don't apply effects unnecessarily as we only want to support Music for now. Change-Id: I260e3c07ef44ceeaa0d2950f1091b9f4f213f115 Signed-off-by: Roman Birg <roman@cyngn.com>
* modiofx: Unmodifiable list is unmodifiableSteve Kondik2016-04-121-2/+3
| | | | | | * Use an arraylist. Change-Id: I1f2d9521df7a7423052db4ffc13cd958f0d030be
* audiofx: Add support for line out devicesSteve Kondik2016-04-083-3/+18
| | | | | | | | | * Kernel can report the output device as line-out if high impedance is detected. This is useful to support in AudioFX as a standalone device as the user probably won't want the same settings on their headphones vs. their car stereo. Change-Id: Ib77c66ecdb6ce7518253fa357959dd3317611602
* audiofx: Misc fixesSteve Kondik2016-04-082-6/+12
| | | | | | | | * Don't resend EQ parameters on device switch, they are already sent. * Synchronize a few things around parameters. * Adjust spacebass again clear user parameters when switching devices. Change-Id: I74b3984e0f8ea603fcad0038c1cd081a4bfc81c0
* audiofx: Update for new session callback mechanismSteve Kondik2016-04-082-5/+18
| | | | | | | | | | | | | * Session callbacks now fire for *all* audio sessions. Additional information is now passed to allow us to make a call on whether we should load effects for this stream. * The current restrictions for session callbacks will attach effects if the stream type is STREAM_MUSIC, the stream is deep buffer or compress offload, and the stream is not mono. We also receive the UID, but this is not yet used. Additional constraints can be defined later. Change-Id: I61b508dfe9191e9e2c4311e80a2e16dab99481e2
* audiofx: Refactor the serviceSteve Kondik2016-04-063-637/+710
| | | | | | | * Starting to get unwieldy. Factor out DevicePreferenceManager and SessionManager into standalone classes. Change-Id: I8e45b734fb647014b6d5c0913dfad4c3e46e92ec
* audiofx: Remove deferred session release codeSteve Kondik2016-04-061-6/+1
| | | | | | | | * This causes more trouble than it's worth, and janks things up with session callbacks. AudioPolicy already handles deferred release in this case for us, there's no need to do it twice. Change-Id: Ib4874df03fb8f1004c8e892bde1e4d243847f22e
* audiofx: Simplify threads usageSteve Kondik2016-04-051-67/+42
| | | | | | | | | | | | | * We don't need to do anything magical with threads. We just need one HandlerThread at normal priority which handles updating the backend when the UI changes or a new device is connected. * No performance penalty is observed when switching presets or sliding EQ bars in this configuration. * There is no need to post a message to update the device. The callback is already executed on our handler, so we're just doing extra work and stalling the process. Change-Id: I1209888579607cfbc020b2b1e79140ef3f28d28c
* audiofx: Re-add product name to preference nameSteve Kondik2016-04-052-8/+24
| | | | | | | * This allows us to have different preferences depending on the device connected, as it was in the past. Change-Id: I84cf0bf272db58c97886d4daaedd48cbd4d43aa6
* audiofx: Always update the UI for device switchesSteve Kondik2016-04-051-7/+0
| | | | | | | | * It's possible in a situation like offload fallback for the UI to receive a device switch event twice. Make sure we fully update the UI so that the correct preset is displayed. Change-Id: Ie0db2bdbbda523e244dabd6552c8f9bc0de51579
* AudioFX: better maxx effect handling and creationRoman Birg2016-04-055-121/+175
| | | | | Change-Id: I6980f7b3e6c96745fd28070616cad8395b2d6acc Signed-off-by: Roman Birg <roman@cyngn.com>
* audiofx: A big pile of fixes.Steve Kondik2016-04-057-220/+362
| | | | | | | | | | | | | * Fix MaxxAudio device selection. Use WAVESFX commands to do this ourselves. * Ditch parameter caching. It's overkill. * Clean up locking across the board. * Fix lost messages in the queue. * Make parameter setting transactional. * Add device changed and lifecycle callbacks to the backend. * Turn the Waves effect on all the time and add some defaults. Change-Id: Ia3e6bfd4010840189169db9037cb925811a6cbc4
* audiofx: Fix a lot of state management issuesSteve Kondik2016-03-247-112/+185
| | | | | | | | | * Centralized control of effects under the backend code * Implemented caches for all effects * Simplified effect backend detection * Fixed multiple instantiation of effects on the same session Change-Id: I1bb97fb4e34cf3893208e827fb8981f872daf39b
* AudioFX: only query for BT A2DP devicesRoman Birg2016-03-151-1/+1
| | | | | | | | | | | SCO devices are supportd in lower layers, but we'll likely never have an SCO device that is also a non-A2DP device that we _want_ to support. If we do we'll need some custom AudioDeviceInfo wrappers. Ref: CYNGNOS-2232 Change-Id: Id6a5ffd33b79f330c1f30f635eac875e5eb58064 Signed-off-by: Roman Birg <roman@cyngn.com>
* AudioFX: catch effect crashesRoman Birg2016-03-153-21/+44
| | | | | | | | | And release as much as we can. But we should ever crash. Ref: AUDIO-144 Change-Id: I31abd2d85ca2a7dc339141be12bad19d97011c44 Signed-off-by: Roman Birg <roman@cyngn.com>
* AudioFX: lower eq hold thresh down to 100msRoman Birg2016-03-111-1/+1
| | | | | | | 150 was just a little too long Change-Id: I2ea470d7fc813d904b114d329d27d8e1a21b84d6 Signed-off-by: Roman Birg <roman@cyngn.com>
* AudioFX: junit4 testsRoman Birg2016-03-101-14/+21
| | | | | | | | Now tests the service directly and indirectly (going through service dispatcher). Change-Id: I5e9a1a787216e4ca97e529b7040bd52f26554a23 Signed-off-by: Roman Birg <roman@cyngn.com>
* AudioFX: make eq bars require a little long press timeRoman Birg2016-03-111-2/+6
| | | | | | | | Earlier patch made it just check distance, so it would be really easy to grab bars, TOO EASY. Change-Id: If8e577f41232daa3ba0e878ae6d4fceadd9bae17 Signed-off-by: Roman Birg <roman@cyngn.com>
* AudioFX: fix not setting up proper defaults on fresh bootRoman Birg2016-03-102-38/+20
| | | | | | | | | | | | | | | The service will setup its own defaults as needed. If there is a necessary udpate to prefs, the pref change increment logic will handle that and we don't explicitly need to call to reapply defaults on every boot. The service will do it in every onCreate() AS NECESSRY! This logic was also leftover from before there was a preference version code. Ref: AUDIO-145, OPO-512 Change-Id: I950bed1fbb6289cd2bcc53bac8ee0c268e225774 Signed-off-by: Roman Birg <roman@cyngn.com>
* AudioFX: make effect handler MORE favorableRoman Birg2016-03-091-1/+1
| | | | | | | Otherwise it's at a lower priority than the service. Change-Id: I58f42dc7c8320d8e4edecbcdb6d61b865ff733ab Signed-off-by: Roman Birg <roman@cyngn.com>