diff options
Diffstat (limited to 'tizen-audio-pcm.c')
-rw-r--r-- | tizen-audio-pcm.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/tizen-audio-pcm.c b/tizen-audio-pcm.c index 0a09cba..89ca482 100644 --- a/tizen-audio-pcm.c +++ b/tizen-audio-pcm.c @@ -28,10 +28,10 @@ audio_return_t _audio_pcm_init(audio_hal_t *ah) { AUDIO_RETURN_VAL_IF_FAIL(ah, AUDIO_ERR_PARAMETER); - ah->device.pcm_in = NULL; - ah->device.pcm_out = NULL; - pthread_mutex_init(&ah->device.pcm_lock, NULL); - ah->device.pcm_count = 0; + ah->device.voice_pcm.in = NULL; + ah->device.voice_pcm.out = NULL; + ah->device.bt_pcm.in = NULL; + ah->device.bt_pcm.out = NULL; return AUDIO_RET_OK; } @@ -40,15 +40,12 @@ audio_return_t _audio_pcm_deinit(audio_hal_t *ah) { AUDIO_RETURN_VAL_IF_FAIL(ah, AUDIO_ERR_PARAMETER); - pthread_mutex_destroy(&ah->device.pcm_lock); - return AUDIO_RET_OK; } audio_return_t audio_pcm_open(void *audio_handle, void **pcm_handle, uint32_t direction, void *sample_spec, uint32_t period_size, uint32_t periods) { audio_return_t audio_ret = AUDIO_RET_OK; - audio_hal_t *ah = NULL; AUDIO_RETURN_VAL_IF_FAIL(audio_handle, AUDIO_ERR_PARAMETER); AUDIO_RETURN_VAL_IF_FAIL(pcm_handle, AUDIO_ERR_PARAMETER); @@ -59,8 +56,6 @@ audio_return_t audio_pcm_open(void *audio_handle, void **pcm_handle, uint32_t di if ((audio_ret = _pcm_open(pcm_handle, direction, sample_spec, period_size, periods))) return audio_ret; - ah = (audio_hal_t*)audio_handle; - ah->device.pcm_count++; AUDIO_LOG_INFO("Opening PCM handle 0x%x", *pcm_handle); return AUDIO_RET_OK; @@ -93,7 +88,6 @@ audio_return_t audio_pcm_stop(void *audio_handle, void *pcm_handle) audio_return_t audio_pcm_close(void *audio_handle, void *pcm_handle) { audio_return_t audio_ret = AUDIO_RET_OK; - audio_hal_t *ah = NULL; AUDIO_RETURN_VAL_IF_FAIL(audio_handle, AUDIO_ERR_PARAMETER); AUDIO_RETURN_VAL_IF_FAIL(pcm_handle, AUDIO_ERR_PARAMETER); @@ -102,10 +96,8 @@ audio_return_t audio_pcm_close(void *audio_handle, void *pcm_handle) return audio_ret; pcm_handle = NULL; - ah = (audio_hal_t*)audio_handle; - ah->device.pcm_count--; - AUDIO_LOG_INFO("PCM handle close success (count:%d)", ah->device.pcm_count); + AUDIO_LOG_INFO("PCM handle close success"); return audio_ret; } |