summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcodeworkx <codeworkx@cyanogenmod.org>2012-12-02 15:39:09 +0100
committercodeworkx <codeworkx@cyanogenmod.org>2012-12-02 15:39:09 +0100
commit605c54b82e788adcaef610d2bfbd773394c51e88 (patch)
tree501fa110857d0cf20539b152c5d97f390a050ed3
parentcdc1a96ac05f2eb3e2fea69aa90a18ae3d5696cd (diff)
downloaddevice_samsung_galaxys2-common-605c54b82e788adcaef610d2bfbd773394c51e88.zip
device_samsung_galaxys2-common-605c54b82e788adcaef610d2bfbd773394c51e88.tar.gz
device_samsung_galaxys2-common-605c54b82e788adcaef610d2bfbd773394c51e88.tar.bz2
audio: update for mr1
Change-Id: I92348574296ab03c0f57b0dfa81bcded7ddb89cb
-rw-r--r--tinyalsa_audio/audio_hw.c20
-rw-r--r--tinyalsa_audio/audio_in.c2
-rw-r--r--tinyalsa_audio/audio_out.c2
-rw-r--r--tinyalsa_audio/mixer.c44
-rw-r--r--tinyalsa_audio/mixer.h1
5 files changed, 3 insertions, 66 deletions
diff --git a/tinyalsa_audio/audio_hw.c b/tinyalsa_audio/audio_hw.c
index 45ab3a2..bb219e1 100644
--- a/tinyalsa_audio/audio_hw.c
+++ b/tinyalsa_audio/audio_hw.c
@@ -40,23 +40,6 @@
* Functions
*/
-static uint32_t audio_hw_get_supported_devices(const struct audio_hw_device *dev)
-{
- struct tinyalsa_audio_device *device;
-
- ALOGD("%s(%p)", __func__, dev);
-
- if(dev == NULL)
- return -1;
-
- device = (struct tinyalsa_audio_device *) dev;
-
- if(device->mixer == NULL)
- return -1;
-
- return (uint32_t) tinyalsa_mixer_get_supported_devices(device->mixer);
-}
-
static int audio_hw_init_check(const struct audio_hw_device *dev)
{
struct tinyalsa_audio_device *device;
@@ -457,11 +440,10 @@ int audio_hw_open(const hw_module_t *module, const char *name,
dev = &(tinyalsa_audio_device->device);
dev->common.tag = HARDWARE_DEVICE_TAG;
- dev->common.version = AUDIO_DEVICE_API_VERSION_1_0;
+ dev->common.version = AUDIO_DEVICE_API_VERSION_2_0;
dev->common.module = (struct hw_module_t *) module;
dev->common.close = audio_hw_close;
- dev->get_supported_devices = audio_hw_get_supported_devices;
dev->init_check = audio_hw_init_check;
dev->set_voice_volume = audio_hw_set_voice_volume;
dev->set_master_volume = audio_hw_set_master_volume;
diff --git a/tinyalsa_audio/audio_in.c b/tinyalsa_audio/audio_in.c
index 94d5c51..105bf12 100644
--- a/tinyalsa_audio/audio_in.c
+++ b/tinyalsa_audio/audio_in.c
@@ -399,7 +399,7 @@ static size_t audio_in_get_buffer_size(const struct audio_stream *stream)
return size;
}
-static uint32_t audio_in_get_channels(const struct audio_stream *stream)
+static audio_channel_mask_t audio_in_get_channels(const struct audio_stream *stream)
{
struct tinyalsa_audio_stream_in *stream_in;
diff --git a/tinyalsa_audio/audio_out.c b/tinyalsa_audio/audio_out.c
index fc6753e..feaa626 100644
--- a/tinyalsa_audio/audio_out.c
+++ b/tinyalsa_audio/audio_out.c
@@ -315,7 +315,7 @@ static size_t audio_out_get_buffer_size(const struct audio_stream *stream)
return size;
}
-static uint32_t audio_out_get_channels(const struct audio_stream *stream)
+static audio_channel_mask_t audio_out_get_channels(const struct audio_stream *stream)
{
struct tinyalsa_audio_stream_out *stream_out;
diff --git a/tinyalsa_audio/mixer.c b/tinyalsa_audio/mixer.c
index 151ce12..0d4950d 100644
--- a/tinyalsa_audio/mixer.c
+++ b/tinyalsa_audio/mixer.c
@@ -1204,50 +1204,6 @@ int tinyalsa_mixer_set_voice_volume(struct tinyalsa_mixer *mixer,
"voice-volume", volume);
}
-audio_devices_t tinyalsa_mixer_get_supported_devices(struct tinyalsa_mixer *mixer)
-{
- struct tinyalsa_mixer_device *mixer_device;
- audio_devices_t devices = 0x00;
- struct list_head *list;
-
- ALOGD("%s(%p)", __func__, mixer);
-
- if(mixer == NULL)
- return -1;
-
- list = mixer->output.devices;
- while(list != NULL) {
- if(list->data != NULL) {
- mixer_device = (struct tinyalsa_mixer_device *) list->data;
- devices |= mixer_device->props.type;
- }
-
- list = list->next;
- }
-
- list = mixer->input.devices;
- while(list != NULL) {
- if(list->data != NULL) {
- mixer_device = (struct tinyalsa_mixer_device *) list->data;
- devices |= mixer_device->props.type;
- }
-
- list = list->next;
- }
-
- list = mixer->modem.devices;
- while(list != NULL) {
- if(list->data != NULL) {
- mixer_device = (struct tinyalsa_mixer_device *) list->data;
- devices |= mixer_device->props.type;
- }
-
- list = list->next;
- }
-
- return devices;
-}
-
struct tinyalsa_mixer_io_props *tinyalsa_mixer_get_output_props(struct tinyalsa_mixer *mixer)
{
ALOGD("%s(%p)", __func__, mixer);
diff --git a/tinyalsa_audio/mixer.h b/tinyalsa_audio/mixer.h
index a370575..5301b7c 100644
--- a/tinyalsa_audio/mixer.h
+++ b/tinyalsa_audio/mixer.h
@@ -115,7 +115,6 @@ int tinyalsa_mixer_set_input_gain(struct tinyalsa_mixer *mixer,
int tinyalsa_mixer_set_voice_volume(struct tinyalsa_mixer *mixer,
audio_devices_t device, float volume);
-audio_devices_t tinyalsa_mixer_get_supported_devices(struct tinyalsa_mixer *mixer);
struct tinyalsa_mixer_io_props *tinyalsa_mixer_get_output_props(struct tinyalsa_mixer *mixer);
struct tinyalsa_mixer_io_props *tinyalsa_mixer_get_input_props(struct tinyalsa_mixer *mixer);
struct tinyalsa_mixer_io_props *tinyalsa_mixer_get_modem_props(struct tinyalsa_mixer *mixer);