new pandaboard support
diff --git a/Android.mk b/Android.mk
index a33b9ae..0b9e9cc 100644
--- a/Android.mk
+++ b/Android.mk
@@ -5,7 +5,7 @@
include $(CLEAR_VARS)
# Should change this so the enable variable gets used as the name?
-LOCAL_MODULE := audio.primary.herring
+LOCAL_MODULE := audio.primary.omap4
LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw
LOCAL_SRC_FILES := audio_hw.c
LOCAL_C_INCLUDES += \
diff --git a/audio_hw.c b/audio_hw.c
index be5cdff..d974086 100644
--- a/audio_hw.c
+++ b/audio_hw.c
@@ -294,6 +294,7 @@
struct tiny_stream_out *out = (struct tiny_stream_out *)stream;
int ret;
+ /* TODO - handle card and device based on config (krtaylor) */
if (!out->pcm) {
LOGV("out_write(%p) opening PCM\n", stream);
out->pcm = pcm_open(0, 0, PCM_OUT | PCM_MMAP, &out->config);
@@ -799,7 +800,7 @@
int len;
property_get("ro.product.device", property, "tiny_hw");
- snprintf(file, sizeof(file), "/system/etc/sound/%s", property);
+ snprintf(file, sizeof(file), "/system/etc/sound/%s.xml", property);
LOGV("Reading configuration from %s\n", file);
f = fopen(file, "r");
@@ -892,6 +893,7 @@
goto err_mixer;
/* Bootstrap routing */
+ /* TODO - need device set based on config (krtaylor) */
pthread_mutex_init(&adev->route_lock, NULL);
adev->mode = AUDIO_MODE_NORMAL;
adev->devices = AUDIO_DEVICE_OUT_SPEAKER | AUDIO_DEVICE_IN_BUILTIN_MIC;
diff --git a/pandaboard.xml b/pandaboard.xml
new file mode 100644
index 0000000..45e22ce
--- /dev/null
+++ b/pandaboard.xml
@@ -0,0 +1,75 @@
+<!-- TinyHAL configuration file for Pandaboard -->
+<!-- kurt.taylor@linaro.org -->
+<tinyhal>
+
+ <!-- Initially set everything static -->
+ <path>
+ <!-- # Set SDP device for following cset commands -->
+ <!-- cdev "hw:Panda" -->
+
+ <!-- # ABE playback path through DL1 -->
+ <ctl name="DL1 Mixer Multimedia" val="1"/>
+ <ctl name="Sidetone Mixer Playback" val="1"/>
+ <ctl name="DL1 PDM Switch" val="1"/>
+ <ctl name="DL1 Media Playback Volume" val="120,120"/>
+ <ctl name="SDT DL Volume" val="120"/>
+
+ <!-- # ABE PDM-UL Capture path -->
+ <ctl name="MUX_UL00" val="11"/>
+ <!-- ctl name="MUX_UL01" val="10"-->
+
+ <!-- # TWL6040 playback path -->
+ <ctl name="Headset Left Playback" val="1"/>
+ <ctl name="Headset Right Playback" val="1"/>
+
+ <!-- # TWL6040 Capture Path -->
+ <ctl name="Analog Left Capture Route" val="0"/>
+ <ctl name="Capture Preamplifier Volume" val="2"/>
+ </path>
+
+<device name="speaker">
+ <path name="on">
+ <ctl name="SPK Switch" val="1"/>
+ </path>
+ <path name="off">
+ <ctl name="SPK Switch" val="0"/>
+ </path>
+</device>
+
+<device name="headphone">
+ <path name="on">
+ <ctl name="HP Switch" val="1"/>
+ </path>
+ <path name="off">
+ <ctl name="HP Switch" val="0"/>
+ </path>
+</device>
+
+<device name="earpiece">
+ <path name="on">
+ <ctl name="EP Switch" val="1"/>
+ </path>
+ <path name="off">
+ <ctl name="EP Switch" val="0"/>
+ </path>
+</device>
+
+<device name="builtin-mic">
+ <path name="on">
+ <ctl name="MIXINL IN1L Switch" val="1"/>
+ </path>
+ <path name="off">
+ <ctl name="MIXINL IN1L Switch" val="0"/>
+ </path>
+</device>
+
+<device name="headset">
+ <path name="on">
+ <ctl name="MIXINR IN1R Switch" val="1"/>
+ </path>
+ <path name="off">
+ <ctl name="MIXINR IN1R Switch" val="0"/>
+ </path>
+</device>
+
+</tinyhal>