Revert "tinyhal: Port to JellyBean"

This reverts commit 414908799e37dfb2b3f4d64ab746195c879641f9.
diff --git a/audio_hw.c b/audio_hw.c
index 5d19190..d974086 100644
--- a/audio_hw.c
+++ b/audio_hw.c
@@ -1,7 +1,6 @@
 /*
  * Copyright (C) 2012 Wolfson Microelectronics plc
  * Copyright (C) 2011 The Android Open Source Project
- * Copyright (C) 2012 Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org> (JB port)
  *
  * Liberal inspiration drawn from the AOSP code for Toro.
  *
@@ -41,19 +40,6 @@
 #include <audio_utils/resampler.h>
 #include <hardware/audio_effect.h>
 
-#ifndef LOGE
-/* JellyBean or higher */
-#define LOGE ALOGE
-#define LOGI ALOGI
-#define LOGV ALOGV
-#define LOGW ALOGW
-#define APILEVEL 1
-#else
-#define audio_channel_mask_t uint32_t
-#define audio_format_t int
-#define APILEVEL 0
-#endif
-
 struct route_setting
 {
     char *ctl_name;
@@ -211,17 +197,17 @@
     return 4096;
 }
 
-static audio_channel_mask_t out_get_channels(const struct audio_stream *stream)
+static uint32_t out_get_channels(const struct audio_stream *stream)
 {
     return AUDIO_CHANNEL_OUT_STEREO;
 }
 
-static audio_format_t out_get_format(const struct audio_stream *stream)
+static int out_get_format(const struct audio_stream *stream)
 {
     return AUDIO_FORMAT_PCM_16_BIT;
 }
 
-static int out_set_format(struct audio_stream *stream, audio_format_t format)
+static int out_set_format(struct audio_stream *stream, int format)
 {
     return 0;
 }
@@ -361,17 +347,17 @@
     return 320;
 }
 
-static audio_channel_mask_t in_get_channels(const struct audio_stream *stream)
+static uint32_t in_get_channels(const struct audio_stream *stream)
 {
     return AUDIO_CHANNEL_IN_MONO;
 }
 
-static audio_format_t in_get_format(const struct audio_stream *stream)
+static int in_get_format(const struct audio_stream *stream)
 {
     return AUDIO_FORMAT_PCM_16_BIT;
 }
 
-static int in_set_format(struct audio_stream *stream, audio_format_t format)
+static int in_set_format(struct audio_stream *stream, int format)
 {
     return 0;
 }
@@ -426,19 +412,10 @@
     return 0;
 }
 
-#if APILEVEL >= 1
-static int adev_open_output_stream(struct audio_hw_device *dev,
-                                   audio_io_handle_t handle,
-                                   audio_devices_t devices,
-                                   audio_output_flags_t flags,
-                                   struct audio_config * config,
-                                   struct audio_stream_out **stream_out)
-#else
 static int adev_open_output_stream(struct audio_hw_device *dev,
                                    uint32_t devices, int *format,
                                    uint32_t *channels, uint32_t *sample_rate,
                                    struct audio_stream_out **stream_out)
-#endif
 {
     struct tiny_audio_device *adev = (struct tiny_audio_device *)dev;
     struct tiny_stream_out *out;
@@ -473,15 +450,9 @@
     select_devices(adev);
     pthread_mutex_unlock(&adev->route_lock);
 
-#if APILEVEL >= 1
-    config->channel_mask = out_get_channels(&out->stream.common);
-    config->format = out_get_format(&out->stream.common);
-    config->sample_rate = out_get_sample_rate(&out->stream.common);
-#else
     *channels = out_get_channels(&out->stream.common);
     *format = out_get_format(&out->stream.common);
     *sample_rate = out_get_sample_rate(&out->stream.common);
-#endif
 
     /* Should query the driver for parameters and compute defaults
      * from those; should also support configuration from file and
@@ -555,40 +526,23 @@
     return -ENOSYS;
 }
 
-#if APILEVEL >= 1
-static size_t adev_get_input_buffer_size(const struct audio_hw_device *dev,
-                                         const struct audio_config *config)
-#else
 static size_t adev_get_input_buffer_size(const struct audio_hw_device *dev,
                                          uint32_t sample_rate, int format,
                                          int channel_count)
-#endif
 {
     return 320;
 }
 
-#if APILEVEL >= 1
-static int adev_open_input_stream(struct audio_hw_device *dev,
-                                  audio_io_handle_t handle,
-                                  audio_devices_t devices,
-                                  struct audio_config *config,
-                                  struct audio_stream_in **stream_in)
-#else
 static int adev_open_input_stream(struct audio_hw_device *dev, uint32_t devices,
                                   int *format, uint32_t *channels,
                                   uint32_t *sample_rate,
                                   audio_in_acoustics_t acoustics,
                                   struct audio_stream_in **stream_in)
-#endif
 {
     struct tiny_audio_device *adev = (struct tiny_audio_device *)dev;
     struct tiny_stream_in *in;
     int ret;
-#if APILEVEL >= 1
-    int channel_count = popcount(config->channel_mask);
-#else
     int channel_count = popcount(*channels);
-#endif
 
     in = calloc(1, sizeof(struct tiny_stream_in));
     if (!in)