From: Younghwan Ahn Date: Tue, 21 Aug 2012 13:52:33 +0000 (+0900) Subject: 2.0 beta init X-Git-Tag: 2.0_alpha~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=406486fb7dd9249b969999f60d76df3d32b1c61c;p=platform%2Fcore%2Fmultimedia%2Flibmm-radio.git 2.0 beta init --- diff --git a/TC/tet_scen b/TC/tet_scen index e2e13b0..df9819b 100644 --- a/TC/tet_scen +++ b/TC/tet_scen @@ -14,7 +14,5 @@ all /utc/utc_mm_radio_get_frequency_func /utc/utc_mm_radio_scan_start_func /utc/utc_mm_radio_scan_stop_func - /utc/utc_mm_radio_set_sound_path_func - /utc/utc_mm_radio_get_sound_path_func "Completed Full Test Suite" # EOF diff --git a/TC/utc/Makefile b/TC/utc/Makefile index 8285fc6..57af965 100755 --- a/TC/utc/Makefile +++ b/TC/utc/Makefile @@ -23,8 +23,6 @@ TS10 = utc_mm_radio_set_frequency_func TS11 = utc_mm_radio_get_frequency_func TS12 = utc_mm_radio_scan_start_func TS13 = utc_mm_radio_scan_stop_func -TS14 = utc_mm_radio_set_sound_path_func -TS15 = utc_mm_radio_get_sound_path_func LIBS = `pkg-config --libs mm-radio` LIBS +=-L/usr/lib/:/usr/lib/pkgconfig @@ -40,7 +38,7 @@ CFLAGS = $(INCS) CC += $(CFLAGS) LDFLAGS = $(LIBS) -all : $(TS1) $(TS2) $(TS3) $(TS4) $(TS5) $(TS6) $(TS7) $(TS8) $(TS9) $(TS10) $(TS11) $(TS12) $(TS13) $(TS14) $(TS15) +all : $(TS1) $(TS2) $(TS3) $(TS4) $(TS5) $(TS6) $(TS7) $(TS8) $(TS9) $(TS10) $(TS11) $(TS12) $(TS13) $(TS1): $(TS1).c $(CC) -o $(TS1) $(TS1).c $(LDFLAGS) @@ -81,14 +79,8 @@ $(TS12): $(TS12).c $(TS13): $(TS13).c $(CC) -o $(TS13) $(TS13).c $(LDFLAGS) -$(TS14): $(TS14).c - $(CC) -o $(TS14) $(TS14).c $(LDFLAGS) - -$(TS15): $(TS15).c - $(CC) -o $(TS15) $(TS15).c $(LDFLAGS) - clean: - rm -rf *~ *.o $(TS1) $(TS2) $(TS3) $(TS4) $(TS5) $(TS6) $(TS7) $(TS8) $(TS9) $(TS10) $(TS11) $(TS12) $(TS13) $(TS14) $(TS15) + rm -rf *~ *.o $(TS1) $(TS2) $(TS3) $(TS4) $(TS5) $(TS6) $(TS7) $(TS8) $(TS9) $(TS10) $(TS11) $(TS12) $(TS13) diff --git a/TC/utc/tslist b/TC/utc/tslist index d6f5156..d2228f7 100755 --- a/TC/utc/tslist +++ b/TC/utc/tslist @@ -11,6 +11,3 @@ ./utc_mm_radio_get_frequency_func ./utc_mm_radio_scan_start_func ./utc_mm_radio_scan_stop_func -./utc_mm_radio_set_sound_path_func -./utc_mm_radio_get_sound_path_func - diff --git a/TC/utc/utc_mm_radio_common.h b/TC/utc/utc_mm_radio_common.h index c918482..3b7aaac 100755 --- a/TC/utc/utc_mm_radio_common.h +++ b/TC/utc/utc_mm_radio_common.h @@ -110,11 +110,4 @@ void utc_mm_radio_scan_start_func_02 (); void utc_mm_radio_scan_stop_func_01 (); void utc_mm_radio_scan_stop_func_02 (); -void utc_mm_radio_set_sound_path_func_01 (); -void utc_mm_radio_set_sound_path_func_02 (); - -void utc_mm_radio_get_sound_path_func_01 (); -void utc_mm_radio_get_sound_path_func_02 (); - - #endif /* UTS_MM_FRAMEWORK_RADIO_COMMON_H */ diff --git a/TC/utc/utc_mm_radio_get_sound_path_func.c b/TC/utc/utc_mm_radio_get_sound_path_func.c deleted file mode 100755 index 85ecb85..0000000 --- a/TC/utc/utc_mm_radio_get_sound_path_func.c +++ /dev/null @@ -1,102 +0,0 @@ -/* - * libmm-radio - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: JongHyuk Choi , YoungHwan An - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#include "utc_mm_radio_common.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -//------------------------------------------------------------------------------------------------- -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Declare the global variables and registers and Internal Funntions -//------------------------------------------------------------------------------------------------- - -struct tet_testlist tet_testlist[] = { - {utc_mm_radio_get_sound_path_func_01, 1}, - {utc_mm_radio_get_sound_path_func_02, 2}, - {NULL, 0} -}; - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/* Initialize TCM data structures */ - - -/* Start up function for each test purpose */ -void -startup () -{ - tet_infoline("[[ COMMON ]]::Inside startup \n"); - - tet_infoline("[[ COMMON ]]::Completing startup \n"); - -} - -/* Clean up function for each test purpose */ -void -cleanup () -{ - -} - -void utc_mm_radio_get_sound_path_func_01() -{ - MMHandleType hradio; - int ret = 0; - MMRadioOutputType soundpath; - - tet_infoline( "[[ TET_MSG ]]:: Get sound path for the Radio instance" ); - - UTC_RADIO_START_ALL(hradio, ret); - - /* Get sound path for the instance of the Radio */ - ret = mm_radio_get_sound_path(hradio, &soundpath); - - dts_check_eq(__func__, ret, MM_ERROR_NONE, "err=%x", ret ); - - UTC_RADIO_DESTROY_ALL(hradio, ret); - - return; -} - -void utc_mm_radio_get_sound_path_func_02() -{ - MMHandleType hradio; - int ret = 0; - - tet_infoline( "[[ TET_MSG ]]:: Get sound path for the Radio instance" ); - - UTC_RADIO_START_ALL(hradio, ret); - - /* Get sound path for the instance of the Radio */ - ret = mm_radio_get_sound_path(hradio, NULL); - - dts_check_ne(__func__, ret, MM_ERROR_NONE, "err=%x", ret ); - - UTC_RADIO_DESTROY_ALL(hradio, ret); - - return; -} - - -/** @} */ - - - - diff --git a/TC/utc/utc_mm_radio_set_sound_path_func.c b/TC/utc/utc_mm_radio_set_sound_path_func.c deleted file mode 100755 index 12c4cca..0000000 --- a/TC/utc/utc_mm_radio_set_sound_path_func.c +++ /dev/null @@ -1,102 +0,0 @@ -/* - * libmm-radio - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: JongHyuk Choi , YoungHwan An - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - - -#include "utc_mm_radio_common.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -//------------------------------------------------------------------------------------------------- -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Declare the global variables and registers and Internal Funntions -//------------------------------------------------------------------------------------------------- - -struct tet_testlist tet_testlist[] = { - {utc_mm_radio_set_sound_path_func_01, 1}, - {utc_mm_radio_set_sound_path_func_02, 2}, - {NULL, 0} -}; - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/* Initialize TCM data structures */ - -/* Start up function for each test purpose */ -void -startup () -{ - tet_infoline("[[ COMMON ]]::Inside startup \n"); - - tet_infoline("[[ COMMON ]]::Completing startup \n"); -} - -/* Clean up function for each test purpose */ -void -cleanup () -{ - -} - -void utc_mm_radio_set_sound_path_func_01() -{ - int ret = 0; - MMHandleType hradio; - - ret = mm_radio_create(&hradio); - ret = mm_radio_realize(hradio); - - tet_infoline( "[[ TET_MSG ]]:: Set sound path for the Radio instance" ); - - /* Set sound path for the instance of the Radio */ - ret = mm_radio_set_sound_path(hradio, MM_RADIO_OUTPUT_SPEAKER); - dts_check_eq(__func__, ret, MM_ERROR_NONE, "err=%x", ret ); - - ret = mm_radio_unrealize(hradio); - ret = mm_radio_destroy(hradio); - - return; -} - - -void utc_mm_radio_set_sound_path_func_02() -{ - int ret = 0; - MMHandleType hradio; - - ret = mm_radio_create(&hradio); - ret = mm_radio_realize(hradio); - - tet_infoline( "[[ TET_MSG ]]:: Set sound path for the Radio instance" ); - - ret = mm_radio_set_sound_path(hradio, -1); - dts_check_ne(__func__, ret, MM_ERROR_NONE, "err=%x", ret ); - - ret = mm_radio_unrealize(hradio); - ret = mm_radio_destroy(hradio); - - return; -} - - -/** @} */ - - - - diff --git a/configure.ac b/configure.ac index fcb97ae..a631a75 100755 --- a/configure.ac +++ b/configure.ac @@ -40,9 +40,13 @@ PKG_CHECK_MODULES(MMTA, mm-ta) AC_SUBST(MMTA_CFLAGS) AC_SUBST(MMTA_LIBS) -PKG_CHECK_MODULES(AVSYSAUDIO, avsysaudio) -AC_SUBST(AVSYSAUDIO_CFLAGS) -AC_SUBST(AVSYSAUDIO_LIBS) +PKG_CHECK_MODULES(GST, gstreamer-0.10) +AC_SUBST(GST_CFLAGS) +AC_SUBST(GST_LIBS) + +PKG_CHECK_MODULES(GSTAPP, gstreamer-app-0.10) +AC_SUBST(GSTAPP_CFLAGS) +AC_SUBST(GSTAPP_LIBS) PKG_CHECK_MODULES(MMSESSION, mm-session) AC_SUBST(MMSESSION_CFLAGS) diff --git a/debian/changelog b/debian/changelog index d7d8b7c..1bb03a7 100755 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,764 @@ +libmm-radio (0.2.3-0) unstable; urgency=low + + * modify internal package from rpm spec + * Git : slp/pkgs/l/libmm-radio + * Tag : libmm-radio_0.2.3-0 + + -- Younghwan Ahn Fri, 27 Jul 2012 18:07:41 +0900 + +libmm-radio (0.2.2-0) unstable; urgency=low + + * code clean up - remove useless codes any more + * Git : slp/pkgs/l/libmm-radio + * Tag : libmm-radio_0.2.2-0 + + -- Younghwan Ahn Wed, 25 Jul 2012 17:49:27 +0900 + +libmm-radio (0.2.1-0) unstable; urgency=low + + * add mm_radio_get_region_type(), mm_radio_get_region_frequency_range() + * Git : slp/pkgs/l/libmm-radio + * Tag : libmm-radio_0.2.1-0 + + -- Younghwan Ahn Tue, 12 Jun 2012 17:51:24 +0900 + +libmm-radio (0.2.0-0) unstable; urgency=low + + * [AudioRoute] bt radio & sound path & volume modified + * Git : slp/pkgs/l/libmm-radio + * Tag : libmm-radio_0.2.0-0 + + -- Seungbae Shin Mon, 23 Apr 2012 16:55:44 +0900 + +libmm-radio (0.1.12-0) unstable; urgency=low + + * Add missed code for libmm-radio_0.1.11-0 + * Git : slp/pkgs/l/libmm-radio + * Tag : libmm-radio_0.1.12-0 + + -- Younghwan Ahn Sat, 07 Apr 2012 15:52:25 +0900 + +libmm-radio (0.1.11-0) unstable; urgency=low + + * modify code temporally for building CAPI on i386 + * Git : slp/pkgs/l/libmm-radio + * Tag : libmm-radio_0.1.11-0 + + -- Younghwan Ahn Fri, 06 Apr 2012 13:19:57 +0900 + +libmm-radio (0.1.10-0) unstable; urgency=low + + * modify arch in control temporally for i386 build + * Git : slp/pkgs/l/libmm-radio + * Tag : libmm-radio_0.1.10-0 + + -- Younghwan Ahn Thu, 05 Apr 2012 18:15:17 +0900 + +libmm-radio (0.1.9-0) unstable; urgency=low + + * modify asm policy + * Git : slp/pkgs/l/libmm-radio + * Tag : libmm-radio_0.1.9-0 + + -- Younghwan Ahn Thu, 05 Apr 2012 13:43:29 +0900 + +libmm-radio (0.1.8-0) unstable; urgency=low + + * code clean up + * Git : slp/pkgs/l/libmm-radio + * Tag : libmm-radio_0.1.8-0 + + -- Younghwan Ahn Tue, 03 Apr 2012 16:59:56 +0900 + +libmm-radio (0.1.7-0) unstable; urgency=low + + * modify to support region settings + * Git : slp/pkgs/l/libmm-radio + * Tag : libmm-radio_0.1.7-0 + + -- Younghwan Ahn Mon, 26 Mar 2012 18:08:44 +0900 + +libmm-radio (0.1.6-0) unstable; urgency=low + + * move _get_signal_strength to mm_radio.h + * Git : slp/pkgs/l/libmm-radio + * Tag : libmm-radio_0.1.6-0 + + -- Younghwan Ahn Tue, 20 Mar 2012 11:54:39 +0900 + +libmm-radio (0.1.5-0) unstable; urgency=low + + * modify signal value + * Git : slp/pkgs/l/libmm-radio + * Tag : libmm-radio_0.1.5-0 + + -- Younghwan Ahn Mon, 20 Feb 2012 20:22:22 +0900 + +libmm-radio (0.1.4-0) unstable; urgency=low + + * set tuner audio mode + * Git : slp/pkgs/l/libmm-radio + * Tag : libmm-radio_0.1.4-0 + + -- Younghwan Ahn Wed, 25 Jan 2012 17:46:20 +0900 + +libmm-radio (0.1.3-1) unstable; urgency=low + + * not to post scan info any more when scan stop is called, add break to scan thread + * Git : slp/pkgs/l/libmm-radio + * Tag : libmm-radio_0.1.3-1 + + -- Younghwan Ahn Tue, 10 Jan 2012 17:38:36 +0900 + +libmm-radio (0.1.3-0) unstable; urgency=low + + * code cleanup, modify freq. param as KHz + * Git : slp/pkgs/l/libmm-radio + * Tag : libmm-radio_0.1.3-0 + + -- Younghwan Ahn Mon, 09 Jan 2012 10:47:46 +0900 + +libmm-radio (0.1.2-30) unstable; urgency=low + + * make apache license of TC files + * Git : slp/pkgs/l/libmm-radio + * Tag : libmm-radio_0.1.2-30 + + -- Younghwan Ahn Wed, 21 Dec 2011 12:30:49 +0900 + +libmm-radio (0.1.2-29) unstable; urgency=low + + * remove h/w dependency code + * Git : 165.213.180.234:slp/pkgs/l/libmm-radio + * Tag : libmm-radio_0.1.2-29 + + -- Younghwan Ahn Thu, 15 Dec 2011 20:11:47 +0900 + libmm-radio (0.1.2-28) unstable; urgency=low - * Initial release + * fix memory leak for scan thread + * Git : 165.213.180.234:slp/pkgs/l/libmm-radio + * Tag : libmm-radio_0.1.2-28 -- Younghwan Ahn Mon, 31 Oct 2011 18:18:51 +0900 +libmm-radio (0.1.2-27) unstable; urgency=low + + * change wrap around + * Git : 165.213.180.234:slp/pkgs/l/libmm-radio + * Tag : libmm-radio_0.1.2-27 + + -- Younghwan Ahn Fri, 14 Oct 2011 14:11:40 +0900 + +libmm-radio (0.1.2-26) unstable; urgency=low + + * fix codes commented by prevent + * Git : 165.213.180.234:slp/pkgs/l/libmm-radio + * Tag : libmm-radio_0.1.2-26 + + -- Younghwan Ahn Tue, 11 Oct 2011 14:57:21 +0900 + +libmm-radio (0.1.2-25) unstable; urgency=low + + * set path using sound policy + * Git : 165.213.180.234:slp/pkgs/l/libmm-radio + * Tag : libmm-radio_0.1.2-25 + + -- Younghwan Ahn Wed, 05 Oct 2011 16:16:37 +0900 + +libmm-radio (0.1.2-24) unstable; urgency=low + + * modify to have dependency of kernel header + * Git : 165.213.180.234:slp/pkgs/l/libmm-radio + * Tag : libmm-radio_0.1.2-24 + + -- Younghwan Ahn Thu, 29 Sep 2011 15:09:30 +0900 + +libmm-radio (0.1.2-23) unstable; urgency=low + + * remove usless set path for noise when radio is started during playing music + * Git : 165.213.180.234:slp/pkgs/l/libmm-radio + * Tag : libmm-radio_0.1.2-23 + + -- Younghwan Ahn Wed, 21 Sep 2011 17:46:23 +0900 + +libmm-radio (0.1.2-22) unstable; urgency=low + + * update changelog + * Git : 165.213.180.234:slp/pkgs/l/libmm-radio + * Tag : libmm-radio_0.1.2-22 + + -- Younghwan Ahn Thu, 14 Jul 2011 10:35:11 +0900 + +libmm-radio (0.1.2-21) unstable; urgency=low + + * Add mute/unmute API + * Git : 165.213.180.234:slp/pkgs/l/libmm-radio + * Tag : libmm-radio_0.1.2-21 + + -- Younghwan Ahn Thu, 26 May 2011 13:48:29 +0900 + +libmm-radio (0.1.2-20) unstable; urgency=low + + * Modify CFLAGS + * Git : 165.213.180.234:slp/pkgs/l/libmm-radio + * Tag : libmm-radio_0.1.2-20 + + -- Seungbae Shin Tue, 03 May 2011 13:26:51 +0900 + +libmm-radio (0.1.2-19) unstable; urgency=low + + * update changelog + * Git : 165.213.180.234:slp/pkgs/l/libmm-radio + * Tag : libmm-radio_0.1.2-19 + + -- YoungHwan Ahn Fri, 18 Feb 2011 16:40:31 +0900 + +libmm-radio (0.1.2-18) unstable; urgency=low + + * fix error handling bug + * Git : 165.213.180.234:slp/pkgs/l/libmm-radio + * Tag : libmm-radio_0.1.2-18 + + -- YoungHwan Ahn Tue, 15 Feb 2011 17:15:58 +0900 + +libmm-radio (0.1.2-17) unstable; urgency=low + + * update unit test cases + * Git : 165.213.180.234:slp/pkgs/l/libmm-radio + * Tag : libmm-radio_0.1.2-17 + + -- YoungHwan Ahn Mon, 14 Feb 2011 14:48:07 +0900 + +libmm-radio (0.1.2-16) unstable; urgency=low + + * add support MM_SESSION_TYPE_VIDEOCALL + * Git : 165.213.180.234:slp/pkgs/l/libmm-radio + * Tag : libmm-radio_0.1.2-16 + + -- KwangHui Cho Mon, 31 Jan 2011 16:37:16 +0900 + +libmm-radio (0.1.2-15) unstable; urgency=low + + * upload directly due to gerrit problem + * Git : 165.213.180.234:slp/pkgs/l/libmm-radio + * Tag : libmm-radio_0.1.2-15 + + -- YoungHwan Ahn Wed, 26 Jan 2011 23:27:10 +0900 + +libmm-radio (0.1.2-14) unstable; urgency=low + + * update unit test codes + * Git : 165.213.180.234:slp/pkgs/l/libmm-radio + * Tag : libmm-radio_0.1.2-14 + + -- YoungHwan Ahn Fri, 21 Jan 2011 16:49:32 +0900 + +libmm-radio (0.1.2-13) unstable; urgency=low + + * fix build error of utc + * Git : 165.213.180.234:slp/pkgs/l/libmm-radio + * Tag : libmm-radio_0.1.2-13 + + -- YoungHwan Ahn Thu, 20 Jan 2011 11:00:44 +0900 + +libmm-radio (0.1.2-12) unstable; urgency=low + + * apply media volume value when radio is created + * Git : 165.213.180.234:slp/pkgs/l/libmm-radio + * Tag : libmm-radio_0.1.2-12 + + -- YoungHwan Ahn Fri, 17 Dec 2010 17:33:13 +0900 + +libmm-radio (0.1.2-11) unstable; urgency=low + + * modify media volume logic for code readibility + * Git : 165.213.180.234:slp/pkgs/l/libmm-radio + * Tag : libmm-radio_0.1.2-11 + + -- YoungHwan Ahn Fri, 10 Dec 2010 11:03:46 +0900 + +libmm-radio (0.1.2-10) unstable; urgency=low + + * fix seek bug when band limit is reached and update doxygen + * Git : 165.213.180.234:/git/slp/pkgs/libmm-radio + * Tag : libmm-radio_0.1.2-10 + + -- Seungbae Shin Thu, 18 Nov 2010 20:58:19 +0900 + +libmm-radio (0.1.2-9) unstable; urgency=low + + * Add fPIC, hash-style + * Git : 165.213.180.234:/git/slp/pkgs/libmm-radio + * Tag : libmm-radio_0.1.2-9 + + -- Seungbae Shin Thu, 18 Nov 2010 15:19:16 +0900 + +libmm-radio (0.1.2-8) unstable; urgency=low + + * add dbg pkg + * Git : 165.213.180.234:/git/slp/pkgs/libmm-radio + * Tag : libmm-radio_0.1.2-8 + + -- YoungHwan Ahn Thu, 18 Nov 2010 14:57:54 +0900 + +libmm-radio (0.1.2-7) unstable; urgency=low + + * seek logic modification + * Git : 165.213.180.234:/git/slp/pkgs/libmm-radio + * Tag : libmm-radio_0.1.2-7 + + -- YoungHwan Ahn Tue, 16 Nov 2010 16:21:48 +0900 + +libmm-radio (0.1.2-6) unstable; urgency=low + + * set ready when scan is finished + * Git : 165.213.180.234:/git/slp/pkgs/libmm-radio + * Tag : libmm-radio_0.1.2-6 + + -- YoungHwan Ahn Tue, 09 Nov 2010 16:58:14 +0900 + +libmm-radio (0.1.2-5) unstable; urgency=low + + * If same freq is found for seeking, skip it. + * Git : 165.213.180.234:/git/slp/pkgs/libmm-radio + * Tag : libmm-radio_0.1.2-5 + + -- YoungHwan Ahn Wed, 03 Nov 2010 18:59:40 +0900 + +libmm-radio (0.1.2-4) unstable; urgency=low + + * can't search some frequencies under 97.3Mhz + * Git : 165.213.180.234:/git/slp/pkgs/libmm-radio + * Tag : libmm-radio_0.1.2-4 + + -- YoungHwan Ahn Fri, 22 Oct 2010 20:55:52 +0900 + +libmm-radio (0.1.2-3) unstable; urgency=low + + * remove binary files + * Git : 165.213.180.234:/git/slp/pkgs/libmm-radio + * Tag : libmm-radio_0.1.2-3 + + -- YoungHwan Ahn Mon, 18 Oct 2010 18:58:58 +0900 + +libmm-radio (0.1.2-2) unstable; urgency=low + + * drop max one when frequency is seeking + * Git : 165.213.180.234:/git/slp/pkgs/libmm-radio + * Tag : libmm-radio_0.1.2-2 + + -- YoungHwan Ahn Mon, 11 Oct 2010 20:26:52 +0900 + +libmm-radio (0.1.2-1) unstable; urgency=low + + * fix freq drop bug + * Git : 165.213.180.234:/git/slp/pkgs/libmm-radio + * Tag : libmm-radio_0.1.2-1 + + -- YoungHwan Ahn Fri, 08 Oct 2010 16:36:08 +0900 + +libmm-radio (0.1.2-0) unstable; urgency=low + + * fix to post message once on ASM event + * Git : 165.213.180.234:/git/slp/pkgs/libmm-radio + * Tag : libmm-radio_0.1.2-0 + + -- Kwanghui Cho Thu, 07 Oct 2010 14:09:50 +0900 + +libmm-radio (0.1.1-21) unstable; urgency=low + + * repackaging + * Git : 165.213.180.234:/git/slp/pkgs/libmm-radio + * Tag : libmm-radio_0.1.1-21 + + -- YoungHwan Ahn Wed, 06 Oct 2010 16:48:21 +0900 + +libmm-radio (0.1.1-20) unstable; urgency=low + + * skip unrealize if there is no resource conflct in asm callback + * Git : 165.213.180.234:/git/slp/pkgs/libmm-radio + * Tag : libmm-radio_0.1.1-20 + + -- Kwanghui Cho Wed, 06 Oct 2010 16:22:20 +0900 + +libmm-radio (0.1.1-19) unstable; urgency=low + + * Radio volume update + * Git : 165.213.180.234:/git/slp/pkgs/libmm-radio + * Tag : libmm-radio_0.1.1-19 + + -- Kwanghui Cho Mon, 04 Oct 2010 15:54:13 +0900 + +libmm-radio (0.1.1-18) unstable; urgency=low + + * update radio state to avsystem + * Git : 165.213.180.234:/git/slp/pkgs/libmm-radio + * Tag : libmm-radio_0.1.1-18 + + -- Kwanghui Cho Mon, 27 Sep 2010 12:47:29 +0900 + +libmm-radio (0.1.1-17) unstable; urgency=low + + * add common-internal-dev for mm_debug + * Git : 165.213.180.234:/git/slp/pkgs/libmm-radio + * Tag : libmm-radio_0.1.1-17 + + -- YoungHwan Ahn Sat, 18 Sep 2010 22:26:07 +0900 + +libmm-radio (0.1.1-16) unstable; urgency=low + + * fix build error + * Git : 165.213.180.234:/git/slp/pkgs/libmm-radio + * Tag : libmm-radio_0.1.1-16 + + -- YoungHwan Ahn Fri, 17 Sep 2010 15:06:25 +0900 + +libmm-radio (0.1.1-15) unstable; urgency=low + + * rename tc + * Git : 165.213.180.234:/git/slp/pkgs/libmm-radio + * Tag : libmm-radio_0.1.1-15 + + -- YoungHwan Ahn Fri, 17 Sep 2010 14:38:36 +0900 + +libmm-radio (0.1.1-14) unstable; urgency=low + + * Add utc + * Git : 165.213.180.234:/git/slp/pkgs/libmm-radio + * Tag : libmm-radio_0.1.1-14 + + -- YoungHwan Ahn Fri, 17 Sep 2010 14:17:05 +0900 + +libmm-radio (0.1.1-13) unstable; urgency=low + + * drop if max freq is scanned + * Git : 165.213.180.234:/git/slp/pkgs/libmm-radio + * Tag : libmm-radio_0.1.1-13 + + -- YoungHwan Ahn Wed, 15 Sep 2010 21:31:51 +0900 + +libmm-radio (0.1.1-12) unstable; urgency=low + + * Add asm resource type when ASM_set_sound_state + * Git : 165.213.180.234:/git/slp/pkgs/libmm-radio + * Tag : libmm-radio_0.1.1-12 + + -- Kwanghui Cho Fri, 10 Sep 2010 17:48:21 +0900 + +libmm-radio (0.1.1-11) unstable; urgency=low + + * Remove including mm_message_private.h + * Git : 165.213.180.234:/git/slp/pkgs/libmm-radio + * Tag : libmm-radio_0.1.1-11 + + -- Seungbae Shin Tue, 31 Aug 2010 10:53:01 +0900 + +libmm-radio (0.1.1-10) unstable; urgency=low + + * MM_ERROR_RADIO_PERMISSION_DENIED + * Git : 165.213.180.234:/git/slp/pkgs/libmm-radio + * Tag : libmm-radio_0.1.1-10 + + -- YoungHwan Ahn Tue, 10 Aug 2010 17:52:17 +0900 + +libmm-radio (0.1.1-9) unstable; urgency=low + + * add MM_ERROR_RADIO_DEVICE_NOT_FOUND + * Git : 165.213.180.234:/git/slp/pkgs/libmm-radio + * Tag : libmm-radio_0.1.1-9 + + -- YoungHwan Ahn Wed, 04 Aug 2010 20:33:07 +0900 + +libmm-radio (0.1.1-8) unstable; urgency=low + + * Add MM_ERROR_RADIO_DEVICE_NOT_OPENED + * Git : 165.213.180.234:/git/slp/pkgs/libmm-radio + * Tag : libmm-radio_0.1.1-8 + + -- YoungHwan Ahn Wed, 04 Aug 2010 11:11:16 +0900 + +libmm-radio (0.1.1-7) unstable; urgency=low + + * Modify internal api logic + * Git : 165.213.180.234:/git/slp/pkgs/libmm-radio + * Tag : libmm-radio_0.1.1-7 + + -- YoungHwan Ahn Tue, 20 Jul 2010 18:42:08 +0900 + +libmm-radio (0.1.1-6) unstable; urgency=low + + * Rename internal pkg as internal-dev + * Git : 165.213.180.234:/git/slp/pkgs/libmm-radio + * Tag : libmm-radio_0.1.1-6 + + -- YoungHwan Ahn Tue, 20 Jul 2010 10:27:01 +0900 + +libmm-radio (0.1.1-5) unstable; urgency=low + + * Add HW Debug APIs and internal pkg + * Git : 165.213.180.234:/git/slp/pkgs/libmm-radio + * Tag : libmm-radio_0.1.1-5 + + -- YoungHwan Ahn Mon, 19 Jul 2010 20:03:30 +0900 + +libmm-radio (0.1.1-4) unstable; urgency=low + + * reupload + * Git : 165.213.180.234:/git/slp2.0/slp2.0-pkgs/libmm-radio-0.1 + * Tag : libmm-radio_0.1.1-4 + + -- JongHyuk Choi Wed, 07 Jul 2010 13:18:35 +0900 + +libmm-radio (0.1.1-3) unstable; urgency=low + + * reupload + * Git : 165.213.180.234:/git/slp2.0/slp2.0-pkgs/libmm-radio-0.1 + * Tag : libmm-radio_0.1.1-3 + + -- YoungHwan Ahn Fri, 25 Jun 2010 21:21:39 +0900 + +libmm-radio (0.1.1-2) unstable; urgency=low + + * remove old dlog dependency + * Git : 165.213.180.234:/git/slp2.0/slp2.0-pkgs/libmm-radio-0.1 + * Tag : libmm-radio_0.1.1-2 + + -- YoungHwan Ahn Fri, 25 Jun 2010 19:14:33 +0900 + +libmm-radio (0.1.1-1) unstable; urgency=low + + * Add codec mute control to remove white noize when volume zero playback + * Git : 165.213.180.234:/git/slp2.0/slp2.0-pkgs/libmm-radio-0.1 + * Tag : libmm-radio_0.1.1-1 + + -- KwangHui Cho Thu, 24 Jun 2010 14:05:47 +0900 + +libmm-radio (0.1.1-0) unstable; urgency=low + + * Update internal code (asm, sound path related) + * Git : 165.213.180.234:/git/slp2.0/slp2.0-pkgs/libmm-radio-0.1 + * Tag : libmm-radio_0.1.1-0 + + -- KwangHui Cho Mon, 21 Jun 2010 14:06:00 +0900 + +libmm-radio (0.1-29) unstable; urgency=low + + * Reupload for mm-log update + * Git : 165.213.180.234:/git/slp2.0/slp2.0-pkgs/libmm-radio-0.1 + * Tag : libmm-radio_0.1-29 + + -- Seungbae Shin Thu, 17 Jun 2010 13:54:43 +0900 + +libmm-radio (0.1-28) unstable; urgency=low + + * Reupload for mm-log update + * Git : 165.213.180.234:/git/slp2.0/slp2.0-pkgs/libmm-radio-0.1 + * Tag : libmm-radio_0.1-28 + + -- Heungsoon Rim Wed, 16 Jun 2010 10:41:58 +0900 + +libmm-radio (0.1-27) unstable; urgency=low + + * Change default session type (from shared to exclusive) + * Git : 165.213.180.234:/git/slp2.0/slp2.0-pkgs/libmm-radio-0.1 + * Tag : libmm-radio_0.1-27 + + -- Kwanghui Cho Fri, 11 Jun 2010 13:43:59 +0900 + +libmm-radio (0.1-26) unstable; urgency=low + + * update asm code (mmplayer -> mmradio) + * Git : 165.213.180.234:/git/slp2.0/slp2.0-pkgs/libmm-radio-0.1 + * Tag : libmm-radio_0.1-26 + + -- Kwanghui Cho Fri, 11 Jun 2010 09:41:09 +0900 + +libmm-radio (0.1-25) unstable; urgency=low + + * non-free to main + * Git : 165.213.180.234:/git/slp2.0/slp2.0-pkgs/libmm-radio-0.1 + * Tag : libmm-radio_0.1-25 + + -- Byungwook Jang Mon, 07 Jun 2010 12:42:40 +0900 + +libmm-radio (0.1-24) unstable; urgency=low + + * mm-session + * Git : 165.213.180.234:/git/slp2.0/slp2.0-pkgs/libmm-radio-0.1 + * Tag : libmm-radio_0.1-24 + + -- Byungwook Jang Sat, 05 Jun 2010 13:39:18 +0900 + +libmm-radio (0.1-23) unstable; urgency=low + + * add explanation of APIs + * Git : 165.213.180.234:/git/slp2.0/slp2.0-pkgs/libmm-radio-0.1 + * Tag : libmm-radio_0.1-23 + + -- Byungwook Jang Fri, 04 Jun 2010 16:53:57 +0900 + +libmm-radio (0.1-22) unstable; urgency=low + + * replace MMSoundSetPathEx2 as mm_sound_set_path + * Git : 165.213.180.234:/git/slp2.0/slp2.0-pkgs/libmm-radio-0.1 + * Tag : libmm-radio_0.1-22 + + -- YoungHwan Ahn Fri, 04 Jun 2010 01:13:02 +0900 + +libmm-radio (0.1-21) unstable; urgency=low + + * E-mail violation + * Git : 165.213.180.234:/git/slp2.0/slp2.0-pkgs/libmm-radio-0.1 + * Tag : libmm-radio_0.1-21 + + -- Byungwook Jang Mon, 31 May 2010 13:42:10 +0900 + +libmm-radio (0.1-20) unstable; urgency=low + + * Deplicate APIs + * Git : 165.213.180.234:/git/slp2.0/slp2.0-pkgs/libmm-radio-0.1 + * Tag : libmm-radio_0.1-20 + + -- Wonhyung Cho Mon, 31 May 2010 13:23:37 +0900 + +libmm-radio (0.1-19) unstable; urgency=low + + * Email violation + * Git : 165.213.180.234:/git/slp2.0/slp2.0-pkgs/libmm-radio-0.1 + * Tag : libmm-radio_0.1-19 + + -- Wonhyung Cho Sun, 30 May 2010 02:00:36 +0900 + +libmm-radio (0.1-18) unstable; urgency=low + + * I don't know why it's now uploaded. + * Git : 165.213.180.234:/git/slp2.0/slp2.0-pkgs/libmm-radio-0.1 + * Tag : libmm-radio_0.1-18 + + -- Wonhyung Cho Sun, 30 May 2010 01:46:24 +0900 + +libmm-radio (0.1-17) unstable; urgency=low + + * Add my name to control + * Git : 165.213.180.234:/git/slp2.0/slp2.0-pkgs/libmm-radio-0.1 + * Tag : libmm-radio_0.1-17 + + -- Wonhyung Cho Sun, 30 May 2010 01:27:31 +0900 + +libmm-radio (0.1-16) unstable; urgency=low + + * Just reupload because of changes of libmm-common + * Git : 165.213.180.234:/git/slp2.0/slp2.0-pkgs/libmm-radio-0.1 + * Tag : libmm-radio_0.1-16 + + -- Wonhyung Cho Sun, 30 May 2010 01:24:00 +0900 + +libmm-radio (0.1-15) unstable; urgency=low + + * Sound path change for MM_RADIO_OUTPUT_NONE + * Git : 165.213.180.234:/git/slp2.0/slp2.0-pkgs/libmm-radio-0.1 + * Tag : libmm-radio_0.1-15 + + -- Byungwook Jang Wed, 26 May 2010 17:00:27 +0900 + +libmm-radio (0.1-14) unstable; urgency=low + + * Remove postinst & fix mmta & use sound-sdk-dev + * Git : 165.213.180.234:/git/slp2.0/slp2.0-pkgs/libmm-radio-0.1 + * Tag : libmm-radio_0.1-14 + + -- Seungbae Shin Tue, 11 May 2010 16:17:50 +0900 + +libmm-radio (0.1-13) unstable; urgency=low + + * Add mm-session dependancy + * Git : 165.213.180.234:/git/slp2.0/slp2.0-pkgs/libmm-radio-0.1 + * Tag : libmm-radio_0.1-13 + + -- Seungbae Shin Tue, 04 May 2010 13:21:45 +0900 + +libmm-radio (0.1-12) unstable; urgency=low + + * Replace log/ta with SDK package + * Git : 165.213.180.234:/git/slp2.0/slp2.0-pkgs/libmm-radio-0.1 + * Tag : libmm-radio_0.1-12 + + -- Seungbae Shin Tue, 04 May 2010 12:41:02 +0900 + +libmm-radio (0.1-11) unstable; urgency=low + + * Add postinst + * Git : 165.213.180.234:/git/slp2.0/slp2.0-pkgs/libmm-radio-0.1 + * Tag : libmm-radio_0.1-11 + + -- Seungbae Shin Fri, 30 Apr 2010 13:46:00 +0900 + +libmm-radio (0.1-10) unstable; urgency=low + + * Fix wrong pkgconfig + * Git : 165.213.180.234:/git/slp2.0/slp2.0-pkgs/libmm-radio-0.1 + * Tag : libmm-radio_0.1-10 + -- Jeon Hee Chul Fri, 23 Apr 2010 16:48:39 +0900 + +libmm-radio (0.1-9) unstable; urgency=low + + * Fix wrong dependency + * git : 165.213.180.234:/git/slp2.0/slp2.0-pkgs/libmm-radio-0.1 + * tag : libmm-radio_0.1-9 + + -- Jeon Hee Chul Thu, 08 Apr 2010 19:39:46 +0900 + +libmm-radio (0.1-8) unstable; urgency=low + + * Add missing dependency + * git : 165.213.180.234:/git/slp2.0/slp2.0-pkgs/libmm-radio-0.1 + * tag : libmm-radio_0.1-8 + + -- Jeon Hee Chul Thu, 08 Apr 2010 17:55:41 +0900 + +libmm-radio (0.1-7) unstable; urgency=low + + * ASM enable + * Scan/Seek enable + * This is first release of mm-radio library + * git : 165.213.180.234:/git/slp2.0/slp2.0-pkgs/libmm-radio-0.1 + * tag : libmm-radio_0.1-7 + + -- Jeon Hee Chul Thu, 08 Apr 2010 14:56:46 +0900 + +libmm-radio (0.1-6) unstable; urgency=low + + * Remove glib dependency. now it works without glib + + -- Jeon Hee Chul Mon, 05 Apr 2010 17:09:37 +0900 + +libmm-radio (0.1-5) unstable; urgency=low + + * Sound path, suppress noise, fix many bugs... + + -- Jeon Hee Chul Wed, 31 Mar 2010 19:39:20 +0900 + +libmm-radio (0.1-4) unstable; urgency=low + + * Implement FSM, Remove pause/resume, etc... + + -- Jeon Hee Chul Tue, 30 Mar 2010 17:56:02 +0900 + +libmm-radio (0.1-3) unstable; urgency=low + + * add radio engine + + -- root Tue, 16 Mar 2010 15:30:20 +0900 + +libmm-radio (0.1-2) unstable; urgency=low + + * update radio engine + + -- hk57.kim Tue, 16 Mar 2010 10:40:37 +0900 + +libmm-radio (0.1-1) unstable; urgency=low + + * Initial Release. + + -- Jeon Hee Chul Wed, 02 Dec 2009 16:47:53 +0900 diff --git a/debian/control b/debian/control index 30a6d19..c787d5d 100755 --- a/debian/control +++ b/debian/control @@ -3,20 +3,20 @@ Section: libs Priority: extra Maintainer: Ahn Young Hwan Shin Seung Bae Choi Jong Hyuk Uploaders: Seungbae Shin , Wonhyung Cho , YoungHwan Ahn , Kwanghui Cho -Build-Depends: debhelper (>= 5), autotools-dev, libmm-log-dev, libmm-common-dev, libmm-ta-dev, libaudiosessionmgr-dev, libavsystem-dev, libmm-session-dev, libmm-common-internal-dev, libmm-sound-dev, linux-libc-dev +Build-Depends: debhelper (>= 5), autotools-dev, libmm-log-dev, libmm-common-dev, libmm-ta-dev, libaudiosessionmgr-dev, libavsystem-dev, libmm-session-dev, libmm-common-internal-dev, libmm-sound-dev, linux-libc-dev, libgstreamer-plugins-base0.10-dev Standards-Version: 0.1.0 Package: libmm-radio Section: libs Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, libavsystem-0, libmm-log, libmm-common, libmm-ta, libaudiosessionmgr-0, libmm-session-0 +Depends: ${shlibs:Depends}, ${misc:Depends}, libavsystem-0, libmm-log, libmm-common, libmm-ta, libaudiosessionmgr-0, libmm-session-0, libgstreamer-plugins-base0.10-0 Description: Multimedia Framework Radio Library Package: libmm-radio-dev XB-Generate-Docs: yes Section: libdevel Architecture: any -Depends: libmm-radio (= ${Source-Version}), libavsystem-sdk-dev, libmm-log-sdk-dev, libmm-common-dev, libmm-ta-sdk-dev, libaudiosessionmgr-sdk-dev, libmm-session-sdk-dev, linux-libc-dev +Depends: libmm-radio (= ${Source-Version}), libavsystem-sdk-dev, libmm-log-sdk-dev, libmm-common-dev, libmm-ta-sdk-dev, libaudiosessionmgr-sdk-dev, libmm-session-sdk-dev, linux-libc-dev, libgstreamer-plugins-base0.10-sdk-dev Description: Multimedia Framework Radio Library (DEV) Package: libmm-radio-dbg diff --git a/debian/rules b/debian/rules index 46311ee..bc0200e 100755 --- a/debian/rules +++ b/debian/rules @@ -42,7 +42,7 @@ endif LDFLAGS += -Wl,--rpath=$(PREFIX)/lib -Wl,--hash-style=both -Wl,--as-needed -config.status: configure +config.status: dh_testdir ./autogen.sh # Add here commands to configure the package. diff --git a/ltmain.sh b/ltmain.sh index 4159958..23c7ab7 120000 --- a/ltmain.sh +++ b/ltmain.sh @@ -1 +1 @@ -/usr/share/libtool/config/ltmain.sh \ No newline at end of file +/scratchbox/compilers/cortex-linux-gnueabi/arch_tools//share/libtool/config/ltmain.sh \ No newline at end of file diff --git a/packaging/libmm-radio.spec b/packaging/libmm-radio.spec index 8b7d9b0..7a243fe 100644 --- a/packaging/libmm-radio.spec +++ b/packaging/libmm-radio.spec @@ -1,9 +1,9 @@ Name: libmm-radio Summary: Multimedia Framework Radio Library -Version: 0.1.2 +Version: 0.2.3 Release: 1 -Group: System/Libraries -License: Apache-2.0 +Group: TO_BE/FILLED_IN +License: TO BE FILLED IN Source0: %{name}-%{version}.tar.gz Requires(post): /sbin/ldconfig Requires(postun): /sbin/ldconfig @@ -13,8 +13,8 @@ BuildRequires: pkgconfig(mm-log) BuildRequires: pkgconfig(mm-ta) BuildRequires: pkgconfig(mm-session) BuildRequires: pkgconfig(mm-sound) -BuildRequires: pkgconfig(avsystem) - +BuildRequires: pkgconfig(gstreamer-0.10) +BuildRequires: pkgconfig(gstreamer-plugins-base-0.10) %description Descirption: Multimedia Framework Radio Library @@ -39,6 +39,7 @@ CFLAGS=" %{optflags} -DGST_EXT_TIME_ANALYSIS -DEXPORT_API=\"__attribute__((visi make %{?jobs:-j%jobs} %install +rm -rf %{buildroot} %make_install @@ -59,5 +60,3 @@ make %{?jobs:-j%jobs} %{_libdir}/libmmfradio.so %{_libdir}/pkgconfig/mm-radio.pc %{_includedir}/mmf/mm_radio.h - - diff --git a/src/Makefile.am b/src/Makefile.am old mode 100755 new mode 100644 index a46c688..ac06ac6 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -11,19 +11,19 @@ libmmfradio_la_CFLAGS = -I. -I./include \ $(GTHREAD_CFLAGS) \ $(MMCOMMON_CFLAGS) \ $(MMTA_CFLAGS) \ - $(AVSYSAUDIO_CFLAGS) \ $(MMSESSION_CFLAGS) \ $(AUDIOSESSIONMGR_CFLAGS) \ $(MMSOUND_CFLAGS) \ + $(GST_CFLAGS) \ + $(GSTAPP_CFLAGS) \ -DMMF_LOG_OWNER=0x200000 -DMMF_DEBUG_PREFIX=\"MM-RADIO\" \ -DGST_EXT_TIME_ANALYSIS libmmfradio_la_LIBADD = $(GTHREAD_LIBS) \ $(MMCOMMON_LIBS) \ $(MMTA_LIBS)\ - $(AVSYSAUDIO_LIBS) \ $(MMSESSION_LIBS) \ $(AUDIOSESSIONMGR_LIBS) \ - $(MMSOUND_LIBS) - - + $(MMSOUND_LIBS) \ + $(GST_LIBS) \ + $(GSTAPP_LIBS) diff --git a/src/Makefile.in b/src/Makefile.in deleted file mode 100644 index 23998c2..0000000 --- a/src/Makefile.in +++ /dev/null @@ -1,609 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = src -DIST_COMMON = $(includelibmmfradio_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__installdirs = "$(DESTDIR)$(libdir)" \ - "$(DESTDIR)$(includelibmmfradiodir)" -LTLIBRARIES = $(lib_LTLIBRARIES) -am__DEPENDENCIES_1 = -libmmfradio_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -am_libmmfradio_la_OBJECTS = libmmfradio_la-mm_radio.lo \ - libmmfradio_la-mm_radio_priv.lo libmmfradio_la-mm_radio_asm.lo -libmmfradio_la_OBJECTS = $(am_libmmfradio_la_OBJECTS) -libmmfradio_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libmmfradio_la_CFLAGS) \ - $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libmmfradio_la_SOURCES) -DIST_SOURCES = $(libmmfradio_la_SOURCES) -HEADERS = $(includelibmmfradio_HEADERS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUDIOSESSIONMGR_CFLAGS = @AUDIOSESSIONMGR_CFLAGS@ -AUDIOSESSIONMGR_LIBS = @AUDIOSESSIONMGR_LIBS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AVSYSAUDIO_CFLAGS = @AVSYSAUDIO_CFLAGS@ -AVSYSAUDIO_LIBS = @AVSYSAUDIO_LIBS@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MMCOMMON_CFLAGS = @MMCOMMON_CFLAGS@ -MMCOMMON_LIBS = @MMCOMMON_LIBS@ -MMSESSION_CFLAGS = @MMSESSION_CFLAGS@ -MMSESSION_LIBS = @MMSESSION_LIBS@ -MMSOUND_CFLAGS = @MMSOUND_CFLAGS@ -MMSOUND_LIBS = @MMSOUND_LIBS@ -MMTA_CFLAGS = @MMTA_CFLAGS@ -MMTA_LIBS = @MMTA_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -lib_LTLIBRARIES = libmmfradio.la -includelibmmfradiodir = $(includedir)/mmf -includelibmmfradio_HEADERS = include/mm_radio.h -libmmfradio_la_SOURCES = mm_radio.c \ - mm_radio_priv.c \ - mm_radio_asm.c - -libmmfradio_la_CFLAGS = -I. -I./include \ - $(GTHREAD_CFLAGS) \ - $(MMCOMMON_CFLAGS) \ - $(MMTA_CFLAGS) \ - $(AVSYSAUDIO_CFLAGS) \ - $(MMSESSION_CFLAGS) \ - $(AUDIOSESSIONMGR_CFLAGS) \ - $(MMSOUND_CFLAGS) \ - -DMMF_LOG_OWNER=0x200000 -DMMF_DEBUG_PREFIX=\"MM-RADIO\" \ - -DGST_EXT_TIME_ANALYSIS - -libmmfradio_la_LIBADD = $(GTHREAD_LIBS) \ - $(MMCOMMON_LIBS) \ - $(MMTA_LIBS)\ - $(AVSYSAUDIO_LIBS) \ - $(MMSESSION_LIBS) \ - $(AUDIOSESSIONMGR_LIBS) \ - $(MMSOUND_LIBS) - -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ - } - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libmmfradio.la: $(libmmfradio_la_OBJECTS) $(libmmfradio_la_DEPENDENCIES) - $(libmmfradio_la_LINK) -rpath $(libdir) $(libmmfradio_la_OBJECTS) $(libmmfradio_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmmfradio_la-mm_radio.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmmfradio_la-mm_radio_asm.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmmfradio_la-mm_radio_priv.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libmmfradio_la-mm_radio.lo: mm_radio.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmmfradio_la_CFLAGS) $(CFLAGS) -MT libmmfradio_la-mm_radio.lo -MD -MP -MF $(DEPDIR)/libmmfradio_la-mm_radio.Tpo -c -o libmmfradio_la-mm_radio.lo `test -f 'mm_radio.c' || echo '$(srcdir)/'`mm_radio.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libmmfradio_la-mm_radio.Tpo $(DEPDIR)/libmmfradio_la-mm_radio.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mm_radio.c' object='libmmfradio_la-mm_radio.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmmfradio_la_CFLAGS) $(CFLAGS) -c -o libmmfradio_la-mm_radio.lo `test -f 'mm_radio.c' || echo '$(srcdir)/'`mm_radio.c - -libmmfradio_la-mm_radio_priv.lo: mm_radio_priv.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmmfradio_la_CFLAGS) $(CFLAGS) -MT libmmfradio_la-mm_radio_priv.lo -MD -MP -MF $(DEPDIR)/libmmfradio_la-mm_radio_priv.Tpo -c -o libmmfradio_la-mm_radio_priv.lo `test -f 'mm_radio_priv.c' || echo '$(srcdir)/'`mm_radio_priv.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libmmfradio_la-mm_radio_priv.Tpo $(DEPDIR)/libmmfradio_la-mm_radio_priv.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mm_radio_priv.c' object='libmmfradio_la-mm_radio_priv.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmmfradio_la_CFLAGS) $(CFLAGS) -c -o libmmfradio_la-mm_radio_priv.lo `test -f 'mm_radio_priv.c' || echo '$(srcdir)/'`mm_radio_priv.c - -libmmfradio_la-mm_radio_asm.lo: mm_radio_asm.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmmfradio_la_CFLAGS) $(CFLAGS) -MT libmmfradio_la-mm_radio_asm.lo -MD -MP -MF $(DEPDIR)/libmmfradio_la-mm_radio_asm.Tpo -c -o libmmfradio_la-mm_radio_asm.lo `test -f 'mm_radio_asm.c' || echo '$(srcdir)/'`mm_radio_asm.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libmmfradio_la-mm_radio_asm.Tpo $(DEPDIR)/libmmfradio_la-mm_radio_asm.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mm_radio_asm.c' object='libmmfradio_la-mm_radio_asm.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmmfradio_la_CFLAGS) $(CFLAGS) -c -o libmmfradio_la-mm_radio_asm.lo `test -f 'mm_radio_asm.c' || echo '$(srcdir)/'`mm_radio_asm.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-includelibmmfradioHEADERS: $(includelibmmfradio_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(includelibmmfradiodir)" || $(MKDIR_P) "$(DESTDIR)$(includelibmmfradiodir)" - @list='$(includelibmmfradio_HEADERS)'; test -n "$(includelibmmfradiodir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includelibmmfradiodir)'"; \ - $(INSTALL_HEADER) $$files "$(DESTDIR)$(includelibmmfradiodir)" || exit $$?; \ - done - -uninstall-includelibmmfradioHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(includelibmmfradio_HEADERS)'; test -n "$(includelibmmfradiodir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(includelibmmfradiodir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(includelibmmfradiodir)" && rm -f $$files - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) $(HEADERS) -installdirs: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includelibmmfradiodir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: install-includelibmmfradioHEADERS - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-libLTLIBRARIES - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-includelibmmfradioHEADERS \ - uninstall-libLTLIBRARIES - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libLTLIBRARIES clean-libtool ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-includelibmmfradioHEADERS install-info \ - install-info-am install-libLTLIBRARIES install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am \ - uninstall-includelibmmfradioHEADERS uninstall-libLTLIBRARIES - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/src/include/mm_radio.h b/src/include/mm_radio.h index becfa1a..dba7d56 100755 --- a/src/include/mm_radio.h +++ b/src/include/mm_radio.h @@ -61,15 +61,23 @@ typedef enum { } MMRadioSeekDirectionType; /** - * Enumerations of output sound path. + * Enumerations of radio region country + * Region settings are according to radio standards, not real geographic regions. + * MM_RADIO_REGION_GROUP_1 : Notrh America, South America, South Korea, Taiwan, Australia + * frequency details : 88.1 - 108MHz, 75uS de-emphasis + * + * MM_RADIO_REGION_GROUP_2 : China, Europe, Africa, Middle East, Hong Kong, India, Indonesia, Russia, Singapore + * frequency details : 87.5 - 108MHz, 50uS de-emphasis + * + * MM_RADIO_REGION_GROUP_3 : Japan alone currenlty + * frequency details : 76.1 - 89.9MHz, 50uS de-emphasis */ typedef enum { - MM_RADIO_OUTPUT_NONE, /**< Output None */ - MM_RADIO_OUTPUT_AUTO, /**< Automatic output mode, but not used yet */ - MM_RADIO_OUTPUT_SPEAKER, /**< Speaker output */ - MM_RADIO_OUTPUT_HEADSET, /**< Headset output */ - MM_RADIO_OUTPUT_NUM, /**< Number of output sound path */ -} MMRadioOutputType; + MM_RADIO_REGION_GROUP_NONE = 0, /**< Region None */ + MM_RADIO_REGION_GROUP_USA, /**< Region USA group */ + MM_RADIO_REGION_GROUP_EUROPE, /**< Region EUROPE group */ + MM_RADIO_REGION_GROUP_JAPAN, /**< Region Japan group */ +} MMRadioRegionType; /** * This function creates a radio handle. \n @@ -121,7 +129,6 @@ int __menu(void) printf("[12] mm_radio_get_frequency\n"); printf("[13] mm_radio_scan_start\n"); printf("[14] mm_radio_scan_stop\n"); - printf("[15] mm_radio_set_sound_path\n"); printf("[0] quit\n"); printf("---------------------------------------------------------\n"); printf("choose one : "); @@ -266,15 +273,6 @@ void __call_api( int choosen ) } break; - case 15: - { - MMRadioOutputType path = 0; - printf("input path(0:NONE/1:AUTO/2:SPK/3:EAR) : "); - scanf("%d", &path); - RADIO_TEST__( mm_radio_set_sound_path(g_my_radio, path); ) - } - break; - default: break; } @@ -351,7 +349,6 @@ int __menu(void) printf("[12] mm_radio_get_frequency\n"); printf("[13] mm_radio_scan_start\n"); printf("[14] mm_radio_scan_stop\n"); - printf("[15] mm_radio_set_sound_path\n"); printf("[0] quit\n"); printf("---------------------------------------------------------\n"); printf("choose one : "); @@ -496,15 +493,6 @@ void __call_api( int choosen ) } break; - case 15: - { - MMRadioOutputType path = 0; - printf("input path(0:NONE/1:AUTO/2:SPK/3:EAR) : "); - scanf("%d", &path); - RADIO_TEST__( mm_radio_set_sound_path(g_my_radio, path); ) - } - break; - default: break; } @@ -580,7 +568,6 @@ int __menu(void) printf("[12] mm_radio_get_frequency\n"); printf("[13] mm_radio_scan_start\n"); printf("[14] mm_radio_scan_stop\n"); - printf("[15] mm_radio_set_sound_path\n"); printf("[0] quit\n"); printf("---------------------------------------------------------\n"); printf("choose one : "); @@ -725,15 +712,6 @@ void __call_api( int choosen ) } break; - case 15: - { - MMRadioOutputType path = 0; - printf("input path(0:NONE/1:AUTO/2:SPK/3:EAR) : "); - scanf("%d", &path); - RADIO_TEST__( mm_radio_set_sound_path(g_my_radio, path); ) - } - break; - default: break; } @@ -810,7 +788,6 @@ int __menu(void) printf("[12] mm_radio_get_frequency\n"); printf("[13] mm_radio_scan_start\n"); printf("[14] mm_radio_scan_stop\n"); - printf("[15] mm_radio_set_sound_path\n"); printf("[0] quit\n"); printf("---------------------------------------------------------\n"); printf("choose one : "); @@ -955,15 +932,6 @@ void __call_api( int choosen ) } break; - case 15: - { - MMRadioOutputType path = 0; - printf("input path(0:NONE/1:AUTO/2:SPK/3:EAR) : "); - scanf("%d", &path); - RADIO_TEST__( mm_radio_set_sound_path(g_my_radio, path); ) - } - break; - default: break; } @@ -1041,7 +1009,6 @@ int __menu(void) printf("[12] mm_radio_get_frequency\n"); printf("[13] mm_radio_scan_start\n"); printf("[14] mm_radio_scan_stop\n"); - printf("[15] mm_radio_set_sound_path\n"); printf("[0] quit\n"); printf("---------------------------------------------------------\n"); printf("choose one : "); @@ -1186,15 +1153,6 @@ void __call_api( int choosen ) } break; - case 15: - { - MMRadioOutputType path = 0; - printf("input path(0:NONE/1:AUTO/2:SPK/3:EAR) : "); - scanf("%d", &path); - RADIO_TEST__( mm_radio_set_sound_path(g_my_radio, path); ) - } - break; - default: break; } @@ -1271,7 +1229,6 @@ int __menu(void) printf("[12] mm_radio_get_frequency\n"); printf("[13] mm_radio_scan_start\n"); printf("[14] mm_radio_scan_stop\n"); - printf("[15] mm_radio_set_sound_path\n"); printf("[0] quit\n"); printf("---------------------------------------------------------\n"); printf("choose one : "); @@ -1416,15 +1373,6 @@ void __call_api( int choosen ) } break; - case 15: - { - MMRadioOutputType path = 0; - printf("input path(0:NONE/1:AUTO/2:SPK/3:EAR) : "); - scanf("%d", &path); - RADIO_TEST__( mm_radio_set_sound_path(g_my_radio, path); ) - } - break; - default: break; } @@ -1500,7 +1448,6 @@ int __menu(void) printf("[12] mm_radio_get_frequency\n"); printf("[13] mm_radio_scan_start\n"); printf("[14] mm_radio_scan_stop\n"); - printf("[15] mm_radio_set_sound_path\n"); printf("[0] quit\n"); printf("---------------------------------------------------------\n"); printf("choose one : "); @@ -1645,15 +1592,6 @@ void __call_api( int choosen ) } break; - case 15: - { - MMRadioOutputType path = 0; - printf("input path(0:NONE/1:AUTO/2:SPK/3:EAR) : "); - scanf("%d", &path); - RADIO_TEST__( mm_radio_set_sound_path(g_my_radio, path); ) - } - break; - default: break; } @@ -1730,7 +1668,6 @@ int __menu(void) printf("[12] mm_radio_get_frequency\n"); printf("[13] mm_radio_scan_start\n"); printf("[14] mm_radio_scan_stop\n"); - printf("[15] mm_radio_set_sound_path\n"); printf("[0] quit\n"); printf("---------------------------------------------------------\n"); printf("choose one : "); @@ -1875,15 +1812,6 @@ void __call_api( int choosen ) } break; - case 15: - { - MMRadioOutputType path = 0; - printf("input path(0:NONE/1:AUTO/2:SPK/3:EAR) : "); - scanf("%d", &path); - RADIO_TEST__( mm_radio_set_sound_path(g_my_radio, path); ) - } - break; - default: break; } @@ -1968,7 +1896,6 @@ int __menu(void) printf("[12] mm_radio_get_frequency\n"); printf("[13] mm_radio_scan_start\n"); printf("[14] mm_radio_scan_stop\n"); - printf("[15] mm_radio_set_sound_path\n"); printf("[0] quit\n"); printf("---------------------------------------------------------\n"); printf("choose one : "); @@ -2113,15 +2040,6 @@ void __call_api( int choosen ) } break; - case 15: - { - MMRadioOutputType path = 0; - printf("input path(0:NONE/1:AUTO/2:SPK/3:EAR) : "); - scanf("%d", &path); - RADIO_TEST__( mm_radio_set_sound_path(g_my_radio, path); ) - } - break; - default: break; } @@ -2199,7 +2117,6 @@ int __menu(void) printf("[12] mm_radio_get_frequency\n"); printf("[13] mm_radio_scan_start\n"); printf("[14] mm_radio_scan_stop\n"); - printf("[15] mm_radio_set_sound_path\n"); printf("[0] quit\n"); printf("---------------------------------------------------------\n"); printf("choose one : "); @@ -2344,15 +2261,6 @@ void __call_api( int choosen ) } break; - case 15: - { - MMRadioOutputType path = 0; - printf("input path(0:NONE/1:AUTO/2:SPK/3:EAR) : "); - scanf("%d", &path); - RADIO_TEST__( mm_radio_set_sound_path(g_my_radio, path); ) - } - break; - default: break; } @@ -2430,7 +2338,6 @@ int __menu(void) printf("[12] mm_radio_get_frequency\n"); printf("[13] mm_radio_scan_start\n"); printf("[14] mm_radio_scan_stop\n"); - printf("[15] mm_radio_set_sound_path\n"); printf("[0] quit\n"); printf("---------------------------------------------------------\n"); printf("choose one : "); @@ -2575,15 +2482,6 @@ void __call_api( int choosen ) } break; - case 15: - { - MMRadioOutputType path = 0; - printf("input path(0:NONE/1:AUTO/2:SPK/3:EAR) : "); - scanf("%d", &path); - RADIO_TEST__( mm_radio_set_sound_path(g_my_radio, path); ) - } - break; - default: break; } @@ -2663,7 +2561,6 @@ int __menu(void) printf("[12] mm_radio_get_frequency\n"); printf("[13] mm_radio_scan_start\n"); printf("[14] mm_radio_scan_stop\n"); - printf("[15] mm_radio_set_sound_path\n"); printf("[0] quit\n"); printf("---------------------------------------------------------\n"); printf("choose one : "); @@ -2808,15 +2705,6 @@ void __call_api( int choosen ) } break; - case 15: - { - MMRadioOutputType path = 0; - printf("input path(0:NONE/1:AUTO/2:SPK/3:EAR) : "); - scanf("%d", &path); - RADIO_TEST__( mm_radio_set_sound_path(g_my_radio, path); ) - } - break; - default: break; } @@ -2894,7 +2782,6 @@ int __menu(void) printf("[12] mm_radio_get_frequency\n"); printf("[13] mm_radio_scan_start\n"); printf("[14] mm_radio_scan_stop\n"); - printf("[15] mm_radio_set_sound_path\n"); printf("[0] quit\n"); printf("---------------------------------------------------------\n"); printf("choose one : "); @@ -3039,15 +2926,6 @@ void __call_api( int choosen ) } break; - case 15: - { - MMRadioOutputType path = 0; - printf("input path(0:NONE/1:AUTO/2:SPK/3:EAR) : "); - scanf("%d", &path); - RADIO_TEST__( mm_radio_set_sound_path(g_my_radio, path); ) - } - break; - default: break; } @@ -3077,16 +2955,16 @@ int main(int argc, char **argv) int mm_radio_scan_stop(MMHandleType hradio); /** - * This function sets the sound path. + * This function is to mute/unmute radio output. * - * @param hradio [in] Handle of radio. - * @param path [in] Output sound path to set. + * @param hradio [in] Handle of radio. + * @param muted [in] 0: unmute 1: mute * * @return This function returns zero on success, or negative value with errors * @pre None * @post None * @remark None - * @see mm_radio_get_sound_path + * @see * @par Example * @code #include @@ -3125,13 +3003,13 @@ int __menu(void) printf("[12] mm_radio_get_frequency\n"); printf("[13] mm_radio_scan_start\n"); printf("[14] mm_radio_scan_stop\n"); - printf("[15] mm_radio_set_sound_path\n"); + printf("[16] mm_radio_set_mute\n"); printf("[0] quit\n"); printf("---------------------------------------------------------\n"); printf("choose one : "); scanf("%d", &menu_item); - if ( menu_item > 15 ) + if ( menu_item > 16 ) menu_item = -1; return menu_item; @@ -3270,14 +3148,13 @@ void __call_api( int choosen ) } break; - case 15: + case 16: { - MMRadioOutputType path = 0; - printf("input path(0:NONE/1:AUTO/2:SPK/3:EAR) : "); - scanf("%d", &path); - RADIO_TEST__( mm_radio_set_sound_path(g_my_radio, path); ) + bool muted = 0; + printf("select one(0:UNMUTE/1:MUTE) : "); + scanf("%d", &muted); + RADIO_TEST__( mm_radio_set_mute(g_my_radio, muted); ) } - break; default: break; @@ -3305,19 +3182,18 @@ int main(int argc, char **argv) * @endcode */ -int mm_radio_set_sound_path(MMHandleType hradio, MMRadioOutputType path)__attribute__ ((deprecated)); - +int mm_radio_set_mute(MMHandleType hradio, bool muted); /** - * This function gets the sound path. + * This function is get strength of radio signal. * - * @param hradio [in] Handle of radio. - * @param pPath [out] Current output sound path. + * @param hradio [in] Handle of radio. + * @param value [in] signal strength * * @return This function returns zero on success, or negative value with errors * @pre None * @post None * @remark None - * @see mm_radio_set_sound_path + * @see * @par Example * @code #include @@ -3356,13 +3232,13 @@ int __menu(void) printf("[12] mm_radio_get_frequency\n"); printf("[13] mm_radio_scan_start\n"); printf("[14] mm_radio_scan_stop\n"); - printf("[15] mm_radio_set_sound_path\n"); + printf("[16] mm_radio_set_mute\n"); printf("[0] quit\n"); printf("---------------------------------------------------------\n"); printf("choose one : "); scanf("%d", &menu_item); - if ( menu_item > 15 ) + if ( menu_item > 16 ) menu_item = -1; return menu_item; @@ -3501,14 +3377,13 @@ void __call_api( int choosen ) } break; - case 15: + case 16: { - MMRadioOutputType path = 0; - printf("input path(0:NONE/1:AUTO/2:SPK/3:EAR) : "); - scanf("%d", &path); - RADIO_TEST__( mm_radio_set_sound_path(g_my_radio, path); ) + bool muted = 0; + printf("select one(0:UNMUTE/1:MUTE) : "); + scanf("%d", &muted); + RADIO_TEST__( mm_radio_set_mute(g_my_radio, muted); ) } - break; default: break; @@ -3534,253 +3409,38 @@ int main(int argc, char **argv) } } - * @endcode + * @endcode */ -int mm_radio_get_sound_path(MMHandleType hradio, MMRadioOutputType* pPath)__attribute__ ((deprecated)); +int mm_radio_get_signal_strength(MMHandleType hradio, int *value); /** - * This function is to mute/unmute radio output. + * This function is to get type of radio region. * * @param hradio [in] Handle of radio. - * @param muted [in] 0: unmute 1: mute + * @param type [out] type of current region * * @return This function returns zero on success, or negative value with errors * @pre None * @post None * @remark None - * @see - * @par Example - * @code -#include -#include -#include - -#define RADIO_TEST__(x_test) \ - ret = x_test \ - if ( ! ret ) \ - { \ - printf("PASS : %s -- %s:%d\n", #x_test, __FILE__, __LINE__); \ - } \ - else \ - { \ - printf("FAIL : %s ERR-CODE : %d -- %s:%d\n", #x_test, ret, __FILE__, __LINE__); \ - } - -static MMHandleType g_my_radio = 0; - -int __menu(void) -{ - int menu_item = 0; - - printf("---------------------------------------------------------\n"); - printf("mm-radio rt api test. try now!\n"); - printf("---------------------------------------------------------\n"); - printf("[1] mm_radio_create\n"); - printf("[2] mm_radio_destroy\n"); - printf("[3] mm_radio_realize\n"); - printf("[4] mm_radio_unrealize\n"); - printf("[7] mm_radio_get_state\n"); - printf("[8] mm_radio_start\n"); - printf("[9] mm_radio_stop\n"); - printf("[10] mm_radio_seek\n"); - printf("[11] mm_radio_set_frequency\n"); - printf("[12] mm_radio_get_frequency\n"); - printf("[13] mm_radio_scan_start\n"); - printf("[14] mm_radio_scan_stop\n"); - printf("[15] mm_radio_set_sound_path\n"); - printf("[16] mm_radio_set_mute\n"); - printf("[0] quit\n"); - printf("---------------------------------------------------------\n"); - printf("choose one : "); - scanf("%d", &menu_item); - - if ( menu_item > 16 ) - menu_item = -1; - - return menu_item; -} - -int __msg_rt_callback(int message, void *pParam, void *user_param) -{ - MMMessageParamType* param = (MMMessageParamType*)pParam; - int ret = 0; - - printf("incomming message : %d\n", message); - - switch(message) - { - case MM_MESSAGE_STATE_CHANGED: - - printf("MM_MESSAGE_STATE_CHANGED: current : %d old : %d\n" - , param->state.current, param->state.previous); - break; - case MM_MESSAGE_RADIO_SCAN_START: - printf("MM_MESSAGE_RADIO_SCAN_START\n"); - break; - case MM_MESSAGE_RADIO_SCAN_INFO: - assert(param); - printf("MM_MESSAGE_RADIO_SCAN_INFO : freq : %d\n", param->radio_scan.frequency); - break; - case MM_MESSAGE_RADIO_SCAN_STOP: - printf("MM_MESSAGE_RADIO_SCAN_STOP\n"); - break; - case MM_MESSAGE_RADIO_SCAN_FINISH: - printf("MM_MESSAGE_RADIO_SCAN_FINISHED\n"); - break; - case MM_MESSAGE_RADIO_SEEK_START: - printf("MM_MESSAGE_RADIO_SEEK_START\n"); - break; - case MM_MESSAGE_RADIO_SEEK_FINISH: - printf("MM_MESSAGE_RADIO_SEEK_FINISHED : freq : %d\n", param->radio_scan.frequency); - break; - default: - printf("ERROR : unknown message received!\n"); - break; - } - - return true; -} - -void __call_api( int choosen ) -{ - int ret = MM_ERROR_NONE; - - switch( choosen ) - { - case 1: - { - RADIO_TEST__( mm_radio_create( &g_my_radio ); ) - RADIO_TEST__( mm_radio_set_message_callback( g_my_radio, __msg_rt_callback, &g_my_radio); ) - } - break; - - case 2: - { - RADIO_TEST__( mm_radio_destroy( g_my_radio ); ) - g_my_radio = 0; - } - break; - - case 3: - { - RADIO_TEST__( mm_radio_realize(g_my_radio ); ) - } - break; - - case 4: - { - RADIO_TEST__( mm_radio_unrealize(g_my_radio ); ) - } - break; - - case 7: - { - MMRadioStateType state = 0; - RADIO_TEST__( mm_radio_get_state(g_my_radio, &state); ) - - printf("state : %d\n", state); - } - break; - - case 8: - { - RADIO_TEST__( mm_radio_start(g_my_radio); ) - } - break; - - case 9: - { - RADIO_TEST__( mm_radio_stop(g_my_radio); ) - } - break; - - case 10: - { - MMRadioSeekDirectionType direction = 0; - printf("input seek direction(0:UP/1:DOWN) : "); - scanf("%d", &direction); - RADIO_TEST__( mm_radio_seek(g_my_radio, direction); ) - } - break; - - case 11: - { - int freq = 0; - printf("input freq : "); - scanf("%d", &freq); - RADIO_TEST__( mm_radio_set_frequency(g_my_radio, freq); ) - } - break; - - case 12: - { - int freq = 0; - RADIO_TEST__( mm_radio_get_frequency(g_my_radio, &freq ); ) - - printf("freq : %d\n", freq); - } - break; - - case 13: - { - RADIO_TEST__( mm_radio_scan_start(g_my_radio); ) - } - break; - - case 14: - { - RADIO_TEST__( mm_radio_scan_stop(g_my_radio); ) - } - break; - - case 15: - { - MMRadioOutputType path = 0; - printf("input path(0:NONE/1:AUTO/2:SPK/3:EAR) : "); - scanf("%d", &path); - RADIO_TEST__( mm_radio_set_sound_path(g_my_radio, path); ) - } - break; - - case 16: - { - bool muted = 0; - printf("select one(0:UNMUTE/1:MUTE) : "); - scanf("%d", &muted); - RADIO_TEST__( mm_radio_set_mute(g_my_radio, muted); ) - } - - default: - break; - } -} - -int main(int argc, char **argv) -{ - while(1) - { - char key = 0; - int choosen = 0; - - choosen = __menu(); - - if ( choosen == -1) - continue; - - if ( choosen == 0 ) - break; - - __call_api( choosen ); - } -} - - * @endcode + * @see mm_radio_get_region_frequency_range() */ -int mm_radio_set_mute(MMHandleType hradio, bool muted); - -int mm_radio_get_signal_strength(MMHandleType hradio, int *value); - +int mm_radio_get_region_type(MMHandleType hradio, MMRadioRegionType *type); +/** + * This function is to get range of radio frequency. + * + * @param hradio [in] Handle of radio. + * @param min [out] min frequency value + * @param max [out] max frequency value + * + * @return This function returns zero on success, or negative value with errors + * @pre None + * @post None + * @remark The unit of frequency is KHz. + * @see mm_radio_get_region_type() + */ +int mm_radio_get_region_frequency_range(MMHandleType hradio, unsigned int *min, unsigned int *max); /** @} diff --git a/src/include/mm_radio_priv.h b/src/include/mm_radio_priv.h index 787d55c..04c14b8 100755 --- a/src/include/mm_radio_priv.h +++ b/src/include/mm_radio_priv.h @@ -39,6 +39,9 @@ #include "mm_radio.h" #include "mm_radio_utils.h" #include + +#include +#include #ifdef __cplusplus extern "C" { @@ -53,12 +56,29 @@ ---------------------------------------------------------------------------*/ #define SAMPLEDELAY 15000 +/* si470x dependent define */ +#define SYSCONFIG1 4 /* System Configuration 1 */ +#define SYSCONFIG1_RDS 0x1000 /* bits 12..12: RDS Enable */ +#define SYSCONFIG1_RDS_OFFSET 12 /* bits 12..12: RDS Enable Offset */ + +#define SYSCONFIG2 5 /* System Configuration 2 */ +#define SYSCONFIG2_SEEKTH 0xff00 /* bits 15..08: RSSI Seek Threshold */ +#define SYSCONFIG2_SEEKTH_OFFSET 8 /* bits 15..08: RSSI Seek Threshold Offset */ + +#define SYSCONFIG3 6 /* System Configuration 3 */ +#define SYSCONFIG3_SKSNR 0x00f0 /* bits 07..04: Seek SNR Threshold */ +#define SYSCONFIG3_SKCNT 0x000f /* bits 03..00: Seek FM Impulse Detection Threshold */ +#define SYSCONFIG3_SKSNR_OFFSET 4 /* bits 07..04: Seek SNR Threshold Offset */ +#define SYSCONFIG3_SKCNT_OFFSET 0 /* bits 03..00: Seek FM Impulse Detection Threshold Offset */ + +#define DEFAULT_CHIP_MODEL "radio-si470x" + /*--------------------------------------------------------------------------- GLOBAL CONSTANT DEFINITIONS: ---------------------------------------------------------------------------*/ typedef enum { - MMRADIO_COMMAND_CREATE, + MMRADIO_COMMAND_CREATE = 0, MMRADIO_COMMAND_DESTROY, MMRADIO_COMMAND_REALIZE, MMRADIO_COMMAND_UNREALIZE, @@ -66,23 +86,64 @@ typedef enum MMRADIO_COMMAND_STOP, MMRADIO_COMMAND_START_SCAN, MMRADIO_COMMAND_STOP_SCAN, - MMRADIO_COMMAND_SET_VOLUME, - MMRADIO_COMMAND_GET_VOLUME, MMRADIO_COMMAND_SET_FREQ, MMRADIO_COMMAND_GET_FREQ, - MMRADIO_COMMAND_SET_SOUND_PATH, - MMRADIO_COMMAND_GET_SOUND_PATH, MMRADIO_COMMAND_MUTE, MMRADIO_COMMAND_UNMUTE, MMRADIO_COMMAND_SEEK, - - MMPLAYER_COMMAND_NUM + MMRADIO_COMMAND_SET_REGION, + MMRADIO_COMMAND_GET_REGION, + MMRADIO_COMMAND_NUM } MMRadioCommand; +/* max and mix frequency types, KHz */ +typedef enum +{ + MM_RADIO_FREQ_NONE = 0, + /* min band types */ + MM_RADIO_FREQ_MIN_76100_KHZ = 76100, + MM_RADIO_FREQ_MIN_87500_KHZ = 87500, + MM_RADIO_FREQ_MIN_88100_KHZ = 88100, + /* max band types */ + MM_RADIO_FREQ_MAX_89900_KHZ = 89900, + MM_RADIO_FREQ_MAX_108000_KHZ = 108000, +}MMRadioFreqTypes; + +/* de-emphasis types */ +typedef enum +{ + MM_RADIO_DEEMPHASIS_NONE = 0, + MM_RADIO_DEEMPHASIS_50_US, + MM_RADIO_DEEMPHASIS_75_US, +}MMRadioDeemphasis; + +/* radio region settings */ +typedef struct +{ + MMRadioRegionType country; + MMRadioDeemphasis deemphasis; // unit : us + MMRadioFreqTypes band_min; // <- freq. range, unit : KHz + MMRadioFreqTypes band_max; // -> + //int channel_spacing; // TBD +}MMRadioRegion_t; + /*--------------------------------------------------------------------------- GLOBAL DATA TYPE DEFINITIONS: ---------------------------------------------------------------------------*/ - +#define USE_GST_PIPELINE + +#ifdef USE_GST_PIPELINE +typedef struct _mm_radio_gstreamer_s +{ + GMainLoop *loop; + GstElement *pipeline; + GstElement *avsysaudiosrc; + GstElement *queue2; + GstElement *avsysaudiosink; + GstBuffer *output_buffer; +} mm_radio_gstreamer_s; +#endif + typedef struct { /* radio state */ int current_state; @@ -122,14 +183,16 @@ typedef struct { int prev_seek_freq; MMRadioSeekDirectionType seek_direction; - /* sound path */ - MMRadioOutputType path; - /* ASM */ MMRadioASM sm; int freq; - unsigned int volume; +#ifdef USE_GST_PIPELINE + mm_radio_gstreamer_s* pGstreamer_s; +#endif + + /* region settings */ + MMRadioRegion_t region_setting; } mm_radio_t; /*=========================================================================================== @@ -141,8 +204,6 @@ int _mmradio_realize(mm_radio_t* radio); int _mmradio_unrealize(mm_radio_t* radio); int _mmradio_set_message_callback(mm_radio_t* radio, MMMessageCallback callback, void *user_param); int _mmradio_get_state(mm_radio_t* radio, int* pState); -int _mmradio_set_volume(mm_radio_t* radio, int volume); -int _mmradio_get_volume(mm_radio_t* radio, int* pVolume); int _mmradio_set_frequency(mm_radio_t* radio, int freq); int _mmradio_get_frequency(mm_radio_t* radio, int* pFreq); int _mmradio_mute(mm_radio_t* radio); @@ -152,10 +213,19 @@ int _mmradio_stop(mm_radio_t* radio); int _mmradio_seek(mm_radio_t* radio, MMRadioSeekDirectionType direction); int _mmradio_start_scan(mm_radio_t* radio); int _mmradio_stop_scan(mm_radio_t* radio); -int _mmradio_set_sound_path(mm_radio_t* radio, MMRadioOutputType path ); -int _mmradio_get_sound_path(mm_radio_t* radio, MMRadioOutputType* pPath ); -int _mmradio_release_sound_path(void); -int _mmradio_audio_state_update(bool onoff); +#ifdef USE_GST_PIPELINE +int _mmradio_realize_pipeline( mm_radio_t* radio); +int _mmradio_start_pipeline(mm_radio_t* radio); +int _mmradio_stop_pipeline( mm_radio_t* radio); +int _mmradio_destroy_pipeline(mm_radio_t* radio); +#endif +int _mmradio_apply_region(mm_radio_t*radio, MMRadioRegionType region, bool update); +int _mmradio_get_region_type(mm_radio_t*radio, MMRadioRegionType *type); +int _mmradio_get_region_frequency_range(mm_radio_t* radio, uint *min_freq, uint *max_freq); +#if 0 +int mmradio_set_attrs(mm_radio_t* radio, MMRadioAttrsType type, MMHandleType attrs); +MMHandleType mmradio_get_attrs(mm_radio_t* radio, MMRadioAttrsType type); +#endif #ifdef __cplusplus } diff --git a/src/include/mm_radio_utils.h b/src/include/mm_radio_utils.h index 1247f72..13c3765 100755 --- a/src/include/mm_radio_utils.h +++ b/src/include/mm_radio_utils.h @@ -27,6 +27,14 @@ #include #include +/* radio log */ +#define MMRADIO_LOG_FENTER debug_fenter +#define MMRADIO_LOG_FLEAVE debug_fleave +#define MMRADIO_LOG_DEBUG debug_log +#define MMRADIO_LOG_ERROR debug_error +#define MMRADIO_LOG_WARNING debug_warning +#define MMRADIO_LOG_CRITICAL debug_critical + /* general */ #ifndef ARRAY_SIZE #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0])) @@ -46,6 +54,13 @@ if ( ! x_radio ) \ return MM_ERROR_RADIO_NOT_INITIALIZED; \ } +#define MMRADIO_CHECK_DEVICE_STATE( x_radio ) \ +if ( x_radio->radio_fd < 0 ) \ +{ \ + debug_error("not available radio device\n"); \ + return MM_ERROR_RADIO_NOT_INITIALIZED;\ +} + /* command locking for multithreading */ #define MMRADIO_CMD_LOCK(x_radio) pthread_mutex_lock( &((mm_radio_t*)x_radio)->cmd_lock ) #define MMRADIO_CMD_UNLOCK(x_radio) pthread_mutex_unlock( &((mm_radio_t*)x_radio)->cmd_lock ) @@ -81,7 +96,7 @@ do \ { \ if( x_ret < 0 ) \ { \ - debug_error("%s failed\n", x_msg);\ + debug_error("%s error\n", x_msg);\ return x_ret; \ } \ } while( 0 ) ; diff --git a/src/mm_radio.c b/src/mm_radio.c index e0856cf..8370451 100755 --- a/src/mm_radio.c +++ b/src/mm_radio.c @@ -87,7 +87,7 @@ int mm_radio_create(MMHandleType *hradio) int result = MM_ERROR_NONE; mm_radio_t* new_radio = NULL; - debug_log("\n"); + MMRADIO_LOG_FENTER(); return_val_if_fail(hradio, MM_ERROR_RADIO_NOT_INITIALIZED); @@ -110,6 +110,8 @@ int mm_radio_create(MMHandleType *hradio) *hradio = (MMHandleType)new_radio; + MMRADIO_LOG_FLEAVE(); + return result; ERROR: @@ -120,6 +122,8 @@ ERROR: } *hradio = (MMHandleType)0; + + MMRADIO_LOG_FLEAVE(); /* FIXIT : need to specify more error case */ return MM_ERROR_RADIO_NO_FREE_SPACE; @@ -130,7 +134,7 @@ int mm_radio_destroy(MMHandleType hradio) int result = MM_ERROR_NONE; mm_radio_t* radio = (mm_radio_t*)hradio; - debug_log("\n"); + MMRADIO_LOG_FENTER(); return_val_if_fail(radio, MM_ERROR_RADIO_NOT_INITIALIZED); @@ -145,8 +149,11 @@ int mm_radio_destroy(MMHandleType hradio) MMRADIO_FREEIF( radio ); MMTA_ACUM_ITEM_SHOW_RESULT_TO(MMTA_SHOW_FILE); + //MMTA_ACUM_ITEM_SHOW_RESULT_TO(MMTA_SHOW_STDOUT); MMTA_RELEASE(); + + MMRADIO_LOG_FLEAVE(); return result; } @@ -156,7 +163,7 @@ int mm_radio_realize(MMHandleType hradio) int result = MM_ERROR_NONE; mm_radio_t* radio = (mm_radio_t*)hradio; - debug_log("\n"); + MMRADIO_LOG_FENTER(); return_val_if_fail(radio, MM_ERROR_RADIO_NOT_INITIALIZED); @@ -168,6 +175,8 @@ int mm_radio_realize(MMHandleType hradio) MMRADIO_CMD_UNLOCK( radio ); + MMRADIO_LOG_FLEAVE(); + return result; } @@ -176,7 +185,7 @@ int mm_radio_unrealize(MMHandleType hradio) int result = MM_ERROR_NONE; mm_radio_t* radio = (mm_radio_t*)hradio; - debug_log("\n"); + MMRADIO_LOG_FENTER(); return_val_if_fail(radio, MM_ERROR_RADIO_NOT_INITIALIZED); @@ -187,6 +196,8 @@ int mm_radio_unrealize(MMHandleType hradio) ) MMRADIO_CMD_UNLOCK( radio ); + + MMRADIO_LOG_FLEAVE(); return result; } @@ -196,7 +207,7 @@ int mm_radio_set_message_callback(MMHandleType hradio, MMMessageCallback callbac int result = MM_ERROR_NONE; mm_radio_t* radio = (mm_radio_t*)hradio; - debug_log("\n"); + MMRADIO_LOG_FENTER(); return_val_if_fail(radio, MM_ERROR_RADIO_NOT_INITIALIZED); @@ -205,6 +216,8 @@ int mm_radio_set_message_callback(MMHandleType hradio, MMMessageCallback callbac result = _mmradio_set_message_callback( radio, callback, user_param ); MMRADIO_CMD_UNLOCK( radio ); + + MMRADIO_LOG_FLEAVE(); return result; } @@ -215,7 +228,7 @@ int mm_radio_get_state(MMHandleType hradio, MMRadioStateType* pState) mm_radio_t* radio = (mm_radio_t*)hradio; int state = 0; - debug_log("\n"); + MMRADIO_LOG_FENTER(); return_val_if_fail(radio, MM_ERROR_RADIO_NOT_INITIALIZED); return_val_if_fail(pState, MM_ERROR_COMMON_INVALID_ARGUMENT); @@ -228,6 +241,8 @@ int mm_radio_get_state(MMHandleType hradio, MMRadioStateType* pState) MMRADIO_CMD_UNLOCK( radio ); + MMRADIO_LOG_FLEAVE(); + return result; } @@ -235,9 +250,8 @@ int mm_radio_start(MMHandleType hradio) { int result = MM_ERROR_NONE; mm_radio_t* radio = (mm_radio_t*)hradio; - MMRadioOutputType path; - debug_log("\n"); + MMRADIO_LOG_FENTER(); return_val_if_fail(radio, MM_ERROR_RADIO_NOT_INITIALIZED); @@ -248,6 +262,8 @@ int mm_radio_start(MMHandleType hradio) MMRADIO_CMD_UNLOCK( radio ); + MMRADIO_LOG_FLEAVE(); + return result; } @@ -256,7 +272,7 @@ int mm_radio_stop(MMHandleType hradio) int result = MM_ERROR_NONE; mm_radio_t* radio = (mm_radio_t*)hradio; - debug_log("\n"); + MMRADIO_LOG_FENTER(); return_val_if_fail(radio, MM_ERROR_RADIO_NOT_INITIALIZED); @@ -268,6 +284,8 @@ int mm_radio_stop(MMHandleType hradio) MMRADIO_CMD_UNLOCK( radio ); + MMRADIO_LOG_FLEAVE(); + return result; } @@ -276,7 +294,7 @@ int mm_radio_seek(MMHandleType hradio, MMRadioSeekDirectionType direction) int result = MM_ERROR_NONE; mm_radio_t* radio = (mm_radio_t*)hradio; - debug_log("\n"); + MMRADIO_LOG_FENTER(); return_val_if_fail(radio, MM_ERROR_RADIO_NOT_INITIALIZED); return_val_if_fail(direction >= MM_RADIO_SEEK_UP && direction <= MM_RADIO_SEEK_DOWN, MM_ERROR_INVALID_ARGUMENT); @@ -287,6 +305,8 @@ int mm_radio_seek(MMHandleType hradio, MMRadioSeekDirectionType direction) MMRADIO_CMD_UNLOCK( radio ); + MMRADIO_LOG_FLEAVE(); + return result; } @@ -295,7 +315,7 @@ int mm_radio_set_frequency(MMHandleType hradio, int freq) int result = MM_ERROR_NONE; mm_radio_t* radio = (mm_radio_t*)hradio; - debug_log("\n"); + MMRADIO_LOG_FENTER(); return_val_if_fail(radio, MM_ERROR_RADIO_NOT_INITIALIZED); @@ -305,6 +325,8 @@ int mm_radio_set_frequency(MMHandleType hradio, int freq) MMRADIO_CMD_UNLOCK( radio ); + MMRADIO_LOG_FLEAVE(); + return result; } @@ -314,7 +336,7 @@ int mm_radio_get_frequency(MMHandleType hradio, int* pFreq) mm_radio_t* radio = (mm_radio_t*)hradio; int freq = 0; - debug_log("\n"); + MMRADIO_LOG_FENTER(); return_val_if_fail(radio, MM_ERROR_RADIO_NOT_INITIALIZED); return_val_if_fail(pFreq, MM_ERROR_INVALID_ARGUMENT); @@ -327,6 +349,8 @@ int mm_radio_get_frequency(MMHandleType hradio, int* pFreq) MMRADIO_CMD_UNLOCK( radio ); + MMRADIO_LOG_FLEAVE(); + return result; } @@ -335,7 +359,7 @@ int mm_radio_scan_start(MMHandleType hradio) int result = MM_ERROR_NONE; mm_radio_t* radio = (mm_radio_t*)hradio; - debug_log("\n"); + MMRADIO_LOG_FENTER(); return_val_if_fail(radio, MM_ERROR_RADIO_NOT_INITIALIZED); @@ -345,6 +369,8 @@ int mm_radio_scan_start(MMHandleType hradio) MMRADIO_CMD_UNLOCK( radio ); + MMRADIO_LOG_FLEAVE(); + return result; } @@ -353,7 +379,7 @@ int mm_radio_scan_stop(MMHandleType hradio) int result = MM_ERROR_NONE; mm_radio_t* radio = (mm_radio_t*)hradio; - debug_log("\n"); + MMRADIO_LOG_FENTER(); return_val_if_fail(radio, MM_ERROR_RADIO_NOT_INITIALIZED); @@ -363,33 +389,7 @@ int mm_radio_scan_stop(MMHandleType hradio) MMRADIO_CMD_UNLOCK( radio ); - return result; -} - -int mm_radio_set_sound_path(MMHandleType hradio, MMRadioOutputType path) -{ - int result = MM_ERROR_NONE; - mm_radio_t* radio = (mm_radio_t*)hradio; - int radio_state = MM_RADIO_STATE_NULL; - - debug_log("\n"); - - return_val_if_fail(radio, MM_ERROR_RADIO_NOT_INITIALIZED); - return_val_if_fail(path >= MM_RADIO_OUTPUT_AUTO && path <= MM_RADIO_OUTPUT_HEADSET, MM_ERROR_INVALID_ARGUMENT); - - return result; -} - -int mm_radio_get_sound_path(MMHandleType hradio, MMRadioOutputType* pPath) -{ - int result = MM_ERROR_NONE; - mm_radio_t* radio = (mm_radio_t*)hradio; - MMRadioOutputType path = 0; - - debug_log("\n"); - - return_val_if_fail(radio, MM_ERROR_RADIO_NOT_INITIALIZED); - return_val_if_fail(pPath, MM_ERROR_INVALID_ARGUMENT); + MMRADIO_LOG_FLEAVE(); return result; } @@ -399,7 +399,7 @@ int mm_radio_set_mute(MMHandleType hradio, bool muted) int result = MM_ERROR_NONE; mm_radio_t* radio = (mm_radio_t*)hradio; - debug_log("\n"); + MMRADIO_LOG_FENTER(); return_val_if_fail(radio, MM_ERROR_RADIO_NOT_INITIALIZED); @@ -416,6 +416,8 @@ int mm_radio_set_mute(MMHandleType hradio, bool muted) MMRADIO_CMD_UNLOCK(radio); + MMRADIO_LOG_FLEAVE(); + return result; } @@ -424,7 +426,7 @@ int mm_radio_get_signal_strength(MMHandleType hradio, int *value) return_val_if_fail(hradio, MM_ERROR_RADIO_NOT_INITIALIZED); return_val_if_fail(value, MM_ERROR_INVALID_ARGUMENT); - debug_log("\n"); + MMRADIO_LOG_FENTER(); int ret = MM_ERROR_NONE; @@ -439,14 +441,56 @@ int mm_radio_get_signal_strength(MMHandleType hradio, int *value) return MM_ERROR_RADIO_INTERNAL; } - usleep(SAMPLEDELAY); - *value = radio->vt.signal; MMRADIO_CMD_UNLOCK( radio ); - debug_log("signal strength = %d\n", *value); + MMRADIO_LOG_DEBUG("signal strength = %d\n", *value); + MMRADIO_LOG_FLEAVE(); return ret; } +int mm_radio_get_region_type(MMHandleType hradio, MMRadioRegionType *type) +{ + MMRADIO_LOG_FENTER(); + return_val_if_fail(hradio, MM_ERROR_RADIO_NOT_INITIALIZED); + return_val_if_fail(type, MM_ERROR_INVALID_ARGUMENT); + + int result = MM_ERROR_NONE; + mm_radio_t* radio = (mm_radio_t*)hradio; + MMRadioRegionType cur_type = MM_RADIO_REGION_GROUP_NONE; + + result = _mmradio_get_region_type(radio, &cur_type); + + if (result == MM_ERROR_NONE) + *type = cur_type; + + MMRADIO_LOG_FLEAVE(); + return result; +} + +int mm_radio_get_region_frequency_range(MMHandleType hradio, unsigned int *min, unsigned int*max) +{ + MMRADIO_LOG_FENTER(); + + return_val_if_fail(hradio, MM_ERROR_RADIO_NOT_INITIALIZED); + return_val_if_fail(min && max, MM_ERROR_INVALID_ARGUMENT); + + int result = MM_ERROR_NONE; + mm_radio_t* radio = (mm_radio_t*)hradio; + unsigned int min_freq = 0; + unsigned int max_freq = 0; + + result = _mmradio_get_region_frequency_range(radio, &min_freq, &max_freq); + + if (result == MM_ERROR_NONE) + { + *min = min_freq; + *max = max_freq; + } + + MMRADIO_LOG_FLEAVE(); + return result; +} + diff --git a/src/mm_radio_asm.c b/src/mm_radio_asm.c index d836ef4..8f3d59e 100755 --- a/src/mm_radio_asm.c +++ b/src/mm_radio_asm.c @@ -22,6 +22,7 @@ #include #include #include "mm_radio_asm.h" +#include "mm_radio_utils.h" static ASM_sound_events_t __mmradio_asm_get_event_type(int type); @@ -34,11 +35,11 @@ int mmradio_asm_register(MMRadioASM* sm, ASM_sound_cb_t callback, void* param) int event_type = ASM_EVENT_NONE; int pid = -1; - debug_log("\n"); + MMRADIO_LOG_FENTER(); if ( ! sm ) { - debug_error("invalid session handle\n"); + MMRADIO_LOG_ERROR("invalid session handle\n"); return MM_ERROR_RADIO_NOT_INITIALIZED; } @@ -46,14 +47,14 @@ int mmradio_asm_register(MMRadioASM* sm, ASM_sound_cb_t callback, void* param) errorcode = _mm_session_util_read_type(-1, &sessionType); if ( errorcode ) { - debug_warning("Read MMSession Type failed. use default \"exclusive\" type\n"); + MMRADIO_LOG_WARNING("Read MMSession Type failed. use default \"exclusive\" type\n"); sessionType = MM_SESSION_TYPE_EXCLUSIVE; /* init session */ errorcode = mm_session_init(sessionType); if ( errorcode ) { - debug_critical("mm_session_init() failed\n"); + MMRADIO_LOG_CRITICAL("mm_session_init() failed\n"); return errorcode; } } @@ -61,7 +62,7 @@ int mmradio_asm_register(MMRadioASM* sm, ASM_sound_cb_t callback, void* param) /* check if it's CALL */ if ( sessionType == MM_SESSION_TYPE_CALL || sessionType == MM_SESSION_TYPE_VIDEOCALL) { - debug_log("session type is VOICE or VIDEO CALL (%d)\n", sessionType); + MMRADIO_LOG_DEBUG("session type is VOICE or VIDEO CALL (%d)\n", sessionType); return MM_ERROR_NONE; } @@ -72,17 +73,17 @@ int mmradio_asm_register(MMRadioASM* sm, ASM_sound_cb_t callback, void* param) if ( sm->pid > 0 ) { pid = sm->pid; - debug_log("mm-radio is running on different process. Just faking pid to [%d]. :-p\n", pid); + MMRADIO_LOG_DEBUG("mm-radio is running on different process. Just faking pid to [%d]. :-p\n", pid); } else { - debug_log("no pid has assigned. using default(current) context\n"); + MMRADIO_LOG_DEBUG("no pid has assigned. using default(current) context\n"); } /* register audio-session-manager callback */ if( ! ASM_register_sound(pid, &asm_handle, event_type, ASM_STATE_NONE, callback, (void*)param, ASM_RESOURCE_NONE, &errorcode)) { - debug_critical("ASM_register_sound() failed\n"); + MMRADIO_LOG_CRITICAL("ASM_register_sound() failed\n"); return errorcode; } @@ -90,6 +91,8 @@ int mmradio_asm_register(MMRadioASM* sm, ASM_sound_cb_t callback, void* param) sm->handle = asm_handle; sm->state = ASM_STATE_NONE; + MMRADIO_LOG_FLEAVE(); + return MM_ERROR_NONE; } @@ -99,9 +102,11 @@ int mmradio_asm_deregister(MMRadioASM* sm) int event_type = ASM_EVENT_NONE; int errorcode = 0; + MMRADIO_LOG_FENTER(); + if ( ! sm ) { - debug_error("invalid session handle\n"); + MMRADIO_LOG_ERROR("invalid session handle\n"); return MM_ERROR_RADIO_NOT_INITIALIZED; } @@ -109,14 +114,14 @@ int mmradio_asm_deregister(MMRadioASM* sm) errorcode = _mm_session_util_read_type(-1, &sessionType); if ( errorcode ) { - debug_error("MMSessionReadType Fail %s\n",__func__); + MMRADIO_LOG_ERROR("MMSessionReadType Fail %s\n",__func__); return MM_ERROR_POLICY_INTERNAL; } /* check if it's CALL */ if ( sessionType == MM_SESSION_TYPE_CALL || sessionType == MM_SESSION_TYPE_VIDEOCALL) { - debug_log("session type is VOICE or VIDEO CALL (%d)\n", sessionType); + MMRADIO_LOG_DEBUG("session type is VOICE or VIDEO CALL (%d)\n", sessionType); return MM_ERROR_NONE; } @@ -125,10 +130,12 @@ int mmradio_asm_deregister(MMRadioASM* sm) if( ! ASM_unregister_sound( sm->handle, event_type, &errorcode) ) { - debug_error("Unregister sound failed 0x%X\n", errorcode); + MMRADIO_LOG_ERROR("Unregister sound failed 0x%X\n", errorcode); return MM_ERROR_POLICY_INTERNAL; } + MMRADIO_LOG_FLEAVE(); + return MM_ERROR_NONE; } @@ -138,9 +145,11 @@ int mmradio_asm_set_state(MMRadioASM* sm, ASM_sound_states_t state, ASM_resource int event_type = ASM_EVENT_NONE; int errorcode = 0; + MMRADIO_LOG_FENTER(); + if ( ! sm ) { - debug_error("invalid session handle\n"); + MMRADIO_LOG_ERROR("invalid session handle\n"); return MM_ERROR_RADIO_NOT_INITIALIZED; } @@ -148,18 +157,18 @@ int mmradio_asm_set_state(MMRadioASM* sm, ASM_sound_states_t state, ASM_resource errorcode = _mm_session_util_read_type(-1, &sessionType); if ( errorcode ) { - debug_error("MMSessionReadType Fail\n"); + MMRADIO_LOG_ERROR("MMSessionReadType Fail\n"); return MM_ERROR_POLICY_INTERNAL; } /* check if it's CALL */ if ( sessionType == MM_SESSION_TYPE_CALL || sessionType == MM_SESSION_TYPE_VIDEOCALL ) { - debug_log("session type is VOICE or VIDEO CALL (%d)\n", sessionType); + MMRADIO_LOG_DEBUG("session type is VOICE or VIDEO CALL (%d)\n", sessionType); return MM_ERROR_NONE; } - if ( sm->by_asm_cb == MMRADIO_ASM_CB_NONE ) + if ( sm->by_asm_cb == MMRADIO_ASM_CB_NONE ) //|| sm->state == ASM_STATE_PLAYING ) { int ret = 0; @@ -167,7 +176,7 @@ int mmradio_asm_set_state(MMRadioASM* sm, ASM_sound_states_t state, ASM_resource if( ! ASM_set_sound_state( sm->handle, event_type, state, resource, &ret) ) { - debug_error("set ASM state to [%d] failed 0x%X\n", state, ret); + MMRADIO_LOG_ERROR("set ASM state to [%d] failed 0x%X\n", state, ret); return MM_ERROR_POLICY_BLOCKED; } @@ -179,6 +188,8 @@ int mmradio_asm_set_state(MMRadioASM* sm, ASM_sound_states_t state, ASM_resource sm->state = state; } + MMRADIO_LOG_FLEAVE(); + return MM_ERROR_NONE; } @@ -187,6 +198,8 @@ ASM_sound_events_t __mmradio_asm_get_event_type(int type) { int event_type = ASM_EVENT_NONE; + MMRADIO_LOG_FENTER(); + /* interpret session type */ switch(type) { @@ -206,9 +219,11 @@ ASM_sound_events_t __mmradio_asm_get_event_type(int type) case MM_SESSION_TYPE_CALL: case MM_SESSION_TYPE_VIDEOCALL: default: - debug_critical("unexpected case! (%d)\n", type); + MMRADIO_LOG_CRITICAL("unexpected case! (%d)\n", type); assert(0); } + MMRADIO_LOG_FLEAVE(); + return event_type; } diff --git a/src/mm_radio_priv.c b/src/mm_radio_priv.c index 8ce0872..ddde93e 100755 --- a/src/mm_radio_priv.c +++ b/src/mm_radio_priv.c @@ -39,25 +39,12 @@ #include #include #include -#include #include "mm_radio_priv.h" /*=========================================================================================== LOCAL DEFINITIONS AND DECLARATIONS FOR MODULE ========================================================================================== */ -#define DEFAULT_DEVICE "/dev/radio0" - -#define TUNER_INDEX 0 -#define FREQUENCY_MIN 87500 -#define FREQUENCY_MAX 108000 -#define DEFAULT_FREQ 107700 -#define FREQUENCY_STEP 50 -#define FREQ_FRAC 16 -#define DEFAULT_WRAP_AROUND 1 //If non-zero, wrap around when at the end of the frequency range, else stop seeking - -#define RADIO_VOLUME_TYPE VOLUME_TYPE_MEDIA - /*--------------------------------------------------------------------------- GLOBAL CONSTANT DEFINITIONS: ---------------------------------------------------------------------------*/ @@ -73,6 +60,17 @@ /*--------------------------------------------------------------------------- LOCAL #defines: ---------------------------------------------------------------------------*/ +#define DEFAULT_DEVICE "/dev/radio0" +#define TUNER_INDEX 0 + +#define DEFAULT_FREQ 107700 + +#define FREQ_FRAC 16 +#define RADIO_FREQ_FORMAT_SET(x_freq) ((x_freq) * FREQ_FRAC) +#define RADIO_FREQ_FORMAT_GET(x_freq) ((x_freq) / FREQ_FRAC) +#define DEFAULT_WRAP_AROUND 1 //If non-zero, wrap around when at the end of the frequency range, else stop seeking + +#define RADIO_DEFAULT_REGION MM_RADIO_REGION_GROUP_USA /*--------------------------------------------------------------------------- LOCAL CONSTANT DEFINITIONS: @@ -90,49 +88,135 @@ extern int errno; /*--------------------------------------------------------------------------- LOCAL VARIABLE DEFINITIONS: ---------------------------------------------------------------------------*/ - +/* radio region configuration table */ +static const MMRadioRegion_t region_table[] = +{ + { /* Notrh America, South America, South Korea, Taiwan, Australia */ + MM_RADIO_REGION_GROUP_USA, // region type + MM_RADIO_DEEMPHASIS_75_US, // de-emphasis + MM_RADIO_FREQ_MIN_87500_KHZ, // min freq. + MM_RADIO_FREQ_MAX_108000_KHZ, // max freq. + }, + { /* China, Europe, Africa, Middle East, Hong Kong, India, Indonesia, Russia, Singapore */ + MM_RADIO_REGION_GROUP_EUROPE, + MM_RADIO_DEEMPHASIS_50_US, + MM_RADIO_FREQ_MIN_87500_KHZ, + MM_RADIO_FREQ_MAX_108000_KHZ, + }, + { + MM_RADIO_REGION_GROUP_JAPAN, + MM_RADIO_DEEMPHASIS_50_US, + MM_RADIO_FREQ_MIN_76100_KHZ, + MM_RADIO_FREQ_MAX_89900_KHZ, + }, +}; /*--------------------------------------------------------------------------- LOCAL FUNCTION PROTOTYPES: ---------------------------------------------------------------------------*/ - static bool __mmradio_post_message(mm_radio_t* radio, enum MMMessageType msgtype, MMMessageParamType* param); static int __mmradio_check_state(mm_radio_t* radio, MMRadioCommand command); static int __mmradio_get_state(mm_radio_t* radio); static bool __mmradio_set_state(mm_radio_t* radio, int new_state); static void __mmradio_seek_thread(mm_radio_t* radio); static void __mmradio_scan_thread(mm_radio_t* radio); -static int __mmradio_set_sound_path(MMRadioOutputType path); ASM_cb_result_t __mmradio_asm_callback(int handle, ASM_event_sources_t sound_event, ASM_sound_commands_t command, unsigned int sound_status, void* cb_data); -static int __mmradio_register_media_volume_callback(mm_radio_t* radio); -static bool __is_tunable_frequency(int freq); -static int __mmradio_get_media_volume(unsigned int* value); +static bool __is_tunable_frequency(mm_radio_t* radio, int freq); +static int __mmradio_set_deemphasis(mm_radio_t* radio); +static int __mmradio_set_band_range(mm_radio_t* radio); + /*=========================================================================== FUNCTION DEFINITIONS ========================================================================== */ +/* -------------------------------------------------------------------------- + * Name : _mmradio_apply_region() + * Desc : update radio region information and set values to device + * Param : + * [in] radio : radio handle + * [in] region : region type + * [in] update : update region values or not + * Return : zero on success, or negative value with error code + *---------------------------------------------------------------------------*/ +int +_mmradio_apply_region(mm_radio_t* radio, MMRadioRegionType region, bool update) +{ + int ret = MM_ERROR_NONE; + int count = 0; + int index = 0; + int i =0; + + MMRADIO_LOG_FENTER(); + + MMRADIO_CHECK_INSTANCE( radio ); + MMRADIO_CHECK_STATE_RETURN_IF_FAIL( radio, MMRADIO_COMMAND_SET_REGION ); + + /* if needed, radio region must be updated. + * Otherwise, just applying settings to device without it. + */ + if ( update ) + { + count = ARRAY_SIZE(region_table); + + //TODO: if auto is supported...get the region info. here + + /* update radio region settings */ + for ( index = 0; index < count; index++ ) + { + /* find the region from pre-defined table*/ + if (region_table[index].country == region) + { + radio->region_setting.country = region_table[index].country; + radio->region_setting.deemphasis = region_table[index].deemphasis; + radio->region_setting.band_min = region_table[index].band_min; + radio->region_setting.band_max = region_table[index].band_max; + } + } + } + + /* chech device is opened or not. if it's not ready, skip to apply region to device now*/ + if (radio->radio_fd < 0) + { + MMRADIO_LOG_DEBUG("not opened device. just updating region info. \n"); + return MM_ERROR_NONE; + } + + MMRADIO_LOG_DEBUG("setting region - country: %d, de-emphasis: %d, band range: %d ~ %d KHz\n", + radio->region_setting.country, radio->region_setting.deemphasis, radio->region_setting.band_min, radio->region_setting.band_max); + + /* set de-emphsasis to device */ + ret = __mmradio_set_deemphasis(radio); + + MMRADIO_CHECK_RETURN_IF_FAIL(ret, "set de-emphasis"); + + /* set band range to device */ + ret = __mmradio_set_band_range(radio); + + MMRADIO_CHECK_RETURN_IF_FAIL(ret, "set band range"); + + MMRADIO_LOG_FLEAVE(); + + return ret; +} int _mmradio_create_radio(mm_radio_t* radio) { int ret = 0; - debug_log("\n"); + MMRADIO_LOG_FENTER(); MMRADIO_CHECK_INSTANCE( radio ); MMRADIO_CHECK_STATE_RETURN_IF_FAIL( radio, MMRADIO_COMMAND_CREATE ); /* set default value */ radio->radio_fd = -1; - radio->path = MM_RADIO_OUTPUT_HEADSET; radio->freq = DEFAULT_FREQ; - - /* set default volume */ - __mmradio_get_media_volume(&radio->volume); + memset(&radio->region_setting, 0, sizeof(MMRadioRegion_t)); /* create command lock */ ret = pthread_mutex_init( &radio->cmd_lock, NULL ); if ( ret ) { - debug_error("mutex creation failed\n"); + MMRADIO_LOG_ERROR("mutex creation failed\n"); return MM_ERROR_RADIO_INTERNAL; } @@ -143,19 +227,21 @@ _mmradio_create_radio(mm_radio_t* radio) if ( ret ) { /* NOTE : we are dealing it as an error since we cannot expect it's behavior */ - debug_error("failed to register asm server\n"); + MMRADIO_LOG_ERROR("failed to register asm server\n"); return MM_ERROR_RADIO_INTERNAL; } + MMRADIO_LOG_FLEAVE(); + return MM_ERROR_NONE; } int _mmradio_realize(mm_radio_t* radio) { - int val = 0; + int ret = MM_ERROR_NONE; - debug_log("\n"); + MMRADIO_LOG_FENTER(); MMRADIO_CHECK_INSTANCE( radio ); MMRADIO_CHECK_STATE_RETURN_IF_FAIL( radio, MMRADIO_COMMAND_REALIZE ); @@ -163,14 +249,14 @@ _mmradio_realize(mm_radio_t* radio) /* open radio device */ if(radio->radio_fd == -1) { - /* prevent noise - don't need to set */ - //__mmradio_set_sound_path(MM_RADIO_OUTPUT_NONE); + MMRadioRegionType region = MM_RADIO_REGION_GROUP_NONE; + bool update = false; /* open device */ radio->radio_fd = open(DEFAULT_DEVICE, O_RDONLY); if (radio->radio_fd < 0) { - debug_error("failed to open radio device[%s] because of %s(%d)\n", + MMRADIO_LOG_ERROR("failed to open radio device[%s] because of %s(%d)\n", DEFAULT_DEVICE, strerror(errno), errno); /* check error */ @@ -184,18 +270,18 @@ _mmradio_realize(mm_radio_t* radio) return MM_ERROR_RADIO_DEVICE_NOT_OPENED; } } - debug_log("radio device fd : %d\n", radio->radio_fd); + MMRADIO_LOG_DEBUG("radio device fd : %d\n", radio->radio_fd); - /* Query Radio device capabilities. */ + /* query radio device capabilities. */ if (ioctl(radio->radio_fd, VIDIOC_QUERYCAP, &(radio->vc)) < 0) { - debug_error("VIDIOC_QUERYCAP failed!\n"); + MMRADIO_LOG_ERROR("VIDIOC_QUERYCAP failed!\n"); goto error; } if ( ! ( radio->vc.capabilities & V4L2_CAP_TUNER) ) { - debug_error("this system can't support fm-radio!\n"); + MMRADIO_LOG_ERROR("this system can't support fm-radio!\n"); goto error; } @@ -204,7 +290,7 @@ _mmradio_realize(mm_radio_t* radio) if ( ! ( (radio->vt).capability & V4L2_TUNER_CAP_STEREO) ) { - debug_error("this system can support mono!\n"); + MMRADIO_LOG_ERROR("this system can support mono!\n"); (radio->vt).audmode = V4L2_TUNER_MODE_MONO; } else @@ -212,9 +298,25 @@ _mmradio_realize(mm_radio_t* radio) (radio->vt).audmode = V4L2_TUNER_MODE_STEREO; } - /* Set tuner index. Must be 0. */ + /* set tuner index. Must be 0. */ (radio->vt).index = TUNER_INDEX; ioctl(radio->radio_fd, VIDIOC_S_TUNER, &(radio->vt)); + + /* check region country type if it's updated or not */ + if ( radio->region_setting.country == MM_RADIO_REGION_GROUP_NONE) + { + /* not initialized yet. set it with default region */ + region = RADIO_DEFAULT_REGION; + update = true; + } + else // already initialized by application + { + region = radio->region_setting.country; + } + + ret = _mmradio_apply_region(radio, region, update); + + MMRADIO_CHECK_RETURN_IF_FAIL(ret, "update region info"); } /* ready but nosound */ @@ -222,6 +324,14 @@ _mmradio_realize(mm_radio_t* radio) goto error; MMRADIO_SET_STATE( radio, MM_RADIO_STATE_READY ); +#ifdef USE_GST_PIPELINE + ret = _mmradio_realize_pipeline(radio); + if ( ret ) { + debug_error("_mmradio_realize_pipeline is failed\n"); + return ret; + } +#endif + MMRADIO_LOG_FLEAVE(); return MM_ERROR_NONE; @@ -232,14 +342,17 @@ error: radio->radio_fd = -1; } + MMRADIO_LOG_FLEAVE(); + return MM_ERROR_RADIO_INTERNAL; } int _mmradio_unrealize(mm_radio_t* radio) { - int res = MM_ERROR_NONE; - debug_log("\n"); + int ret = MM_ERROR_NONE; + + MMRADIO_LOG_FENTER(); MMRADIO_CHECK_INSTANCE( radio ); MMRADIO_CHECK_STATE_RETURN_IF_FAIL( radio, MMRADIO_COMMAND_UNREALIZE ); @@ -255,13 +368,15 @@ _mmradio_unrealize(mm_radio_t* radio) } MMRADIO_SET_STATE( radio, MM_RADIO_STATE_NULL ); - - res = mmradio_asm_set_state(&radio->sm, ASM_STATE_STOP, ASM_RESOURCE_NONE); - if ( res ) - { - debug_error("failed to set asm state to STOP\n"); - return res; +#ifdef USE_GST_PIPELINE + ret= _mmradio_destroy_pipeline(radio); + if ( ret ) { + debug_error("_mmradio_destroy_pipeline is failed\n"); + return ret; } +#endif + + MMRADIO_LOG_FLEAVE(); return MM_ERROR_NONE; } @@ -270,7 +385,7 @@ int _mmradio_destroy(mm_radio_t* radio) { int ret = 0; - debug_log("\n"); + MMRADIO_LOG_FENTER(); MMRADIO_CHECK_INSTANCE( radio ); MMRADIO_CHECK_STATE_RETURN_IF_FAIL( radio, MMRADIO_COMMAND_DESTROY ); @@ -278,108 +393,54 @@ _mmradio_destroy(mm_radio_t* radio) ret = mmradio_asm_deregister(&radio->sm); if ( ret ) { - debug_error("failed to deregister asm server\n"); + MMRADIO_LOG_ERROR("failed to deregister asm server\n"); return MM_ERROR_RADIO_INTERNAL; } _mmradio_unrealize( radio ); - return MM_ERROR_NONE; -} - -int -_mmradio_set_volume(mm_radio_t* radio, int volume) -{ - int err = 0; - debug_log("\n"); - - MMRADIO_CHECK_INSTANCE( radio ); - MMRADIO_CHECK_STATE_RETURN_IF_FAIL( radio, MMRADIO_COMMAND_SET_VOLUME ); - - //remove white noise when volume zero playback - if(!volume && radio->volume) //amp on - err = avsys_audio_ext_device_ampon(AVSYS_AUDIO_EXT_DEVICE_FMRADIO); - else if(volume && !radio->volume) //amp off - err = avsys_audio_ext_device_ampoff(AVSYS_AUDIO_EXT_DEVICE_FMRADIO); - - if(AVSYS_FAIL(err)) - debug_error("codec mute or unmute failed\n"); - - radio->volume = volume; - - if (radio->radio_fd < 0) - { - debug_log("radio is still not opened. just store given volume\n"); - return MM_ERROR_NONE; - } - - (radio->vctrl).id = V4L2_CID_AUDIO_VOLUME; - (radio->vctrl).value = volume; - - if (ioctl(radio->radio_fd, VIDIOC_S_CTRL, &(radio->vctrl))< 0) - { - return MM_ERROR_RADIO_INTERNAL; - } + MMRADIO_LOG_FLEAVE(); return MM_ERROR_NONE; } -int -_mmradio_get_volume(mm_radio_t* radio, int* pVolume) -{ - debug_log("\n"); - - MMRADIO_CHECK_INSTANCE( radio ); - MMRADIO_CHECK_STATE_RETURN_IF_FAIL( radio, MMRADIO_COMMAND_GET_VOLUME ); - - return_val_if_fail(pVolume, MM_ERROR_INVALID_ARGUMENT); - - if ( radio->radio_fd < 0 ) - { - debug_log("radio is not opened yet. returning stored volume [%d]\n", radio->volume); - *pVolume = radio->volume; - return MM_ERROR_NONE; - } - - if (ioctl(radio->radio_fd, VIDIOC_G_CTRL, &(radio->vctrl)) < 0) - { - return MM_ERROR_RADIO_INTERNAL; - } - - radio->volume = (int)(radio->vctrl).value; - *pVolume = radio->volume; - - debug_log("volume : %d\n", *pVolume); - - return MM_ERROR_NONE; -} int -_mmradio_set_frequency(mm_radio_t* radio, int freq) // 87500 ~ 108000 KHz +_mmradio_set_frequency(mm_radio_t* radio, int freq) // unit should be KHz { - debug_log("\n"); + MMRADIO_LOG_FENTER(); MMRADIO_CHECK_INSTANCE( radio ); MMRADIO_CHECK_STATE_RETURN_IF_FAIL( radio, MMRADIO_COMMAND_SET_FREQ ); + MMRADIO_LOG_DEBUG("Setting %d frequency\n", freq); + radio->freq = freq; if (radio->radio_fd < 0) { - debug_log("radio device is not opened yet. just store given frequency [%d]\n", freq); + MMRADIO_LOG_DEBUG("radio device is not opened yet. so, it will be applied\n", freq); return MM_ERROR_NONE; } - if ( freq < FREQUENCY_MIN || freq > FREQUENCY_MAX ) + /* check frequency range */ + if ( freq < radio->region_setting.band_min + || freq > radio->region_setting.band_max ) + { + MMRADIO_LOG_ERROR("out of frequency range\n", freq); return MM_ERROR_INVALID_ARGUMENT; + } + /* set it */ (radio->vf).tuner = 0; - (radio->vf).frequency = (freq * FREQ_FRAC); + (radio->vf).frequency = RADIO_FREQ_FORMAT_SET(freq); if(ioctl(radio->radio_fd, VIDIOC_S_FREQUENCY, &(radio->vf))< 0) { return MM_ERROR_RADIO_NOT_INITIALIZED; } + + MMRADIO_LOG_FLEAVE(); return MM_ERROR_NONE; @@ -389,7 +450,7 @@ int _mmradio_get_frequency(mm_radio_t* radio, int* pFreq) { int freq = 0; - debug_log("\n"); + MMRADIO_LOG_FENTER(); MMRADIO_CHECK_INSTANCE( radio ); MMRADIO_CHECK_STATE_RETURN_IF_FAIL( radio, MMRADIO_COMMAND_GET_FREQ ); @@ -399,33 +460,33 @@ _mmradio_get_frequency(mm_radio_t* radio, int* pFreq) /* just return stored frequency if radio device is not ready */ if ( radio->radio_fd < 0 ) { - debug_log("freq : %d\n", radio->freq); + MMRADIO_LOG_DEBUG("freq : %d\n", radio->freq); *pFreq = radio->freq; return MM_ERROR_NONE; } if (ioctl(radio->radio_fd, VIDIOC_G_FREQUENCY, &(radio->vf)) < 0) { - debug_error("failed to do VIDIOC_G_FREQUENCY\n"); + MMRADIO_LOG_ERROR("failed to do VIDIOC_G_FREQUENCY\n"); return MM_ERROR_RADIO_INTERNAL; } - /* (87500 ~ 108000) */ - freq = (radio->vf).frequency; - freq /= FREQ_FRAC; + freq = RADIO_FREQ_FORMAT_GET((radio->vf).frequency); /* update freq in handle */ radio->freq = freq; *pFreq = radio->freq; + MMRADIO_LOG_FLEAVE(); + return MM_ERROR_NONE; } int _mmradio_mute(mm_radio_t* radio) { - debug_log("\n"); + MMRADIO_LOG_FENTER(); MMRADIO_CHECK_INSTANCE( radio ); MMRADIO_CHECK_STATE_RETURN_IF_FAIL( radio, MMRADIO_COMMAND_MUTE ); @@ -442,6 +503,8 @@ _mmradio_mute(mm_radio_t* radio) { return MM_ERROR_RADIO_NOT_INITIALIZED; } + + MMRADIO_LOG_FLEAVE(); return MM_ERROR_NONE; @@ -450,15 +513,11 @@ _mmradio_mute(mm_radio_t* radio) int _mmradio_unmute(mm_radio_t* radio) { - debug_log("\n"); + MMRADIO_LOG_FENTER(); MMRADIO_CHECK_INSTANCE( radio ); MMRADIO_CHECK_STATE_RETURN_IF_FAIL( radio, MMRADIO_COMMAND_UNMUTE ); - - if (radio->radio_fd < 0) - { - return MM_ERROR_RADIO_NOT_INITIALIZED; - } + MMRADIO_CHECK_DEVICE_STATE( radio ); (radio->vctrl).id = V4L2_CID_AUDIO_MUTE; (radio->vctrl).value = 0; //unmute @@ -467,180 +526,324 @@ _mmradio_unmute(mm_radio_t* radio) { return MM_ERROR_RADIO_NOT_INITIALIZED; } + + MMRADIO_LOG_FLEAVE(); + return MM_ERROR_NONE; - } - + +/* -------------------------------------------------------------------------- + * Name : __mmradio_set_deemphasis + * Desc : apply de-emphasis value to device + * Param : + * [in] radio : radio handle + * Return : zero on success, or negative value with error code + *---------------------------------------------------------------------------*/ int -_mmradio_set_message_callback(mm_radio_t* radio, MMMessageCallback callback, void *user_param) +__mmradio_set_deemphasis(mm_radio_t* radio) { - debug_log("\n"); + int value = 0; + MMRADIO_LOG_FENTER(); + MMRADIO_CHECK_INSTANCE( radio ); - radio->msg_cb = callback; - radio->msg_cb_param = user_param; + /* get de-emphasis */ + switch (radio->region_setting.deemphasis) + { + case MM_RADIO_DEEMPHASIS_50_US: + value = 1;//V4L2_DEEMPHASIS_50_uS; + break; + + case MM_RADIO_DEEMPHASIS_75_US: + value = 2;//V4L2_DEEMPHASIS_75_uS; + break; + + default: + MMRADIO_LOG_ERROR("not availabe de-emphasis value\n"); + return MM_ERROR_COMMON_INVALID_ARGUMENT; + } + + /* set it to device */ + (radio->vctrl).id = (0x009d0000 | 0x900) +1;//V4L2_CID_TUNE_DEEMPHASIS; + (radio->vctrl).value = value; + + if (ioctl(radio->radio_fd, VIDIOC_S_CTRL, &(radio->vctrl)) < 0) + { + MMRADIO_LOG_ERROR("failed to set de-emphasis\n"); + return MM_ERROR_RADIO_INTERNAL; + } - debug_log("msg_cb : 0x%x msg_cb_param : 0x%x\n", (unsigned int)callback, (unsigned int)user_param); + MMRADIO_LOG_FLEAVE(); return MM_ERROR_NONE; } - + +/* -------------------------------------------------------------------------- + * Name : __mmradio_set_band_range + * Desc : apply max and min frequency to device + * Param : + * [in] radio : radio handle + * Return : zero on success, or negative value with error code + *---------------------------------------------------------------------------*/ int -_mmradio_get_state(mm_radio_t* radio, int* pState) +__mmradio_set_band_range(mm_radio_t* radio) { - debug_log("\n"); - int state = 0; - + MMRADIO_LOG_FENTER(); + MMRADIO_CHECK_INSTANCE( radio ); - return_val_if_fail( pState, MM_ERROR_INVALID_ARGUMENT ); - - state = __mmradio_get_state( radio ); - *pState = state; + /* get min and max freq. */ + (radio->vt).rangelow = RADIO_FREQ_FORMAT_SET(radio->region_setting.band_min); + (radio->vt).rangehigh = RADIO_FREQ_FORMAT_SET(radio->region_setting.band_max); + + /* set it to device */ + if (ioctl(radio->radio_fd, VIDIOC_S_TUNER, &(radio->vt)) < 0 ) + { + MMRADIO_LOG_ERROR("failed to set band range\n"); + return MM_ERROR_RADIO_INTERNAL; + } + + MMRADIO_LOG_FLEAVE(); return MM_ERROR_NONE; } int -__mmradio_get_media_volume(unsigned int* value) +_mmradio_set_message_callback(mm_radio_t* radio, MMMessageCallback callback, void *user_param) { - int res = MM_ERROR_NONE; - - debug_log("\n"); + MMRADIO_LOG_FENTER(); - /* get volume value from sound module */ - res = mm_sound_volume_get_value(RADIO_VOLUME_TYPE, value); - MMRADIO_CHECK_RETURN_IF_FAIL(res, "get volume"); - - return res; -} + MMRADIO_CHECK_INSTANCE( radio ); -void -__media_volume_changed(void* param) -{ - mm_radio_t *radio = (mm_radio_t *)param; - int res = MM_ERROR_NONE; - unsigned int value = 0; + radio->msg_cb = callback; + radio->msg_cb_param = user_param; - debug_log("\n"); + MMRADIO_LOG_DEBUG("msg_cb : 0x%x msg_cb_param : 0x%x\n", (unsigned int)callback, (unsigned int)user_param); - if ( __mmradio_get_media_volume(&value) == MM_ERROR_NONE ) - { - res = _mmradio_set_volume(radio, value); - MMRADIO_CHECK_RETURN_IF_FAIL(res, "set chip volume"); + MMRADIO_LOG_FLEAVE(); - debug_log("radio volume is changed as (%d) by volume app\n", value); - } - - return; + return MM_ERROR_NONE; } - -int -__mmradio_register_media_volume_callback(mm_radio_t* radio) + +int +_mmradio_get_state(mm_radio_t* radio, int* pState) { - int res = MM_ERROR_NONE; - - debug_log("\n"); + int state = 0; + MMRADIO_LOG_FENTER(); + MMRADIO_CHECK_INSTANCE( radio ); + return_val_if_fail( pState, MM_ERROR_INVALID_ARGUMENT ); + + state = __mmradio_get_state( radio ); - res = mm_sound_volume_add_callback(RADIO_VOLUME_TYPE, __media_volume_changed, (void* )radio); - MMRADIO_CHECK_RETURN_IF_FAIL(res, "add volume"); - - return res; + *pState = state; + + MMRADIO_LOG_FLEAVE(); + + return MM_ERROR_NONE; } int _mmradio_start(mm_radio_t* radio) { - int res = MM_ERROR_NONE; + int ret = MM_ERROR_NONE; system_audio_route_t policy = SYSTEM_AUDIO_ROUTE_POLICY_DEFAULT; - debug_log("\n"); + MMRADIO_LOG_FENTER(); MMRADIO_CHECK_INSTANCE( radio ); MMRADIO_CHECK_STATE_RETURN_IF_FAIL( radio, MMRADIO_COMMAND_START ); - debug_log("now tune to frequency : %d\n", radio->freq); + MMRADIO_LOG_DEBUG("now tune to frequency : %d\n", radio->freq); - /* chip volume should also be applied whenever media volume is changed. */ - __mmradio_register_media_volume_callback(radio); - - res = mmradio_asm_set_state(&radio->sm, ASM_STATE_PLAYING, ASM_RESOURCE_RADIO_TUNNER); - if ( res ) + ret = mmradio_asm_set_state(&radio->sm, ASM_STATE_PLAYING, ASM_RESOURCE_RADIO_TUNNER); + if ( ret ) { - debug_error("failed to set asm state to PLAYING\n"); - return res; + MMRADIO_LOG_ERROR("failed to set asm state to PLAYING\n"); + return ret; } /* set stored frequency */ _mmradio_set_frequency( radio, radio->freq ); - /* set stored volume */ - _mmradio_set_volume( radio, radio->volume ); - - /* set sound path with mm-sound policy */ - res = mm_sound_route_get_system_policy(&policy); - - if (res != MM_ERROR_NONE) - { - debug_error("failed to get sound policy\n"); - return res; - } - - debug_log("current sound path policy : %d\n", policy); - - if (policy == SYSTEM_AUDIO_ROUTE_POLICY_HANDSET_ONLY) - __mmradio_set_sound_path(MM_RADIO_OUTPUT_SPEAKER); - else - __mmradio_set_sound_path(MM_RADIO_OUTPUT_HEADSET); - /* unmute */ if( _mmradio_unmute(radio) != MM_ERROR_NONE) return MM_ERROR_RADIO_NOT_INITIALIZED; - /* set audio state */ - _mmradio_audio_state_update( true ); - MMRADIO_SET_STATE( radio, MM_RADIO_STATE_PLAYING ); +#ifdef USE_GST_PIPELINE + ret = _mmradio_start_pipeline( radio ); + if ( ret ) { + debug_error("_mmradio_start_pipeline is failed\n"); + return ret; + } +#endif + + MMRADIO_LOG_FLEAVE(); - return res; + return ret; } int _mmradio_stop(mm_radio_t* radio) { - int res = MM_ERROR_NONE; + int ret = MM_ERROR_NONE; - debug_log("\n"); + MMRADIO_LOG_FENTER(); MMRADIO_CHECK_INSTANCE( radio ); MMRADIO_CHECK_STATE_RETURN_IF_FAIL( radio, MMRADIO_COMMAND_STOP ); - _mmradio_audio_state_update( false ); - if( _mmradio_mute(radio) != MM_ERROR_NONE) return MM_ERROR_RADIO_NOT_INITIALIZED; - __mmradio_set_sound_path(MM_RADIO_OUTPUT_NONE); - MMRADIO_SET_STATE( radio, MM_RADIO_STATE_READY ); - res = mmradio_asm_set_state(&radio->sm, ASM_STATE_STOP, ASM_RESOURCE_NONE); - if ( res ) + ret = mmradio_asm_set_state(&radio->sm, ASM_STATE_STOP, ASM_RESOURCE_NONE); + if ( ret ) { - debug_error("failed to set asm state to PLAYING\n"); - return res; + MMRADIO_LOG_ERROR("failed to set asm state to PLAYING\n"); + return ret; } +#ifdef USE_GST_PIPELINE + ret= _mmradio_stop_pipeline( radio ); + if ( ret ) { + debug_error("_mmradio_stop_pipeline is failed\n"); + return ret; + } +#endif - return MM_ERROR_NONE; + MMRADIO_LOG_FLEAVE(); + + return ret; } +#ifdef USE_GST_PIPELINE int -_mmradio_seek(mm_radio_t* radio, MMRadioSeekDirectionType direction) +_mmradio_realize_pipeline(mm_radio_t* radio) { + int ret = MM_ERROR_NONE; + + gst_init (NULL, NULL); + radio->pGstreamer_s = g_new0 (mm_radio_gstreamer_s, 1); + + radio->pGstreamer_s->pipeline= gst_pipeline_new ("avsysaudio"); + + radio->pGstreamer_s->avsysaudiosrc= gst_element_factory_make("avsysaudiosrc","fm audio src"); + radio->pGstreamer_s->queue2= gst_element_factory_make("queue2","queue2"); + radio->pGstreamer_s->avsysaudiosink= gst_element_factory_make("avsysaudiosink","audio sink"); + + g_object_set(radio->pGstreamer_s->avsysaudiosrc, "latency", 2, NULL); + g_object_set(radio->pGstreamer_s->avsysaudiosink, "sync", false, NULL); + + if (!radio->pGstreamer_s->pipeline || !radio->pGstreamer_s->avsysaudiosrc || !radio->pGstreamer_s->queue2 || !radio->pGstreamer_s->avsysaudiosink) { + mmf_debug(MMF_DEBUG_ERROR,"[%s][%05d] One element could not be created. Exiting.\n", __func__, __LINE__); + return MM_ERROR_RADIO_NOT_INITIALIZED; + } + + gst_bin_add_many(GST_BIN(radio->pGstreamer_s->pipeline), + radio->pGstreamer_s->avsysaudiosrc, + radio->pGstreamer_s->queue2, + radio->pGstreamer_s->avsysaudiosink, + NULL); + if(!gst_element_link_many( + radio->pGstreamer_s->avsysaudiosrc, + radio->pGstreamer_s->queue2, + radio->pGstreamer_s->avsysaudiosink, + NULL)) { + mmf_debug(MMF_DEBUG_ERROR,"[%s][%05d] Fail to link b/w appsrc and ffmpeg in rotate\n", __func__, __LINE__); + return MM_ERROR_RADIO_NOT_INITIALIZED; + } + return ret; +} + +int +_mmradio_start_pipeline(mm_radio_t* radio) +{ + int ret = MM_ERROR_NONE; + GstStateChangeReturn ret_state; debug_log("\n"); + + if(gst_element_set_state (radio->pGstreamer_s->pipeline, GST_STATE_PLAYING) == GST_STATE_CHANGE_FAILURE) { + mmf_debug(MMF_DEBUG_ERROR, "Fail to change pipeline state"); + gst_object_unref (radio->pGstreamer_s->pipeline); + g_free (radio->pGstreamer_s); + return MM_ERROR_RADIO_INVALID_STATE; + } + + ret_state = gst_element_get_state (radio->pGstreamer_s->pipeline, NULL, NULL, GST_CLOCK_TIME_NONE); + if (ret_state == GST_STATE_CHANGE_FAILURE) { + mmf_debug(MMF_DEBUG_ERROR, "GST_STATE_CHANGE_FAILURE"); + gst_object_unref (radio->pGstreamer_s->pipeline); + g_free (radio->pGstreamer_s); + return MM_ERROR_RADIO_INVALID_STATE; + } else { + mmf_debug (MMF_DEBUG_LOG, "[%s][%05d] GST_STATE_NULL ret_state = %d (GST_STATE_CHANGE_SUCCESS)\n", __func__, __LINE__, ret_state); + } + return ret; +} + +int +_mmradio_stop_pipeline(mm_radio_t* radio) +{ + int ret = MM_ERROR_NONE; + GstStateChangeReturn ret_state; + + debug_log("\n"); + if(gst_element_set_state (radio->pGstreamer_s->pipeline, GST_STATE_READY) == GST_STATE_CHANGE_FAILURE) { + mmf_debug(MMF_DEBUG_ERROR, "Fail to change pipeline state"); + gst_object_unref (radio->pGstreamer_s->pipeline); + g_free (radio->pGstreamer_s); + return MM_ERROR_RADIO_INVALID_STATE; + } + + ret_state = gst_element_get_state (radio->pGstreamer_s->pipeline, NULL, NULL, GST_CLOCK_TIME_NONE); + if (ret_state == GST_STATE_CHANGE_FAILURE) { + mmf_debug(MMF_DEBUG_ERROR, "GST_STATE_CHANGE_FAILURE"); + gst_object_unref (radio->pGstreamer_s->pipeline); + g_free (radio->pGstreamer_s); + return MM_ERROR_RADIO_INVALID_STATE; + } else { + mmf_debug (MMF_DEBUG_LOG, "[%s][%05d] GST_STATE_NULL ret_state = %d (GST_STATE_CHANGE_SUCCESS)\n", __func__, __LINE__, ret_state); + } + return ret; +} + +int +_mmradio_destroy_pipeline(mm_radio_t * radio) +{ + int ret = 0; + GstStateChangeReturn ret_state; + debug_log("\n"); + + if(gst_element_set_state (radio->pGstreamer_s->pipeline, GST_STATE_NULL) == GST_STATE_CHANGE_FAILURE) { + mmf_debug(MMF_DEBUG_ERROR, "Fail to change pipeline state"); + gst_object_unref (radio->pGstreamer_s->pipeline); + g_free (radio->pGstreamer_s); + return MM_ERROR_RADIO_INVALID_STATE; + } + + ret_state = gst_element_get_state (radio->pGstreamer_s->pipeline, NULL, NULL, GST_CLOCK_TIME_NONE); + if (ret_state == GST_STATE_CHANGE_FAILURE) { + mmf_debug(MMF_DEBUG_ERROR, "GST_STATE_CHANGE_FAILURE"); + gst_object_unref (radio->pGstreamer_s->pipeline); + g_free (radio->pGstreamer_s); + return MM_ERROR_RADIO_INVALID_STATE; + } else { + mmf_debug (MMF_DEBUG_LOG, "[%s][%05d] GST_STATE_NULL ret_state = %d (GST_STATE_CHANGE_SUCCESS)\n", __func__, __LINE__, ret_state); + } + gst_object_unref (radio->pGstreamer_s->pipeline); + g_free (radio->pGstreamer_s); + return ret; +} +#endif + +int +_mmradio_seek(mm_radio_t* radio, MMRadioSeekDirectionType direction) +{ + MMRADIO_LOG_FENTER(); MMRADIO_CHECK_INSTANCE( radio ); MMRADIO_CHECK_STATE_RETURN_IF_FAIL( radio, MMRADIO_COMMAND_SEEK ); @@ -650,7 +853,7 @@ _mmradio_seek(mm_radio_t* radio, MMRadioSeekDirectionType direction) if( _mmradio_mute(radio) != MM_ERROR_NONE) return MM_ERROR_RADIO_NOT_INITIALIZED; - debug_log("trying to seek. direction[0:UP/1:DOWN) %d\n", direction); + MMRADIO_LOG_DEBUG("trying to seek. direction[0:UP/1:DOWN) %d\n", direction); radio->seek_direction = direction; ret = pthread_create(&radio->seek_thread, NULL, @@ -658,18 +861,20 @@ _mmradio_seek(mm_radio_t* radio, MMRadioSeekDirectionType direction) if ( ret ) { - debug_log("failed create thread\n"); + MMRADIO_LOG_DEBUG("failed create thread\n"); return MM_ERROR_RADIO_INTERNAL; } + MMRADIO_LOG_FLEAVE(); + return MM_ERROR_NONE; } int _mmradio_start_scan(mm_radio_t* radio) { - debug_log("\n"); - + MMRADIO_LOG_FENTER(); + MMRADIO_CHECK_INSTANCE( radio ); MMRADIO_CHECK_STATE_RETURN_IF_FAIL( radio, MMRADIO_COMMAND_START_SCAN ); @@ -677,26 +882,26 @@ _mmradio_start_scan(mm_radio_t* radio) radio->stop_scan = false; - scan_tr_id = pthread_create(&radio->scan_thread, NULL, + scan_tr_id = pthread_create(&radio->scan_thread, NULL, (void *)__mmradio_scan_thread, (void *)radio); if (scan_tr_id != 0) { - debug_log("failed to create thread : scan\n"); + MMRADIO_LOG_DEBUG("failed to create thread : scan\n"); return MM_ERROR_RADIO_NOT_INITIALIZED; } - pthread_detach(radio->scan_thread); - MMRADIO_SET_STATE( radio, MM_RADIO_STATE_SCANNING ); + MMRADIO_LOG_FLEAVE(); + return MM_ERROR_NONE; } int _mmradio_stop_scan(mm_radio_t* radio) { - debug_log("\n"); + MMRADIO_LOG_FENTER(); MMRADIO_CHECK_INSTANCE( radio ); MMRADIO_CHECK_STATE_RETURN_IF_FAIL( radio, MMRADIO_COMMAND_STOP_SCAN ); @@ -705,116 +910,16 @@ _mmradio_stop_scan(mm_radio_t* radio) if( radio->scan_thread > 0 ) { + pthread_cancel(radio->scan_thread); pthread_join(radio->scan_thread, NULL); radio->scan_thread = 0; } MMRADIO_SET_STATE( radio, MM_RADIO_STATE_READY ); MMRADIO_POST_MSG(radio, MM_MESSAGE_RADIO_SCAN_STOP, NULL); - - return MM_ERROR_NONE; -} - -int -_mmradio_set_sound_path(mm_radio_t* radio, MMRadioOutputType path ) -{ - int res = MM_ERROR_NONE; - - debug_log("\n"); - - MMRADIO_CHECK_INSTANCE( radio ); - - /* set sound path */ - radio->path = path; - debug_log("path : %d\n", radio->path); - /* apply sound path */ - res = __mmradio_set_sound_path( radio->path ); - - return res; -} - -int -_mmradio_release_sound_path() -{ - debug_log("\n"); - - return __mmradio_set_sound_path( MM_RADIO_OUTPUT_NONE ); -} - -int -_mmradio_audio_state_update(bool onoff) -{ - debug_log("\n"); - - return avsys_audio_set_ext_device_status(AVSYS_AUDIO_EXT_DEVICE_FMRADIO, onoff); -} - -int -_mmradio_get_sound_path(mm_radio_t* radio, MMRadioOutputType* pPath ) -{ - debug_log("\n"); - - MMRADIO_CHECK_INSTANCE( radio ); - return_val_if_fail(pPath, MM_ERROR_INVALID_ARGUMENT); - - *pPath = radio->path; - debug_log("sound path : %d\n", *pPath); - - return MM_ERROR_NONE; -} - -int -__mmradio_set_sound_path(MMRadioOutputType path) -{ - int res = MM_ERROR_NONE; - int output_path = 0; - int input_path = AVSYS_AUDIO_PATH_EX_FMINPUT; //MM_SOUND_PATH_FMINPUT; - - debug_log("\n"); + MMRADIO_LOG_FLEAVE(); - - switch(path) - { - case MM_RADIO_OUTPUT_NONE: - output_path = AVSYS_AUDIO_PATH_EX_NONE; //MM_SOUND_PATH_NONE; - input_path = AVSYS_AUDIO_PATH_EX_NONE; //MM_SOUND_PATH_NONE; - break; - - case MM_RADIO_OUTPUT_SPEAKER: - output_path = AVSYS_AUDIO_PATH_EX_SPK; //MM_SOUND_PATH_SPK; - break; - - case MM_RADIO_OUTPUT_HEADSET: - output_path = AVSYS_AUDIO_PATH_EX_HEADSET; //MM_SOUND_PATH_HEADSET; - break; - - case MM_RADIO_OUTPUT_AUTO: - { - debug_error("automatic sound path is not implemented yet\n"); - debug_error("this option can be valid only if hw supports internal antenna\n"); - return MM_ERROR_RADIO_INTERNAL; - } - break; - - default: - return MM_ERROR_RADIO_INTERNAL; - break; - } - - res = avsys_audio_set_path_ex( AVSYS_AUDIO_GAIN_EX_FMRADIO, - output_path, - input_path, - AVSYS_AUDIO_PATH_OPTION_NONE ); - - if ( AVSYS_FAIL(res) ) - { - debug_warning("failed to set sound path\n"); - return res; - } - - debug_log("setting sound path finished\n"); - return MM_ERROR_NONE; } @@ -823,17 +928,20 @@ __mmradio_scan_thread(mm_radio_t* radio) { int ret = 0; int prev_freq = 0; - struct v4l2_hw_freq_seek vs = {0,}; vs.tuner = TUNER_INDEX; vs.type = V4L2_TUNER_RADIO; vs.wrap_around = 0; /* around:1 not around:0 */ vs.seek_upward = 1; /* up : 1 ------- down : 0 */ + MMRADIO_LOG_FENTER(); + + MMRADIO_CHECK_INSTANCE( radio ); + if( _mmradio_mute(radio) != MM_ERROR_NONE) goto FINISHED; - if( _mmradio_set_frequency(radio, FREQUENCY_MIN ) != MM_ERROR_NONE) + if( _mmradio_set_frequency(radio, radio->region_setting.band_min) != MM_ERROR_NONE) goto FINISHED; MMRADIO_POST_MSG(radio, MM_MESSAGE_RADIO_SCAN_START, NULL); @@ -844,24 +952,24 @@ __mmradio_scan_thread(mm_radio_t* radio) int freq = 0; MMMessageParamType param = {0,}; - debug_log("scanning....\n"); + MMRADIO_LOG_DEBUG("scanning....\n"); ret = ioctl(radio->radio_fd, VIDIOC_S_HW_FREQ_SEEK, &vs); if( ret == -1 ) { if ( errno == EAGAIN ) { - debug_error("scanning timeout\n"); + MMRADIO_LOG_ERROR("scanning timeout\n"); continue; } else if ( errno == EINVAL ) { - debug_error("The tuner index is out of bounds or the value in the type field is wrong."); + MMRADIO_LOG_ERROR("The tuner index is out of bounds or the value in the type field is wrong."); break; } else { - debug_error("Error: %s, %d\n", strerror(errno), errno); + MMRADIO_LOG_ERROR("Error: %s, %d\n", strerror(errno), errno); break; } } @@ -873,13 +981,13 @@ __mmradio_scan_thread(mm_radio_t* radio) ret = _mmradio_get_frequency(radio, &freq); if ( ret ) { - debug_error("failed to get current frequency\n"); + MMRADIO_LOG_ERROR("failed to get current frequency\n"); } else { if ( freq < prev_freq ) { - debug_log("scanning wrapped around. stopping scan\n"); + MMRADIO_LOG_DEBUG("scanning wrapped around. stopping scan\n"); break; } @@ -887,21 +995,20 @@ __mmradio_scan_thread(mm_radio_t* radio) continue; prev_freq = param.radio_scan.frequency = freq; - debug_log("scanning : new frequency : [%d]\n", param.radio_scan.frequency); + MMRADIO_LOG_DEBUG("scanning : new frequency : [%d]\n", param.radio_scan.frequency); /* drop if max freq is scanned */ - if (param.radio_scan.frequency == FREQUENCY_MAX ) + if (radio, param.radio_scan.frequency == radio->region_setting.band_max ) { - debug_log("%d freq is dropping...and stopping scan\n", param.radio_scan.frequency); + MMRADIO_LOG_DEBUG("%d freq is dropping...and stopping scan\n", param.radio_scan.frequency); break; } - if ( radio->stop_scan ) break; // don't need to post + if ( radio->stop_scan ) break; // doesn't need to post MMRADIO_POST_MSG(radio, MM_MESSAGE_RADIO_SCAN_INFO, ¶m); } } - FINISHED: radio->scan_thread = 0; @@ -912,16 +1019,25 @@ FINISHED: MMRADIO_POST_MSG(radio, MM_MESSAGE_RADIO_SCAN_FINISH, NULL); } + MMRADIO_LOG_FLEAVE(); + pthread_exit(NULL); + return; } bool -__is_tunable_frequency(int freq) +__is_tunable_frequency(mm_radio_t* radio, int freq) { - if ( freq == FREQUENCY_MAX || freq == FREQUENCY_MIN ) + MMRADIO_LOG_FENTER(); + + MMRADIO_CHECK_INSTANCE( radio ); + + if ( freq == radio->region_setting.band_max|| freq == radio->region_setting.band_min ) return false; + MMRADIO_LOG_FLEAVE(); + return true; } @@ -938,6 +1054,10 @@ __mmradio_seek_thread(mm_radio_t* radio) vs.type = V4L2_TUNER_RADIO; vs.wrap_around = DEFAULT_WRAP_AROUND; + MMRADIO_LOG_FENTER(); + + MMRADIO_CHECK_INSTANCE( radio ); + /* check direction */ switch( radio->seek_direction ) { @@ -951,7 +1071,7 @@ __mmradio_seek_thread(mm_radio_t* radio) MMRADIO_POST_MSG(radio, MM_MESSAGE_RADIO_SEEK_START, NULL); - debug_log("seeking....\n"); + MMRADIO_LOG_DEBUG("seeking....\n"); while ( ! seek_stop ) { @@ -962,17 +1082,17 @@ __mmradio_seek_thread(mm_radio_t* radio) if ( errno == EAGAIN ) { /* FIXIT : we need retrying code here */ - debug_error("scanning timeout\n"); + MMRADIO_LOG_ERROR("scanning timeout\n"); goto SEEK_FAILED; } else if ( errno == EINVAL ) { - debug_error("The tuner index is out of bounds or the value in the type field is wrong."); + MMRADIO_LOG_ERROR("The tuner index is out of bounds or the value in the type field is wrong."); goto SEEK_FAILED; } else { - debug_error("Error: %s, %d\n", strerror(errno), errno); + MMRADIO_LOG_ERROR("Error: %s, %d\n", strerror(errno), errno); goto SEEK_FAILED; } } @@ -981,26 +1101,26 @@ __mmradio_seek_thread(mm_radio_t* radio) ret = _mmradio_get_frequency(radio, &freq); if ( ret ) { - debug_error("failed to get current frequency\n"); + MMRADIO_LOG_ERROR("failed to get current frequency\n"); goto SEEK_FAILED; } - debug_log("found frequency = %d\n", freq); + MMRADIO_LOG_DEBUG("found frequency = %d\n", freq); /* if same freq is found, ignore it and search next one. */ if ( freq == radio->prev_seek_freq ) { - debug_log("It's same with previous one(%d). So, trying next one. \n", freq); + MMRADIO_LOG_DEBUG("It's same with previous one(%d). So, trying next one. \n", freq); continue; } - if ( __is_tunable_frequency(freq) ) + if ( __is_tunable_frequency(radio, freq) ) // check if it's limit freq or not { /* now tune to new frequency */ ret = _mmradio_set_frequency(radio, freq); if ( ret ) { - debug_error("failed to tune to new frequency\n"); + MMRADIO_LOG_ERROR("failed to tune to new frequency\n"); goto SEEK_FAILED; } } @@ -1012,17 +1132,20 @@ __mmradio_seek_thread(mm_radio_t* radio) ret = _mmradio_unmute(radio); if ( ret ) { - debug_error("failed to tune to new frequency\n"); + MMRADIO_LOG_ERROR("failed to tune to new frequency\n"); goto SEEK_FAILED; } param.radio_scan.frequency = radio->prev_seek_freq = freq; - debug_log("seeking : new frequency : [%d]\n", param.radio_scan.frequency); + MMRADIO_LOG_DEBUG("seeking : new frequency : [%d]\n", param.radio_scan.frequency); MMRADIO_POST_MSG(radio, MM_MESSAGE_RADIO_SEEK_FINISH, ¶m); seek_stop = true; } radio->seek_thread = 0; + + MMRADIO_LOG_FLEAVE(); + pthread_exit(NULL); return; @@ -1037,7 +1160,9 @@ SEEK_FAILED: static bool __mmradio_post_message(mm_radio_t* radio, enum MMMessageType msgtype, MMMessageParamType* param) { - return_val_if_fail( radio, false ); + MMRADIO_CHECK_INSTANCE( radio ); + + MMRADIO_LOG_FENTER(); if ( !radio->msg_cb ) { @@ -1045,9 +1170,12 @@ __mmradio_post_message(mm_radio_t* radio, enum MMMessageType msgtype, MMMessageP return false; } - debug_log("address of msg_cb : %d\n", radio->msg_cb); + MMRADIO_LOG_DEBUG("address of msg_cb : %d\n", radio->msg_cb); radio->msg_cb(msgtype, param, radio->msg_cb_param); + + MMRADIO_LOG_FLEAVE(); + return true; } @@ -1056,11 +1184,13 @@ static int { MMRadioStateType radio_state = MM_RADIO_STATE_NUM; - return_val_if_fail(radio, MM_ERROR_RADIO_NOT_INITIALIZED); + MMRADIO_LOG_FENTER(); + + MMRADIO_CHECK_INSTANCE( radio ); radio_state = __mmradio_get_state( radio ); - debug_log("incomming command : %d current state : %d\n", command, radio_state); + MMRADIO_LOG_DEBUG("incomming command : %d current state : %d\n", command, radio_state); switch( command ) { @@ -1133,14 +1263,11 @@ static int break; case MMRADIO_COMMAND_DESTROY: - case MMRADIO_COMMAND_SET_VOLUME: - case MMRADIO_COMMAND_GET_VOLUME: case MMRADIO_COMMAND_MUTE: case MMRADIO_COMMAND_UNMUTE: case MMRADIO_COMMAND_SET_FREQ: case MMRADIO_COMMAND_GET_FREQ: - case MMRADIO_COMMAND_SET_SOUND_PATH: - case MMRADIO_COMMAND_GET_SOUND_PATH: + case MMRADIO_COMMAND_SET_REGION: { /* we can do it at any state */ } @@ -1153,26 +1280,37 @@ static int } break; + case MMRADIO_COMMAND_GET_REGION: + { + if ( radio_state == MM_RADIO_STATE_NULL ) + goto INVALID_STATE; + } + break; + default: - debug_log("not handled in FSM. don't care it\n"); + MMRADIO_LOG_DEBUG("not handled in FSM. don't care it\n"); break; } - debug_log("status OK\n"); + MMRADIO_LOG_DEBUG("status OK\n"); radio->cmd = command; + MMRADIO_LOG_FLEAVE(); + return MM_ERROR_NONE; INVALID_STATE: debug_warning("invalid state. current : %d command : %d\n", radio_state, command); + MMRADIO_LOG_FLEAVE(); return MM_ERROR_RADIO_INVALID_STATE; NO_OP: debug_warning("mm-radio is in the desired state(%d). doing noting\n", radio_state); + MMRADIO_LOG_FLEAVE(); return MM_ERROR_RADIO_NO_OP; } @@ -1182,7 +1320,10 @@ __mmradio_set_state(mm_radio_t* radio, int new_state) { MMMessageParamType msg = {0, }; int msg_type = MM_MESSAGE_UNKNOWN; - + + MMRADIO_LOG_FENTER(); + MMRADIO_CHECK_INSTANCE( radio ); + if ( ! radio ) { debug_warning("calling set_state with invalid radio handle\n"); @@ -1227,15 +1368,17 @@ __mmradio_set_state(mm_radio_t* radio, int new_state) break; } + MMRADIO_LOG_FLEAVE(); + return true; } static int __mmradio_get_state(mm_radio_t* radio) { - return_val_if_fail(radio, MM_ERROR_RADIO_NOT_INITIALIZED); + MMRADIO_CHECK_INSTANCE( radio ); - debug_log("radio state : current : [%d] old : [%d] pending : [%d]\n", + MMRADIO_LOG_DEBUG("radio state : current : [%d] old : [%d] pending : [%d]\n", radio->current_state, radio->old_state, radio->pending_state ); return radio->current_state; @@ -1248,6 +1391,8 @@ __mmradio_asm_callback(int handle, ASM_event_sources_t event_source, ASM_sound_c int result = MM_ERROR_NONE; ASM_cb_result_t cb_res = ASM_CB_RES_NONE; + MMRADIO_LOG_FENTER(); + radio->sm.event_src = event_source; switch(command) @@ -1255,24 +1400,25 @@ __mmradio_asm_callback(int handle, ASM_event_sources_t event_source, ASM_sound_c case ASM_COMMAND_STOP: case ASM_COMMAND_PAUSE: { - debug_log("ASM asked me to stop. cmd : %d\n", command); + MMRADIO_LOG_DEBUG("ASM asked me to stop. cmd : %d\n", command); switch(event_source) { case ASM_EVENT_SOURCE_CALL_START: case ASM_EVENT_SOURCE_ALARM_START: + case ASM_EVENT_SOURCE_EARJACK_UNPLUG: + case ASM_EVENT_SOURCE_OTHER_APP: { radio->sm.by_asm_cb = MMRADIO_ASM_CB_POSTMSG; result = _mmradio_stop(radio); if( result ) { - debug_error("failed to stop radio\n"); + MMRADIO_LOG_ERROR("failed to stop radio\n"); } - debug_log("skip unrealize in asm callback") + MMRADIO_LOG_DEBUG("skip unrealize in asm callback") } break; - case ASM_EVENT_SOURCE_OTHER_APP: case ASM_EVENT_SOURCE_RESOURCE_CONFLICT: default: { @@ -1280,14 +1426,14 @@ __mmradio_asm_callback(int handle, ASM_event_sources_t event_source, ASM_sound_c result = _mmradio_stop(radio); if( result ) { - debug_error("failed to stop radio\n"); + MMRADIO_LOG_ERROR("failed to stop radio\n"); } radio->sm.by_asm_cb = MMRADIO_ASM_CB_POSTMSG; result = _mmradio_unrealize(radio); if ( result ) { - debug_error("failed to unrealize radio\n"); + MMRADIO_LOG_ERROR("failed to unrealize radio\n"); } } break; @@ -1303,7 +1449,7 @@ __mmradio_asm_callback(int handle, ASM_event_sources_t event_source, ASM_sound_c msg.union_type = MM_MSG_UNION_CODE; msg.code = event_source; - debug_log("Got ASM resume message by %d\n", msg.code); + MMRADIO_LOG_DEBUG("Got ASM resume message by %d\n", msg.code); MMRADIO_POST_MSG(radio, MM_MESSAGE_READY_TO_RESUME, &msg); cb_res = ASM_CB_RES_IGNORE; @@ -1315,5 +1461,36 @@ __mmradio_asm_callback(int handle, ASM_event_sources_t event_source, ASM_sound_c break; } + MMRADIO_LOG_FLEAVE(); + return cb_res; -} \ No newline at end of file +} + +int _mmradio_get_region_type(mm_radio_t*radio, MMRadioRegionType *type) +{ + MMRADIO_LOG_FENTER(); + MMRADIO_CHECK_INSTANCE( radio ); + MMRADIO_CHECK_STATE_RETURN_IF_FAIL( radio, MMRADIO_COMMAND_GET_REGION ); + + return_val_if_fail( type, MM_ERROR_INVALID_ARGUMENT ); + + *type = radio->region_setting.country; + + MMRADIO_LOG_FLEAVE(); + return MM_ERROR_NONE; +} + +int _mmradio_get_region_frequency_range(mm_radio_t* radio, unsigned int *min_freq, unsigned int *max_freq) +{ + MMRADIO_LOG_FENTER(); + MMRADIO_CHECK_INSTANCE( radio ); + MMRADIO_CHECK_STATE_RETURN_IF_FAIL( radio, MMRADIO_COMMAND_GET_REGION ); + + return_val_if_fail( min_freq && max_freq, MM_ERROR_INVALID_ARGUMENT ); + + *min_freq = radio->region_setting.band_min; + *max_freq = radio->region_setting.band_max; + + MMRADIO_LOG_FLEAVE(); + return MM_ERROR_NONE; +} diff --git a/test/Makefile.in b/test/Makefile.in deleted file mode 100644 index f0d6b35..0000000 --- a/test/Makefile.in +++ /dev/null @@ -1,565 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -bin_PROGRAMS = mm_radio_testsuite$(EXEEXT) -subdir = test -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" -PROGRAMS = $(bin_PROGRAMS) -am_mm_radio_testsuite_OBJECTS = \ - mm_radio_testsuite-mm_radio_testsuite.$(OBJEXT) \ - mm_radio_testsuite-mm_radio_rt_api_test.$(OBJEXT) -mm_radio_testsuite_OBJECTS = $(am_mm_radio_testsuite_OBJECTS) -am__DEPENDENCIES_1 = -mm_radio_testsuite_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) \ - $(mm_radio_testsuite_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(mm_radio_testsuite_SOURCES) -DIST_SOURCES = $(mm_radio_testsuite_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUDIOSESSIONMGR_CFLAGS = @AUDIOSESSIONMGR_CFLAGS@ -AUDIOSESSIONMGR_LIBS = @AUDIOSESSIONMGR_LIBS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AVSYSAUDIO_CFLAGS = @AVSYSAUDIO_CFLAGS@ -AVSYSAUDIO_LIBS = @AVSYSAUDIO_LIBS@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MMCOMMON_CFLAGS = @MMCOMMON_CFLAGS@ -MMCOMMON_LIBS = @MMCOMMON_LIBS@ -MMSESSION_CFLAGS = @MMSESSION_CFLAGS@ -MMSESSION_LIBS = @MMSESSION_LIBS@ -MMSOUND_CFLAGS = @MMSOUND_CFLAGS@ -MMSOUND_LIBS = @MMSOUND_LIBS@ -MMTA_CFLAGS = @MMTA_CFLAGS@ -MMTA_LIBS = @MMTA_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -mm_radio_testsuite_SOURCES = mm_radio_testsuite.c \ - mm_radio_rt_api_test.c - -mm_radio_testsuite_CFLAGS = -I$(srcdir)/../src/include \ - $(MMCOMMON_CFLAGS) \ - $(MMTA_CFLAGS) - -mm_radio_testsuite_DEPENDENCIES = $(top_builddir)/src/libmmfradio.la -mm_radio_testsuite_LDADD = $(top_builddir)/src/libmmfradio.la \ - $(MMCOMMON_LIBS) \ - $(MMTA_LIBS) - -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign test/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -mm_radio_testsuite$(EXEEXT): $(mm_radio_testsuite_OBJECTS) $(mm_radio_testsuite_DEPENDENCIES) - @rm -f mm_radio_testsuite$(EXEEXT) - $(mm_radio_testsuite_LINK) $(mm_radio_testsuite_OBJECTS) $(mm_radio_testsuite_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mm_radio_testsuite-mm_radio_rt_api_test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mm_radio_testsuite-mm_radio_testsuite.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mm_radio_testsuite-mm_radio_testsuite.o: mm_radio_testsuite.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mm_radio_testsuite_CFLAGS) $(CFLAGS) -MT mm_radio_testsuite-mm_radio_testsuite.o -MD -MP -MF $(DEPDIR)/mm_radio_testsuite-mm_radio_testsuite.Tpo -c -o mm_radio_testsuite-mm_radio_testsuite.o `test -f 'mm_radio_testsuite.c' || echo '$(srcdir)/'`mm_radio_testsuite.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mm_radio_testsuite-mm_radio_testsuite.Tpo $(DEPDIR)/mm_radio_testsuite-mm_radio_testsuite.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mm_radio_testsuite.c' object='mm_radio_testsuite-mm_radio_testsuite.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mm_radio_testsuite_CFLAGS) $(CFLAGS) -c -o mm_radio_testsuite-mm_radio_testsuite.o `test -f 'mm_radio_testsuite.c' || echo '$(srcdir)/'`mm_radio_testsuite.c - -mm_radio_testsuite-mm_radio_testsuite.obj: mm_radio_testsuite.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mm_radio_testsuite_CFLAGS) $(CFLAGS) -MT mm_radio_testsuite-mm_radio_testsuite.obj -MD -MP -MF $(DEPDIR)/mm_radio_testsuite-mm_radio_testsuite.Tpo -c -o mm_radio_testsuite-mm_radio_testsuite.obj `if test -f 'mm_radio_testsuite.c'; then $(CYGPATH_W) 'mm_radio_testsuite.c'; else $(CYGPATH_W) '$(srcdir)/mm_radio_testsuite.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mm_radio_testsuite-mm_radio_testsuite.Tpo $(DEPDIR)/mm_radio_testsuite-mm_radio_testsuite.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mm_radio_testsuite.c' object='mm_radio_testsuite-mm_radio_testsuite.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mm_radio_testsuite_CFLAGS) $(CFLAGS) -c -o mm_radio_testsuite-mm_radio_testsuite.obj `if test -f 'mm_radio_testsuite.c'; then $(CYGPATH_W) 'mm_radio_testsuite.c'; else $(CYGPATH_W) '$(srcdir)/mm_radio_testsuite.c'; fi` - -mm_radio_testsuite-mm_radio_rt_api_test.o: mm_radio_rt_api_test.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mm_radio_testsuite_CFLAGS) $(CFLAGS) -MT mm_radio_testsuite-mm_radio_rt_api_test.o -MD -MP -MF $(DEPDIR)/mm_radio_testsuite-mm_radio_rt_api_test.Tpo -c -o mm_radio_testsuite-mm_radio_rt_api_test.o `test -f 'mm_radio_rt_api_test.c' || echo '$(srcdir)/'`mm_radio_rt_api_test.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mm_radio_testsuite-mm_radio_rt_api_test.Tpo $(DEPDIR)/mm_radio_testsuite-mm_radio_rt_api_test.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mm_radio_rt_api_test.c' object='mm_radio_testsuite-mm_radio_rt_api_test.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mm_radio_testsuite_CFLAGS) $(CFLAGS) -c -o mm_radio_testsuite-mm_radio_rt_api_test.o `test -f 'mm_radio_rt_api_test.c' || echo '$(srcdir)/'`mm_radio_rt_api_test.c - -mm_radio_testsuite-mm_radio_rt_api_test.obj: mm_radio_rt_api_test.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mm_radio_testsuite_CFLAGS) $(CFLAGS) -MT mm_radio_testsuite-mm_radio_rt_api_test.obj -MD -MP -MF $(DEPDIR)/mm_radio_testsuite-mm_radio_rt_api_test.Tpo -c -o mm_radio_testsuite-mm_radio_rt_api_test.obj `if test -f 'mm_radio_rt_api_test.c'; then $(CYGPATH_W) 'mm_radio_rt_api_test.c'; else $(CYGPATH_W) '$(srcdir)/mm_radio_rt_api_test.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mm_radio_testsuite-mm_radio_rt_api_test.Tpo $(DEPDIR)/mm_radio_testsuite-mm_radio_rt_api_test.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mm_radio_rt_api_test.c' object='mm_radio_testsuite-mm_radio_rt_api_test.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mm_radio_testsuite_CFLAGS) $(CFLAGS) -c -o mm_radio_testsuite-mm_radio_rt_api_test.obj `if test -f 'mm_radio_rt_api_test.c'; then $(CYGPATH_W) 'mm_radio_rt_api_test.c'; else $(CYGPATH_W) '$(srcdir)/mm_radio_rt_api_test.c'; fi` - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: - for dir in "$(DESTDIR)$(bindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-binPROGRAMS - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-binPROGRAMS - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic clean-libtool ctags distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-binPROGRAMS install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am \ - uninstall-binPROGRAMS - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/test/mm_radio_rt_api_test.c b/test/mm_radio_rt_api_test.c index 3516d3a..8affa39 100755 --- a/test/mm_radio_rt_api_test.c +++ b/test/mm_radio_rt_api_test.c @@ -23,7 +23,7 @@ #include "mm_radio.h" #include "mm_radio_rt_api_test.h" -#define MENU_ITEM_MAX 16 +#define MENU_ITEM_MAX 18 static int __menu(void); static void __call_api( int choosen ); @@ -86,7 +86,7 @@ void __call_api( int choosen ) case 10: { - MMRadioSeekDirectionType direction = 0; + int direction = 0; printf("input seek direction(0:UP/1:DOWN) : "); scanf("%d", &direction); RADIO_TEST__( mm_radio_seek(g_my_radio, direction); ) @@ -123,24 +123,32 @@ void __call_api( int choosen ) } break; - case 15: - { - MMRadioOutputType path = 0; - printf("input path(0:NONE/1:AUTO/2:SPK/3:EAR) : "); - scanf("%d", &path); - RADIO_TEST__( mm_radio_set_sound_path(g_my_radio, path); ) - } - break; - case 16: { - bool muted = 0; + int muted = 0; printf("select one(0:UNMUTE/1:MUTE) : "); scanf("%d", &muted); RADIO_TEST__( mm_radio_set_mute(g_my_radio, muted); ) } break; + case 17: + { + MMRadioRegionType type = 0; + RADIO_TEST__( mm_radio_get_region_type(g_my_radio, &type ); ) + printf("region type : %d\n", type); + } + break; + + case 18: + { + unsigned int min_freq = 0; + unsigned int max_freq = 0; + RADIO_TEST__( mm_radio_get_region_frequency_range(g_my_radio, &min_freq, &max_freq ); ) + printf("region band range: %d ~ %d KHz\n", min_freq, max_freq); + } + break; + default: break; } @@ -188,8 +196,9 @@ int __menu(void) printf("[12] mm_radio_get_frequency\n"); printf("[13] mm_radio_scan_start\n"); printf("[14] mm_radio_scan_stop\n"); - printf("[15] mm_radio_set_sound_path\n"); printf("[16] mm_radio_set_mute\n"); + printf("[17] mm_radio_get_region_type\n"); + printf("[18] mm_radio_get_region_frequency_range\n"); printf("[0] quit\n"); printf("---------------------------------------------------------\n"); printf("choose one : "); diff --git a/test/mm_radio_test_type.h b/test/mm_radio_test_type.h index 42bf69d..ead49e9 100755 --- a/test/mm_radio_test_type.h +++ b/test/mm_radio_test_type.h @@ -43,7 +43,7 @@ typedef struct __test_item } \ else \ { \ - printf("FAIL : %s ERR-CODE : %d -- %s:%d\n", #x_test, ret, __FILE__, __LINE__); \ + printf("FAIL : %s ERR-CODE : 0x%x -- %s:%d\n", #x_test, ret, __FILE__, __LINE__); \ } #endif /* MM_RADIO_TEST_TYPE_H_ */ diff --git a/test/mm_radio_testsuite.c b/test/mm_radio_testsuite.c index e82d777..53b468f 100755 --- a/test/mm_radio_testsuite.c +++ b/test/mm_radio_testsuite.c @@ -27,7 +27,9 @@ #include "mm_radio.h" #include "mm_radio_test_type.h" +#include "mm_radio_rt_api_test.h" +#define DEFAULT_TEST_FREQ 107700 /* test items...*/ int __test_radio_init(void); @@ -37,6 +39,7 @@ int __test_repeat_start_stop(void); int __test_repeat_seek(void); int __test_repeat_whole(void); int __test_manual_api_calling(void); +int __test_radio_hw_debug(void); static int __msg_callback(int message, void *param, void *user_param); @@ -201,7 +204,7 @@ static int __msg_callback(int message, void *pParam, void *user_param) break; case MM_MESSAGE_RADIO_SCAN_INFO: assert(param); - printf("MM_MESSAGE_RADIO_SCAN_INFO : freq : %d\n", param->radio_scan.frequency); + printf("MM_MESSAGE_RADIO_SCAN_INFO : freq : %d KHz\n", param->radio_scan.frequency); break; case MM_MESSAGE_RADIO_SCAN_STOP: printf("MM_MESSAGE_RADIO_SCAN_STOP\n"); @@ -214,7 +217,7 @@ static int __msg_callback(int message, void *pParam, void *user_param) printf("MM_MESSAGE_RADIO_SEEK_START\n"); break; case MM_MESSAGE_RADIO_SEEK_FINISH: - printf("MM_MESSAGE_RADIO_SEEK_FINISHED : freq : %d\n", param->radio_scan.frequency); + printf("MM_MESSAGE_RADIO_SEEK_FINISHED : freq : %d KHz\n", param->radio_scan.frequency); break; default: printf("ERROR : unknown message received!\n"); @@ -250,7 +253,7 @@ int __test_radio_listen_gorealra(void) RADIO_TEST__( mm_radio_create(&radio); ) RADIO_TEST__( mm_radio_set_message_callback( radio, (MMMessageCallback)__msg_callback, (void*)radio ); ) RADIO_TEST__( mm_radio_realize(radio); ) - RADIO_TEST__( mm_radio_set_frequency( radio, 1077 ); ) + RADIO_TEST__( mm_radio_set_frequency( radio, DEFAULT_TEST_FREQ ); ) RADIO_TEST__( mm_radio_start(radio); ) return ret; @@ -290,7 +293,7 @@ int __test_repeat_start_stop(void) RADIO_TEST__( mm_radio_create(&radio); ) RADIO_TEST__( mm_radio_set_message_callback( radio, (MMMessageCallback)__msg_callback, (void*)radio ); ) RADIO_TEST__( mm_radio_realize(radio); ) - RADIO_TEST__( mm_radio_set_frequency( radio, 1077 ); ) + RADIO_TEST__( mm_radio_set_frequency( radio, DEFAULT_TEST_FREQ ); ) while(1) { @@ -324,3 +327,4 @@ int __test_manual_api_calling(void) return 0; } +