History log of /frameworks/av/services/audioflinger/PatchPanel.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
e443ffac2a09b69470c4663ee031a527c53738d9 05-Jan-2015 soon1.choi <soon1.choi@lge.com> DO NOT MERGE - fix memory leak in PatchPanel

Before the audio patch is created, audio patch with same handle is
removed from vector for patches. At this time, Patch allocated in the
heap is not freed. This causes memory leaks in the mediaserver.

Bug: 18904322.

Change-Id: Id0d28c36a7e7fbf473753bf4ead7518f28c1b998
/frameworks/av/services/audioflinger/PatchPanel.cpp
f8fd8d6daab5ced86ce950be68070d27c24d487f 10-Sep-2014 Eric Laurent <elaurent@google.com> audioflinger: fix audio patch release

Fix error in PatchPanel:releaseAudioPatch() causing
the wrong patch handle to be passed to the audio HAL.

Bug: 17368621.
Change-Id: I037fd2e6273508c830414b5900d07c0178b96dae
/frameworks/av/services/audioflinger/PatchPanel.cpp
874c4287a4e49c59ac88767751dce00fcd3edb73 09-Aug-2014 Eric Laurent <elaurent@google.com> audio policy: enable more than one sink per audio patch.

Allow creation of audio patches with more than one sink.
More than one sink is enabled when:
- Connecting an input device to output devices on the same audio HW module.
- Connecting an output mix to output devices on the same audio HA module.

All other patches are limited to one sink.

Bug: 16879363.
Change-Id: I95be6948ef29df64e51e5b8ace38c2db7f3e89f2
/frameworks/av/services/audioflinger/PatchPanel.cpp
cf2c0210c8afbe7d0661ccbbae3835b5ce73c0bf 26-Jul-2014 Eric Laurent <elaurent@google.com> AudioFlinger: update openInput() and openOutput()

Add parameters to openInput() and openOutput(): device address,
input source.
Allow caller to specify a given I/O handle
Group parameters in a struct audio_config.

Bug: 12378680.
Change-Id: I7e9af74c0d996561cc13cbee7d9012d2daf33025
/frameworks/av/services/audioflinger/PatchPanel.cpp
83b8808faad1e91690c64d7007348be8d9ebde73 21-Jun-2014 Eric Laurent <elaurent@google.com> audio flinger: add patch connection between hw modules

Add support for audio device connections between different audio
hw modules.
The patch is performed by creating a bridge between the playback
thread connected to the sink device and the record thread connected
to the source device using a pair of specialized PlaybackTrack and
RecordTrack.
- Added PatchTrack and PatchRecord classes.
- Added TrackBase type to indicate more clearly the track behavior.
- A TrackBase can allocate the buffer or reuse an existing one.
- Factored some code in openOutput() and openInput() for internal use
by PatchPanel.

Bug: 14815883.

Change-Id: Ib9515fcda864610458a4bc81fa8f59096ff4d7db
/frameworks/av/services/audioflinger/PatchPanel.cpp
24478d47fc631ab33208f4dd9d034abb6839c992 05-Jun-2014 Eric Laurent <elaurent@google.com> AudioFlinger: fix PatchPanel debug log.

Bug: 14815883.
Change-Id: I71cf2ef74a96d3cdb27f2beb1b76b8979c738335
/frameworks/av/services/audioflinger/PatchPanel.cpp
62aaabb3905c61bb7acd6037414c206240a31c32 02-Jun-2014 Eric Laurent <elaurent@google.com> audio policy: fix unitialized hw module in audio port

The hw module handle was not initialized when creating
and audio port configuration from an input stream descriptor.

Bug 15376641.

Change-Id: I6c784cded68a5c665fd22c3643765c63f70eb241
/frameworks/av/services/audioflinger/PatchPanel.cpp
e1715a465a29db625da9d0ea365edf371e39e201 20-May-2014 Eric Laurent <elaurent@google.com> audio policy: add audio port gain control

Implement setAudioPortConfig() API to configure an
audio port.
Currently limited to gain control.

Bug: 14815883.

Change-Id: Ic1b268e5ba5c277e9f5b8fa63c81dd7c0b250024
/frameworks/av/services/audioflinger/PatchPanel.cpp
6a94d69dc4f32abb53c466a96f905bb199be6417 20-May-2014 Eric Laurent <elaurent@google.com> audio policy: implement routing control

Add implementation of audio routing control via AudioSystem APIs.

The following APIs are implemented:
- listAudioPorts(): return a list of devices and output/input mixers ports
that can be used as sources or sinks for audio patches.
- createAudioPatch()/releaseAudioPatch(): create/release a connection patch between
two audio ports (e.g. to connect input from an HDMI device to a speaker output device).
Only one client application can own a patch from a given source.
When an audio port (device or mix) is part of an application created patch, its routing cannot
not be changed by a policy decision.
- listAudioPatches(): return a list of existing patches.

Each audio port addition/removal and each audio patch creation/release increments a generation count.
This generation count is used to ensure consistency betwen calls to
listAudioPorts() and listAudioPatches().

Bug: 14815883.

Change-Id: I022b638c2f5f0bb41543c7cfca7488fb45cfdd80
/frameworks/av/services/audioflinger/PatchPanel.cpp
951f455566775e5f01e67c5ee26863d7d19209d7 20-May-2014 Eric Laurent <elaurent@google.com> DO NOT MERGE - audioflinger: first patch panel implementation.

Added a new PatchPanel subclass to AudioFlinger
to handle audio ports and audio patches configuration
and connection.
The first implementation does not add new functionnality.
AudioPolicyManager uses patch panel interface to control
device routing.
AudioFlinger:
- Added PatchPanel class. The first implementation does not
add new functionnality. PatchPanel handles routing commands
for audio HAL after 3.0 or converts to setParameters for audio
HALs before 3.0.
- Added config events to ThreadBase to control synchronized
audio patch connection.
AudioPolicyManager:
- Use PatchPanel API to control device selection isntead of setParameters.
- New base class AudioPort common to audio device descriptors
and input output stream profiles. This class is RefBase and groups
attributes common to audio ports.
- Use same device selection flow for input as for outputs:
getNewInputDevice -> getDeviceForInptusiource -> setInputDevice

Change-Id: Idaa5a883b19a45816651c58cac697640dc717cd9
/frameworks/av/services/audioflinger/PatchPanel.cpp