le_audio_common.h

Go to the documentation of this file.
1 
2 /*
3  * ====================== WARNING ======================
4  *
5  * THE CONTENTS OF THIS FILE HAVE BEEN AUTO-GENERATED.
6  * DO NOT MODIFY IN ANY WAY.
7  *
8  * ====================== WARNING ======================
9  */
10 /**
11  * @file le_audio_common.h
12  *
13  * Type definitions for le_audio.
14  *
15  */
16 #ifndef LE_AUDIO_COMMON_H_INCLUDE_GUARD
17 #define LE_AUDIO_COMMON_H_INCLUDE_GUARD
18 
19 
20 #include "legato.h"
21 
22 #define IFGEN_LE_AUDIO_PROTOCOL_ID "6a8550b129317ef436c4894129509c7c"
23 #define IFGEN_LE_AUDIO_MSG_SIZE 124
24 /** @addtogroup le_audio
25  * @{ **/
26 
27 
28 //--------------------------------------------------------------------------------------------------
29 /**
30  * Maximum DTMF string length.
31  */
32 //--------------------------------------------------------------------------------------------------
33 #define LE_AUDIO_DTMF_MAX_LEN 100
34 
35 //--------------------------------------------------------------------------------------------------
36 /**
37  * Maximum DTMF string length.
38  * One extra byte is added for the null character.
39  */
40 //--------------------------------------------------------------------------------------------------
41 #define LE_AUDIO_DTMF_MAX_BYTES 101
42 
43 //--------------------------------------------------------------------------------------------------
44 /**
45  * No file descriptor define
46  */
47 //--------------------------------------------------------------------------------------------------
48 #define LE_AUDIO_NO_FD -1
49 
50 //--------------------------------------------------------------------------------------------------
51 /**
52  * Maximum gain name string length.
53  */
54 //--------------------------------------------------------------------------------------------------
55 #define LE_AUDIO_GAIN_NAME_MAX_LEN 100
56 
57 //--------------------------------------------------------------------------------------------------
58 /**
59  * Maximum gain name string length.
60  * One extra byte is added for the null character.
61  */
62 //--------------------------------------------------------------------------------------------------
63 #define LE_AUDIO_GAIN_NAME_MAX_BYTES 101
64 
65 //--------------------------------------------------------------------------------------------------
66 /**
67  * Audio recording/playback events.
68  */
69 //--------------------------------------------------------------------------------------------------
70 typedef enum
71 {
73  ///< Playback has reached the end of file.
75  ///< No more audio samples to play.
77  ///< Recording/playback has encountered an error.
79  ///< Enumerate max value.
80 }
82 
83 
84 //--------------------------------------------------------------------------------------------------
85 /**
86  * Companding.
87  */
88 //--------------------------------------------------------------------------------------------------
89 typedef enum
90 {
92  ///< A-law PCM (i.e. Europe and most of the rest of the world).
94  ///< MU-law PCM (i.e. North America and Japan).
96  ///< Linear PCM.
97 }
99 
100 
101 //--------------------------------------------------------------------------------------------------
102 /**
103  * I2S channel mode.
104  */
105 //--------------------------------------------------------------------------------------------------
106 typedef enum
107 {
109  ///< Left channel.
111  ///< Right channel.
113  ///< Mono mode.
115  ///< Stereo mode.
117  ///< Reverse mode (left & right reversed).
118 }
120 
121 
122 //--------------------------------------------------------------------------------------------------
123 /**
124  * Audio format.
125  */
126 //--------------------------------------------------------------------------------------------------
127 typedef enum
128 {
130  ///< Waveform audio file
132  ///< Adaptive Multi Rate
133  LE_AUDIO_FORMAT_MAX = 2
134  ///<
135 }
137 
138 
139 //--------------------------------------------------------------------------------------------------
140 /**
141  * AMR mode.
142  */
143 //--------------------------------------------------------------------------------------------------
144 typedef enum
145 {
147  ///< Not set
149  ///< AMR Narrowband in 4.75kbps
151  ///< AMR Narrowband in 5.15kbps
153  ///< AMR Narrowband in 5.9kbps
155  ///< AMR Narrowband in 6.7kbps
157  ///< AMR Narrowband in 7.4kbps (default value)
159  ///< AMR Narrowband in 7.95kbps
161  ///< AMR Narrowband in 10.3kbps
163  ///< AMR Narrowband in 12.2kbps
165  ///< AMR Wideband in 6.6kbps
167  ///< AMR Wideband in 8.85kbps
169  ///< AMR Wideband in 12.65kbps
171  ///< AMR Wideband in 14.25kbps
173  ///< AMR Wideband in 15.85kbps
175  ///< AMR Wideband in 18.25kbps
177  ///< AMR Wideband in 19.85kbps
179  ///< AMR Wideband in 23.05kbps
181  ///< AMR Wideband in 23.85kbps
182 }
184 
185 
186 //--------------------------------------------------------------------------------------------------
187 /**
188  * Reference type for Audio Stream
189  */
190 //--------------------------------------------------------------------------------------------------
191 typedef struct le_audio_Stream* le_audio_StreamRef_t;
192 
193 
194 //--------------------------------------------------------------------------------------------------
195 /**
196  * Reference type for Audio Connector
197  */
198 //--------------------------------------------------------------------------------------------------
199 typedef struct le_audio_Connector* le_audio_ConnectorRef_t;
200 
201 
202 //--------------------------------------------------------------------------------------------------
203 /**
204  * Reference type used by Add/Remove functions for EVENT 'le_audio_Media'
205  */
206 //--------------------------------------------------------------------------------------------------
207 typedef struct le_audio_MediaHandler* le_audio_MediaHandlerRef_t;
208 
209 
210 //--------------------------------------------------------------------------------------------------
211 /**
212  * Reference type used by Add/Remove functions for EVENT 'le_audio_DtmfDetector'
213  */
214 //--------------------------------------------------------------------------------------------------
215 typedef struct le_audio_DtmfDetectorHandler* le_audio_DtmfDetectorHandlerRef_t;
216 
217 
218 //--------------------------------------------------------------------------------------------------
219 /**
220  * Handler for audio stream event.
221  *
222  */
223 //--------------------------------------------------------------------------------------------------
224 typedef void (*le_audio_MediaHandlerFunc_t)
225 (
226  le_audio_StreamRef_t streamRef,
227  ///< Audio stream reference.
228  le_audio_MediaEvent_t event,
229  ///< Event value.
230  void* contextPtr
231  ///<
232 );
233 
234 //--------------------------------------------------------------------------------------------------
235 /**
236  * Handler for DTMF decoding.
237  *
238  */
239 //--------------------------------------------------------------------------------------------------
241 (
242  le_audio_StreamRef_t streamRef,
243  ///< Audio stream reference.
244  char dtmf,
245  ///< Detected DTMF.
246  void* contextPtr
247  ///<
248 );
249 
250 
251 //--------------------------------------------------------------------------------------------------
252 /**
253  * Get if this client bound locally.
254  */
255 //--------------------------------------------------------------------------------------------------
256 LE_SHARED bool ifgen_le_audio_HasLocalBinding
257 (
258  void
259 );
260 
261 
262 //--------------------------------------------------------------------------------------------------
263 /**
264  * Init data that is common across all threads
265  */
266 //--------------------------------------------------------------------------------------------------
267 LE_SHARED void ifgen_le_audio_InitCommonData
268 (
269  void
270 );
271 
272 
273 //--------------------------------------------------------------------------------------------------
274 /**
275  * Perform common initialization and open a session
276  */
277 //--------------------------------------------------------------------------------------------------
278 LE_SHARED le_result_t ifgen_le_audio_OpenSession
279 (
280  le_msg_SessionRef_t _ifgen_sessionRef,
281  bool isBlocking
282 );
283 
284 //--------------------------------------------------------------------------------------------------
285 /**
286  * Open the Microphone.
287  *
288  * @return Reference to the input audio stream, NULL if the function fails.
289  */
290 //--------------------------------------------------------------------------------------------------
291 LE_SHARED le_audio_StreamRef_t ifgen_le_audio_OpenMic
292 (
293  le_msg_SessionRef_t _ifgen_sessionRef
294 );
295 
296 //--------------------------------------------------------------------------------------------------
297 /**
298  * Open the Speaker-phone.
299  *
300  * @return Reference to the output audio stream, NULL if the function fails.
301  */
302 //--------------------------------------------------------------------------------------------------
303 LE_SHARED le_audio_StreamRef_t ifgen_le_audio_OpenSpeaker
304 (
305  le_msg_SessionRef_t _ifgen_sessionRef
306 );
307 
308 //--------------------------------------------------------------------------------------------------
309 /**
310  * Open the received audio stream of an USB audio class.
311  *
312  * @return Reference to the input audio stream, NULL if the function fails.
313  */
314 //--------------------------------------------------------------------------------------------------
315 LE_SHARED le_audio_StreamRef_t ifgen_le_audio_OpenUsbRx
316 (
317  le_msg_SessionRef_t _ifgen_sessionRef
318 );
319 
320 //--------------------------------------------------------------------------------------------------
321 /**
322  * Open the transmitted audio stream of an USB audio class.
323  *
324  * @return Reference to the output audio stream, NULL if the function fails.
325  */
326 //--------------------------------------------------------------------------------------------------
327 LE_SHARED le_audio_StreamRef_t ifgen_le_audio_OpenUsbTx
328 (
329  le_msg_SessionRef_t _ifgen_sessionRef
330 );
331 
332 //--------------------------------------------------------------------------------------------------
333 /**
334  * Open the received audio stream of the PCM interface.
335  *
336  * @return Reference to the input audio stream, NULL if the function fails.
337  */
338 //--------------------------------------------------------------------------------------------------
339 LE_SHARED le_audio_StreamRef_t ifgen_le_audio_OpenPcmRx
340 (
341  le_msg_SessionRef_t _ifgen_sessionRef,
342  uint32_t timeslot
343  ///< [IN] The time slot number.
344 );
345 
346 //--------------------------------------------------------------------------------------------------
347 /**
348  * Open the transmitted audio stream of the PCM interface.
349  *
350  * @return Reference to the output audio stream, NULL if the function fails.
351  */
352 //--------------------------------------------------------------------------------------------------
353 LE_SHARED le_audio_StreamRef_t ifgen_le_audio_OpenPcmTx
354 (
355  le_msg_SessionRef_t _ifgen_sessionRef,
356  uint32_t timeslot
357  ///< [IN] The time slot number.
358 );
359 
360 //--------------------------------------------------------------------------------------------------
361 /**
362  * Open the received audio stream of the I2S interface.
363  *
364  * @return Reference to the input audio stream, NULL if the function fails.
365  */
366 //--------------------------------------------------------------------------------------------------
367 LE_SHARED le_audio_StreamRef_t ifgen_le_audio_OpenI2sRx
368 (
369  le_msg_SessionRef_t _ifgen_sessionRef,
371  ///< [IN] The channel mode.
372 );
373 
374 //--------------------------------------------------------------------------------------------------
375 /**
376  * Open the transmitted audio stream of the I2S interface.
377  *
378  * @return Reference to the output audio stream, NULL if the function fails.
379  */
380 //--------------------------------------------------------------------------------------------------
381 LE_SHARED le_audio_StreamRef_t ifgen_le_audio_OpenI2sTx
382 (
383  le_msg_SessionRef_t _ifgen_sessionRef,
385  ///< [IN] The channel mode.
386 );
387 
388 //--------------------------------------------------------------------------------------------------
389 /**
390  * Open the audio stream for playback.
391  *
392  * @return Reference to the audio stream, NULL if the function fails.
393  */
394 //--------------------------------------------------------------------------------------------------
395 LE_SHARED le_audio_StreamRef_t ifgen_le_audio_OpenPlayer
396 (
397  le_msg_SessionRef_t _ifgen_sessionRef
398 );
399 
400 //--------------------------------------------------------------------------------------------------
401 /**
402  * Open the audio stream for recording.
403  *
404  * @return Reference to the audio stream, NULL if the function fails.
405  */
406 //--------------------------------------------------------------------------------------------------
407 LE_SHARED le_audio_StreamRef_t ifgen_le_audio_OpenRecorder
408 (
409  le_msg_SessionRef_t _ifgen_sessionRef
410 );
411 
412 //--------------------------------------------------------------------------------------------------
413 /**
414  * Open the received audio stream of a voice call.
415  *
416  * @return Reference to the input audio stream, NULL if the function fails.
417  */
418 //--------------------------------------------------------------------------------------------------
419 LE_SHARED le_audio_StreamRef_t ifgen_le_audio_OpenModemVoiceRx
420 (
421  le_msg_SessionRef_t _ifgen_sessionRef
422 );
423 
424 //--------------------------------------------------------------------------------------------------
425 /**
426  * Open the transmitted audio stream of a voice call.
427  *
428  * @return Reference to the output audio stream, NULL if the function fails.
429  */
430 //--------------------------------------------------------------------------------------------------
431 LE_SHARED le_audio_StreamRef_t ifgen_le_audio_OpenModemVoiceTx
432 (
433  le_msg_SessionRef_t _ifgen_sessionRef
434 );
435 
436 //--------------------------------------------------------------------------------------------------
437 /**
438  * Add handler function for EVENT 'le_audio_Media'
439  *
440  * This event provides information on player / recorder stream events.
441  *
442  */
443 //--------------------------------------------------------------------------------------------------
444 LE_SHARED le_audio_MediaHandlerRef_t ifgen_le_audio_AddMediaHandler
445 (
446  le_msg_SessionRef_t _ifgen_sessionRef,
447  le_audio_StreamRef_t streamRef,
448  ///< [IN] The audio stream reference.
449  le_audio_MediaHandlerFunc_t handlerPtr,
450  ///< [IN]
451  void* contextPtr
452  ///< [IN]
453 );
454 
455 //--------------------------------------------------------------------------------------------------
456 /**
457  * Remove handler function for EVENT 'le_audio_Media'
458  */
459 //--------------------------------------------------------------------------------------------------
460 LE_SHARED void ifgen_le_audio_RemoveMediaHandler
461 (
462  le_msg_SessionRef_t _ifgen_sessionRef,
463  le_audio_MediaHandlerRef_t handlerRef
464  ///< [IN]
465 );
466 
467 //--------------------------------------------------------------------------------------------------
468 /**
469  * Close an audio stream.
470  * If several users own the stream reference, the interface closes only after
471  * the last user closes the audio stream.
472  *
473  * @note If the caller is passing a bad reference into this function, it is a fatal error, the
474  * function will not return.
475  */
476 //--------------------------------------------------------------------------------------------------
477 LE_SHARED void ifgen_le_audio_Close
478 (
479  le_msg_SessionRef_t _ifgen_sessionRef,
480  le_audio_StreamRef_t streamRef
481  ///< [IN] Audio stream reference.
482 );
483 
484 //--------------------------------------------------------------------------------------------------
485 /**
486  * Set the Gain value of an input or output stream.
487  *
488  * @return LE_BAD_PARAMETER The audio stream reference is invalid.
489  * @return LE_OUT_OF_RANGE The gain value is out of range.
490  * @return LE_UNAVAILABLE The audio service initialization failed.
491  * @return LE_FAULT On any other failure.
492  * @return LE_OK The function succeeded.
493  *
494  * @note If the caller is passing a bad reference into this function, it is a fatal error, the
495  * function will not return.
496  */
497 //--------------------------------------------------------------------------------------------------
498 LE_SHARED le_result_t ifgen_le_audio_SetGain
499 (
500  le_msg_SessionRef_t _ifgen_sessionRef,
501  le_audio_StreamRef_t streamRef,
502  ///< [IN] Audio stream reference.
503  int32_t gain
504  ///< [IN] Gain value (specific to the platform)
505 );
506 
507 //--------------------------------------------------------------------------------------------------
508 /**
509  * Get the Gain value of an input or output stream.
510  *
511  * @return LE_BAD_PARAMETER The audio stream reference is invalid.
512  * @return LE_UNAVAILABLE The audio service initialization failed.
513  * @return LE_FAULT On any other failure.
514  * @return LE_OK The function succeeded.
515  *
516  * @note If the caller is passing a bad reference into this function, it is a fatal error, the
517  * function will not return.
518  */
519 //--------------------------------------------------------------------------------------------------
520 LE_SHARED le_result_t ifgen_le_audio_GetGain
521 (
522  le_msg_SessionRef_t _ifgen_sessionRef,
523  le_audio_StreamRef_t streamRef,
524  ///< [IN] Audio stream reference.
525  int32_t* gainPtr
526  ///< [OUT] Gain value (specific to the platform)
527 );
528 
529 //--------------------------------------------------------------------------------------------------
530 /**
531  * Mute an audio stream.
532  *
533  * @return LE_BAD_PARAMETER The audio stream reference is invalid.
534  * @return LE_UNAVAILABLE The audio service initialization failed.
535  * @return LE_FAULT On any other failure.
536  * @return LE_OK The function succeeded.
537  *
538  * @note If the caller is passing a bad reference into this function, it is a fatal error, the
539  * function will not return.
540  */
541 //--------------------------------------------------------------------------------------------------
542 LE_SHARED le_result_t ifgen_le_audio_Mute
543 (
544  le_msg_SessionRef_t _ifgen_sessionRef,
545  le_audio_StreamRef_t streamRef
546  ///< [IN] Audio stream reference.
547 );
548 
549 //--------------------------------------------------------------------------------------------------
550 /**
551  * Unmute an audio stream.
552  *
553  * @return LE_BAD_PARAMETER The audio stream reference is invalid.
554  * @return LE_UNAVAILABLE The audio service initialization failed.
555  * @return LE_FAULT On any other failure.
556  * @return LE_OK The function succeeded.
557  *
558  * @note If the caller is passing a bad reference into this function, it is a fatal error, the
559  * function will not return.
560  */
561 //--------------------------------------------------------------------------------------------------
562 LE_SHARED le_result_t ifgen_le_audio_Unmute
563 (
564  le_msg_SessionRef_t _ifgen_sessionRef,
565  le_audio_StreamRef_t streamRef
566  ///< [IN] Audio stream reference.
567 );
568 
569 //--------------------------------------------------------------------------------------------------
570 /**
571  * Create an audio connector reference.
572  *
573  * @return Reference to the audio connector, NULL if the function fails.
574  */
575 //--------------------------------------------------------------------------------------------------
576 LE_SHARED le_audio_ConnectorRef_t ifgen_le_audio_CreateConnector
577 (
578  le_msg_SessionRef_t _ifgen_sessionRef
579 );
580 
581 //--------------------------------------------------------------------------------------------------
582 /**
583  * Delete an audio connector reference.
584  *
585  * @note If the caller is passing a bad reference into this function, it is a fatal error, the
586  * function will not return.
587  */
588 //--------------------------------------------------------------------------------------------------
589 LE_SHARED void ifgen_le_audio_DeleteConnector
590 (
591  le_msg_SessionRef_t _ifgen_sessionRef,
592  le_audio_ConnectorRef_t connectorRef
593  ///< [IN] Connector reference.
594 );
595 
596 //--------------------------------------------------------------------------------------------------
597 /**
598  * Connect an audio stream to the connector reference.
599  *
600  * @return LE_BUSY There are insufficient DSP resources available.
601  * @return LE_UNAVAILABLE The audio service initialization failed.
602  * @return LE_BAD_PARAMETER The connector and/or the audio stream references are invalid.
603  * @return LE_FAULT On any other failure.
604  * @return LE_OK The function succeeded.
605  *
606  * @note If the caller is passing a bad reference into this function, it is a fatal error, the
607  * function will not return.
608  */
609 //--------------------------------------------------------------------------------------------------
610 LE_SHARED le_result_t ifgen_le_audio_Connect
611 (
612  le_msg_SessionRef_t _ifgen_sessionRef,
613  le_audio_ConnectorRef_t connectorRef,
614  ///< [IN] Connector reference.
615  le_audio_StreamRef_t streamRef
616  ///< [IN] Audio stream reference.
617 );
618 
619 //--------------------------------------------------------------------------------------------------
620 /**
621  * Disconnect an audio stream from the connector reference.
622  *
623  * @note If the caller is passing a bad reference into this function, it is a fatal error, the
624  * function will not return.
625  */
626 //--------------------------------------------------------------------------------------------------
627 LE_SHARED void ifgen_le_audio_Disconnect
628 (
629  le_msg_SessionRef_t _ifgen_sessionRef,
630  le_audio_ConnectorRef_t connectorRef,
631  ///< [IN] Connector reference.
632  le_audio_StreamRef_t streamRef
633  ///< [IN] Audio stream reference.
634 );
635 
636 //--------------------------------------------------------------------------------------------------
637 /**
638  * Add handler function for EVENT 'le_audio_DtmfDetector'
639  *
640  * This event provides information on DTMF decoding for the specified streamRef
641  *
642  */
643 //--------------------------------------------------------------------------------------------------
644 LE_SHARED le_audio_DtmfDetectorHandlerRef_t ifgen_le_audio_AddDtmfDetectorHandler
645 (
646  le_msg_SessionRef_t _ifgen_sessionRef,
647  le_audio_StreamRef_t streamRef,
648  ///< [IN] Audio stream reference.
650  ///< [IN]
651  void* contextPtr
652  ///< [IN]
653 );
654 
655 //--------------------------------------------------------------------------------------------------
656 /**
657  * Remove handler function for EVENT 'le_audio_DtmfDetector'
658  */
659 //--------------------------------------------------------------------------------------------------
660 LE_SHARED void ifgen_le_audio_RemoveDtmfDetectorHandler
661 (
662  le_msg_SessionRef_t _ifgen_sessionRef,
664  ///< [IN]
665 );
666 
667 //--------------------------------------------------------------------------------------------------
668 /**
669  * This function must be called to enable the Noise Suppressor.
670  *
671  * @return LE_BAD_PARAMETER The audio stream reference is invalid.
672  * @return LE_UNAVAILABLE The audio service initialization failed.
673  * @return LE_FAULT On any other failure.
674  * @return LE_OK Function succeeded.
675  *
676  * @note The process exits, if an invalid audio stream reference is given.
677  */
678 //--------------------------------------------------------------------------------------------------
679 LE_SHARED le_result_t ifgen_le_audio_EnableNoiseSuppressor
680 (
681  le_msg_SessionRef_t _ifgen_sessionRef,
682  le_audio_StreamRef_t streamRef
683  ///< [IN] Audio stream reference.
684 );
685 
686 //--------------------------------------------------------------------------------------------------
687 /**
688  * This function must be called to disable the Noise Suppressor.
689  *
690  * @return LE_BAD_PARAMETER The audio stream reference is invalid.
691  * @return LE_UNAVAILABLE The audio service initialization failed.
692  * @return LE_FAULT On any other failure.
693  * @return LE_OK Function succeeded.
694  *
695  * @note The process exits, if an invalid audio stream reference is given.
696  */
697 //--------------------------------------------------------------------------------------------------
698 LE_SHARED le_result_t ifgen_le_audio_DisableNoiseSuppressor
699 (
700  le_msg_SessionRef_t _ifgen_sessionRef,
701  le_audio_StreamRef_t streamRef
702  ///< [IN] Audio stream reference.
703 );
704 
705 //--------------------------------------------------------------------------------------------------
706 /**
707  * This function must be called to enable the Echo Canceller.
708  *
709  * @return LE_BAD_PARAMETER The audio stream reference is invalid.
710  * @return LE_UNAVAILABLE The audio service initialization failed.
711  * @return LE_FAULT On any other failure.
712  * @return LE_OK Function succeeded.
713  *
714  * @note The process exits, if an invalid audio stream reference is given.
715  */
716 //--------------------------------------------------------------------------------------------------
717 LE_SHARED le_result_t ifgen_le_audio_EnableEchoCanceller
718 (
719  le_msg_SessionRef_t _ifgen_sessionRef,
720  le_audio_StreamRef_t streamRef
721  ///< [IN] Audio stream reference.
722 );
723 
724 //--------------------------------------------------------------------------------------------------
725 /**
726  * This function must be called to disable the Echo Canceller.
727  *
728  * @return LE_BAD_PARAMETER The audio stream reference is invalid.
729  * @return LE_UNAVAILABLE The audio service initialization failed.
730  * @return LE_FAULT On any other failure.
731  * @return LE_OK Function succeeded.
732  *
733  * @note The process exits, if an invalid audio stream reference is given.
734  */
735 //--------------------------------------------------------------------------------------------------
736 LE_SHARED le_result_t ifgen_le_audio_DisableEchoCanceller
737 (
738  le_msg_SessionRef_t _ifgen_sessionRef,
739  le_audio_StreamRef_t streamRef
740  ///< [IN] Audio stream reference.
741 );
742 
743 //--------------------------------------------------------------------------------------------------
744 /**
745  * This function must be called to get the status of Noise Suppressor.
746  *
747  * @return LE_BAD_PARAMETER The audio stream reference is invalid.
748  * @return LE_UNAVAILABLE The audio service initialization failed.
749  * @return LE_FAULT On any other failure.
750  * @return LE_OK Function succeeded.
751  *
752  * @note The process exits, if an invalid audio stream reference is given.
753  */
754 //--------------------------------------------------------------------------------------------------
755 LE_SHARED le_result_t ifgen_le_audio_IsNoiseSuppressorEnabled
756 (
757  le_msg_SessionRef_t _ifgen_sessionRef,
758  le_audio_StreamRef_t streamRef,
759  ///< [IN] Audio stream reference.
760  bool* statusPtr
761  ///< [OUT] true if NS is enabled, false otherwise
762 );
763 
764 //--------------------------------------------------------------------------------------------------
765 /**
766  * This function must be called to get the status of Echo Canceller.
767  *
768  * @return LE_BAD_PARAMETER The audio stream reference is invalid.
769  * @return LE_UNAVAILABLE The audio service initialization failed.
770  * @return LE_FAULT On any other failure.
771  * @return LE_OK Function succeeded.
772  *
773  * @note The process exits, if an invalid audio stream reference is given.
774  */
775 //--------------------------------------------------------------------------------------------------
776 LE_SHARED le_result_t ifgen_le_audio_IsEchoCancellerEnabled
777 (
778  le_msg_SessionRef_t _ifgen_sessionRef,
779  le_audio_StreamRef_t streamRef,
780  ///< [IN] Audio stream reference.
781  bool* statusPtr
782  ///< [OUT] true if EC is enabled, false otherwise
783 );
784 
785 //--------------------------------------------------------------------------------------------------
786 /**
787  * This function must be called to enable the FIR (Finite Impulse Response) filter.
788  *
789  * @return LE_BAD_PARAMETER The audio stream reference is invalid.
790  * @return LE_UNAVAILABLE The audio service initialization failed.
791  * @return LE_FAULT On any other failure.
792  * @return LE_OK Function succeeded.
793  *
794  * @note The process exits, if an invalid audio stream reference is given.
795  */
796 //--------------------------------------------------------------------------------------------------
797 LE_SHARED le_result_t ifgen_le_audio_EnableFirFilter
798 (
799  le_msg_SessionRef_t _ifgen_sessionRef,
800  le_audio_StreamRef_t streamRef
801  ///< [IN] Audio stream reference.
802 );
803 
804 //--------------------------------------------------------------------------------------------------
805 /**
806  * This function must be called to disable the FIR (Finite Impulse Response) filter.
807  *
808  * @return LE_BAD_PARAMETER The audio stream reference is invalid.
809  * @return LE_UNAVAILABLE The audio service initialization failed.
810  * @return LE_FAULT On any other failure.
811  * @return LE_OK Function succeeded.
812  *
813  * @note The process exits, if an invalid audio stream reference is given.
814  */
815 //--------------------------------------------------------------------------------------------------
816 LE_SHARED le_result_t ifgen_le_audio_DisableFirFilter
817 (
818  le_msg_SessionRef_t _ifgen_sessionRef,
819  le_audio_StreamRef_t streamRef
820  ///< [IN] Audio stream reference.
821 );
822 
823 //--------------------------------------------------------------------------------------------------
824 /**
825  * This function must be called to enable the IIR (Infinite Impulse Response) filter.
826  *
827  * @return LE_BAD_PARAMETER The audio stream reference is invalid.
828  * @return LE_UNAVAILABLE The audio service initialization failed.
829  * @return LE_FAULT On any other failure.
830  * @return LE_OK Function succeeded.
831  *
832  * @note The process exits, if an invalid audio stream reference is given.
833  */
834 //--------------------------------------------------------------------------------------------------
835 LE_SHARED le_result_t ifgen_le_audio_EnableIirFilter
836 (
837  le_msg_SessionRef_t _ifgen_sessionRef,
838  le_audio_StreamRef_t streamRef
839  ///< [IN] Audio stream reference.
840 );
841 
842 //--------------------------------------------------------------------------------------------------
843 /**
844  * This function must be called to disable the IIR (Infinite Impulse Response) filter.
845  *
846  * @return LE_BAD_PARAMETER The audio stream reference is invalid.
847  * @return LE_UNAVAILABLE The audio service initialization failed.
848  * @return LE_FAULT On any other failure.
849  * @return LE_OK Function succeeded.
850  *
851  * @note The process exits, if an invalid audio stream reference is given.
852  */
853 //--------------------------------------------------------------------------------------------------
854 LE_SHARED le_result_t ifgen_le_audio_DisableIirFilter
855 (
856  le_msg_SessionRef_t _ifgen_sessionRef,
857  le_audio_StreamRef_t streamRef
858  ///< [IN] Audio stream reference.
859 );
860 
861 //--------------------------------------------------------------------------------------------------
862 /**
863  * This function must be called to enable the automatic gain control on the selected audio stream.
864  *
865  * @return LE_BAD_PARAMETER The audio stream reference is invalid.
866  * @return LE_UNAVAILABLE The audio service initialization failed.
867  * @return LE_FAULT On any other failure.
868  * @return LE_OK Function succeeded.
869  *
870  * @note The process exits, if an invalid audio stream reference is given.
871  */
872 //--------------------------------------------------------------------------------------------------
873 LE_SHARED le_result_t ifgen_le_audio_EnableAutomaticGainControl
874 (
875  le_msg_SessionRef_t _ifgen_sessionRef,
876  le_audio_StreamRef_t streamRef
877  ///< [IN] Audio stream reference.
878 );
879 
880 //--------------------------------------------------------------------------------------------------
881 /**
882  * This function must be called to disable the automatic gain control on the selected audio stream.
883  *
884  * @return LE_BAD_PARAMETER The audio stream reference is invalid.
885  * @return LE_UNAVAILABLE The audio service initialization failed.
886  * @return LE_FAULT On any other failure.
887  * @return LE_OK Function succeeded.
888  *
889  * @note The process exits, if an invalid audio stream reference is given.
890  */
891 //--------------------------------------------------------------------------------------------------
892 LE_SHARED le_result_t ifgen_le_audio_DisableAutomaticGainControl
893 (
894  le_msg_SessionRef_t _ifgen_sessionRef,
895  le_audio_StreamRef_t streamRef
896  ///< [IN] Audio stream reference.
897 );
898 
899 //--------------------------------------------------------------------------------------------------
900 /**
901  * This function must be called to set the audio profile.
902  *
903  * @return LE_UNAVAILABLE On audio service initialization failure.
904  * @return LE_FAULT On any other failure.
905  * @return LE_OK Function succeeded.
906  *
907  */
908 //--------------------------------------------------------------------------------------------------
909 LE_SHARED le_result_t ifgen_le_audio_SetProfile
910 (
911  le_msg_SessionRef_t _ifgen_sessionRef,
912  uint32_t profile
913  ///< [IN] Audio profile.
914 );
915 
916 //--------------------------------------------------------------------------------------------------
917 /**
918  * This function must be called to get the audio profile in use.
919  *
920  * @return LE_UNAVAILABLE On audio service initialization failure.
921  * @return LE_FAULT On any other failure.
922  * @return LE_OK Function succeeded.
923  *
924  */
925 //--------------------------------------------------------------------------------------------------
926 LE_SHARED le_result_t ifgen_le_audio_GetProfile
927 (
928  le_msg_SessionRef_t _ifgen_sessionRef,
929  uint32_t* profilePtr
930  ///< [OUT] Audio profile.
931 );
932 
933 //--------------------------------------------------------------------------------------------------
934 /**
935  * Configure the PCM Sampling Rate.
936  *
937  * @return LE_FAULT Function failed.
938  * @return LE_OUT_OF_RANGE Your platform does not support the setting's value.
939  * @return LE_BUSY PCM interface is already active.
940  * @return LE_OK Function succeeded.
941  */
942 //--------------------------------------------------------------------------------------------------
943 LE_SHARED le_result_t ifgen_le_audio_SetPcmSamplingRate
944 (
945  le_msg_SessionRef_t _ifgen_sessionRef,
946  uint32_t rate
947  ///< [IN] Sampling rate in Hz.
948 );
949 
950 //--------------------------------------------------------------------------------------------------
951 /**
952  * Configure the PCM Sampling Resolution.
953  *
954  * @return LE_FAULT Function failed.
955  * @return LE_OUT_OF_RANGE Your platform does not support the setting's value.
956  * @return LE_BUSY PCM interface is already active.
957  * @return LE_OK Function succeeded.
958  */
959 //--------------------------------------------------------------------------------------------------
960 LE_SHARED le_result_t ifgen_le_audio_SetPcmSamplingResolution
961 (
962  le_msg_SessionRef_t _ifgen_sessionRef,
963  uint32_t bitsPerSample
964  ///< [IN] Sampling resolution (bits/sample).
965 );
966 
967 //--------------------------------------------------------------------------------------------------
968 /**
969  * Configure the PCM Companding.
970  *
971  * @return LE_FAULT Function failed.
972  * @return LE_OUT_OF_RANGE Your platform does not support the setting's value.
973  * @return LE_BUSY PCM interface is already active.
974  * @return LE_OK Function succeeded.
975  */
976 //--------------------------------------------------------------------------------------------------
977 LE_SHARED le_result_t ifgen_le_audio_SetPcmCompanding
978 (
979  le_msg_SessionRef_t _ifgen_sessionRef,
980  le_audio_Companding_t companding
981  ///< [IN] Companding.
982 );
983 
984 //--------------------------------------------------------------------------------------------------
985 /**
986  * Retrieve the PCM Sampling Rate.
987  *
988  * @return The sampling rate in Hz.
989  */
990 //--------------------------------------------------------------------------------------------------
991 LE_SHARED uint32_t ifgen_le_audio_GetPcmSamplingRate
992 (
993  le_msg_SessionRef_t _ifgen_sessionRef
994 );
995 
996 //--------------------------------------------------------------------------------------------------
997 /**
998  * Retrieve the PCM Sampling Resolution.
999  *
1000  * @return The sampling resolution (bits/sample).
1001  */
1002 //--------------------------------------------------------------------------------------------------
1003 LE_SHARED uint32_t ifgen_le_audio_GetPcmSamplingResolution
1004 (
1005  le_msg_SessionRef_t _ifgen_sessionRef
1006 );
1007 
1008 //--------------------------------------------------------------------------------------------------
1009 /**
1010  * Retrieve the PCM Companding.
1011  *
1012  * @return The PCM companding.
1013  */
1014 //--------------------------------------------------------------------------------------------------
1015 LE_SHARED le_audio_Companding_t ifgen_le_audio_GetPcmCompanding
1016 (
1017  le_msg_SessionRef_t _ifgen_sessionRef
1018 );
1019 
1020 //--------------------------------------------------------------------------------------------------
1021 /**
1022  * Get the default PCM time slot used on the current platform.
1023  *
1024  * @return the time slot number.
1025  */
1026 //--------------------------------------------------------------------------------------------------
1027 LE_SHARED uint32_t ifgen_le_audio_GetDefaultPcmTimeSlot
1028 (
1029  le_msg_SessionRef_t _ifgen_sessionRef
1030 );
1031 
1032 //--------------------------------------------------------------------------------------------------
1033 /**
1034  * Get the default I2S channel mode used on the current platform.
1035  *
1036  * @return the I2S channel mode.
1037  */
1038 //--------------------------------------------------------------------------------------------------
1039 LE_SHARED le_audio_I2SChannel_t ifgen_le_audio_GetDefaultI2sMode
1040 (
1041  le_msg_SessionRef_t _ifgen_sessionRef
1042 );
1043 
1044 //--------------------------------------------------------------------------------------------------
1045 /**
1046  * Play a file on a playback stream.
1047  *
1048  * @return LE_FAULT Function failed.
1049  * @return LE_BAD_PARAMETER Audio stream reference is invalid.
1050  * @return LE_BUSY Player interface is already active.
1051  * @return LE_OK Function succeeded.
1052  *
1053  * @note
1054  * - The fd is closed by the IPC API. To play again the same file, the fd parameter can be set
1055  * to LE_AUDIO_NO_FD: in this case, the previous file descriptor is re-used.
1056  * If the fd as to be kept on its side, the application should duplicate the fd (e.g., using
1057  * dup() ) before calling the API.
1058  * In that case, the old and new file descriptors refer to the same open file description and
1059  * thus share file offset. So, once a playback has reached the end of file, the application must
1060  * reset the file offset by using lseek on the duplicated descriptor to start the playback from
1061  * the beginning.
1062  *
1063  * @note
1064  * - Calling le_audio_PlayFile(<..>, LE_AUDIO_NO_FD) will rewind the audio file to the
1065  * beginning when a playback is already in progress.
1066  *
1067  */
1068 //--------------------------------------------------------------------------------------------------
1069 LE_SHARED le_result_t ifgen_le_audio_PlayFile
1070 (
1071  le_msg_SessionRef_t _ifgen_sessionRef,
1072  le_audio_StreamRef_t streamRef,
1073  ///< [IN] Audio stream reference.
1074  int fd
1075  ///< [IN] File descriptor.
1076 );
1077 
1078 //--------------------------------------------------------------------------------------------------
1079 /**
1080  * Initiate a playback sending samples over a pipe.
1081  *
1082  * @return LE_FAULT Function failed.
1083  * @return LE_BUSY Player interface is already active.
1084  * @return LE_OK Function succeeded.
1085  *
1086  * @note The fd is closed by the IPC API. To use again the same pipe, the fd parameter can be set
1087  * to LE_AUDIO_NO_FD: in this case, the previous file descriptor is re-used.
1088  * If the fd as to be kept on its side, the application should duplicate the fd (e.g., using dup() )
1089  * before calling the API.
1090  *
1091  * @note Playback initiated with this function must be stopped by calling le_audio_Stop().
1092  */
1093 //--------------------------------------------------------------------------------------------------
1094 LE_SHARED le_result_t ifgen_le_audio_PlaySamples
1095 (
1096  le_msg_SessionRef_t _ifgen_sessionRef,
1097  le_audio_StreamRef_t streamRef,
1098  ///< [IN] Audio stream reference.
1099  int fd
1100  ///< [IN] File descriptor.
1101 );
1102 
1103 //--------------------------------------------------------------------------------------------------
1104 /**
1105  * Record a file on a recorder stream.
1106  *
1107  * @return LE_FAULT Function failed.
1108  * @return LE_BAD_PARAMETER The audio stream reference is invalid.
1109  * @return LE_BUSY Recorder interface is already active.
1110  * @return LE_OK Function succeeded.
1111  *
1112  * @note the fd is closed by the API. To record again the same file, the fd parameter can be set to
1113  * LE_AUDIO_NO_FD: in this case, the previous file descriptor is re-used.
1114  * If the fd as to be kept on its side, the application should duplicate the fd (e.g., using dup() )
1115  * before calling the API.
1116  *
1117  */
1118 //--------------------------------------------------------------------------------------------------
1119 LE_SHARED le_result_t ifgen_le_audio_RecordFile
1120 (
1121  le_msg_SessionRef_t _ifgen_sessionRef,
1122  le_audio_StreamRef_t streamRef,
1123  ///< [IN] Audio stream reference.
1124  int fd
1125  ///< [IN] File descriptor.
1126 );
1127 
1128 //--------------------------------------------------------------------------------------------------
1129 /**
1130  * Get samples from a recorder stream.
1131  *
1132  * @return LE_FAULT Function failed.
1133  * @return LE_BUSY Recorder interface is already active.
1134  * @return LE_OK Function succeeded.
1135  *
1136  * @note The fd is closed by the API. To use again the same pipe, the fd parameter can be set to
1137  * LE_AUDIO_NO_FD: in this case, the previous file descriptor is re-used.
1138  * If the fd as to be kept on its side, the application should duplicate the fd (e.g., using dup() )
1139  * before calling the API.
1140  *
1141  * @note When using this function recording must be stopped by calling le_audio_Stop().
1142  */
1143 //--------------------------------------------------------------------------------------------------
1144 LE_SHARED le_result_t ifgen_le_audio_GetSamples
1145 (
1146  le_msg_SessionRef_t _ifgen_sessionRef,
1147  le_audio_StreamRef_t streamRef,
1148  ///< [IN] Audio stream reference.
1149  int fd
1150  ///< [IN] File descriptor.
1151 );
1152 
1153 //--------------------------------------------------------------------------------------------------
1154 /**
1155  * Stop the file playback/recording.
1156  *
1157  * @return LE_FAULT Function failed.
1158  * @return LE_OK Function succeeded.
1159  *
1160  * @note The used file descriptor is not deallocated, but is is rewound to the beginning.
1161  *
1162  */
1163 //--------------------------------------------------------------------------------------------------
1164 LE_SHARED le_result_t ifgen_le_audio_Stop
1165 (
1166  le_msg_SessionRef_t _ifgen_sessionRef,
1167  le_audio_StreamRef_t streamRef
1168  ///< [IN] Audio stream reference.
1169 );
1170 
1171 //--------------------------------------------------------------------------------------------------
1172 /**
1173  * Pause the file playback/recording.
1174  *
1175  * @return LE_FAULT Function failed.
1176  * @return LE_OK Function succeeded.
1177  *
1178  */
1179 //--------------------------------------------------------------------------------------------------
1180 LE_SHARED le_result_t ifgen_le_audio_Pause
1181 (
1182  le_msg_SessionRef_t _ifgen_sessionRef,
1183  le_audio_StreamRef_t streamRef
1184  ///< [IN] Audio stream reference.
1185 );
1186 
1187 //--------------------------------------------------------------------------------------------------
1188 /**
1189  * Flush the remaining audio samples.
1190  *
1191  * @return LE_FAULT Function failed.
1192  * @return LE_OK Function succeeded.
1193  *
1194  */
1195 //--------------------------------------------------------------------------------------------------
1196 LE_SHARED le_result_t ifgen_le_audio_Flush
1197 (
1198  le_msg_SessionRef_t _ifgen_sessionRef,
1199  le_audio_StreamRef_t streamRef
1200  ///< [IN] Audio stream reference.
1201 );
1202 
1203 //--------------------------------------------------------------------------------------------------
1204 /**
1205  * Resume a file playback/recording (need to be in pause state).
1206  *
1207  * @return LE_FAULT Function failed.
1208  * @return LE_OK Function succeeded.
1209  *
1210  */
1211 //--------------------------------------------------------------------------------------------------
1212 LE_SHARED le_result_t ifgen_le_audio_Resume
1213 (
1214  le_msg_SessionRef_t _ifgen_sessionRef,
1215  le_audio_StreamRef_t streamRef
1216  ///< [IN] Audio stream reference.
1217 );
1218 
1219 //--------------------------------------------------------------------------------------------------
1220 /**
1221  * Set the channel number of a PCM sample.
1222  *
1223  * @return LE_FAULT Function failed.
1224  * @return LE_OK Function succeeded.
1225  *
1226  */
1227 //--------------------------------------------------------------------------------------------------
1228 LE_SHARED le_result_t ifgen_le_audio_SetSamplePcmChannelNumber
1229 (
1230  le_msg_SessionRef_t _ifgen_sessionRef,
1231  le_audio_StreamRef_t streamRef,
1232  ///< [IN] Audio stream reference.
1233  uint32_t nbChannel
1234  ///< [IN] Channel Number
1235 );
1236 
1237 //--------------------------------------------------------------------------------------------------
1238 /**
1239  * Get the channel number of a PCM sample.
1240  *
1241  * @return LE_FAULT Function failed.
1242  * @return LE_OK Function succeeded.
1243  *
1244  */
1245 //--------------------------------------------------------------------------------------------------
1246 LE_SHARED le_result_t ifgen_le_audio_GetSamplePcmChannelNumber
1247 (
1248  le_msg_SessionRef_t _ifgen_sessionRef,
1249  le_audio_StreamRef_t streamRef,
1250  ///< [IN] Audio stream reference.
1251  uint32_t* nbChannelPtr
1252  ///< [OUT] Channel Number
1253 );
1254 
1255 //--------------------------------------------------------------------------------------------------
1256 /**
1257  * Set the PCM sampling rate of a PCM sample.
1258  *
1259  * @return LE_FAULT Function failed.
1260  * @return LE_OK Function succeeded.
1261  *
1262  */
1263 //--------------------------------------------------------------------------------------------------
1264 LE_SHARED le_result_t ifgen_le_audio_SetSamplePcmSamplingRate
1265 (
1266  le_msg_SessionRef_t _ifgen_sessionRef,
1267  le_audio_StreamRef_t streamRef,
1268  ///< [IN] Audio stream reference.
1269  uint32_t rate
1270  ///< [IN] PCM sampling Rate.
1271 );
1272 
1273 //--------------------------------------------------------------------------------------------------
1274 /**
1275  * Get the PCM sampling rate of a PCM sample.
1276  *
1277  * @return LE_FAULT Function failed.
1278  * @return LE_OK Function succeeded.
1279  *
1280  */
1281 //--------------------------------------------------------------------------------------------------
1282 LE_SHARED le_result_t ifgen_le_audio_GetSamplePcmSamplingRate
1283 (
1284  le_msg_SessionRef_t _ifgen_sessionRef,
1285  le_audio_StreamRef_t streamRef,
1286  ///< [IN] Audio stream reference.
1287  uint32_t* ratePtr
1288  ///< [OUT] PCM sampling Rate.
1289 );
1290 
1291 //--------------------------------------------------------------------------------------------------
1292 /**
1293  * Set the sampling resolution (in bits per sample) of a PCM sample.
1294  *
1295  * @return LE_FAULT Function failed.
1296  * @return LE_OK Function succeeded.
1297  *
1298  */
1299 //--------------------------------------------------------------------------------------------------
1300 LE_SHARED le_result_t ifgen_le_audio_SetSamplePcmSamplingResolution
1301 (
1302  le_msg_SessionRef_t _ifgen_sessionRef,
1303  le_audio_StreamRef_t streamRef,
1304  ///< [IN] Audio stream reference.
1305  uint32_t samplingRes
1306  ///< [IN] Sampling resolution (in bits per sample).
1307 );
1308 
1309 //--------------------------------------------------------------------------------------------------
1310 /**
1311  * Get the sampling resolution (in bits per sample) of a PCM sample.
1312  *
1313  * @return LE_FAULT Function failed.
1314  * @return LE_OK Function succeeded.
1315  *
1316  */
1317 //--------------------------------------------------------------------------------------------------
1318 LE_SHARED le_result_t ifgen_le_audio_GetSamplePcmSamplingResolution
1319 (
1320  le_msg_SessionRef_t _ifgen_sessionRef,
1321  le_audio_StreamRef_t streamRef,
1322  ///< [IN] Audio stream reference.
1323  uint32_t* samplingResPtr
1324  ///< [OUT] Sampling resolution (in bits per sample).
1325 );
1326 
1327 //--------------------------------------------------------------------------------------------------
1328 /**
1329  * This function must be called to play a DTMF on a specific audio stream.
1330  *
1331  * @return LE_FORMAT_ERROR The DTMF characters are invalid.
1332  * @return LE_BUSY A DTMF playback is already in progress on the playback stream.
1333  * @return LE_FAULT Function failed to play the DTMFs.
1334  * @return LE_OK Function succeeded.
1335  *
1336  * @note If the DTMF string is too long (max DTMF_MAX_LEN characters), it is a fatal
1337  * error, the function will not return.
1338  * @note If the DTMF duration or pause is more than 5000ms, it is a fatal
1339  * error, the function will not return.
1340  * @note The process exits, if an invalid audio stream reference is given.
1341  */
1342 //--------------------------------------------------------------------------------------------------
1343 LE_SHARED le_result_t ifgen_le_audio_PlayDtmf
1344 (
1345  le_msg_SessionRef_t _ifgen_sessionRef,
1346  le_audio_StreamRef_t streamRef,
1347  ///< [IN] Audio stream reference.
1348  const char* LE_NONNULL dtmf,
1349  ///< [IN] DTMFs to play.
1350  uint32_t duration,
1351  ///< [IN] DTMF duration in milliseconds.
1352  uint32_t pause
1353  ///< [IN] Pause duration between tones in milliseconds.
1354 );
1355 
1356 //--------------------------------------------------------------------------------------------------
1357 /**
1358  * This function must be called to ask to the Mobile Network to generate on the remote audio party
1359  * the DTMFs.
1360  *
1361  * @return LE_FORMAT_ERROR The DTMF characters are invalid.
1362  * @return LE_BUSY A DTMF playback is in progress.
1363  * @return LE_FAULT Function failed.
1364  * @return LE_OK Function succeeded.
1365  *
1366  * @note If the DTMF string is too long (max DTMF_MAX_LEN characters), it is a fatal
1367  * error, the function will not return.
1368  */
1369 //--------------------------------------------------------------------------------------------------
1370 LE_SHARED le_result_t ifgen_le_audio_PlaySignallingDtmf
1371 (
1372  le_msg_SessionRef_t _ifgen_sessionRef,
1373  const char* LE_NONNULL dtmf,
1374  ///< [IN] DTMFs to play.
1375  uint32_t duration,
1376  ///< [IN] DTMF duration in milliseconds.
1377  uint32_t pause
1378  ///< [IN] Pause duration between tones in milliseconds.
1379 );
1380 
1381 //--------------------------------------------------------------------------------------------------
1382 /**
1383  * Set the encoding format of a recorder stream.
1384  *
1385  * @return LE_FAULT Function failed.
1386  * @return LE_OK Function succeeded.
1387  *
1388  */
1389 //--------------------------------------------------------------------------------------------------
1390 LE_SHARED le_result_t ifgen_le_audio_SetEncodingFormat
1391 (
1392  le_msg_SessionRef_t _ifgen_sessionRef,
1393  le_audio_StreamRef_t streamRef,
1394  ///< [IN] Audio stream reference.
1395  le_audio_Format_t format
1396  ///< [IN] Encoding format.
1397 );
1398 
1399 //--------------------------------------------------------------------------------------------------
1400 /**
1401  * Get the encoding format of a recorder stream.
1402  *
1403  * @return LE_FAULT Function failed.
1404  * @return LE_OK Function succeeded.
1405  *
1406  * @note A client calling this function with either an invalid
1407  * streamRef or null out pointer parameter will be killed and the
1408  * function will not return.
1409  */
1410 //--------------------------------------------------------------------------------------------------
1411 LE_SHARED le_result_t ifgen_le_audio_GetEncodingFormat
1412 (
1413  le_msg_SessionRef_t _ifgen_sessionRef,
1414  le_audio_StreamRef_t streamRef,
1415  ///< [IN] Audio stream reference.
1416  le_audio_Format_t* formatPtr
1417  ///< [OUT] Encoding format.
1418 );
1419 
1420 //--------------------------------------------------------------------------------------------------
1421 /**
1422  * Set the AMR mode for AMR encoder.
1423  *
1424  * @return LE_FAULT Function failed.
1425  * @return LE_OK Function succeeded.
1426  *
1427  */
1428 //--------------------------------------------------------------------------------------------------
1429 LE_SHARED le_result_t ifgen_le_audio_SetSampleAmrMode
1430 (
1431  le_msg_SessionRef_t _ifgen_sessionRef,
1432  le_audio_StreamRef_t streamRef,
1433  ///< [IN] Audio stream reference.
1434  le_audio_AmrMode_t mode
1435  ///< [IN] AMR mode.
1436 );
1437 
1438 //--------------------------------------------------------------------------------------------------
1439 /**
1440  * Get the AMR mode for AMR encoder.
1441  *
1442  * @return LE_FAULT Function failed.
1443  * @return LE_OK Function succeeded.
1444  *
1445  * @note A client calling this function with a null out pointer
1446  * parameter will be killed and the function will not return.
1447  */
1448 //--------------------------------------------------------------------------------------------------
1449 LE_SHARED le_result_t ifgen_le_audio_GetSampleAmrMode
1450 (
1451  le_msg_SessionRef_t _ifgen_sessionRef,
1452  le_audio_StreamRef_t streamRef,
1453  ///< [IN] Audio stream reference.
1454  le_audio_AmrMode_t* modePtr
1455  ///< [OUT] AMR mode.
1456 );
1457 
1458 //--------------------------------------------------------------------------------------------------
1459 /**
1460  * Set the AMR discontinuous transmission (DTX). The DTX is activated by default.
1461  *
1462  * @return LE_FAULT Function failed.
1463  * @return LE_OK Function succeeded.
1464  *
1465  * @note If the caller is passing a bad reference into this function, it is a fatal error, the
1466  * function will not return.
1467  */
1468 //--------------------------------------------------------------------------------------------------
1469 LE_SHARED le_result_t ifgen_le_audio_SetSampleAmrDtx
1470 (
1471  le_msg_SessionRef_t _ifgen_sessionRef,
1472  le_audio_StreamRef_t streamRef,
1473  ///< [IN] Audio stream reference.
1474  bool dtx
1475  ///< [IN] DTX.
1476 );
1477 
1478 //--------------------------------------------------------------------------------------------------
1479 /**
1480  * Get the AMR discontinuous transmission (DTX) value.
1481  *
1482  * @return LE_FAULT Function failed.
1483  * @return LE_OK Function succeeded.
1484  *
1485  * @note If the caller is passing a bad reference into this function, it is a fatal error, the
1486  * function will not return.
1487  */
1488 //--------------------------------------------------------------------------------------------------
1489 LE_SHARED le_result_t ifgen_le_audio_GetSampleAmrDtx
1490 (
1491  le_msg_SessionRef_t _ifgen_sessionRef,
1492  le_audio_StreamRef_t streamRef,
1493  ///< [IN] Audio stream reference.
1494  bool* dtxPtr
1495  ///< [OUT] DTX.
1496 );
1497 
1498 //--------------------------------------------------------------------------------------------------
1499 /**
1500  * Set the value of a platform specific gain in the audio subsystem.
1501  *
1502  * @return LE_BAD_PARAMETER The pointer to the name of the platform specific gain is invalid.
1503  * @return LE_NOT_FOUND The specified gain's name is not recognized in your audio subsystem.
1504  * @return LE_OUT_OF_RANGE The gain parameter is out of range.
1505  * @return LE_UNAVAILABLE The audio service initialization failed.
1506  * @return LE_FAULT On any other failure.
1507  * @return LE_OK The function succeeded.
1508  *
1509  * @note If the caller is passing a bad reference into this function, it is a fatal error, the
1510  * function will not return.
1511  * @warning Ensure to check the names of supported gains for your specific platform.
1512  */
1513 //--------------------------------------------------------------------------------------------------
1514 LE_SHARED le_result_t ifgen_le_audio_SetPlatformSpecificGain
1515 (
1516  le_msg_SessionRef_t _ifgen_sessionRef,
1517  const char* LE_NONNULL gainName,
1518  ///< [IN] Name of the platform specific gain.
1519  int32_t gain
1520  ///< [IN] The gain value (specific to the platform)
1521 );
1522 
1523 //--------------------------------------------------------------------------------------------------
1524 /**
1525  * Get the value of a platform specific gain in the audio subsystem.
1526  *
1527  * @return LE_BAD_PARAMETER The pointer to the name of the platform specific gain is invalid.
1528  * @return LE_NOT_FOUND The specified gain's name is not recognized in your audio subsystem.
1529  * @return LE_UNAVAILABLE The audio service initialization failed.
1530  * @return LE_FAULT On any other failure.
1531  * @return LE_OK The function succeeded.
1532  *
1533  * @note If the caller is passing a bad reference into this function, it is a fatal error, the
1534  * function will not return.
1535  * @warning Ensure to check the names of supported gains for your specific platform.
1536  */
1537 //--------------------------------------------------------------------------------------------------
1538 LE_SHARED le_result_t ifgen_le_audio_GetPlatformSpecificGain
1539 (
1540  le_msg_SessionRef_t _ifgen_sessionRef,
1541  const char* LE_NONNULL gainName,
1542  ///< [IN] Name of the platform specific gain.
1543  int32_t* gainPtr
1544  ///< [OUT] The gain value (specific to the platform)
1545 );
1546 
1547 //--------------------------------------------------------------------------------------------------
1548 /**
1549  * Mute the Call Waiting Tone.
1550  *
1551  * @return LE_UNAVAILABLE On audio service initialization failure.
1552  * @return LE_FAULT On any other failure.
1553  * @return LE_OK The function succeeded.
1554  */
1555 //--------------------------------------------------------------------------------------------------
1556 LE_SHARED le_result_t ifgen_le_audio_MuteCallWaitingTone
1557 (
1558  le_msg_SessionRef_t _ifgen_sessionRef
1559 );
1560 
1561 //--------------------------------------------------------------------------------------------------
1562 /**
1563  * Unmute the Call Waiting Tone.
1564  *
1565  * @return LE_UNAVAILABLE On audio service initialization failure.
1566  * @return LE_FAULT On any other failure.
1567  * @return LE_OK The function succeeded.
1568  */
1569 //--------------------------------------------------------------------------------------------------
1570 LE_SHARED le_result_t ifgen_le_audio_UnmuteCallWaitingTone
1571 (
1572  le_msg_SessionRef_t _ifgen_sessionRef
1573 );
1574 /** @} **/
1575 #endif // LE_AUDIO_COMMON_H_INCLUDE_GUARD
AMR Narrowband in 12.2kbps.
Definition: le_audio_common.h:162
Recording/playback has encountered an error.
Definition: le_audio_common.h:76
AMR Wideband in 18.25kbps.
Definition: le_audio_common.h:174
#define LE_SHARED
Definition: le_basics.h:300
struct le_audio_DtmfDetectorHandler * le_audio_DtmfDetectorHandlerRef_t
Definition: le_audio_common.h:215
AMR Narrowband in 7.95kbps.
Definition: le_audio_common.h:158
le_result_t
Definition: le_basics.h:46
AMR Wideband in 19.85kbps.
Definition: le_audio_common.h:176
MU-law PCM (i.e. North America and Japan).
Definition: le_audio_common.h:93
le_audio_I2SChannel_t
Definition: le_audio_common.h:106
le_audio_AmrMode_t
Definition: le_audio_common.h:144
Stereo mode.
Definition: le_audio_common.h:114
A-law PCM (i.e. Europe and most of the rest of the world).
Definition: le_audio_common.h:91
AMR Wideband in 6.6kbps.
Definition: le_audio_common.h:164
AMR Wideband in 12.65kbps.
Definition: le_audio_common.h:168
Right channel.
Definition: le_audio_common.h:110
void(* le_audio_DtmfDetectorHandlerFunc_t)(le_audio_StreamRef_t streamRef, char dtmf, void *contextPtr)
Definition: le_audio_common.h:241
AMR Narrowband in 5.9kbps.
Definition: le_audio_common.h:152
AMR Wideband in 15.85kbps.
Definition: le_audio_common.h:172
Enumerate max value.
Definition: le_audio_common.h:78
le_audio_MediaEvent_t
Definition: le_audio_common.h:70
AMR Narrowband in 10.3kbps.
Definition: le_audio_common.h:160
Waveform audio file.
Definition: le_audio_common.h:129
AMR Wideband in 23.05kbps.
Definition: le_audio_common.h:178
le_audio_Companding_t
Definition: le_audio_common.h:89
Playback has reached the end of file.
Definition: le_audio_common.h:72
Left channel.
Definition: le_audio_common.h:108
AMR Wideband in 23.85kbps.
Definition: le_audio_common.h:180
struct le_msg_Session * le_msg_SessionRef_t
Definition: le_messaging.h:860
Mono mode.
Definition: le_audio_common.h:112
struct le_audio_MediaHandler * le_audio_MediaHandlerRef_t
Definition: le_audio_common.h:207
struct le_audio_Connector * le_audio_ConnectorRef_t
Definition: le_audio_common.h:199
struct le_audio_Stream * le_audio_StreamRef_t
Definition: le_audio_common.h:191
void(* le_audio_MediaHandlerFunc_t)(le_audio_StreamRef_t streamRef, le_audio_MediaEvent_t event, void *contextPtr)
Definition: le_audio_common.h:225
AMR Narrowband in 4.75kbps.
Definition: le_audio_common.h:148
Linear PCM.
Definition: le_audio_common.h:95
AMR Wideband in 14.25kbps.
Definition: le_audio_common.h:170
Adaptive Multi Rate.
Definition: le_audio_common.h:131
AMR Narrowband in 7.4kbps (default value)
Definition: le_audio_common.h:156
AMR Narrowband in 6.7kbps.
Definition: le_audio_common.h:154
No more audio samples to play.
Definition: le_audio_common.h:74
Not set.
Definition: le_audio_common.h:146
Reverse mode (left & right reversed).
Definition: le_audio_common.h:116
le_audio_Format_t
Definition: le_audio_common.h:127
AMR Narrowband in 5.15kbps.
Definition: le_audio_common.h:150
AMR Wideband in 8.85kbps.
Definition: le_audio_common.h:166