module-voice-userdata.h 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. /*
  2. * This file is part of pulseaudio-meego
  3. *
  4. * Copyright (C) 2008, 2009 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_userdata_h
  18. #define module_voice_userdata_h
  19. #ifdef HAVE_CONFIG_H
  20. #include <config.h>
  21. #endif
  22. #include <stdio.h>
  23. #include <pulsecore/modargs.h>
  24. #include <pulsecore/sink-input.h>
  25. #include <pulsecore/source-output.h>
  26. #include <pulsecore/module.h>
  27. #include <pulsecore/thread.h>
  28. #include <pulsecore/thread-mq.h>
  29. #include <pulsecore/semaphore.h>
  30. #include <pulsecore/fdsem.h>
  31. #ifdef HAVE_LIBCMTSPEECHDATA
  32. #include <cmtspeech.h>
  33. #endif
  34. #include "src/common/src-48-to-8.h"
  35. #include "src/common/src-8-to-48.h"
  36. #include "voice-cmtspeech.h"
  37. #include <voice-buffer.h>
  38. /* This is a copy/paste from module-alsa-sink-volume.c, keep it up to date!*/
  39. /* String with single integer defining which mixer
  40. * tuning table is used. Currently only two different tables
  41. * can be defined.
  42. */
  43. #define PROP_MIXER_TUNING_MODE "x-maemo.alsa_sink.mixer_tuning_mode"
  44. #define PROP_MIXER_TUNING_PRI (0)
  45. #define PROP_MIXER_TUNING_ALT (1)
  46. #define PROP_MIXER_TUNING_PRI_S "0"
  47. #define PROP_MIXER_TUNING_ALT_S "1"
  48. struct voice_aep_ear_ref
  49. {
  50. int loop_padding_usec;
  51. pa_atomic_t loop_state;
  52. volatile struct timeval loop_tstamp;
  53. pa_asyncq *loop_asyncq;
  54. pa_memblockq *loop_memblockq;
  55. };
  56. struct eq_channel
  57. {
  58. int16_t *coeff[2];
  59. int32_t *delay[2];
  60. };
  61. struct iir_eq
  62. {
  63. struct eq_channel channel;
  64. int32_t *scratch;
  65. };
  66. /* TODO: Classify each member according to which thread they are used from */
  67. struct userdata
  68. {
  69. pa_core *core;
  70. pa_module *module;
  71. int modargs;
  72. pa_msgobject *mainloop_handler;
  73. int ul_timing_advance;
  74. pa_channel_map mono_map;
  75. pa_channel_map stereo_map;
  76. pa_sample_spec hw_sample_spec;
  77. pa_sample_spec hw_mono_sample_spec;
  78. pa_sample_spec aep_sample_spec;
  79. pa_channel_map aep_channel_map;
  80. int aep_fragment_size;
  81. int aep_hw_fragment_size;
  82. int hw_fragment_size;
  83. int hw_fragment_size_max;
  84. int hw_mono_fragment_size;
  85. int aep_hw_mono_fragment_size;
  86. int voice_ul_fragment_size;
  87. pa_memchunk aep_silence_memchunk;
  88. pa_atomic_ptr_t memchunk_pool;
  89. pa_sink *master_sink;
  90. pa_source *master_source;
  91. pa_sink *raw_sink;
  92. pa_sink *voip_sink;
  93. pa_sink_input *hw_sink_input;
  94. int field_204;
  95. int field_208;
  96. int mixer_state;
  97. int alt_mixer_compensation;
  98. void *sink_temp_buff;
  99. int sink_temp_buff_len;
  100. pa_memblockq *unused_memblockq;
  101. pa_sink_input *aep_sink_input;
  102. pa_source *raw_source;
  103. pa_source *voip_source;
  104. pa_source_output *hw_source_output;
  105. int field_230;
  106. pa_memblockq *hw_source_memblockq;
  107. pa_memblockq *ul_memblockq;
  108. int loop_state;
  109. int16_t linear_q15_master_volume_R;
  110. int16_t linear_q15_master_volume_L;
  111. int field_244;
  112. int field_248;
  113. int field_24C;
  114. int field_250;
  115. int field_254;
  116. int field_258;
  117. int field_25C;
  118. int field_260;
  119. int field_264;
  120. int field_268;
  121. int field_26C;
  122. int field_270;
  123. int field_274;
  124. int field_278;
  125. int field_27C;
  126. int field_280;
  127. int field_284;
  128. int field_288;
  129. int field_28C;
  130. int field_290;
  131. int field_294;
  132. int field_298;
  133. int field_29C;
  134. int field_2A0;
  135. int field_2A4;
  136. int field_2A8;
  137. int field_2AC;
  138. int field_2B0;
  139. int field_2B4;
  140. int field_2B8;
  141. int field_2BC;
  142. int field_2C0;
  143. int field_2C4;
  144. pa_queue *dl_sideinfo_queue;
  145. char field_2CC;
  146. char gap_2CD[3];
  147. src_48_to_8 *hw_source_to_aep_resampler;
  148. src_8_to_48 *aep_to_hw_sink_resampler;
  149. src_48_to_8 *ear_to_aep_resampler;
  150. src_48_to_8 *raw_sink_to_hw8khz_sink_resampler;
  151. src_8_to_48 *hw8khz_source_to_raw_source_resampler;
  152. struct voice_aep_ear_ref ear_ref;
  153. struct cmtspeech_dbus_conn cmt_dbus_conn;
  154. struct cmtspeech_connection cmt_connection;
  155. char gap_3DE[2];
  156. struct iir_eq *wb_mic_iir_eq;
  157. int wb_ear_iir_eq;
  158. struct iir_eq *nb_mic_iir_eq;
  159. int nb_ear_iir_eq;
  160. int xprot;
  161. int field_3F4;
  162. int field_3F8;
  163. int field_3FC;
  164. pa_hook_slot *sink_hook;
  165. pa_hook_slot *source_hook;
  166. pa_subscription *sink_subscription;
  167. int trace_func;
  168. int field_410;
  169. int field_414;
  170. };
  171. #endif /* module_voice_userdata_h */