diff options
author | Andrew Dodd <atd7@cornell.edu> | 2012-04-14 17:38:49 -0400 |
---|---|---|
committer | Pawit Pornkitprasan <p.pawit@gmail.com> | 2013-02-25 18:42:11 +0700 |
commit | d5458299dd6ebb9b591024da6615c4c14cb9e34a (patch) | |
tree | 2fde5f53e369fb25ecdadcc234e8d7b570b3d232 /libaudio | |
parent | 15d28f2bfe320514dcb9bd9894fcaed2f480bcf5 (diff) | |
download | device_samsung_aries-common-d5458299dd6ebb9b591024da6615c4c14cb9e34a.zip device_samsung_aries-common-d5458299dd6ebb9b591024da6615c4c14cb9e34a.tar.gz device_samsung_aries-common-d5458299dd6ebb9b591024da6615c4c14cb9e34a.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
Diffstat (limited to 'libaudio')
-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 f95b675..74fe6d2 100644 --- a/libaudio/AudioHardware.cpp +++ b/libaudio/AudioHardware.cpp @@ -719,6 +719,7 @@ void AudioHardware::setVoiceVolume_l(float volume) break; case AudioSystem::DEVICE_OUT_SPEAKER: + case AudioSystem::DEVICE_OUT_ANLG_DOCK_HEADSET: ALOGD("### speaker call volume"); type = SOUND_TYPE_SPEAKER; break; @@ -863,6 +864,7 @@ status_t AudioHardware::setIncallPath_l(uint32_t device) break; case AudioSystem::DEVICE_OUT_SPEAKER: + case AudioSystem::DEVICE_OUT_ANLG_DOCK_HEADSET: ALOGD("### incall mode speaker route"); path = SOUND_AUDIO_PATH_SPEAKER; break; @@ -1135,6 +1137,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"; @@ -1146,6 +1151,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: @@ -1163,6 +1169,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: |