summaryrefslogtreecommitdiffstats
path: root/audio_a2dp_hw
diff options
context:
space:
mode:
authorSunny Kapdi <sunnyk@codeaurora.org>2013-01-22 13:21:26 -0800
committerSteve Kondik <shade@chemlab.org>2013-01-28 22:37:31 -0800
commit69f86c8d0f1f2d1adfd04f94bfd4580a3bc61d4c (patch)
tree16110c3eefabc86870d88f5aa199e7a8733a75ee /audio_a2dp_hw
parentb1f0fed3b40572b0ae2a2f7522e93de4190409b7 (diff)
downloadexternal_bluetooth_bluedroid-69f86c8d0f1f2d1adfd04f94bfd4580a3bc61d4c.zip
external_bluetooth_bluedroid-69f86c8d0f1f2d1adfd04f94bfd4580a3bc61d4c.tar.gz
external_bluetooth_bluedroid-69f86c8d0f1f2d1adfd04f94bfd4580a3bc61d4c.tar.bz2
Bluetooth: Change Sampling Frequency to 48 kHz
Change Default Sampling Frequency to 48 kHz by default to match Audio Source. CRs-fixed: 436686 Change-Id: I0a4aa9ca61964e76220c77fa60c281f7a5df58b4
Diffstat (limited to 'audio_a2dp_hw')
-rw-r--r--audio_a2dp_hw/Android.mk6
-rw-r--r--audio_a2dp_hw/audio_a2dp_hw.h5
2 files changed, 11 insertions, 0 deletions
diff --git a/audio_a2dp_hw/Android.mk b/audio_a2dp_hw/Android.mk
index d98e4bb..bf00342 100644
--- a/audio_a2dp_hw/Android.mk
+++ b/audio_a2dp_hw/Android.mk
@@ -2,6 +2,12 @@ LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
+ifeq ($(BOARD_USES_ALSA_AUDIO),true)
+ifeq ($(TARGET_QCOM_AUDIO_VARIANT),caf)
+ LOCAL_CFLAGS += -DSAMPLE_RATE_48K
+endif
+endif
+
LOCAL_SRC_FILES:= \
audio_a2dp_hw.c
diff --git a/audio_a2dp_hw/audio_a2dp_hw.h b/audio_a2dp_hw/audio_a2dp_hw.h
index 2015591..3076a6d 100644
--- a/audio_a2dp_hw/audio_a2dp_hw.h
+++ b/audio_a2dp_hw/audio_a2dp_hw.h
@@ -1,6 +1,7 @@
/******************************************************************************
*
* Copyright (C) 2009-2012 Broadcom Corporation
+ * Copyright (c) 2013, Linux Foundation. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -35,7 +36,11 @@
#define A2DP_CTRL_PATH "/data/misc/bluedroid/.a2dp_ctrl"
#define A2DP_DATA_PATH "/data/misc/bluedroid/.a2dp_data"
+#ifdef SAMPLE_RATE_48K
+#define AUDIO_STREAM_DEFAULT_RATE 48000
+#else
#define AUDIO_STREAM_DEFAULT_RATE 44100
+#endif
#define AUDIO_STREAM_DEFAULT_FORMAT AUDIO_FORMAT_PCM_16_BIT
#define AUDIO_STREAM_DEFAULT_CHANNEL_FLAG AUDIO_CHANNEL_OUT_STEREO
#define AUDIO_STREAM_OUTPUT_BUFFER_SZ (20*512)