diff options
Diffstat (limited to 'modules/alsa/alsa_omap4.cpp')
-rw-r--r-- | modules/alsa/alsa_omap4.cpp | 12 |
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) |