bool is_connected;
int changed_device_info_type;
- int route;
int device_in;
int device_out;
int is_available;
int volume_config;
int session_type;
int session_options;
- int priority;
- int handle_route;
bool enable_session;
bool need_broadcast;
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
*/
#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
*/
#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 */
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);
#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 */
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;
/**
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);
///////////////////////////////////
//// 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
param->data = data;
param->loop = 1;
param->volume_config = volume_config;
- param->priority = priority;
- param->handle_route = handle_route;
}
EXPORT_API
MMSoundPlayParam param = { 0, };
/* FIXME : this function will be deleted */
- _mm_sound_fill_play_param(¶m, filename, volume_config, callback, data, HANDLE_PRIORITY_NORMAL, MM_SOUND_HANDLE_ROUTE_USING_CURRENT);
+ _mm_sound_fill_play_param(¶m, filename, volume_config, callback, data);
return mm_sound_play_sound_ex(¶m, handle);
}
{
MMSoundPlayParam param = { 0, };
- _mm_sound_fill_play_param(¶m, filename, volume_config, callback, data, HANDLE_PRIORITY_NORMAL, MM_SOUND_HANDLE_ROUTE_USING_CURRENT);
+ _mm_sound_fill_play_param(¶m, filename, volume_config, callback, data);
return mm_sound_play_sound_ex(¶m, 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) {
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
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;
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;
uint32_t handle;
int mode;
- int policy;
int volume_type;
int gain_type;
int rate;
}
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;
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;
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;
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);
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");
}
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;
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");
}
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;
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");
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
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;
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);
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;
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);
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);
}
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;
}
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;
******************************************************************************************/
// 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;
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, ¶m);
#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;
/* 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);
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;
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);
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);
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);
" <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'/>"
" <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'/>"
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;
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:
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();
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) {
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;
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;
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);
mode = HANDLE_MODE_OUTPUT;
}
- route_info.policy = HANDLE_ROUTE_POLICY_OUT_AUTO;
-
- p->handle_route = param->handle_route;
-
switch(info->format)
{
case 8:
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;
{
tone_info_t *toneInfo;
pa_sample_spec ss;
- mm_sound_handle_route_info route_info;
int size;
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;
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;
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) {
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:
int size;
pa_sample_spec ss;
- mm_sound_handle_route_info route_info;
if (p == NULL) {
debug_error("[CODEC WAV] param is null\n");
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);