X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=plugins%2Faudio%2Faudio-alsa.h;h=9b9ee21c07e86ae1ac8a2c81fba4ee0af9173885;hb=559b80ade33b82aa76dac5f107e9692c58ea38c3;hp=776ac819a082360dc3161949032457e87541071c;hpb=3bce4a6a8648c91b6ddea478116b3b0679ef4648;p=src%2Fapp-framework-binder.git diff --git a/plugins/audio/audio-alsa.h b/plugins/audio/audio-alsa.h index 776ac819..9b9ee21c 100644 --- a/plugins/audio/audio-alsa.h +++ b/plugins/audio/audio-alsa.h @@ -19,24 +19,30 @@ #ifndef AUDIO_ALSA_H #define AUDIO_ALSA_H +#include #include #include "local-def.h" -typedef struct adev_ctx adev_ctx_T; +typedef struct dev_ctx_alsa dev_ctx_alsa_T; -struct adev_ctx { +struct dev_ctx_alsa { char *name; snd_pcm_t *dev; snd_pcm_hw_params_t *params; snd_mixer_elem_t *mixer_elm; + snd_mixer_elem_t *mixer_elm_m; long vol_max; long vol; + pthread_t thr; + unsigned char thr_should_run; + unsigned char thr_finished; }; -PUBLIC unsigned int _alsa_get_volume (unsigned int); +STATIC void* _alsa_play_thread_fn (void *); +PUBLIC int _alsa_get_volume (unsigned int, unsigned int); PUBLIC unsigned char _alsa_get_mute (unsigned int); -static struct adev_ctx **adev_ctx = NULL; +static struct dev_ctx_alsa **dev_ctx_a = NULL; #endif /* AUDIO_ALSA_H */