OSDN Git Service

Merge remote-tracking branch 'x86/nougat-x86' into oreo-x86 oreo-x86 pie-x86 q-x86 r-x86 android-x86-8.1-r1 android-x86-8.1-r2 android-x86-8.1-r3 android-x86-8.1-r4 android-x86-8.1-r5 android-x86-8.1-r6 android-x86-9.0-r1 android-x86-9.0-r2
authorChih-Wei Huang <cwhuang@linux.org.tw>
Thu, 22 Feb 2018 10:08:20 +0000 (18:08 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Thu, 22 Feb 2018 10:08:20 +0000 (18:08 +0800)
hdmi/Android.mk
hdmi/tinyaudio_hw.c

index f9f0b3b..d8231f0 100644 (file)
@@ -16,11 +16,9 @@ LOCAL_PATH := $(call my-dir)
 
 # Build only when BOARD_USES_ALSA_AUDIO is set
 ifeq ($(BOARD_USES_ALSA_AUDIO), true)
-ifeq ($(BOARD_USES_TINY_ALSA_AUDIO), true)
 
 include $(CLEAR_VARS)
 
-
 LOCAL_MODULE_RELATIVE_PATH := hw
 LOCAL_CFLAGS := -D_POSIX_C_SOURCE=200809
 
@@ -32,11 +30,10 @@ LOCAL_C_INCLUDES += \
 
 LOCAL_SHARED_LIBRARIES := liblog libcutils libtinyalsa
 
-LOCAL_MODULE := audio.hdmi.$(TARGET_BOARD_PLATFORM)
+LOCAL_MODULE := audio.primary.hdmi
 LOCAL_MODULE_TAGS := optional
 LOCAL_CFLAGS += -Werror
 
 include $(BUILD_SHARED_LIBRARY)
 
-endif #BOARD_USES_TINY_ALSA_AUDIO
 endif #BOARD_USES_ALSA_AUDIO
index 4aaf6f7..dfd8dfc 100644 (file)
@@ -247,7 +247,7 @@ static int start_output_stream(struct stream_out *out)
     out->pcm_config.silence_threshold = 0;
 
     if(activePcm){
-      ALOGV("Closing already open tiny alsa stream running state %d",(int)(activePcm));
+      ALOGV("Closing already open tiny alsa stream running state %p", activePcm);
       pcm_close(activePcm);
       activePcm = NULL;
     }
@@ -269,7 +269,7 @@ static int start_output_stream(struct stream_out *out)
     activePcm = out->pcm;
     activeChannel = out->pcm_config.channels;
 
-    ALOGV("Initialized PCM device for channels %d handle = %d",out->pcm_config.channels, (int)activePcm);
+    ALOGI("Initialized PCM device for channels %d handle = %p", out->pcm_config.channels, activePcm);
     ALOGV("%s exit",__func__);
     return 0;
 }
@@ -310,7 +310,7 @@ static size_t out_get_buffer_size(const struct audio_stream *stream)
        buf_size/=LATENCY_TO_BUFFER_SIZE_RATIO;
     }
 
-    ALOGV("%s : %d, period_size : %d, frame_size : %d",
+    ALOGV("%s : %zu, period_size : %u, frame_size : %zu",
         __func__,
         buf_size,
         out->pcm_config.period_size,
@@ -569,7 +569,7 @@ static ssize_t out_write(struct audio_stream_out *stream, const void* buffer,
     int32_t* dstbuff = NULL;
     int outbytes = 0;
 
-    ALOGV("%s enter for bytes = %d channels = %d",__func__,bytes, out->pcm_config.channels);
+    ALOGV("%s enter for bytes = %zu channels = %u", __func__, bytes, out->pcm_config.channels);
 
     pthread_mutex_lock(&out->dev->lock);
     pthread_mutex_lock(&out->lock);
@@ -615,7 +615,7 @@ static ssize_t out_write(struct audio_stream_out *stream, const void* buffer,
     else
       ret = pcm_write(out->pcm, (void *)buffer, bytes);
 
-    ALOGV("pcm_write: %s done for %d input bytes, output bytes = %d ", pcm_get_error(out->pcm),bytes,outbytes);
+    ALOGV("pcm_write: %s done for %zu input bytes, output bytes = %d ", pcm_get_error(out->pcm), bytes, outbytes);
 
     free(dstbuff);
 
@@ -752,7 +752,7 @@ static int adev_open_output_stream(struct audio_hw_device *dev,
     pthread_mutex_lock(&out->lock);
 
     if(activePcm){
-      ALOGV("Closing already open tiny alsa stream %d",(int)out->pcm);
+      ALOGV("Closing already open tiny alsa stream %p", out->pcm);
       pcm_close(activePcm);
       activePcm = NULL;
     }