summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorHyunjin Park <hyunjin45.park@samsung.com>2015-09-22 19:43:25 +0900
committerHyunjin Park <hyunjin45.park@samsung.com>2015-09-24 21:01:52 +0900
commit0b27ea9bf4d71eb00eb7b6dce64b9d5c924216a2 (patch)
tree5d7a2b18cdb0c3407d34d91f79ad601db11da46e /src/include
parent3cbc3986bc483432ff4f023d796654ea8dd642da (diff)
downloadlibmm-radio-0b27ea9bf4d71eb00eb7b6dce64b9d5c924216a2.tar.gz
libmm-radio-0b27ea9bf4d71eb00eb7b6dce64b9d5c924216a2.tar.bz2
libmm-radio-0b27ea9bf4d71eb00eb7b6dce64b9d5c924216a2.zip
Signed-off-by: Hyunjin Park <hyunjin45.park@samsung.com> Change-Id: Ica7ac7942b356062a623664e6c0c3702e54bc39d
Diffstat (limited to 'src/include')
-rwxr-xr-x[-rw-r--r--]src/include/mm_radio_audio_focus.h (renamed from src/include/mm_radio_asm.h)23
-rwxr-xr-x[-rw-r--r--]src/include/mm_radio_priv.h19
2 files changed, 28 insertions, 14 deletions
diff --git a/src/include/mm_radio_asm.h b/src/include/mm_radio_audio_focus.h
index c8d1c93..46b7d04 100644..100755
--- a/src/include/mm_radio_asm.h
+++ b/src/include/mm_radio_audio_focus.h
@@ -18,9 +18,9 @@
* limitations under the License.
*
*/
-
-#ifndef MM_RADIO_ASM_H_
-#define MM_RADIO_ASM_H_
+
+#ifndef MM_RADIO_AUDIO_FOCUS_H_
+#define MM_RADIO_AUDIO_FOCUS_H_
#include <mm_types.h>
#include <mm_error.h>
@@ -28,6 +28,7 @@
#include <mm_session.h>
#include <mm_session_private.h>
#include <audio-session-manager.h>
+#include <mm_sound_focus.h>
enum {
MMRADIO_ASM_CB_NONE,
@@ -39,12 +40,14 @@ typedef struct {
int pid;
int by_asm_cb;
int event_src;
- ASM_sound_states_t state;
-} MMRadioASM;
+ int sound_focus_register;
+ int asm_session_flags;
+} MMRadioAudioFocus;
-/* returns allocated handle */
-int mmradio_asm_register(MMRadioASM* sm, ASM_sound_cb_t callback, void* param);
-int mmradio_asm_deregister(MMRadioASM* sm);
-int mmradio_asm_set_state(MMRadioASM* sm, ASM_sound_states_t state, ASM_resource_t resource);
+int mmradio_audio_focus_register(MMRadioAudioFocus* sm, mm_sound_focus_changed_cb callback, void* param);
+int mmradio_audio_focus_deregister(MMRadioAudioFocus* sm);
+int mmradio_set_audio_focus(MMRadioAudioFocus* sm, mm_sound_focus_changed_watch_cb callback, void* param);
+int mmradio_unset_audio_focus(MMRadioAudioFocus* sm, void* param);
+void mmradio_get_audio_focus_reason(mm_sound_focus_state_e focus_state, const char *reason_for_change, ASM_event_sources_t *event_source, int *postMsg);
-#endif /* MM_RADIO_ASM_H_ */
+#endif /* MM_RADIO_AUDIO_FOCUS_H_ */
diff --git a/src/include/mm_radio_priv.h b/src/include/mm_radio_priv.h
index bd070ae..e4609b9 100644..100755
--- a/src/include/mm_radio_priv.h
+++ b/src/include/mm_radio_priv.h
@@ -35,14 +35,17 @@
#include <mm_types.h>
#include <mm_message.h>
-#include "mm_radio_asm.h"
+#include "mm_radio_audio_focus.h"
#include "mm_radio.h"
#include "mm_radio_utils.h"
#include <linux/videodev2.h>
#include <gst/gst.h>
#include <gst/gstbuffer.h>
-
+
+#include <mm_sound.h>
+#include <mm_sound_focus.h>
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -184,8 +187,7 @@ typedef struct {
int prev_seek_freq;
MMRadioSeekDirectionType seek_direction;
- /* ASM */
- MMRadioASM sm;
+ MMRadioAudioFocus sm;
int freq;
#ifdef USE_GST_PIPELINE
@@ -224,6 +226,15 @@ int _mmradio_destroy_pipeline(mm_radio_t* radio);
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, unsigned int *min_freq, unsigned int *max_freq);
+int _mmradio_get_channel_spacing(mm_radio_t* radio, unsigned int *ch_spacing);
+void _mmradio_sound_focus_cb(int id, mm_sound_focus_type_e focus_type,
+ mm_sound_focus_state_e focus_state, const char *reason_for_change,
+ const char *additional_info, void *user_data);
+
+void _mmradio_sound_focus_watch_cb(int id, mm_sound_focus_type_e focus_type,
+ mm_sound_focus_state_e focus_state, const char *reason_for_change,
+ const char *additional_info, void *user_data);
+
#if 0
int mmradio_set_attrs(mm_radio_t* radio, MMRadioAttrsType type, MMHandleType attrs);
MMHandleType mmradio_get_attrs(mm_radio_t* radio, MMRadioAttrsType type);