Fix invalid format string 34/195534/2 accepted/tizen_5.5_unified accepted/tizen_5.5_unified_mobile_hotfix accepted/tizen_5.5_unified_wearable_hotfix accepted/tizen_6.0_unified accepted/tizen_6.0_unified_hotfix tizen_5.5 tizen_5.5_mobile_hotfix tizen_5.5_tv tizen_5.5_wearable_hotfix tizen_6.0 tizen_6.0_hotfix accepted/tizen/5.5/unified/20191031.014427 accepted/tizen/5.5/unified/mobile/hotfix/20201027.082658 accepted/tizen/5.5/unified/wearable/hotfix/20201027.123744 accepted/tizen/6.0/unified/20201030.123648 accepted/tizen/6.0/unified/hotfix/20201103.052739 accepted/tizen/unified/20181218.062917 submit/tizen/20181217.051937 submit/tizen_5.5/20191031.000001 submit/tizen_5.5_mobile_hotfix/20201026.185101 submit/tizen_5.5_wearable_hotfix/20201026.184301 submit/tizen_6.0/20201029.205101 submit/tizen_6.0_hotfix/20201102.192501 submit/tizen_6.0_hotfix/20201103.114801 tizen_5.5.m2_release tizen_6.0.m2_release
authorSeungbae Shin <seungbae.shin@samsung.com>
Fri, 14 Dec 2018 06:45:49 +0000 (15:45 +0900)
committerSeungbae Shin <seungbae.shin@samsung.com>
Mon, 17 Dec 2018 03:30:18 +0000 (12:30 +0900)
[Version] 0.2.26
[Issue Type] Build

Change-Id: Ia7f3fcba1ddc3d41e9d632aa860c38ff0141f81b

packaging/audio-hal-ak4953.spec
tizen-audio-impl-pcm.c
tizen-audio-pcm.c

index 68efc4e..be256b3 100644 (file)
@@ -1,6 +1,6 @@
 Name:       audio-hal-ak4953
 Summary:    TIZEN Audio HAL for AK4953
-Version:    0.2.25
+Version:    0.2.26
 Release:    0
 Group:      System/Libraries
 License:    Apache-2.0
index 70d9cf5..dc93a90 100644 (file)
@@ -224,7 +224,7 @@ audio_return_t _pcm_start(void *pcm_handle)
     }
 #endif
 
-    AUDIO_LOG_INFO("PCM handle 0x%x start", pcm_handle);
+    AUDIO_LOG_INFO("PCM handle %p start", pcm_handle);
     return AUDIO_RET_OK;
 }
 
@@ -244,7 +244,7 @@ audio_return_t _pcm_stop(void *pcm_handle)
     }
 #endif
 
-    AUDIO_LOG_INFO("PCM handle 0x%x stop", pcm_handle);
+    AUDIO_LOG_INFO("PCM handle %p stop", pcm_handle);
     return AUDIO_RET_OK;
 }
 
