aboutsummaryrefslogtreecommitdiff
path: root/audio
AgeCommit message (Collapse)Author
2011-05-25liba2dp: Fix timeout computation in wait_for_start()Mike Lockwood
Also increase a2dp_write timeout from 100ms to 500 ms to avoid losing the first fraction of a second of a song when streaming starts. This is a manual integration of commit cb75ad7a5a708a6a1f593cddb745f1c0460676c6 from donut. Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-05-25Read the error code separately in a recv call.Jaikumar Ganesh
Read the error code in a new recv call. Trying to read more data than required to cover the error scenario was causing problems when a NEW STREAM was being started.
2011-05-25Read BT_SUGGESTED_BUFFER_SIZE bytes in recv call.Jaikumar Ganesh
In Bluez4, the error code has been moved out of the response structure into a new structure bt_audio_error_t. We were only reading sizeof(bt_audio_msg_header_t) and hence the 1 extra bytes gets read on the next call and our state machine gets screwed up. Fixed some tab / spaces issue.
2011-05-25Add Android system properties to set the device name, set sampling frequency.Jaikumar Ganesh
1)Add support for ro.produce.model/brand/name system properties. 2)Set SBC frequency to 44100. Original Change by Nick Pelly. <npelly@google.com> Moved to Bluez-4 by Jaikumar Ganesh. <jaikumar@google.com>
2011-05-25Make AVRCP keys work under Android.Jaikumar Ganesh
Original author: Nick Pelly <npelly@google.com> Change-Id: Ic5d728751454dc32dcfe0d91a93e23df654e419d
2011-05-25Make android specific changes to conf files.Jaikumar Ganesh
Change-Id: I60bfb7cf24f1152913f944652e413509a6c31f26
2011-05-25Add liba2dp.c to Bluez.Jaikumar Ganesh
Original change: Mike Lockwood and Nick Pelly Contains changes by: Jaikumar Ganesh and Eric Laurent Change-Id: Ib9ed83951721e42aebd1a2872a2267291d024b76
2011-05-25Add Android makefiles to Bluez.Jaikumar Ganesh
This includes the following commits from previous versions: a) bluez: Add Android.mk for pand (off by default) b163e2bb16bb5e06a7100f77fe94c24aef1a162e by <san@google.com> b) Add missing libbluetooth in linker commands for executables using libbluetoothd. 3e442fe33c17b9476063068d5bb486b4f936257b by <dougkwan@google.com> c) Edit makefiles to get network to work. Changed libglib to be a shared library fddb10d62d21580c49101c3dc4ab43f6619234c0 by Danica Chang d) Update Bluetooth configuration path: 0b25504e93b95a809e32227a3832bf08a3c13296 by Jaikumar Ganesh e) bluez : use another code for Intel's mmx. fe0762b2463df43b2765582c76a09356c753e16b by: Author: Jae-Hyung Ahn <jerry.ahn@windriver.com>, Signed-off-by: Bruce Beare <brucex.j.beare@intel.com>
2011-05-15Report error if read failed in bluetooth_playback_poll_reventsSzymon Janc
2011-05-15Remove unused variable svclass from hf_io_cbSzymon Janc
2011-05-15Disconnect headset when not able to reply with ERROR commandSzymon Janc
2011-05-15Fix callbacks numbering in connect_cb_new from audio/headset.cSzymon Janc
2011-05-15Validate if sending reply succeed in control_cbSzymon Janc
2011-05-15Remove unused remote_type variable from a2dp_configSzymon Janc
2011-05-15Fix garbage return value in send_reqSzymon Janc
2011-05-15Fix garbage return value in gst_avdtp_sink_audioservice_recvSzymon Janc
2011-05-15Remove redundant local copy of GSlist* from functionsSzymon Janc
Those functions already get copy of pointer to list so local copy is not needed.
2011-05-15Fix possible NULL pointer dereference in headset_server_initSzymon Janc
2011-05-15Fix empty parameter list in functions declarationsSzymon Janc
Use foo(void) instead of foo() for parameterless functions declaration. This allows compiler to check if foo is called without parameters.
2011-05-10Fix C++ style commentsSzymon Janc
2011-05-02Fix crash when calling finalize_setup_errnoLuiz Augusto von Dentz
finalize_setup_errno last parameter must be NULL otherwise it may access invalid memory.
2011-04-27Fix format string warningsJohan Hedberg
2011-04-27Add format string warnings to printf-style functionsJohan Hedberg
2011-04-27Accept Apple specific headset commandsMarcel Holtmann
2011-04-21Use flushable packets for A2DP media dataJohan Hedberg
2011-04-21Clean up handle_transport_connect code flowJohan Hedberg
2011-04-19Fix not waiting for POLLERR when disconnecting SCOLuiz Augusto von Dentz
To make sure the SCO link is really disconnected we should wait for POLLERR since POLLHUP does not necessarily means the link is completely disconnected just that no further data can be sent/received. Note that this depend on a fix of SCO socket shutdown in kernel to wait for disconnect confimation to then kill/destroy the socket indicating the err/reason using POLLERR.
2011-04-18Add NO CARRIER response to maemo6 telephony driverDmitriy Paliy
2011-04-18Add NO CARRIER response to HFPDmitriy Paliy
HFP is updated by NO CARRIER response accordingly to HFP 1.5 p.68.
2011-04-14Fix unregistering a2dp sep while it is lockedLuiz Augusto von Dentz
If sep is locked it should not be unregistered until properly unlocked.
2011-04-05Add NOTICE and MODULE_LICENSE_GPL files.Jaikumar Ganesh
Change-Id: Ibec15e1a8d9d23a0fe557ceb59ac2c80bbc5d6c3
2011-04-04Fix not removing source when removing setup callbackLuiz Augusto von Dentz
In rare situations this may lead to access invalid memory since setup can be freed before idle callback is called.
2011-04-04Refactor A2DP finalize_*_errno functionsLuiz Augusto von Dentz
There was a lot of duplicate code in them so they are now replaced by finalize_setup_errno which can deal with multiple callbacks reusing the same error.
2011-04-04Fix handling of A2DP suspend responseLuiz Augusto von Dentz
Finalize_suspend is being called twice when a resume request is queue after it or if start fails.
2011-04-04Fix check for valid SCO socket before shutdownDaniel Orstadius
To prevent a crash in the event that there is a request to remove the audio connection when it has already been disconnected by the remote. Set headset state to connected directly if there is no SCO socket.
2011-04-01Add ERROR code response to ATD in maemo6 telephonyDmitriy Paliy
ERROR code response is added to ATD command in maemo6 telephony driver based on HFP 1.5 specification, page 68: "Standard error indication code. It shall be issued on detection of any syntax, format or procedure error condition."
2011-03-30Change version number to 4.89Jaikumar Ganesh
Change-Id: Idc8204629b859ef3873afc4d303a61308af14a07
2011-03-30bluez : use another code for Intel's mmx.Bruce Beare
Change-Id: I65a820d9feb1bc6c80915851f09202483420ab8d Author: Jae-Hyung Ahn <jerry.ahn@windriver.com> Signed-off-by: Bruce Beare <brucex.j.beare@intel.com>
2011-03-30Add missing NOTICE files.David Deephanphongs
Original commit: c3d03f1916d453eabbc5e3d58f6926dcaba2c4df update by Jaikumar Ganesh for Bluez upmerge.
2011-03-30A2dp SDP record: We only support player category.Jaikumar Ganesh
Change-Id: I6eaf6b2ad1eb99c0c163d4d1131d851ec6781cb6
2011-03-30Update SDP records for AVRCP TG role.Jaikumar Ganesh
Android only supports category 1 keys. Change-Id: I0760b7a8f49ff9e21dbd28cb3a5ce486209a30c3
2011-03-30Fix issue 2516842 Device runtime restarts while pairing and connecting A2DP HS.Eric Laurent
There are several problems in liba2dp.c: 1 There is a bug in bluetooth_parse_capabilities(): the capabilities field pointer increment in the while loop is wrong and in case the first capabilities field is not the one we need we end up reading undefined data. 2 In the same while loop there is no protection for infinite looping if the length of the capabilities field is 0. 3 When start or configure fail, we just reset state to A2DP_STATE_INITIALIZED to force a new configuration attempt. This is bad as we don't close the connection and configure expects a closed connection. Subsequent configure attempts will fail reading sbc capabilites. 4 When there is a problem executing a command in a2dp_thread() loop, we do not reset current command which prevents from executing the same command again. Here is what happens in this issue: There is an error in the A2DP start request because the headset has been disconnected and we go back to configure. Because of problem 3, the connection is still opened when we run configure again and the 1st capabilitites field lock indicator is set. We try to read next field and because of problems 1 & 2 we end up looping here for ever. As data->mutex is locked, it cannot be acquired by pthread_cond_timedwait() trying to exit in wait_for_start() and the timeout mechanism fails. We stay locked here with A2dpAudioInterface::A2dpAudioStreamOut::mLock also locked as we are in A2dpAudioInterface::A2dpAudioStreamOut:write(). When system_server tries to disable bluetooth A2DP, A2dpAudioInterface::A2dpAudioStreamOut::setBluetoothEnabled() tries to acquire mLock and system_server is also deadlocked. Change-Id: I785250fe65651ec6fc2ae01a4250a61f2fd43908
2011-03-30Use monotonically increasing clock for A2DP timing.Nick Pelly
This is to avoid skips when the system time changes.
2011-03-30Stop trying to send A2DP packets quickly to catch-up on missed write()'s afterNick Pelly
falling behind by 200ms, or on poll() timeout. This allows us to recover more quickly from a situation where an A2DP headset rejects A2DP packets for a short time. We now reset to regular packet metering faster.
2011-03-30Fix liba2dp.c compiler warnings.Nick Pelly
2011-03-30Set A2DP L2CAP socket to flushable while streaming A2DP, and set the automaticNick Pelly
flush timeout. Remove the (ahead < 0) logic that was designed to skip forwards when streaming was lagging. This logic was not working properly, and ACL flushing does its job. Changes made by: Jaikumar Ganesh for Bluez upgrade to 4.89 Change-Id: Ic9025be657cbea1362b0a7f1d5a30ecf55e6cad2
2011-03-30Send SBC frames if output buffer is nearly full.Yu Kang Ku
This is to address an A2DP issue seen with the Mazda carkit, where A2DP audio cannot be played. The MTU size (8200) requested by this carkit is much greater than the output buffer size (2048) allocated by the Bluez A2DP profile. The output buffer being full is giving an SBC encode error. This patch checks for the buffer full condition. Change-Id: Idded504d085c760baef15cd3cef84fcf57165e4f Signed-off-by: Yu Kang Ku <kang.ku@motorola.com> Signed-off-by: Nick Pelly <npelly@google.com>
2011-03-30Add support for sending Broadcom coexistance setup commands for A2DP links.Nick Pelly
Enabled on platforms with BOARD_HAVE_BLUETOOTH_BCM. Change-Id: Ic223955ac3580e5a9430f96e069f686a7afdbef8
2011-03-30Bluetooth A2DP suspend-resume improvements.Eric Laurent
This change will reduce the occurence rate of A2DP sink suspend resume failures observed in issues 2184627, 2181005 and possibly 2189628. Avoid lockups in case of BT device disconnection during the A2DP start process by using a timeout when reading from bluetooth command socket. Correct a typo causing potential deadlock in wait_for_start().
2011-03-30Remove redundant call to bluetooth_init().Nick Pelly
This is a cleanup to Ian Kent's preceeding patchset. Change-Id: I8ff00530fdd337873ff898b7fd9009b0fc13f0b4