Remove useless parameters(route_info, priority) regarding audio path routing since... 98/112898/2 accepted/tizen/3.0/common/20170213.160907 accepted/tizen/3.0/ivi/20170213.035337 accepted/tizen/3.0/mobile/20170213.035234 accepted/tizen/3.0/tv/20170213.035300 accepted/tizen/3.0/wearable/20170213.035324 submit/tizen_3.0/20170210.094941
authorSangchul Lee <sc11.lee@samsung.com>
Fri, 3 Feb 2017 07:14:30 +0000 (16:14 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Fri, 10 Feb 2017 04:40:32 +0000 (13:40 +0900)
[Version] 0.10.91
[Profile] Common
[Issue Type] Clean up

Change-Id: Ifdce998ae0ac6b32cdb4f1df681161ab11bf6cc4
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
19 files changed:
include/mm_ipc.h
include/mm_sound.h
include/mm_sound_pa_client.h
include/mm_sound_private.h
include/mm_sound_proxy.h
mm_sound.c
mm_sound_client.c
mm_sound_pa_client.c
mm_sound_proxy.c
packaging/libmm-sound.spec
server/include/mm_sound_mgr_codec.h
server/include/mm_sound_mgr_ipc.h
server/include/mm_sound_plugin_codec.h
server/mm_sound_mgr_codec.c
server/mm_sound_mgr_ipc.c
server/mm_sound_mgr_ipc_dbus.c
server/plugin/ogg/mm_sound_plugin_codec_ogg.c
server/plugin/tone/mm_sound_plugin_codec_tone.c
server/plugin/wav/mm_sound_plugin_codec_wave.c

index 243b60f..0e711b1 100644 (file)
@@ -65,7 +65,6 @@ typedef struct
        bool is_connected;
        int changed_device_info_type;
 
-       int route;
        int device_in;
        int device_out;
        int is_available;
@@ -91,8 +90,6 @@ typedef struct
        int volume_config;
        int session_type;
        int session_options;
-       int priority;
-       int handle_route;
 
        bool enable_session;
        bool need_broadcast;
index 2b10cdb..6c78b0f 100644 (file)
@@ -872,11 +872,6 @@ int mm_sound_play_tone (MMSoundTone_t num, int volume_config, const double volum
 int mm_sound_play_tone_with_stream_info(MMSoundTone_t tone, char *stream_type, int stream_id, const double volume, const int duration, int *handle);
 
 /*
- * Enumerations of System audio route policy
- */
-
-
-/*
  * Enumerations of device & route
  */
 
@@ -923,26 +918,6 @@ typedef enum {
 #define MM_SOUND_ROUTE_NUM 16
 #define MM_SOUND_NAME_NUM 32
 
-typedef enum{
-       MM_SOUND_ROUTE_OUT_SPEAKER = MM_SOUND_DEVICE_OUT_SPEAKER, /**< Routing audio output to builtin device such as internal speaker. */
-       MM_SOUND_ROUTE_OUT_RECEIVER = MM_SOUND_DEVICE_OUT_RECEIVER, /**< Routing audio output to builtin device such as internal receiver. */
-       MM_SOUND_ROUTE_OUT_WIRED_ACCESSORY = MM_SOUND_DEVICE_OUT_WIRED_ACCESSORY,/**< Routing audio output to wired accessory such as headphone, headset, and so on. */
-       MM_SOUND_ROUTE_OUT_BLUETOOTH_SCO = MM_SOUND_DEVICE_OUT_BT_SCO, /**< Routing audio output to bluetooth SCO. */
-       MM_SOUND_ROUTE_OUT_BLUETOOTH_A2DP = MM_SOUND_DEVICE_OUT_BT_A2DP, /**< Routing audio output to bluetooth A2DP. */
-       MM_SOUND_ROUTE_OUT_DOCK = MM_SOUND_DEVICE_OUT_DOCK, /**< Routing audio output to DOCK */
-       MM_SOUND_ROUTE_OUT_HDMI = MM_SOUND_DEVICE_OUT_HDMI, /**< Routing audio output to HDMI */
-       MM_SOUND_ROUTE_OUT_MIRRORING = MM_SOUND_DEVICE_OUT_MIRRORING, /**< Routing audio output to MIRRORING */
-       MM_SOUND_ROUTE_OUT_USB_AUDIO = MM_SOUND_DEVICE_OUT_USB_AUDIO, /**< Routing audio output to USB Audio */
-       MM_SOUND_ROUTE_OUT_MULTIMEDIA_DOCK = MM_SOUND_DEVICE_OUT_MULTIMEDIA_DOCK, /**< Routing audio output to Multimedia DOCK */
-       MM_SOUND_ROUTE_IN_MIC = MM_SOUND_DEVICE_IN_MIC, /**< Routing audio input to device builtin mic. */
-       MM_SOUND_ROUTE_IN_WIRED_ACCESSORY = MM_SOUND_DEVICE_IN_WIRED_ACCESSORY, /**< Routing audio input to wired accessory. */
-       MM_SOUND_ROUTE_IN_MIC_OUT_RECEIVER = MM_SOUND_DEVICE_IN_MIC | MM_SOUND_DEVICE_OUT_RECEIVER, /**< Routing audio input to device builtin mic and routing audio output to builtin receiver*/
-       MM_SOUND_ROUTE_IN_MIC_OUT_SPEAKER = MM_SOUND_DEVICE_IN_MIC | MM_SOUND_DEVICE_OUT_SPEAKER , /**< Routing audio input to device builtin mic and routing audio output to builtin speaker */
-       MM_SOUND_ROUTE_IN_MIC_OUT_HEADPHONE = MM_SOUND_DEVICE_IN_MIC | MM_SOUND_DEVICE_OUT_WIRED_ACCESSORY,/**< Routing audio input to device builtin mic and routing audio output to headphone */
-       MM_SOUND_ROUTE_INOUT_HEADSET = MM_SOUND_DEVICE_IN_WIRED_ACCESSORY | MM_SOUND_DEVICE_OUT_WIRED_ACCESSORY,        /**< Routing audio input and output to headset*/
-       MM_SOUND_ROUTE_INOUT_BLUETOOTH = MM_SOUND_DEVICE_IN_BT_SCO | MM_SOUND_DEVICE_OUT_BT_SCO /**< Routing audio input and output to bluetooth SCO */
-} mm_sound_route;
-
 /*
  * MMSound Device APIs
  */
index 38f507a..ca1269f 100644 (file)
 #include "include/mm_sound.h"
 
 typedef enum {
-       HANDLE_ROUTE_POLICY_DEFAULT,
-       HANDLE_ROUTE_POLICY_OUT_AUTO,
-}MMSoundHandleRoutePolicy; /* custom route policy per handle */
-
-typedef enum {
-       HANDLE_PRIORITY_NORMAL,
-}MMSoundHandlePriority;
-
-typedef enum {
        HANDLE_MODE_OUTPUT,                             /**< Output mode of handle */
        HANDLE_MODE_OUTPUT_CLOCK,                       /**< Output mode of gst audio only mode */
        HANDLE_MODE_OUTPUT_VIDEO,                       /**< Output mode of gst video mode */
@@ -52,18 +43,7 @@ typedef enum {
        HANDLE_MODE_NUM,                                        /**< Number of mode */
 }MMSoundHandleMode;
 
-enum mm_sound_handle_direction_t {
-       HANDLE_DIRECTION_NONE,
-};
-
-typedef struct mm_sound_handle_route_info{
-       MMSoundHandleRoutePolicy policy;
-       mm_sound_device_in device_in;
-       mm_sound_device_out device_out;
-       bool do_not_restore;
-}mm_sound_handle_route_info;
-
-int mm_sound_pa_open(MMSoundHandleMode mode, mm_sound_handle_route_info *route_info, MMSoundHandlePriority priority, int volume_config, pa_sample_spec* ss, pa_channel_map* channel_map, int* size, char *stream_type, int stream_index);
+int mm_sound_pa_open(MMSoundHandleMode mode, int volume_config, pa_sample_spec* ss, pa_channel_map* channel_map, int* size, char *stream_type, int stream_index);
 int mm_sound_pa_read(const int handle, void* buf, const int size);
 int mm_sound_pa_write(const int handle, void* buf, const int size);
 int mm_sound_pa_close(const int handle);
index 5f9214e..1a7282b 100644 (file)
 #define MM_SOUND_VOLUME_CONFIG_TYPE(vol) (vol & 0x00FF)
 #define MM_SOUND_VOLUME_CONFIG_GAIN(vol) (vol & 0xFF00)
 
-enum mm_sound_handle_route_t {
-       MM_SOUND_HANDLE_ROUTE_USING_CURRENT,
-};
-
 typedef struct {
        const char                      *filename;              /**< filename to play */
        bool                            skip_session;   /**< skip session control */
@@ -62,9 +58,7 @@ typedef struct {
        void                            *data;                  /**< user data to callback */
        void                            *mem_ptr;               /**< memory buffer to play */
        int                                     mem_size;               /**< size of memory buffer */
-       int                                     handle_route;   /**< 1 for speaker, 0 for current */
        int                                     volume_config;  /**< volume type & volume gain */
-       int                                     priority;               /**< 0 or 1 */
 } MMSoundPlayParam;
 
 /**
index 026dd6a..e79d7ef 100644 (file)
@@ -45,10 +45,9 @@ int mm_sound_proxy_play_tone(int tone, int repeat, int volume, int volume_config
                        bool enable_session, int *codechandle, char *stream_type, int stream_index);
 int mm_sound_proxy_play_tone_with_stream_info(int client_pid, int tone, char *stream_type, int stream_id, int volume, int repeat, int *codechandle);
 int mm_sound_proxy_play_sound(const char* filename, int tone, int repeat, int volume, int volume_config,
-                       int priority, int session_type, int session_options, int client_pid, int handle_route,
-                       bool enable_session, int *codechandle, char *stream_type, int stream_index);
+                       int session_type, int session_options, int client_pid, bool enable_session, int *codechandle, char *stream_type, int stream_index);
 int mm_sound_proxy_play_sound_with_stream_info(const char* filename, int repeat, int volume,
-                       int priority, int client_pid, int handle_route, int *codechandle, char *stream_type, int stream_index);
+                       int client_pid, int *codechandle, char *stream_type, int stream_index);
 int mm_sound_proxy_stop_sound(int handle);
 int mm_sound_proxy_clear_focus(int pid); // Not original focus feature, only for cleaning up tone/wav player internal focus usage.
 int mm_sound_proxy_add_play_sound_end_callback(mm_sound_stop_callback_wrapper_func func, void* userdata, mm_sound_proxy_userdata_free freefunc, unsigned *subs_id);
index 8fc8bdb..ca13ad2 100644 (file)
@@ -240,7 +240,7 @@ int mm_sound_volume_primary_type_get(volume_type_t *type)
 ///////////////////////////////////
 ////     MMSOUND PLAY APIs
 ///////////////////////////////////
-static inline void _mm_sound_fill_play_param(MMSoundPlayParam *param, const char *filename, int volume_config, mm_sound_stop_callback_func callback, void *data, int priority, int handle_route)
+static inline void _mm_sound_fill_play_param(MMSoundPlayParam *param, const char *filename, int volume_config, mm_sound_stop_callback_func callback, void *data)
 {
        param->filename = filename;
        param->volume = 0; //volume value dose not effect anymore
@@ -248,8 +248,6 @@ static inline void _mm_sound_fill_play_param(MMSoundPlayParam *param, const char
        param->data = data;
        param->loop = 1;
        param->volume_config = volume_config;
-       param->priority = priority;
-       param->handle_route = handle_route;
 }
 
 EXPORT_API
@@ -258,7 +256,7 @@ int mm_sound_play_loud_solo_sound(const char *filename, int volume_config, mm_so
        MMSoundPlayParam param = { 0, };
 
     /* FIXME : this function will be deleted */
-       _mm_sound_fill_play_param(&param, filename, volume_config, callback, data, HANDLE_PRIORITY_NORMAL, MM_SOUND_HANDLE_ROUTE_USING_CURRENT);
+       _mm_sound_fill_play_param(&param, filename, volume_config, callback, data);
        return mm_sound_play_sound_ex(&param, handle);
 }
 
@@ -267,7 +265,7 @@ int mm_sound_play_sound(const char *filename, int volume_config, mm_sound_stop_c
 {
        MMSoundPlayParam param = { 0, };
 
-       _mm_sound_fill_play_param(&param, filename, volume_config, callback, data, HANDLE_PRIORITY_NORMAL, MM_SOUND_HANDLE_ROUTE_USING_CURRENT);
+       _mm_sound_fill_play_param(&param, filename, volume_config, callback, data);
        return mm_sound_play_sound_ex(&param, handle);
 }
 
@@ -294,8 +292,6 @@ int mm_sound_play_sound_ex(MMSoundPlayParam *param, int *handle)
                return MM_ERROR_INVALID_ARGUMENT;
        }
 
-       debug_warning ("play sound : priority=[%d], handle_route=[%d]\n", param->priority, param->handle_route);
-
        /* Play sound */
        err = mm_sound_client_play_sound(param, 0, &lhandle);
        if (err < 0) {
@@ -325,8 +321,7 @@ int mm_sound_play_sound_with_stream_info(const char *filename, char *stream_type
        param.volume = 0; //volume value dose not effect anymore
        param.callback = callback;
        param.data = data;
-       param.priority = HANDLE_PRIORITY_NORMAL;
-       param.handle_route = MM_SOUND_HANDLE_ROUTE_USING_CURRENT;
+
        if (loop == 0)
                param.loop = -1;
        else
index 1b9b59f..d547414 100644 (file)
@@ -473,8 +473,7 @@ int mm_sound_client_play_sound(MMSoundPlayParam *param, int tone, int *handle)
 
        mm_sound_convert_volume_type_to_stream_type(volume_type, stream_type);
        ret = mm_sound_proxy_play_sound(param->filename, tone, param->loop, param->volume, param->volume_config,
-                                        param->priority, session_type, session_options, getpid(), param->handle_route,
-                                        !param->skip_session, handle, stream_type, -1);
+                                        session_type, session_options, getpid(), param->skip_session, handle, stream_type, -1);
        if (ret != MM_ERROR_NONE) {
                debug_error("Play Sound Failed");
                goto failed;
@@ -512,7 +511,7 @@ int mm_sound_client_play_sound_with_stream_info(MMSoundPlayParam *param, int *ha
        play_sound_end_callback_data_t *end_cb_data;
 
        ret = mm_sound_proxy_play_sound_with_stream_info(param->filename, param->loop, param->volume,
-                                        param->priority, getpid(), param->handle_route, handle, stream_type, stream_id);
+                                        getpid(), handle, stream_type, stream_id);
        if (ret != MM_ERROR_NONE) {
                debug_error("Play Sound Failed");
                goto failed;
index 9653075..0d9171a 100644 (file)
@@ -37,7 +37,6 @@ typedef struct _mm_sound_handle_t {
     uint32_t handle;
 
     int mode;
-    int policy;
     int volume_type;
     int gain_type;
     int rate;
@@ -169,7 +168,7 @@ gint __mm_sound_handle_comparefunc(gconstpointer a, gconstpointer b)
 }
 
 EXPORT_API
-int mm_sound_pa_open(MMSoundHandleMode mode, mm_sound_handle_route_info *route_info, MMSoundHandlePriority priority, int volume_config, pa_sample_spec* ss, pa_channel_map* channel_map, int* size, char *stream_type, int stream_index)
+int mm_sound_pa_open(MMSoundHandleMode mode, int volume_config, pa_sample_spec* ss, pa_channel_map* channel_map, int* size, char *stream_type, int stream_index)
 {
     pa_simple *s = NULL;
     pa_channel_map maps;
@@ -184,16 +183,10 @@ int mm_sound_pa_open(MMSoundHandleMode mode, mm_sound_handle_route_info *route_i
     int periods_per_buffer = PA_SIMPLE_PERIODS_PER_BUFFER_DEFAULT;
 
     int handle_mode = mode;
-    int handle_inout = HANDLE_DIRECTION_NONE;
     int sample_size = 0;
     pa_proplist *proplist = NULL;
 
     mm_sound_handle_t* handle = NULL;
-    MMSoundHandleRoutePolicy policy = HANDLE_ROUTE_POLICY_DEFAULT;
-
-    if(route_info) {
-        policy = route_info->policy;
-    }
 
     if (ss->channels < MM_SOUND_CHANNEL_MIN || ss->channels > MM_SOUND_CHANNEL_MAX)
         return MM_ERROR_INVALID_ARGUMENT;
@@ -390,7 +383,6 @@ int mm_sound_pa_open(MMSoundHandleMode mode, mm_sound_handle_route_info *route_i
     handle = (mm_sound_handle_t*)malloc(sizeof(mm_sound_handle_t));
     memset(handle, 0, sizeof(mm_sound_handle_t));
     handle->mode = mode;
-    handle->policy = policy;
     handle->volume_type = prop_vol_type;
     handle->gain_type = prop_gain_type;
     handle->rate = ss->rate;
@@ -413,9 +405,9 @@ int mm_sound_pa_open(MMSoundHandleMode mode, mm_sound_handle_route_info *route_i
         goto fail;
     }
 
-    debug_msg("created handle[%d]. mode(%d), policy(%d), volumetype(%d), gain(%d), rate(%d), channels(%d), format(%d), stream_idx(%d), s(%x), source_type(%d) handle_inout(%d)",
-        handle->handle, handle->mode, handle->policy, handle->volume_type, handle->gain_type,
-        handle->rate, handle->channels, ss->format, handle->stream_idx, handle->s, handle->source_type, handle_inout);
+    debug_msg("created handle[%d]. mode(%d), volumetype(%d), gain(%d), rate(%d), channels(%d), format(%d), stream_idx(%d), s(%x), source_type(%d)",
+        handle->handle, handle->mode, handle->volume_type, handle->gain_type,
+        handle->rate, handle->channels, ss->format, handle->stream_idx, handle->s, handle->source_type);
 
     if (proplist)
         pa_proplist_free(proplist);
index 4052d09..552614a 100644 (file)
@@ -582,8 +582,8 @@ int mm_sound_proxy_play_tone(int tone, int repeat, int volume, int volume_config
 
        debug_fenter();
 
-       params = g_variant_new("(iiiiiiibsi)", tone, repeat, volume,
-                     volume_config, session_type, session_options, client_pid , _enable_session, stream_type, stream_index);
+       params = g_variant_new("(iiiiiiibsi)", tone, repeat, volume, volume_config, session_type,
+                     session_options, client_pid , _enable_session, stream_type, stream_index);
        if (params) {
                if ((ret = mm_sound_dbus_method_call_to(AUDIO_PROVIDER_SOUND_SERVER, AUDIO_METHOD_PLAY_DTMF, params, &result)) != MM_ERROR_NONE) {
                        debug_error("dbus play tone failed");
@@ -649,8 +649,8 @@ cleanup:
 }
 
 int mm_sound_proxy_play_sound(const char* filename, int tone, int repeat, int volume, int volume_config,
-                          int priority, int session_type, int session_options, int client_pid, int handle_route,
-                          bool enable_session, int *codechandle, char *stream_type, int stream_index)
+                          int session_type, int session_options, int client_pid, bool enable_session, int *codechandle,
+                          char *stream_type, int stream_index)
 {
        int ret = MM_ERROR_NONE;
        int handle = 0;
@@ -664,8 +664,8 @@ int mm_sound_proxy_play_sound(const char* filename, int tone, int repeat, int vo
 
        debug_fenter();
 
-       params = g_variant_new("(siiiiiiiiibsi)", filename, tone, repeat, volume,
-                     volume_config, priority, session_type, session_options, client_pid, handle_route, _enable_session, stream_type, stream_index);
+       params = g_variant_new("(siiiiiiibsi)", filename, tone, repeat, volume,
+                     volume_config, session_type, session_options, client_pid, _enable_session, stream_type, stream_index);
        if (params) {
                if ((ret = mm_sound_dbus_method_call_to(AUDIO_PROVIDER_SOUND_SERVER, AUDIO_METHOD_PLAY_FILE_START, params, &result)) != MM_ERROR_NONE) {
                        debug_error("dbus play file failed");
@@ -692,7 +692,7 @@ cleanup:
 }
 
 int mm_sound_proxy_play_sound_with_stream_info(const char* filename, int repeat, int volume,
-                               int priority, int client_pid, int handle_route, int *codechandle, char *stream_type, int stream_index)
+                               int client_pid, int *codechandle, char *stream_type, int stream_index)
 {
        int ret = MM_ERROR_NONE;
        int handle = 0;
@@ -705,8 +705,7 @@ int mm_sound_proxy_play_sound_with_stream_info(const char* filename, int repeat,
 
        debug_fenter();
 
-       params = g_variant_new("(siiiiisi)", filename, repeat, volume,
-                       priority, client_pid, handle_route, stream_type, stream_index);
+       params = g_variant_new("(siiisi)", filename, repeat, volume, client_pid, stream_type, stream_index);
        if (params) {
                if ((ret = mm_sound_dbus_method_call_to(AUDIO_PROVIDER_SOUND_SERVER, AUDIO_METHOD_PLAY_FILE_START_WITH_STREAM_INFO, params, &result)) != MM_ERROR_NONE) {
                        debug_error("dbus play file failed");
index a41e881..b74c039 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libmm-sound
 Summary:    MMSound Package contains client lib and sound_server binary
-Version:    0.10.90
+Version:    0.10.91
 Release:    0
 Group:      System/Libraries
 License:    Apache-2.0
index fb49b16..ce7344a 100644 (file)
@@ -47,8 +47,6 @@ typedef struct {
        int samplerate;
        int channels;
        int volume_config;
-       int priority;
-       int handle_route;
        bool enable_session;
        char stream_type[MM_SOUND_STREAM_TYPE_LEN];
        int stream_index;
index 357f711..b8c1b2d 100644 (file)
@@ -31,11 +31,10 @@ int MMSoundMgrIpcInit(void);
 int MMSoundMgrIpcFini(void);
 
 /* Msg processing */
-int _MMSoundMgrIpcPlayFile(char* filename, int tone, int repeat, int volume, int volume_config,
-                          int priority, int session_type, int session_options, int client_pid, int handle_route,
-                          gboolean enable_session, int *codechandle, char *stream_type, int stream_index);
+int _MMSoundMgrIpcPlayFile(char* filename, int tone, int repeat, int volume, int volume_config, int session_type,
+                          int session_options, int client_pid, gboolean enable_session, int *codechandle, char *stream_type, int stream_index);
 int _MMSoundMgrIpcPlayFileWithStreamInfo(char* filename, int repeat, int volume,
-                          int priority, int client_pid, int handle_route, int *codechandle, char *stream_type, int stream_index);
+                          int client_pid, int *codechandle, char *stream_type, int stream_index);
 int _MMSoundMgrIpcStop(int handle);
 #ifdef FOCUS_INTEGRATION
 int _MMSoundMgrIpcClearFocus(int pid);
index b11914c..a419978 100644 (file)
@@ -54,11 +54,9 @@ typedef struct {
        int tone;
        int repeat_count;
        double volume;
-       int priority;
        int volume_config;
        int keytone;
        MMSourceType *source;
-       int handle_route;
        char stream_type[MM_SOUND_STREAM_TYPE_LEN];
        int stream_index;
        pthread_mutex_t *codec_wave_mutex;
index 8dc3591..5c50d97 100644 (file)
@@ -266,11 +266,9 @@ int MMSoundMgrCodecPlay(int *slotid, const mmsound_mgr_codec_param_t *param)
        codec_param.repeat_count = param->repeat_count;
        codec_param.volume = param->volume;
        codec_param.source = param->source;
-       codec_param.priority = param->priority;
        codec_param.stop_cb = _MMSoundMgrCodecStopCallback;
        codec_param.param = *slotid;
        codec_param.pid = (int)param->param;
-       codec_param.handle_route = param->handle_route;
        codec_param.codec_wave_mutex = &codec_wave_mutex;
        codec_param.stream_index = param->stream_index;
        MMSOUND_STRNCPY(codec_param.stream_type, param->stream_type, MM_SOUND_STREAM_TYPE_LEN);
@@ -447,11 +445,9 @@ int MMSoundMgrCodecPlayWithStreamInfo(int *slotid, const mmsound_mgr_codec_param
        codec_param.repeat_count = param->repeat_count;
        codec_param.volume = param->volume;
        codec_param.source = param->source;
-       codec_param.priority = param->priority;
        codec_param.stop_cb = _MMSoundMgrCodecStopCallback;
        codec_param.param = *slotid;
        codec_param.pid = (int)param->param;
-       codec_param.handle_route = param->handle_route;
        codec_param.codec_wave_mutex = &codec_wave_mutex;
        codec_param.stream_index = param->stream_index;
        MMSOUND_STRNCPY(codec_param.stream_type, param->stream_type, MM_SOUND_STREAM_TYPE_LEN);
@@ -542,7 +538,6 @@ int MMSoundMgrCodecPlayDtmf(int *slotid, const mmsound_mgr_codec_param_t *param)
        }
 
        codec_param.tone = param->tone;
-       codec_param.priority = 0;
        codec_param.volume_config = param->volume_config;
        codec_param.repeat_count = param->repeat_count;
        codec_param.volume = param->volume;
@@ -728,7 +723,6 @@ int MMSoundMgrCodecPlayDtmfWithStreamInfo(int *slotid, const mmsound_mgr_codec_p
        }
 
        codec_param.tone = param->tone;
-       codec_param.priority = 0;
        codec_param.repeat_count = param->repeat_count;
        codec_param.volume = param->volume;
        codec_param.stop_cb = _MMSoundMgrCodecStopCallback;
index 415623f..89017fe 100644 (file)
@@ -45,8 +45,8 @@
 ******************************************************************************************/
 // except msgid
 int _MMSoundMgrIpcPlayFile(char* filename,int tone, int repeat, int volume, int volume_config,
-                          int priority, int session_type, int session_options, int client_pid, int handle_route,
-                          gboolean enable_session, int *codechandle, char *stream_type, int stream_index)
+                          int session_type, int session_options, int client_pid, gboolean enable_session,
+                          int *codechandle, char *stream_type, int stream_index)
 {
        mmsound_mgr_codec_param_t param = {0,};
        MMSourceType *source = NULL;
@@ -73,21 +73,19 @@ int _MMSoundMgrIpcPlayFile(char* filename,int tone, int repeat, int volume, int
        param.repeat_count = repeat;
        param.volume = volume;
        param.volume_config = volume_config;
-       param.priority = priority;
        param.session_type = session_type;
        param.session_options = session_options;
        param.param = (void*)client_pid;
        param.source = source;
-       param.handle_route = handle_route;
        param.enable_session = enable_session;
        param.stream_index = stream_index;
        MMSOUND_STRNCPY(param.stream_type, stream_type, MM_SOUND_STREAM_TYPE_LEN);
 
 /*
-       debug_msg("File[%s] DTMF[%d] Loop[%d] Volume[%f] Priority[%d] VolCfg[0x%x] callback[%p] param[%d] src_type[%d] src_ptr[%p] keytone[%d] route[%d] enable_session[%d]",
+       debug_msg("File[%s] DTMF[%d] Loop[%d] Volume[%f] VolCfg[0x%x] callback[%p] param[%d] src_type[%d] src_ptr[%p] keytone[%d] enable_session[%d]",
                        filename,
-                       param.tone, param.repeat_count, param.volume, param.priority, param.volume_config, param.callback,
-                       (int)param.param, param.source->type, param.source->ptr, param.keytone, param.handle_route, param.enable_session);
+                       param.tone, param.repeat_count, param.volume, param.volume_config, param.callback,
+                       (int)param.param, param.source->type, param.source->ptr, param.keytone, param.enable_session);
                        */
 
        ret = MMSoundMgrCodecPlay(codechandle, &param);
@@ -135,7 +133,7 @@ int _MMSoundMgrIpcClearFocus(int pid)
 #endif
 
 int _MMSoundMgrIpcPlayFileWithStreamInfo(char* filename, int repeat, int volume,
-                          int priority, int client_pid, int handle_route, int *codechandle, char *stream_type, int stream_index)
+                          int client_pid, int *codechandle, char *stream_type, int stream_index)
 {
        mmsound_mgr_codec_param_t param = {0,};
        MMSourceType *source = NULL;
@@ -160,10 +158,8 @@ int _MMSoundMgrIpcPlayFileWithStreamInfo(char* filename, int repeat, int volume,
        /* Set sound player parameter */
        param.repeat_count = repeat;
        param.volume = volume;
-       param.priority = priority;
        param.param = (void*)client_pid;
        param.source = source;
-       param.handle_route = handle_route;
        param.stream_index = stream_index;
        MMSOUND_STRNCPY(param.stream_type, stream_type, MM_SOUND_STREAM_TYPE_LEN);
 
@@ -194,7 +190,6 @@ int _MMSoundMgrIpcPlayDTMF(int tone, int repeat, int volume, int volume_config,
        param.repeat_count = repeat;
        param.volume = volume;
        param.volume_config = volume_config;
-       param.priority = 0;
        param.param = (void*)client_pid;
        param.session_type = session_type;
        param.session_options = session_options;
@@ -206,7 +201,6 @@ int _MMSoundMgrIpcPlayDTMF(int tone, int repeat, int volume, int volume_config,
        debug_msg("Loop %d\n", param.repeat_count);
        debug_msg("Volume %d\n",param.volume);
        debug_msg("VolumeConfig %x\n",param.volume_config);
-       debug_msg("Priority %d\n", param.priority);
        debug_msg("session %d\n", param.session_type);
        debug_msg("session options %x\n", param.session_options);
        debug_msg("enable_session %d\n", param.enable_session);
@@ -229,7 +223,6 @@ int _MMSoundMgrIpcPlayDTMFWithStreamInfo(int tone, int repeat, int volume, int c
        param.tone = tone;
        param.repeat_count = repeat;
        param.volume = volume;
-       param.priority = 0;
        param.param = (void*)client_pid;
        param.stream_index = stream_index;
        MMSOUND_STRNCPY(param.stream_type, stream_type, MM_SOUND_STREAM_TYPE_LEN);
@@ -237,7 +230,6 @@ int _MMSoundMgrIpcPlayDTMFWithStreamInfo(int tone, int repeat, int volume, int c
        debug_msg("DTMF %d\n", param.tone);
        debug_msg("Loop %d\n", param.repeat_count);
        debug_msg("Volume %d\n",param.volume);
-       debug_msg("Priority %d\n", param.priority);
        debug_msg("stream type %s\n", param.stream_type);
        debug_msg("stream index %d\n", param.stream_index);
 
index b580b28..145e85e 100644 (file)
@@ -39,11 +39,9 @@ static const gchar introspection_xml[] =
   "      <arg type='i' name='repeat' direction='in'/>"
   "      <arg type='i' name='volume' direction='in'/>"
   "      <arg type='i' name='vol_config' direction='in'/>"
-  "      <arg type='i' name='priority' direction='in'/>"
   "      <arg type='i' name='session_type' direction='in'/>"
   "      <arg type='i' name='session_option' direction='in'/>"
   "      <arg type='i' name='client_pid' direction='in'/>"
-  "      <arg type='i' name='handle_route' direction='in'/>"
   "      <arg type='b' name='enable_session' direction='in'/>"
   "      <arg type='s' name='stream_type' direction='in'/>"
   "      <arg type='i' name='stream_index' direction='in'/>"
@@ -53,9 +51,7 @@ static const gchar introspection_xml[] =
   "         <arg type='s' name='filename' direction='in'/>"
   "         <arg type='i' name='repeat' direction='in'/>"
   "         <arg type='i' name='volume' direction='in'/>"
-  "         <arg type='i' name='priority' direction='in'/>"
   "         <arg type='i' name='client_pid' direction='in'/>"
-  "         <arg type='i' name='handle_route' direction='in'/>"
   "         <arg type='s' name='stream_type' direction='in'/>"
   "         <arg type='i' name='stream_index' direction='in'/>"
   "         <arg type='i' name='handle' direction='out'/>"
@@ -300,8 +296,8 @@ static void handle_method_play_file_start(GDBusMethodInvocation* invocation)
        gchar* filename = NULL;
        gchar *stream_type = NULL;
        gint32 ret = MM_ERROR_NONE, slotid = 0;
-       gint32 tone = 0, repeat = 0, volume = 0, vol_config = 0, priority = 0;
-       gint32 session_type = 0, session_option = 0, pid = 0, handle_route =0, stream_index = 0;
+       gint32 tone = 0, repeat = 0, volume = 0, vol_config = 0;
+       gint32 session_type = 0, session_option = 0, pid = 0, stream_index = 0;
        gboolean enable_session = 0;
        GVariant *params = NULL;
 
@@ -313,15 +309,15 @@ static void handle_method_play_file_start(GDBusMethodInvocation* invocation)
                goto send_reply;
        }
 
-       g_variant_get(params, "(siiiiiiiiibsi)", &filename, &tone, &repeat, &volume,
-                     &vol_config, &priority, &session_type, &session_option, &pid, &handle_route, &enable_session, &stream_type, &stream_index);
+       g_variant_get(params, "(siiiiiiibsi)", &filename, &tone, &repeat, &volume,
+                     &vol_config, &session_type, &session_option, &pid, &enable_session, &stream_type, &stream_index);
        if (!filename) {
            debug_error("filename null");
            ret = MM_ERROR_SOUND_INTERNAL;
            goto send_reply;
        }
-       ret = _MMSoundMgrIpcPlayFile(filename, tone, repeat, volume, vol_config, priority,
-                               session_type, session_option, _get_sender_pid(invocation), handle_route, enable_session, &slotid, stream_type, stream_index);
+       ret = _MMSoundMgrIpcPlayFile(filename, tone, repeat, volume, vol_config,
+                               session_type, session_option, _get_sender_pid(invocation), enable_session, &slotid, stream_type, stream_index);
 
 
 send_reply:
@@ -342,7 +338,7 @@ static void handle_method_play_file_start_with_stream_info(GDBusMethodInvocation
        gchar* filename = NULL;
        gchar *stream_type = NULL;
        gint32 ret = MM_ERROR_NONE, slotid = 0;
-       gint32 repeat = 0, volume = 0, priority = 0, pid = 0, handle_route =0, stream_index = 0;
+       gint32 repeat = 0, volume = 0, pid = 0, stream_index = 0;
        GVariant *params = NULL;
 
        debug_fenter();
@@ -353,15 +349,14 @@ static void handle_method_play_file_start_with_stream_info(GDBusMethodInvocation
                goto send_reply;
        }
 
-       g_variant_get(params, "(siiiiisi)", &filename, &repeat, &volume,
-                     &priority, &pid, &handle_route, &stream_type, &stream_index);
+       g_variant_get(params, "(siiisi)", &filename, &repeat, &volume, &pid, &stream_type, &stream_index);
        if (!filename) {
            debug_error("filename null");
            ret = MM_ERROR_SOUND_INTERNAL;
            goto send_reply;
        }
-       ret = _MMSoundMgrIpcPlayFileWithStreamInfo(filename, repeat, volume, priority,
-                               _get_sender_pid(invocation), handle_route, &slotid, stream_type, stream_index);
+       ret = _MMSoundMgrIpcPlayFileWithStreamInfo(filename, repeat, volume, _get_sender_pid(invocation),
+                   &slotid, stream_type, stream_index);
 
 send_reply:
        if (ret == MM_ERROR_NONE) {
index 7e88f73..5151aa0 100644 (file)
@@ -64,7 +64,6 @@ typedef struct {
        char* pcm_out_buf;
        int                     offset;
        int     period;
-       int     handle_route;
        int gain, out, in, option;
        mm_sound_device_in device_in;
        mm_sound_device_out device_out;
@@ -189,9 +188,6 @@ int MMSoundPlugCodecOggCreate(mmsound_codec_param_t *param, mmsound_codec_info_t
        int err, used_size, skipsize;
        int ret = MM_ERROR_NONE;
 
-       mm_sound_handle_route_info route_info;
-       route_info.policy = HANDLE_ROUTE_POLICY_OUT_AUTO;
-
        pa_sample_spec ss;
        int size = 0;
        int mode = HANDLE_MODE_OUTPUT_LOW_LATENCY;
@@ -273,7 +269,6 @@ int MMSoundPlugCodecOggCreate(mmsound_codec_param_t *param, mmsound_codec_info_t
        debug_msg("[CODEC OGG]format     : %d\n", info->format);
        debug_msg("[CODEC OGG]samplerate : %d\n", info->samplerate);
        debug_msg("[CODEC OGG]doffset    : %d\n", info->doffset);
-       debug_msg("[CODEC OGG]priority : %d\n", param->priority);
        debug_msg("[CODEC OGG]repeat : %d\n", param->repeat_count);
        debug_msg("[CODEC OGG]volume : %d\n", param->volume);
        debug_msg("[CODEC OGG]callback : %08x\n", param->stop_cb);
@@ -289,10 +284,6 @@ int MMSoundPlugCodecOggCreate(mmsound_codec_param_t *param, mmsound_codec_info_t
                mode = HANDLE_MODE_OUTPUT;
        }
 
-       route_info.policy = HANDLE_ROUTE_POLICY_OUT_AUTO;
-
-       p->handle_route = param->handle_route;
-
        switch(info->format)
        {
        case 8:
@@ -308,10 +299,10 @@ int MMSoundPlugCodecOggCreate(mmsound_codec_param_t *param, mmsound_codec_info_t
        ss.channels = info->channels;
        ss.rate = info->samplerate;
 
-       debug_msg("[CODEC OGG] PARAM mode:[%d] priority:[%d] policy:[%d] channels:[%d] samplerate:[%d] format:[%d] volume type:[%x]\n",
-               mode,-1, route_info.policy, ss.channels, ss.rate, ss.format, param->volume_config);
+       debug_msg("[CODEC OGG] PARAM mode:[%d] channels:[%d] samplerate:[%d] format:[%d] volume type:[%x]\n",
+               mode, ss.channels, ss.rate, ss.format, param->volume_config);
 
-       p->handle = mm_sound_pa_open(HANDLE_MODE_OUTPUT_LOW_LATENCY, &route_info, 0, param->volume_config, &ss, NULL, &size, param->stream_type, param->stream_index);
+       p->handle = mm_sound_pa_open(HANDLE_MODE_OUTPUT_LOW_LATENCY, param->volume_config, &ss, NULL, &size, param->stream_type, param->stream_index);
        if(!p->handle) {
                debug_error("[CODEC OGG] Can not open audio handle\n");
                ret = MM_ERROR_SOUND_INTERNAL;
index 1366fb8..6507f1a 100644 (file)
@@ -757,7 +757,6 @@ int MMSoundPlugCodecToneCreate(mmsound_codec_param_t *param, mmsound_codec_info_
 {
        tone_info_t *toneInfo;
        pa_sample_spec ss;
-       mm_sound_handle_route_info route_info;
 
        int size;
 
@@ -778,9 +777,8 @@ int MMSoundPlugCodecToneCreate(mmsound_codec_param_t *param, mmsound_codec_info_
        ss.rate = SAMPLERATE;
        ss.channels = CHANNELS;
        ss.format = PA_SAMPLE_S16LE;
-       route_info.policy = HANDLE_ROUTE_POLICY_OUT_AUTO;
 
-       toneInfo->handle = mm_sound_pa_open(HANDLE_MODE_OUTPUT, &route_info, HANDLE_PRIORITY_NORMAL, param->volume_config, &ss, NULL, &size, param->stream_type, param->stream_index);
+       toneInfo->handle = mm_sound_pa_open(HANDLE_MODE_OUTPUT, param->volume_config, &ss, NULL, &size, param->stream_type, param->stream_index);
        if (!toneInfo->handle) {
                debug_error("Device Open Error 0x%x\n", result);
                goto Error;
index 2ea3502..7fd61b0 100644 (file)
@@ -86,8 +86,6 @@ typedef struct
        int channels;
        int samplerate;
        int format;
-       int handle_route;
-       int priority;
        MMSourceType *source;
        char buffer[48000 / 1000 * SAMPLE_COUNT * 2 *2];//segmentation fault when above 22.05KHz stereo
        int gain, out, in, option;
@@ -242,10 +240,10 @@ int MMSoundPlugCodecWaveCreate(mmsound_codec_param_t *param, mmsound_codec_info_
        debug_enter("\n");
 #endif
 
-       debug_msg("period[%d] type[%s] ch[%d] format[%d] rate[%d] doffset[%d] priority[%d] repeat[%d] volume[%f] callback[%p] route[%d]\n",
+       debug_msg("period[%d] type[%s] ch[%d] format[%d] rate[%d] doffset[%d] repeat[%d] volume[%f] callback[%p]\n",
                        keytone_period, (info->codec == MM_SOUND_SUPPORTED_CODEC_WAVE) ? "Wave" : "Unknown",
-                       info->channels, info->format, info->samplerate, info->doffset, param->priority, param->repeat_count,
-                       param->volume, param->stop_cb, param->handle_route);
+                       info->channels, info->format, info->samplerate, info->doffset, param->repeat_count,
+                       param->volume, param->stop_cb);
        source = param->source;
 
        if (g_thread_pool_func == NULL) {
@@ -287,13 +285,10 @@ int MMSoundPlugCodecWaveCreate(mmsound_codec_param_t *param, mmsound_codec_info_
                p->mode = HANDLE_MODE_OUTPUT;
        }
 
-       p->priority = param->priority;
        p->volume_config = param->volume_config;
        p->channels = info->channels;
        p->samplerate = info->samplerate;
 
-       p->handle_route = param->handle_route;
-
        switch(info->format)
        {
        case 8:
@@ -355,7 +350,6 @@ static void _runing(void *param)
        int size;
 
        pa_sample_spec ss;
-       mm_sound_handle_route_info route_info;
 
        if (p == NULL) {
                debug_error("[CODEC WAV] param is null\n");
@@ -365,13 +359,11 @@ static void _runing(void *param)
        debug_enter("[CODEC WAV] (Slot ID %d)\n", p->cb_param);
        CODEC_WAVE_LOCK(p->codec_wave_mutex);
 
-       route_info.policy = HANDLE_ROUTE_POLICY_OUT_AUTO;
-
        ss.rate = p->samplerate;
        ss.channels = p->channels;
        ss.format = p->format;
        p->period = pa_sample_size(&ss) * ((ss.rate * 25) / 1000);
-       p->handle = mm_sound_pa_open(p->mode, &route_info, p->priority, p->volume_config, &ss, NULL, &size, p->stream_type, p->stream_index);
+       p->handle = mm_sound_pa_open(p->mode, p->volume_config, &ss, NULL, &size, p->stream_type, p->stream_index);
        if(!p->handle) {
                debug_critical("[CODEC WAV] Can not open audio handle\n");
                CODEC_WAVE_UNLOCK(p->codec_wave_mutex);