@@ -252,7 +252,7 @@ audio_return_t _pcm_close(void *pcm_handle)
 {
     int err;
 
-    AUDIO_LOG_INFO("Try to close PCM handle 0x%x", pcm_handle);
+    AUDIO_LOG_INFO("Try to close PCM handle %p", pcm_handle);
 
 #ifdef __USE_TINYALSA__
     if ((err = pcm_close(pcm_handle)) < 0) {
@@ -278,7 +278,7 @@ audio_return_t _pcm_avail(void *pcm_handle, uint32_t *avail)
 
     err = pcm_get_htimestamp(pcm_handle, &frames_avail, &tspec);
     if (err < 0) {
-        AUDIO_LOG_ERROR("Could not get avail and timespec at PCM handle 0x%x : %d", pcm_handle, err);
+        AUDIO_LOG_ERROR("Could not get avail and timespec at PCM handle %p : %d", pcm_handle, err);
         return AUDIO_ERR_IOCTL;
     }
 
@@ -291,7 +291,7 @@ audio_return_t _pcm_avail(void *pcm_handle, uint32_t *avail)
     snd_pcm_sframes_t frames_avail;
 
     if ((frames_avail = snd_pcm_avail(pcm_handle)) < 0) {
-        AUDIO_LOG_ERROR("Could not get avail at PCM handle 0x%x : %d", pcm_handle, frames_avail);
+        AUDIO_LOG_ERROR("Could not get avail at PCM handle %p : %ld", pcm_handle, frames_avail);
         return AUDIO_ERR_IOCTL;
     }
 
@@ -326,7 +326,7 @@ audio_return_t _pcm_write(void *pcm_handle, const void *buffer, uint32_t frames)
 
     frames_written = snd_pcm_writei(pcm_handle, buffer, (snd_pcm_uframes_t) frames);
     if (frames_written < 0) {
-        AUDIO_LOG_ERROR("Failed to write pcm : %d", frames_written);
+        AUDIO_LOG_ERROR("Failed to write pcm : %ld", frames_written);
         return AUDIO_ERR_IOCTL;
     }
 
@@ -357,7 +357,7 @@ audio_return_t _pcm_read(void *pcm_handle, void *buffer, uint32_t frames)
 
     frames_read = snd_pcm_readi(pcm_handle, buffer, (snd_pcm_uframes_t)frames);
     if (frames_read < 0) {
-        AUDIO_LOG_ERROR("Failed to read pcm : %d", frames_read);
+        AUDIO_LOG_ERROR("Failed to read pcm : %ld", frames_read);
         return AUDIO_ERR_IOCTL;
     }
 
@@ -483,7 +483,8 @@ audio_return_t _pcm_get_params(void *pcm_handle, uint32_t direction, void **samp
     _stop_threshold    = config->stop_threshold;
     _silence_threshold = config->silence_threshold;
 
-    AUDIO_LOG_DEBUG("_pcm_get_params (handle 0x%x, format %d, rate %d, channels %d, period_size %d, periods %d, buffer_size %d)", pcm_handle, config->format, config->rate, config->channels, config->period_size, config->period_count, _buffer_size);
+    AUDIO_LOG_DEBUG("_pcm_get_params (handle %p, format %d, rate %u, channels %u, period_size %u, periods %u, buffer_size %u)",
+                    pcm_handle, config->format, config->rate, config->channels, config->period_size, config->period_count, _buffer_size);
 #else  /* alsa-lib */
     int err;
     audio_pcm_sample_spec_t *ss;
@@ -512,7 +513,7 @@ audio_return_t _pcm_get_params(void *pcm_handle, uint32_t direction, void **samp
         (err = snd_pcm_hw_params_get_format(hwparams, &_format)) < 0 ||
         (err = snd_pcm_hw_params_get_rate(hwparams, &_rate, &dir)) < 0 ||
         (err = snd_pcm_hw_params_get_channels(hwparams, &_channels)) < 0) {
-        AUDIO_LOG_ERROR("snd_pcm_hw_params_get_{period_size|buffer_size|periods|format|rate|channels}() failed : %s", err);
+        AUDIO_LOG_ERROR("snd_pcm_hw_params_get_{period_size|buffer_size|periods|format|rate|channels}() failed : %d", err);
         return AUDIO_ERR_PARAMETER;
     }
 
@@ -531,10 +532,11 @@ audio_return_t _pcm_get_params(void *pcm_handle, uint32_t direction, void **samp
         (err = snd_pcm_sw_params_get_stop_threshold(swparams, &_stop_threshold)) < 0  ||
         (err = snd_pcm_sw_params_get_silence_threshold(swparams, &_silence_threshold)) < 0  ||
         (err = snd_pcm_sw_params_get_avail_min(swparams, &_avail_min)) < 0) {
-        AUDIO_LOG_ERROR("snd_pcm_sw_params_get_{start_threshold|stop_threshold|silence_threshold|avail_min}() failed : %s", err);
+        AUDIO_LOG_ERROR("snd_pcm_sw_params_get_{start_threshold|stop_threshold|silence_threshold|avail_min}() failed : %d", err);
     }
 
-    AUDIO_LOG_DEBUG("_pcm_get_params (handle 0x%x, format %d, rate %d, channels %d, period_size %d, periods %d, buffer_size %d)", pcm_handle, _format, _rate, _channels, _period_size, _periods, _buffer_size);
+    AUDIO_LOG_DEBUG("_pcm_get_params (handle %p, format %d, rate %u, channels %u, period_size %lu, periods %u, buffer_size %lu)",
+                    pcm_handle, _format, _rate, _channels, _period_size, _periods, _buffer_size);
 #endif
 
     return AUDIO_RET_OK;
@@ -601,7 +603,7 @@ audio_return_t _pcm_set_params(void *pcm_handle, uint32_t direction, void *sampl
 
     _buffer_size = period_size * periods;
     if ((err = snd_pcm_hw_params_set_buffer_size(pcm_handle, hwparams, _buffer_size)) < 0) {
-        AUDIO_LOG_ERROR("snd_pcm_hw_params_set_buffer_size(%u) failed : %d", _buffer_size, err);
+        AUDIO_LOG_ERROR("snd_pcm_hw_params_set_buffer_size(%lu) failed : %d", _buffer_size, err);
         return AUDIO_ERR_PARAMETER;
     }
 
@@ -647,7 +649,8 @@ audio_return_t _pcm_set_params(void *pcm_handle, uint32_t direction, void *sampl
         return AUDIO_ERR_IOCTL;
     }
 
-    AUDIO_LOG_DEBUG("_pcm_set_params (handle 0x%x, format %d, rate %d, channels %d, period_size %d, periods %d, buffer_size %d)", pcm_handle, ss.format, ss.rate, ss.channels, period_size, periods, _buffer_size);
+    AUDIO_LOG_DEBUG("_pcm_set_params (handle %p, format %d, rate %u, channels %u, period_size %u, periods %u, buffer_size %lu)",
+                    pcm_handle, ss.format, ss.rate, ss.channels, period_size, periods, _buffer_size);
 #endif
 
     return AUDIO_RET_OK;
index b18ad7e..c12c196 100644 (file)
@@ -62,7 +62,7 @@ audio_return_t audio_pcm_open(void *audio_handle, const char *card, const char *
 
     ah = (audio_hal_t*)audio_handle;
     ah->device.pcm_count++;
-    AUDIO_LOG_INFO("Opening PCM handle 0x%x", (unsigned int)*pcm_handle);
+    AUDIO_LOG_INFO("Opening PCM handle %p", *pcm_handle);
 
     return AUDIO_RET_OK;
 }