44 Commits

Author SHA1 Message Date
Dima Zavin
34bb419e59 update for new audio.h header location
Change-Id: Ic4c62c4037800802427eb7d3c7f5eb8b25d18876
Signed-off-by: Dima Zavin <dima@android.com>
2011-05-12 14:09:57 -07:00
Andreas Huber
4b3913a3e4 Squashed commit of the following:
commit c80992e419ed567abef451042f09c4958534b90d
Author: Andreas Huber <andih@google.com>
Date:   Wed May 11 14:00:07 2011 -0700

    Support for the mp3 audio decoder as a software OMX component.

    Change-Id: I66e10c4d0be4c3aecdef1c21b15a2c7359ceb807

commit a358d0e1bf2a88897887445f42ccdda0f5f2f528
Author: Andreas Huber <andih@google.com>
Date:   Wed May 11 13:11:23 2011 -0700

    Support for G.711 alaw and mulaw decoders as software OMX components

    Change-Id: Ia5c76c02cb83a9f94ce39a27b2251e5880218f03

commit 79088b9c9a5c8b8c97ea66cb4f90a2b0f0d34553
Author: Andreas Huber <andih@google.com>
Date:   Thu May 5 15:43:32 2011 -0700

    Instead of using an RGB surface and conversion yuv420->rgb565

    convert from OMX_COLOR_FormatYUV420Planar to HAL_PIXEL_FORMAT_YV12 instead.

    Change-Id: I8c4fc3c54c963f0d4ba6377f3c4ab4e0013152e5
    related-to-bug: 4394005

commit 69469d3bd84425777b11b9fc938c5e0c61af26a7
Author: Andreas Huber <andih@google.com>
Date:   Tue May 10 15:46:42 2011 -0700

    voip mustn't link against libstagefright.so

    Change-Id: I4d0ba9a8b9dc9380b792a1bd04bcda231964862c

commit 2a9a9eeeeeb36ae3a9e680469c3016d509ff08c3
Author: Andreas Huber <andih@google.com>
Date:   Tue May 10 14:37:10 2011 -0700

    Remove most non-OMX software decoders by default

    Change-Id: Ic56514bc1b56b8fa952e8c4a164ea7379ecb69d0

commit a4de62c37b335c318217765403a9fb282b20a216
Author: Andreas Huber <andih@google.com>
Date:   Mon May 9 16:50:02 2011 -0700

    Conditionally build the old-style software decoders.

    Change-Id: I5de609e1d76c92d26d6eb81d1551462258f3f15f

commit 5d8b039f9449dc3dad1e77c42c80cc0b54b0c846
Author: Andreas Huber <andih@google.com>
Date:   Mon May 9 16:13:12 2011 -0700

    Support for MPEG4 and H.263 video decoders as soft OMX components.

    Change-Id: I5e3a4835afab89f98e3aa128d013628f5830eafe

commit b25a1bfbeb0ff6e62e1cc694ce2599c91489c7d0
Author: Andreas Huber <andih@google.com>
Date:   Mon May 9 11:49:10 2011 -0700

    Boost Soft OMX thread priority, fix timestamp handling in vorbis Soft OMX decoder.

    Change-Id: I68d26d4999f06fcc451d69e5303663fab0cba9e8

commit c0574362f8dc3319ce84d981097867062a698527
Author: Andreas Huber <andih@google.com>
Date:   Mon May 9 11:28:53 2011 -0700

    Support for the AMR decoders (NB and WB) as Soft OMX components.

    Change-Id: Ia565f59833fb52653e23f26536e7e41fc329a754

commit 3e5575a8f0e27a490cb7bde77bd9456087837f08
Author: Andreas Huber <andih@google.com>
Date:   Wed May 4 13:41:25 2011 -0700

    Signal an error if the aac decoder failed to initialize from codec specific data.

    Change-Id: I01da7831bdf722edd7d6dc5974486daa2cf2b209
    related-to-bug: 4272179

commit f94aeaa9886e772ff4823e671ed237096649f4af
Author: Andreas Huber <andih@google.com>
Date:   Tue May 3 13:07:38 2011 -0700

    Software OMX nodes don't (yet?) support native_window mode.

    Change-Id: I7d9ca9164ef4abf66b573ca21dba12d672f8b12d

