3
0
Fork 0

audio: update for mr1

Change-Id: I92348574296ab03c0f57b0dfa81bcded7ddb89cb
This commit is contained in:
codeworkx 2012-12-02 15:39:09 +01:00
parent cdc1a96ac0
commit 605c54b82e
5 changed files with 3 additions and 66 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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);

View File

@ -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);