diff options
author | Paul Kocialkowski <contact@paulk.fr> | 2012-09-23 11:01:24 +0200 |
---|---|---|
committer | Paul Kocialkowski <contact@paulk.fr> | 2012-09-23 11:01:24 +0200 |
commit | f17d43066fc1f8b03947032bb04a1b5cc22203fa (patch) | |
tree | 632fefca59e04d081cc837ec77b68526495b7d4f /audio_hw.c | |
parent | 38f53573aad8deef4b2fe0663091f9c9336f711a (diff) | |
download | hardware_tinyalsa-audio-f17d43066fc1f8b03947032bb04a1b5cc22203fa.tar.gz hardware_tinyalsa-audio-f17d43066fc1f8b03947032bb04a1b5cc22203fa.tar.bz2 hardware_tinyalsa-audio-f17d43066fc1f8b03947032bb04a1b5cc22203fa.zip |
Debug prints on most functions
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Diffstat (limited to 'audio_hw.c')
-rw-r--r-- | audio_hw.c | 28 |
1 files changed, 27 insertions, 1 deletions
@@ -47,6 +47,8 @@ static uint32_t audio_hw_get_supported_devices(const struct audio_hw_device *dev) { + LOGD("%s(%p)", __func__, dev); + int supported_output_devices = AUDIO_DEVICE_OUT_EARPIECE | AUDIO_DEVICE_OUT_SPEAKER | AUDIO_DEVICE_OUT_WIRED_HEADSET | @@ -71,6 +73,8 @@ static uint32_t audio_hw_get_supported_devices(const struct audio_hw_device *dev static int audio_hw_init_check(const struct audio_hw_device *dev) { + LOGD("%s(%p)", __func__, dev); + if(dev != NULL) return 0; else @@ -79,49 +83,67 @@ static int audio_hw_init_check(const struct audio_hw_device *dev) static int audio_hw_set_voice_volume(struct audio_hw_device *dev, float volume) { + LOGD("%s(%p, %f)", __func__, dev, volume); + return -ENOSYS; } static int audio_hw_set_master_volume(struct audio_hw_device *dev, float volume) { + LOGD("%s(%p, %f)", __func__, dev, volume); + return -ENOSYS; } static int audio_hw_set_mode(struct audio_hw_device *dev, int mode) { + LOGD("%s(%p, %d)", __func__, dev, mode); + return 0; } static int audio_hw_set_mic_mute(struct audio_hw_device *dev, bool state) { + LOGD("%s(%p, %d)", __func__, dev, state); + return -ENOSYS; } static int audio_hw_get_mic_mute(const struct audio_hw_device *dev, bool *state) { + LOGD("%s(%p, %p)", __func__, dev, state); + return -ENOSYS; } static int audio_hw_set_parameters(struct audio_hw_device *dev, const char *kvpairs) { + LOGD("%s(%p, %s)", __func__, dev, kvpairs); + return -ENOSYS; } -static char * audio_hw_get_parameters(const struct audio_hw_device *dev, +static char *audio_hw_get_parameters(const struct audio_hw_device *dev, const char *keys) { + LOGD("%s(%p, %s)", __func__, dev, keys); + return NULL; } static size_t audio_hw_get_input_buffer_size(const struct audio_hw_device *dev, uint32_t sample_rate, int format, int channel_count) { + LOGD("%s(%p, %d, %d, %d)", __func__, dev, sample_rate, format, channel_count); + return 320; } static int audio_hw_dump(const audio_hw_device_t *device, int fd) { + LOGD("%s(%p, %d)", __func__, device, fd); + return 0; } @@ -131,6 +153,8 @@ static int audio_hw_dump(const audio_hw_device_t *device, int fd) int audio_hw_close(hw_device_t *device) { + LOGD("%s(%p)", __func__, device); + if(device != NULL) free(device); @@ -143,6 +167,8 @@ int audio_hw_open(const hw_module_t *module, const char *name, struct tinyalsa_audio_device *tinyalsa_audio_device; struct audio_hw_device *dev; + LOGD("%s(%p, %s, %p)", __func__, module, name, device); + if(strcmp(name, AUDIO_HARDWARE_INTERFACE) != 0) return -EINVAL; |