commit eefdfabac8dc659e00daa56da69aea705c49cb67
Author: Andreas Huber <andih@google.com>
Date:   Tue May 3 12:57:16 2011 -0700

    Fixing the OMX tests to refer to appropriate files from test content.

    Change-Id: I5b61c3498749bfb876abbd3946a5132356e3f6ff

commit f31b7326aef14b6a1b7946520a9688f092e844d5
Author: Andreas Huber <andih@google.com>
Date:   Tue May 3 11:08:38 2011 -0700

    Soft OMX components are now dynamiclly loaded/unloaded, not directly linked against.

    Change-Id: I1e2ecfbfab67a8869886f738eaf0c7b3c948b6d9

commit b7f0343879e4df06f0a1c9bfece24df557954e2f
Author: Andreas Huber <andih@google.com>
Date:   Mon May 2 15:58:36 2011 -0700

    Support for the AVC software decoder as an OMX component.

    Change-Id: I13c12df435ba4afbd968a9fc659f66b91c818bc2

commit 5bb9e616d6c8e1b13d531fe996b9a9affdfb2977
Author: Andreas Huber <andih@google.com>
Date:   Fri Apr 29 12:05:37 2011 -0700

    Fix Vorbis OMX decoder's component role.

    Change-Id: I5e871e5e11b3f951c93590210e63fd7987c467b5

commit 089c91f2333062e196c7afd5fb0ca914878aa474
Author: Andreas Huber <andih@google.com>
Date:   Fri Apr 29 12:05:18 2011 -0700

    Support vorbis_decoder OMX testing.

    Change-Id: I1985be178a12ae3f8768bc72067d9236238be170

commit 56e241fa36fc37219bc536b823bdc2ab82dc1fad
Author: Andreas Huber <andih@google.com>
Date:   Fri Apr 29 12:01:46 2011 -0700

    SoftVorbis OMX component now respects the number of valid frames per page.

    Change-Id: I82a117a064d9b083fc58a54ad900a987a763ef03

commit fcd618ec520c376fdb78f4cbb44b8d9f5d213e2b
Author: Andreas Huber <andih@google.com>
Date:   Fri Apr 29 10:59:38 2011 -0700

    Support for the vorbis audio decoder as a soft OMX component.

    Change-Id: Iaeb057e58ca306d3dce205c0445b74d5aefef492

commit d1fcc3203fc8003ad79c6e96b3a1fc4261743f16
Author: Andreas Huber <andih@google.com>
Date:   Fri Apr 29 10:07:50 2011 -0700

    VPX decoder now properly resizes buffers after a port settings change.

    Change-Id: I110749a31b6cba087891d8e5dfe420830bdbf831

commit 35c7168243cb69849d88911144a2c7fdfed5c54e
Author: Andreas Huber <andih@google.com>
Date:   Thu Apr 28 13:23:34 2011 -0700

    Support for the VPX video decoder as a Software OMX component.

    Change-Id: Ic345add2d6d768d4af631160153f2e9b97fcea71

commit 923b2534b4211fc5405377b5190bfa6f2dd27f32
Author: Andreas Huber <andih@google.com>
Date:   Thu Apr 28 11:34:40 2011 -0700

    Table-based registration of soft omx components.

    Change-Id: I7f45f0fa5b3a7950776e69c66349731f7674e937

commit 04a88f3edb2266a463da9c4481b80178be460902
Author: Andreas Huber <andih@google.com>
Date:   Thu Apr 28 11:22:31 2011 -0700

    Apparently OMX_GetParameter is valid in any state other than OMX_StateInvalid

    OMX_SetParameter is still constrained to OMX_StateLoaded or a disabled port.

    Change-Id: I1032d7cf4011982d306aa369d4158a82830d26fb

commit 9d70ca68445e7c40f5c9b2d12466e468f514de88
Author: Andreas Huber <andih@google.com>
Date:   Wed Apr 27 15:03:18 2011 -0700

    Use the new soft OMX aac decoder for HTTP live playback.

    Change-Id: Ifbcfb732a9edb855cb46b49f6d0ac942170ee28f

commit 213fe4a10ea93cce08e8622dc3908053f29878a1
Author: Andreas Huber <andih@google.com>
Date:   Tue Apr 12 16:39:45 2011 -0700

    Foundation for supporting software decoders as OMX components

    Change-Id: I7fdab256563b35d1d090617abaea9a26b198d816

