From b6d942d796ac6cea75bed0e19efc4dd765543cb0 Mon Sep 17 00:00:00 2001 From: Vishal Bhoj Date: Fri, 14 Oct 2011 13:12:23 +0530 Subject: audio: playback on hdmi Audio playback is now routed to hdmi Change-Id: I88e34dff93060a7e7ad4ea66cabdc438448e1a60 Signed-off-by: Vishal Bhoj --- modules/alsa/alsa_omap4.cpp | 12 ++++++++++-- 1 file 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) -- cgit v1.2.3