The tool supports testing USB audio by default. It reads audio from the ALSA device for the android phone in accessory mode and outputs it to the ALSA device for the PC's speaker. The default values work on my PC, but can be changed via command line options. When the -a option is specified, accessorytest also acts as the host side of the AccessoryChat test, so audio can be tested side by side with the accessory bulk endpoint support. When the -h option is specified, accessorytest will look for HID devices on the PC and proxy them to the phone over the accessory protocol. This requires running accessorytest as root. Change-Id: I1ea06d7201cd845b95a92a42594464783a90189b
26 lines
492 B
Makefile
26 lines
492 B
Makefile
LOCAL_PATH:= $(call my-dir)
|
|
|
|
# Build for Linux host only
|
|
ifeq ($(HOST_OS),linux)
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_MODULE_TAGS := optional
|
|
|
|
LOCAL_SRC_FILES := accessory.c \
|
|
audio.c \
|
|
hid.c \
|
|
usb.c
|
|
|
|
LOCAL_C_INCLUDES += external/tinyalsa/include
|
|
|
|
LOCAL_MODULE := accessorytest
|
|
|
|
LOCAL_STATIC_LIBRARIES := libusbhost libcutils libtinyalsa
|
|
LOCAL_LDLIBS += -lpthread
|
|
LOCAL_CFLAGS := -g -O0
|
|
|
|
include $(BUILD_HOST_EXECUTABLE)
|
|
|
|
endif
|