Change-Id: I83e9236beed4af985d10333c203f065df9e09a42
2011-05-11 14:24:58 -07:00
Dima Zavin
24fc2fb1c5 audio/media: convert to using the audio HAL and new audio defs
Change-Id: Ibc637918637329e4f2b62f4ac7781102fbc269f5
Signed-off-by: Dima Zavin <dima@android.com>
2011-04-27 13:10:10 -07:00
Eric Laurent
d8cbd16659 am 7a492a9a: am b7a76e84: am a482d83c: Merge "Issue 4157048: mic gain for VoIP/SIP calls." into gingerbread
* commit '7a492a9ad42947a3a7b777b0eb6eec56f5bb942b':
  Issue 4157048: mic gain for VoIP/SIP calls.
2011-04-05 10:27:06 -07:00
Eric Laurent
7a492a9ad4 am b7a76e84: am a482d83c: Merge "Issue 4157048: mic gain for VoIP/SIP calls." into gingerbread
* commit 'b7a76e84fde7fe534d46aaaa71e3224798354009':
  Issue 4157048: mic gain for VoIP/SIP calls.
2011-04-04 17:44:50 -07:00
Eric Laurent
d7a724e6d8 Issue 4157048: mic gain for VoIP/SIP calls.
Herring board exhibits a strong echo even in non speakerphone modes.
To compensate the lack of AEC or AES when not in speakerphone, the mic gain
had been reduced in the ADC. But this has an adverse effect on other VoIP applications
that have their own AEC and are penalized by the weak mic gain.

This workaround enables an acceptable mic gain for other VoIP apps while offering a
SIP call experience which is not worse than it was with the residual echo that was
present even with mic gain reduction.

Change-Id: I33fd37858758e94e42ef5b545d3f0dc233220bf1
2011-03-29 18:44:03 -07:00
Carl Shapiro
3f9e08973f Include strings.h instead of string.h for the strcasecmp prototype.
Change-Id: I6b0ddc2408c30851edcffb36f1bc74245403ffc7
2011-03-21 20:21:40 -07:00
Iliyan Malchev
3070af0882 frameworks/base: remove LOCAL_PRELINK_MODULE
Change-Id: I54dd62ebef47e7690afa5a858f3cad941b135481
Signed-off-by: Iliyan Malchev <malchev@google.com>
2011-03-14 14:25:59 -07:00
Jean-Michel Trivi
2ba92c71b5 do not merge bug 3370834 Cherrypick from master
Cherripick from master CL 79833, 79417, 78864, 80332, 87500

Add new audio mode and recording source for audio communications
 other than telelphony.

The audio mode MODE_IN_CALL signals the system the device a phone
 call is currently underway. There was no way for audio video
 chat or VoIP applications to signal a call is underway, but not
 using the telephony resources. This change introduces a new mode
 to address this. Changes in other parts of the system (java
 and native) are required to take this new mode into account.
The generic AudioPolicyManager is updated to not use its phone
 state variable directly, but to use two new convenience methods,
 isInCall() and isStateInCall(int) instead.

Add a recording source used to designate a recording stream for
voice communications such as VoIP.

Update the platform-independent audio policy manager to pass the
 nature of the audio recording source to the audio policy client
 interface through the AudioPolicyClientInterface::setParameters()
 method.

SIP calls should set the audio mode to MODE_IN_COMMUNICATION,
 Audio mode MODE_IN_CALL is reserved for telephony.

SIP: Enable built-in echo canceler if available.
1. Always initialize AudioRecord with VOICE_COMMUNICATION.
2. If echo canceler is available, disable our echo suppressor.

Note that this CL is intentionally not correcting the
 getAudioSourceMax() return value in MediaRecorder.java as the
 new source is hidden here.

Change-Id: Ie68cd03c50553101aa2ad838fe9459b2cf151bc8
2011-01-26 11:20:01 -08:00
Chia-chi Yeh
d87be273aa Enable built-in echo canceler if available.
1. Always initialize AudioRecord with VOICE_COMMUNICATION.
2. If echo canceler is available, disable our echo suppressor.

Change-Id: Idf18d3833189a8478c1b252ebe6ce55e923280b3
2011-01-06 17:43:24 +08:00
Chia-chi Yeh
d0da380796 am dc78e3fe: am 3cf71376: RTP: Send silence packets on idle streams for every second.
* commit 'dc78e3fe7f2ffbc810cd54e86e3a83e279d74984':
  RTP: Send silence packets on idle streams for every second.
