summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVishal Bhoj <vishal.bhoj@linaro.org>2011-10-14 13:12:23 +0530
committerVishal Bhoj <vishal.bhoj@linaro.org>2011-10-14 13:16:22 +0530
commitb6d942d796ac6cea75bed0e19efc4dd765543cb0 (patch)
tree62cd50b19dadb0ce8efe330b86d39eeb16093dce
parent2f7289ca073ff4ee478997447fc9a104b1497fcd (diff)
downloadpandaboard-linaro_android_2.3.5.tar.gz
audio: playback on hdmilinaro_android_2.3.5
Audio playback is now routed to hdmi Change-Id: I88e34dff93060a7e7ad4ea66cabdc438448e1a60 Signed-off-by: Vishal Bhoj <vishal.bhoj@linaro.org>
-rw-r--r--modules/alsa/alsa_omap4.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/modules/alsa/alsa_omap4.cpp b/modules/alsa/alsa_omap4.cpp
index 329b9ec..54e2bfb 100644
--- a/modules/alsa/alsa_omap4.cpp
+++ b/modules/alsa/alsa_omap4.cpp
@@ -33,7 +33,8 @@
#define ALSA_DEFAULT_SAMPLE_RATE 44100 // in Hz
#endif
-#define DEFAULT_DEVICE "plughw:0,0"
+#define DEFAULT_OUT_DEVICE "plughw:1,0"
+#define DEFAULT_IN_DEVICE "plughw:0,0"
namespace android
{
@@ -159,7 +160,14 @@ const char *deviceName(alsa_handle_t *handle, uint32_t device, int mode)
{
static char devString[ALSA_NAME_MAX];
int hasDevExt = 0;
- return DEFAULT_DEVICE;
+ if (device & 0x0000FFFF) {
+ LOGD("Output Device");
+ return DEFAULT_OUT_DEVICE;
+ }
+ else {
+ LOGD("Input Device");
+ return DEFAULT_IN_DEVICE;
+ }
}
const char *streamName(alsa_handle_t *handle)