Commit Graph

18 Commits

Author SHA1 Message Date
Yidong Huang 7939a3b47a hal: restore fm volume when codec backend config changed
During FM playback, usecase play-fm may be disabled and
re-routed because of codec backend config change. Default
FM volume is applied when usecase play-fm re-routed, thus
volume may be different from previous normal one. As for
current mixer path, default value for fm is too low to be
audible.

Restore FM volume after usecase play-fm re-routed by codec
backend config change.

CRs-Fixed: 2171323
Change-Id: I88117989ffcacc48268891c7144f78e7a9875c51
2018-02-12 18:21:41 -08:00
Dhananjay Kumar e6293dd5b4 audio: enable SoundMonitor to handle ADSP SSR events
Enable SoundMonitor in audio hal to handle ADSP SSR events,
do required cleanup and restore any active sessions gracefully.

Change-Id: I83270b7c12095e56a6677f41efe0f5618a27e0e5
2017-07-11 15:01:33 -07:00
Revathi Uddaraju 1eac8b0e2d hal: Add support for dynamic logging
Changes to support dynamic logging in hal

Change-Id: I315c919bd940d8ccdb9103eb06bf67c1e3ff3f4b
2017-05-29 03:20:20 -07:00
Satya Krishna Pindiproli f1cd92b17e hal: fix compiler warnings which are now treated as errors
With CLANG enabled and -Wall & -Werror being set in
LOCAL_CFLAGS, all warnings are treated as errors.

This commit fixes all the warnings most of which are
about unused variables and functions.

Change-Id: I32c6593fa0ad6a4fdca5dc8e6c76982a146a8bc6
2016-04-19 18:12:23 +05:30
Dhananjay Kumar eeb6b31f4c hal: fm: add parameter to set mute options
Add parameter to handle mute options, this is required to
control fm mute in device loopback mode without affecting
other music streams.

CRs-Fixed: 963849
Change-Id: I1729d0bd3cff40670444a8806a05c7304d4ca6aa
2016-01-28 21:50:43 +05:30
Linux Build Service Account 7157d2852c Merge "hal: fix compilation issues with audio FM extention" 2015-11-02 23:48:10 -08:00
Mingming Yin 12125e85ac hal: fix compilation issues with audio FM extention
- Update FM device references to match latest
  definitions to fix compilation of FM extention.
- Update FM feature flag for power optimization.

Change-Id: I17a9e240e552c4089d3e9c7a25e437fb5b5433f9
2015-10-30 10:17:54 -07:00
Dhananjay Kumar df8aecfbc1 hal: audio_extn: fix pop noise when FM is interrupted by voice call
Minor pop is observed when FM playback is stopped, this is due to
derouting of loopback devices while they still have audible data.
This is causing pops even when FM is stopped after playback, but
this pop is more perceivable in case of interruption by voice call.
Fix the issue by draining unmuted data before derouting FM playback.

Change-Id: If92e43f3a15f0a9cfdf2819827c7f7a0ba852e3d
2015-10-07 22:52:26 +05:30
Naresh Tanniru 9e95c2424a hal: Fix for FM mute issue on start of FM record
- FM audio is muted on start of record session when
  playback record concurrency enabled

- Add support for FM playback device switch on
  record concurrency enabled

Change-Id: I51795dedf0f32c41c6a84889bb7f62ee21713720
2015-01-21 01:52:00 -08:00
Haynes Mathew George b51ceb1e78 hal: miscellaneous fixes
Fixes for the following issues reported by KW

21725, 21726, 21727, 21737, 21738, 21739, 21740, 21750,
21751, 21752, 25317, 30602, 32620, 36778, 41817, 41819,
50942, 54468, 54470, 54479, 55569, 54481, 55570, 55571,
58485, 85112, 85122, 85123

Change-Id: I9abef07db7ccdc19789a201eb268a97e1b360cad
2014-07-31 08:17:03 -07:00
Dhanalakshmi Siddani 7b4cb78234 Audio: Fix for FM off/on delay post SSR
- 8-10sec delay observed when FM is turned off/on from UI post SSR with
  touch tones enabled. If any new input request comes before FM is closed
  post SSR, pcm driver assumes AFE is still active and starts pumping data
  to AFE which is already closed due to SSR causing the delay
- Fix is to close FM session during SSR

 CRs-Fixed: 673031

Change-Id: I4a55c6ca66d94e633e768b1d40584d5a5782e13e
2014-05-29 23:07:49 -07:00
Haynes Mathew George 1376ca60d8 audio: Remove unused var and unnecessary code
Remove update_mixer (as its unused) and change function signatures
wherever used.
Remove code chunk to set BT sample rate before enabling device as
thats part of the mixer path file now.

Change-Id: I5eb3bce5183acf505596be2b0ec93cdbd728bdaa
CRs-Fixed: 581453
2014-04-29 14:54:21 -07:00
Linux Build Service Account bcfbd1add0 Merge "hal: fm: Fix incorrect routing of fm audio to speaker" 2014-04-28 22:26:18 -07:00
Ravi Kumar Alamanda 014b6b919c hal: fm: Fix incorrect routing of fm audio to speaker
- FM audio is enabled or disabled through set_parameters() API
  on primary output stream. The audio is routed to device of
  primary output stream.
- If the routing is not updated before the enable command, the
  audio is routed to previous device of primary output.
- Fix the issue by updating the primary output device with device
  from enable command.

Change-Id: I67764b8b5d2cfaddef94ccfe555702289bf36f95
CRs-Fixed: 651821
2014-04-22 15:19:13 -07:00
Banajit Goswami 88d6cc5106 hal: add support for external FM volume control
APQ8084 uses an external chip for FM. Add support for
mixer control for external FM volume control.

Change-Id: I296d0b32fce632a296057e6d7b48698d9b0648fe
2014-04-20 00:52:05 -07:00
Apoorv Raghuvanshi 84fa2fe20e hal: Detect sound card dynamically
- HAL always assumed SOUND_CARD/MIXER_CARD
  number to be zero. This could cause HAL
  not to load when some other card is
  detected earlier to HAL.
- Fix by removing these Macro(s) and reading
  correct sound card number runtime while loading
- Corrected its use cases across HAL replacing it
  with appropriate platform API

CRs-fixed: 580226

Change-Id: I4512e4a2f7f81d8415c3ba8ec393c96867e6d69a
2013-12-17 12:29:42 -08:00
Ravi Kumar Alamanda cb065748f9 hal: Fix incorrect FM volume after reboot
Reboot the phone, start FM playback and it plays back at
max volume regardless of previous Media volume.
The audio HAL is caching the volume that is being sent to
driver after conversion.
Fix the issue by caching the value set by the policy manager.

Change-Id: I2c416fc72d354b368890afcdd51b83e662b0ce6e
CRs-Fixed: 579377
2013-11-20 18:48:01 -08:00
Apoorv Raghuvanshi 6e26284a70 hal: Support for fm audio features
Added support for fm audio feature and hal single
instance fix

Change-Id: I189fd089b45a7e268e0af4ba4ef3eefd22a3f2ff
2013-10-16 19:03:40 -07:00