2011-01-04 17:41:16 -08:00
Chia-chi Yeh
3cf7137642 RTP: Send silence packets on idle streams for every second.
Originally a stream does not send packets when it is receive-only or there is
nothing to mix. However, this causes some problems with certain firewalls and
proxies. A firewall might remove a port mapping when there is no outgoing
packet for a preiod of time, and a proxy might wait for incoming packets from
both sides before start forwarding. To solve these problems, we send out a
silence packet on the stream for every second. It should be good enough to
keep the stream alive with relatively low resources.

Bug: 3119690
Change-Id: Ib9c55e5dddfba28928bd9b376832b68bda24c0e4
2011-01-04 19:54:49 +08:00
Chia-chi Yeh
4c7cc83827 Merge "RTP: Prepare to unhide the APIs." 2010-11-30 19:45:47 -08:00
Chia-chi Yeh
53aa6ef70d RTP: Prepare to unhide the APIs.
Polish things a little bit.

Change-Id: I2c3cea8b34b9c858879bc722ea1f38082ba22b8d
2010-12-01 11:35:51 +08:00
Chia-chi Yeh
342a9be009 am e843dfa8: am bd399b0b: Merge "RTP: Pause echo suppressor when far-end volume is low." into gingerbread
* commit 'e843dfa8dcd0a7bfa956b75424bb5db834975a64':
  RTP: Pause echo suppressor when far-end volume is low.
2010-11-30 16:23:17 -08:00
Chia-chi Yeh
0c7d30660c RTP: Pause echo suppressor when far-end volume is low.
Bug: 3136725
Change-Id: Ieeedd2836d3028045aacac963f44285491708cc3
2010-10-27 18:15:26 +08:00
Chia-chi Yeh
39df5331c7 am 044fcd64: am 703aae06: Merge "RTP: Fix non-zero DC in EchoSuppressor caused while aggregating samples." into gingerbread
Merge commit '044fcd64fe999dca0f986dfce9cb3b5b1da77f44'

* commit '044fcd64fe999dca0f986dfce9cb3b5b1da77f44':
  RTP: Fix non-zero DC in EchoSuppressor caused while aggregating samples.
2010-10-21 16:08:47 -07:00
Chia-chi Yeh
8a68b52b98 RTP: Fix non-zero DC in EchoSuppressor caused while aggregating samples.
Rewrite using integer arithmetic to get full 32-bit precision instead
of 23-bit in single precision floating-points.

Bug: 3029745
Change-Id: If67dcc403923755f403d08bbafb41ebce26e4e8b
2010-10-22 03:47:02 +08:00
Chung-yih Wang
2473f94718 am 4b7ff734: am 4483232f: Suppress harder for echo without affecting the volume of real voice.
Merge commit '4b7ff734611666a68471c97fabb6f516efab25cd'

* commit '4b7ff734611666a68471c97fabb6f516efab25cd':
  Suppress harder for echo without affecting the volume of real voice.
2010-10-10 12:54:13 -07:00
Chung-yih Wang
7ff6f97f84 resolved conflicts for merge of 4790a2e2 to master
Change-Id: I659ccd9a51e24f217f715178a98eaf6592c258d7
2010-10-09 08:07:55 +08:00
Chung-yih Wang
4483232f57 Suppress harder for echo without affecting the volume of real voice.
Change-Id: Ia3ce98eedd487a9e879ff0a4907b8c15b5707429
2010-10-08 06:09:07 +08:00
Marco Nelissen
fd1e4ad52c Fix simulator build, part 1/n
Change-Id: If0a42ab262ee6aa6381ce95bd49baf232adb01c5
2010-10-06 12:23:02 -07:00
Chung-yih Wang
fb116fbea3 Misc fixes for sim-eng build.
Change-Id: I0c5dac1097abc924e66dab92d7d03d5051b4fd29
2010-10-06 16:46:59 +08:00
Chia-chi Yeh
a8a10096a1 RTP: Add a baseline echo suppressor.
Change-Id: I832f1f572f141fd928afe671b12d0b59f2a8e0b1
2010-10-05 02:47:00 +08:00
Chia-chi Yeh
67ecb5b90c RTP: Start AudioRecord before AudioTrack to avoid being disabled.
Change-Id: I96be89fda41d77e2cf5bfc1c2f14e2b109001b57
2010-10-01 08:20:09 +08:00
Chia-chi Yeh
21ae1ad6a6 RTP: Minor fixes with polishing.
Change-Id: I50641373989e512fb489b5017edbcfd7848fe8b9
2010-09-30 16:07:44 +08:00
Chia-chi Yeh
3520bd4313 RTP: Adjust the jitter buffer to 512ms.
Change-Id: Ia91c1aa1a03b65dbd329ea98383f370844e2b0c0
2010-09-30 13:51:26 +08:00
Chia-chi Yeh
f88fc1fa90 RTP: Enable AMR codec.
Change-Id: I49e6bdc1b67306b44173f2f346f8372a50264870
2010-09-30 08:55:12 +08:00
Chia-chi Yeh
f4ae94229d RTP: Enable GSM-EFR codec.
Change-Id: I9d84009e4557a0a82c1f9d7d543922741be97c77
2010-09-30 03:07:57 +08:00
Chia-chi Yeh
fe5298992a RTP: Revise the workaround of private addresses and fix bugs.
Change-Id: Ie654b569f47049aa452eca8d3e6d4a98ac18469c
2010-09-30 02:43:48 +08:00
Chia-chi Yeh
e006e4d2c9 Merge changes Iae1913fb,I38dbefef into gingerbread
* changes:
  RTP: Enable GSM codec.
  RTP: Refactor out G711 codecs into another file.
