module-voice-api.h 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /*
  2. * This file is part of pulseaudio-nokia
  3. *
  4. * Copyright (C) 2010 Nokia Corporation. All rights reserved.
  5. *
  6. * Contact: Maemo Multimedia <multimedia@maemo.org>
  7. *
  8. * This software, including documentation, is protected by copyright
  9. * controlled by Nokia Corporation. All rights are reserved.
  10. *
  11. * Copying, including reproducing, storing, adapting or translating,
  12. * any or all of this material requires the prior written consent of
  13. * Nokia Corporation. This material also contains confidential
  14. * information which may not be disclosed to others without the prior
  15. * written consent of Nokia.
  16. */
  17. #ifndef module_voice_api_h
  18. #define module_voice_api_h
  19. #ifdef HAVE_CONFIG_H
  20. #include <config.h>
  21. #endif
  22. #include <pulsecore/sink.h>
  23. #include <pulsecore/source.h>
  24. #define VOICE_SOURCE_FRAMESIZE (20000) /* us */
  25. #define VOICE_SINK_FRAMESIZE (10000) /* us */
  26. #define VOICE_API_VERSION "0.1"
  27. #define VOICE_HOOK_HW_SINK_PROCESS "x-nokia.voice.hw_sink_process"
  28. #define VOICE_HOOK_NARROWBAND_EAR_EQU_MONO "x-nokia.voice.narrowband_ear_equ_mono"
  29. #define VOICE_HOOK_NARROWBAND_MIC_EQ_MONO "x-nokia.voice.narrowband_mic_eq_mono"
  30. #define VOICE_HOOK_WIDEBAND_MIC_EQ_MONO "x-nokia.voice.wideband_mic_eq_mono"
  31. #define VOICE_HOOK_XPROT_MONO "x-nokia.voice.xport_mono"
  32. #define VOICE_HOOK_VOLUME "x-nokia.voice.volume"
  33. #define VOICE_HOOK_CALL_VOLUME "x-nokia.voice.call_volume"
  34. #define VOICE_HOOK_CALL_BEGIN "x-nokia.voice.call_begin"
  35. #define VOICE_HOOK_CALL_END "x-nokia.voice.call_end"
  36. #define VOICE_HOOK_AEP_DOWNLINK "x-nokia.voice.aep_downlink"
  37. #define VOICE_HOOK_AEP_UPLINK "x-nokia.voice.aep_uplink"
  38. typedef struct {
  39. pa_memchunk *chunk;
  40. pa_memchunk *rchunk;
  41. } aep_uplink;
  42. typedef struct {
  43. pa_memchunk *chunk;
  44. int spc_flags;
  45. pa_bool_t cmt;
  46. } aep_downlink;
  47. enum {
  48. /* TODO: Print out BIG warning if in wrong buffer mode when this message is received */
  49. VOICE_SOURCE_SET_UL_DEADLINE = PA_SOURCE_MESSAGE_MAX + 100,
  50. };
  51. enum {
  52. VOICE_SINK_GET_SIDE_INFO_QUEUE_PTR = PA_SINK_MESSAGE_MAX + 100,
  53. };
  54. #define PA_PROP_SINK_API_EXTENSION_PROPERTY_NAME "sink.api-extension.nokia.voice"
  55. #define PA_PROP_SINK_API_EXTENSION_PROPERTY_VALUE VOICE_API_VERSION
  56. #define PA_PROP_SOURCE_API_EXTENSION_PROPERTY_NAME "source.api-extension.nokia.voice"
  57. #define PA_PROP_SOURCE_API_EXTENSION_PROPERTY_VALUE VOICE_API_VERSION
  58. /* Because pa_queue does not like NULL pointers, this flag is added to every
  59. * set of flags to make the pa_queue entries non null. */
  60. #define VOICE_SIDEINFO_FLAG_BOGUS (0x8000)
  61. /* TODO: Create voice API for SPC flags. Voice module should not use cmtspeech headers. */
  62. #endif /* module_voice_api_h */