summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/AudioFlinger.h
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2014-05-20 10:48:17 -0700
committerEric Laurent <elaurent@google.com>2014-05-27 10:53:51 -0700
commit1c333e252cbca3337c1bedbc57a005f3b7d23fdb (patch)
tree327f985a0db89dad8fc742baf5b198c3b78c429b /services/audioflinger/AudioFlinger.h
parent4b123406c10c17852734a1b691bb9ce2a4cb7caf (diff)
downloadframeworks_av-1c333e252cbca3337c1bedbc57a005f3b7d23fdb.zip
frameworks_av-1c333e252cbca3337c1bedbc57a005f3b7d23fdb.tar.gz
frameworks_av-1c333e252cbca3337c1bedbc57a005f3b7d23fdb.tar.bz2
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
Diffstat (limited to 'services/audioflinger/AudioFlinger.h')
-rw-r--r--services/audioflinger/AudioFlinger.h37
1 files changed, 13 insertions, 24 deletions
diff --git a/services/audioflinger/AudioFlinger.h b/services/audioflinger/AudioFlinger.h
index 3d7a562..29dc6b2 100644
--- a/services/audioflinger/AudioFlinger.h
+++ b/services/audioflinger/AudioFlinger.h
@@ -225,41 +225,24 @@ public:
/* List available audio ports and their attributes */
virtual status_t listAudioPorts(unsigned int *num_ports,
- struct audio_port *ports)
- {
- return INVALID_OPERATION;
- }
+ struct audio_port *ports);
/* Get attributes for a given audio port */
- virtual status_t getAudioPort(struct audio_port *port)
- {
- return INVALID_OPERATION;
- }
+ virtual status_t getAudioPort(struct audio_port *port);
/* Create an audio patch between several source and sink ports */
virtual status_t createAudioPatch(const struct audio_patch *patch,
- audio_patch_handle_t *handle)
- {
- return INVALID_OPERATION;
- }
+ audio_patch_handle_t *handle);
/* Release an audio patch */
- virtual status_t releaseAudioPatch(audio_patch_handle_t handle)
- {
- return INVALID_OPERATION;
- }
+ virtual status_t releaseAudioPatch(audio_patch_handle_t handle);
/* List existing audio patches */
virtual status_t listAudioPatches(unsigned int *num_patches,
- struct audio_patch *patches)
- {
- return INVALID_OPERATION;
- }
+ struct audio_patch *patches);
+
/* Set audio port configuration */
- virtual status_t setAudioPortConfig(const struct audio_port_config *config)
- {
- return INVALID_OPERATION;
- }
+ virtual status_t setAudioPortConfig(const struct audio_port_config *config);
virtual status_t onTransact(
uint32_t code,
@@ -435,6 +418,8 @@ private:
#include "Effects.h"
+#include "PatchPanel.h"
+
// server side of the client's IAudioTrack
class TrackHandle : public android::BnAudioTrack {
public:
@@ -542,6 +527,8 @@ private:
const char *moduleName() const { return mModuleName; }
audio_hw_device_t *hwDevice() const { return mHwDevice; }
+ uint32_t version() const { return mHwDevice->common.version; }
+
private:
const char * const mModuleName;
audio_hw_device_t * const mHwDevice;
@@ -702,6 +689,8 @@ private:
bool mIsLowRamDevice;
bool mIsDeviceTypeKnown;
nsecs_t mGlobalEffectEnableTime; // when a global effect was last enabled
+
+ sp<PatchPanel> mPatchPanel;
};
#undef INCLUDING_FROM_AUDIOFLINGER_H