2010-09-28 19:40:59 -07:00
Chia-chi Yeh
a6f950c968 RTP: Enable GSM codec.
Change-Id: Iae1913fb0643f1c66b5d16f24d51924d363e5ef5
2010-09-29 10:36:52 +08:00
Chia-chi Yeh
78c11b3cf1 RTP: Refactor out G711 codecs into another file.
Change-Id: I38dbefef2315a28d44683e86a51e69f38e3f20ec
2010-09-29 05:46:19 +08:00
Chia-chi Yeh
9083c84af1 RTP: Delay the initialization of AudioTrack and AudioRecord.
Related to http://b/3043844.

Change-Id: I2c4fd9f64e6eba597d68b2ea1ceeff83103697db
2010-09-29 05:24:34 +08:00
Chung-yih Wang
bd2294204e Fix the unhold issue especially if one is behind NAT.
+call startAudio() when call is established.

Change-Id: Ib6a1e34017fb83007ce275da1991058e8b803833
2010-09-27 23:53:39 +08:00
repo sync
7a69aeffda RTP: Add log throttle for "no data".
Change-Id: I14d9886a40fa780514cbc6c5bac6fb2a670f55f4
2010-09-23 05:46:01 +08:00
Chia-chi Yeh
4033a67d0e RTP: Update native part to reflect the API change.
Change-Id: Ic2858920ad77d7312f2429f89ca509a481363431
2010-09-23 03:36:43 +08:00
Chia-chi Yeh
557b04de23 RTP: prevent buffer overflow in AudioRecord.
This change simply reduces the receive timeout of DeviceSocket. It works
because AudioRecord will block us till there is enough data, which makes
AudioSocket overlap AudioRecord.

Change-Id: I4700224fb407e148ef359a9d99279e10240128d0
2010-09-08 09:56:02 +08:00
Chia-chi Yeh
7fa7ee11f6 Revert "RTP: integrate the echo canceller from speex."
This reverts commit 4ae6ec428f3570b9020b35ada6a62f94af66d888.
2010-08-26 10:33:09 +08:00
Chia-chi Yeh
4ae6ec428f RTP: integrate the echo canceller from speex.
Currently the filter_length is set to one second.
Will change that when we have a better idea.

Change-Id: Ia942a8fff00b096de8ff0049a448816ea9a68068
2010-08-24 16:04:18 +08:00
Chia-chi Yeh
2880ef86e5 RTP: reduce the latency by overlapping AudioRecord and AudioTrack.
Change-Id: I00d750ee514ef68d5b2a28bd1893417ed70ef1fc
2010-08-24 13:58:12 +08:00
Chia-chi Yeh
b879032347 RTP: fix few leaks when fail to add streams into a group.
Change-Id: Iefb3fe219ad48641da37a83c8d14e9ebf1d3086c
2010-08-19 18:26:53 +08:00
Chia-chi Yeh
3459d3037c RTP: remove froyo-compatible code.
Change-Id: I6822a4e4749a5909959658c29253242b4018aeb0
2010-08-18 07:09:59 +08:00
Chia-chi Yeh
4c5d28cee0 RTP: move into frameworks.
Change-Id: Ic9c17b460448c746b21526ac10b647f281ae48e9
2010-08-06 14:12:05 +08:00