From: a0220410 Date: Wed, 10 Aug 2016 15:55:54 +0000 (+0800) Subject: change module name to "ti_audio_s" for stereo X-Git-Url: https://git.ti.com/gitweb?p=tas2555sw-android%2Ftas2555-util-stereo.git;a=commitdiff_plain;h=150cacde8ea89173b2bee88b6f6e76dc766d25c6;hp=ba275735ca663e884e19378b72406b9be1559bf3 change module name to "ti_audio_s" for stereo --- diff --git a/Android.mk b/Android.mk index 6597f47..f1638c9 100755 --- a/Android.mk +++ b/Android.mk @@ -6,11 +6,11 @@ include $(CLEAR_VARS) LOCAL_SRC_FILES := main.c -LOCAL_C_INCLUDES := external/ti_audio/ +LOCAL_C_INCLUDES := external/ti_audio_s/ LOCAL_CFLAGS := -O2 -g -W -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -LOCAL_MODULE := ti_audio +LOCAL_MODULE := ti_audio_s LOCAL_MODULE_TAGS := debug LOCAL_SYSTEM_SHARED_LIBRARIES := libc libm diff --git a/main.c b/main.c index d9478d0..8e691e3 100755 --- a/main.c +++ b/main.c @@ -40,17 +40,17 @@ static void usage(){ fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n", - "usage: ti_audio -r channel book page register [count] (read, hexdecimal)", - " ti_audio -w channel book page register value1 [value2 ...] (write, hexdecimal)", - " ti_audio -d on (turn on the debug msg, bool)", - " ti_audio -p [n] (get/[set] DSP program, decimal)", - " ti_audio -c [n] (get/[set] DSP configuration, decimal)", - " ti_audio -s [n] (get/[set] sample rate, decimal)", - " ti_audio -b channel [n] (get/[set] bit rate, decimal)", - " ti_audio -v channel [n] (get/[set] volume, decimal)", - " ti_audio -f (trigger firmware reload)", - " ti_audio -o on (turn on/off TAS2555, bool)", - " ti_audio -t (get firmware timestamp)", + "usage: ti_audio_s -r channel book page register [count] (read, hexdecimal)", + " ti_audio_s -w channel book page register value1 [value2 ...] (write, hexdecimal)", + " ti_audio_s -d on (turn on the debug msg, bool)", + " ti_audio_s -p [n] (get/[set] DSP program, decimal)", + " ti_audio_s -c [n] (get/[set] DSP configuration, decimal)", + " ti_audio_s -s [n] (get/[set] sample rate, decimal)", + " ti_audio_s -b channel [n] (get/[set] bit rate, decimal)", + " ti_audio_s -v channel [n] (get/[set] volume, decimal)", + " ti_audio_s -f (trigger firmware reload)", + " ti_audio_s -o on (turn on/off TAS2555, bool)", + " ti_audio_s -t (get firmware timestamp)", " channel: 1 - left channel, 2 - right channel, 3 - both channels", TIAUDIO_VERSION); } @@ -150,7 +150,7 @@ static int TiAudio_Reg_Write(int fileHandle, int argc, char **argv){ unsigned int whole_reg = 0; unsigned int temp_reg = 0; int i=0, reg_count = 0; - unsigned char *pChannel; + char *pChannel; if(argc < 7){ fprintf(stderr, "invalid para numbers\n"); @@ -240,7 +240,7 @@ static int TiAudio_Reg_Read(int fileHandle, int argc, char **argv){ unsigned char channel; unsigned int temp_reg = 0; int i=0, reg_count = 0; - unsigned char *pChannel; + char *pChannel; if((argc != 6) &&(argc != 7)) { fprintf(stderr, "invalid para numbers\n"); @@ -579,8 +579,8 @@ static int TiAudio_BitRate(int fileHandle, int argc, char **argv){ unsigned char pBuff[5]; unsigned char bSet = 0; unsigned char channel; - unsigned int nBitRate; - unsigned char *pChannel; + int nBitRate = -1; + char *pChannel; if(argc == 3){ bSet = 0; @@ -680,7 +680,7 @@ static int TiAudio_DACVolume(int fileHandle, int argc, char **argv){ unsigned char bSet = 0; unsigned int nVol; unsigned char channel; - unsigned char *pChannel; + char *pChannel; if(argc == 3){ bSet = 0; @@ -801,7 +801,7 @@ err: return err; } -static int TiAudio_Timestamp(int fileHandle, int argc, char **argv){ +static int TiAudio_Timestamp(int fileHandle){ int err = -1; unsigned char pBuff[4]; @@ -836,7 +836,7 @@ err: return err; } -static int TiAudio_TriggerFWReload(int fileHandle, int argc, char **argv){ +static int TiAudio_TriggerFWReload(int fileHandle){ int err = -1; unsigned char pBuff[4]; pBuff[0] = TIAUDIO_CMD_FW_RELOAD; @@ -911,10 +911,10 @@ int main(int argc, char **argv) ret = TiAudio_SpeakerOn(fileHandle, argc, argv); break; case 't': - ret = TiAudio_Timestamp(fileHandle, argc, argv); + ret = TiAudio_Timestamp(fileHandle); break; case 'f': - ret = TiAudio_TriggerFWReload(fileHandle, argc, argv); + ret = TiAudio_TriggerFWReload(fileHandle); break; default: usage(); diff --git a/ti_audio.h b/ti_audio.h index 21d5dbd..dc06c49 100755 --- a/ti_audio.h +++ b/ti_audio.h @@ -25,7 +25,7 @@ #include #include -#define TIAUDIO_VERSION "Version : 3.1 (20th, May, 2016)" +#define TIAUDIO_VERSION "Version : 3.2 (10th, August, 2016)" #define TI_AUDIO_NAME "/dev/tas2555s" #define MAX_INT_STR "4294967295"