diff options
author | Andrew Dodd <atd7@cornell.edu> | 2012-04-14 17:38:49 -0400 |
---|---|---|
committer | Pawit Pornkitprasan <p.pawit@gmail.com> | 2012-07-23 09:16:19 +0700 |
commit | 219723e8e2470bcc3f01366b2e8cb4b2d39e4a7a (patch) | |
tree | c0da41e4faa32224b90f0a78451115ca8997252d | |
parent | 13808b6139613972f761b482acadab063866cf8d (diff) | |
download | device_samsung_aries-common-219723e8e2470bcc3f01366b2e8cb4b2d39e4a7a.zip device_samsung_aries-common-219723e8e2470bcc3f01366b2e8cb4b2d39e4a7a.tar.gz device_samsung_aries-common-219723e8e2470bcc3f01366b2e8cb4b2d39e4a7a.tar.bz2 |
libaudio: Dock audio support
Currently this routes media to the dock, but keeps call I/O on the
device speaker.
Works with Steven Harper's Samsung dock audio patches from 2-3
months ago.
Change-Id: I41764f51f8c2df4d2f745ebdb8ada1abf0c29848
-rw-r--r-- | libaudio/AudioHardware.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libaudio/AudioHardware.cpp b/libaudio/AudioHardware.cpp index 4064a95..4d1661e 100644 --- a/libaudio/AudioHardware.cpp +++ b/libaudio/AudioHardware.cpp @@ -631,6 +631,7 @@ void AudioHardware::setVoiceVolume_l(float volume) break; case AudioSystem::DEVICE_OUT_SPEAKER: + case AudioSystem::DEVICE_OUT_ANLG_DOCK_HEADSET: LOGD("### speaker call volume"); type = SOUND_TYPE_SPEAKER; break; @@ -775,6 +776,7 @@ status_t AudioHardware::setIncallPath_l(uint32_t device) break; case AudioSystem::DEVICE_OUT_SPEAKER: + case AudioSystem::DEVICE_OUT_ANLG_DOCK_HEADSET: LOGD("### incall mode speaker route"); path = SOUND_AUDIO_PATH_SPEAKER; break; @@ -1047,6 +1049,9 @@ const char *AudioHardware::getOutputRouteFromDevice(uint32_t device) switch (device) { case AudioSystem::DEVICE_OUT_EARPIECE: return "RCV"; + case AudioSystem::DEVICE_OUT_ANLG_DOCK_HEADSET: + if (mMode == AudioSystem::MODE_RINGTONE) return "RING_SPK"; + else return "EXTRA_DOCK_SPEAKER"; case AudioSystem::DEVICE_OUT_SPEAKER: if (mMode == AudioSystem::MODE_RINGTONE) return "RING_SPK"; else return "SPK"; @@ -1058,6 +1063,7 @@ const char *AudioHardware::getOutputRouteFromDevice(uint32_t device) else return "HP"; case (AudioSystem::DEVICE_OUT_SPEAKER|AudioSystem::DEVICE_OUT_WIRED_HEADPHONE): case (AudioSystem::DEVICE_OUT_SPEAKER|AudioSystem::DEVICE_OUT_WIRED_HEADSET): + case (AudioSystem::DEVICE_OUT_SPEAKER|AudioSystem::DEVICE_OUT_ANLG_DOCK_HEADSET): if (mMode == AudioSystem::MODE_RINGTONE) return "RING_SPK_HP"; else return "SPK_HP"; case AudioSystem::DEVICE_OUT_BLUETOOTH_SCO: @@ -1075,6 +1081,7 @@ const char *AudioHardware::getVoiceRouteFromDevice(uint32_t device) case AudioSystem::DEVICE_OUT_EARPIECE: return "RCV"; case AudioSystem::DEVICE_OUT_SPEAKER: + case AudioSystem::DEVICE_OUT_ANLG_DOCK_HEADSET: return "SPK"; case AudioSystem::DEVICE_OUT_WIRED_HEADPHONE: case AudioSystem::DEVICE_OUT_WIRED_HEADSET: |