le_audio_interface.h

Go to the documentation of this file.
1 
2 
3 /*
4  * ====================== WARNING ======================
5  *
6  * THE CONTENTS OF THIS FILE HAVE BEEN AUTO-GENERATED.
7  * DO NOT MODIFY IN ANY WAY.
8  *
9  * ====================== WARNING ======================
10  */
11 
12 /**
13  * @page c_audio Audio
14  *
15  * @ref le_audio_interface.h "API Reference" <br>
16  * @ref platformConstraintsAudio Constraints
17  *
18  * The Audio API handles audio interfaces including play and record supported formats.
19  *
20  * A Legato device can use several audio interfaces. You choose the input and output
21  * interfaces to tie together. The Audio stream related to a particular interface is
22  * represented with an 'Audio Stream Reference'.
23  *
24  * You can create your own audio path by connecting several audio streams together using
25  * audio connectors.
26  *
27  * An audio path can support more than two audio interfaces. You can have a basic output audio
28  * path of a voice call to connect the Modem Voice Received interface with the Speaker
29  * interface, and at the same time, the Modem Voice Received interface can be also connected to a
30  * Recorder Device interface.
31  *
32  * @section le_audio_binding IPC interfaces binding
33  *
34  * All the functions of this API are provided by the @b audioService.
35  *
36  * @note The functions that are highly dependent on the initialization of the lower layers of the
37  * @b audioService will return LE_UNAVAILABLE error code if those layers failed to initialize.
38  * Recovery can be attempted by restarting the service.
39  *
40  * Here's a code sample binding to audio services:
41  * @verbatim
42  bindings:
43  {
44  clientExe.clientComponent.le_audio -> audioService.le_audio
45  }
46  @endverbatim
47  *
48  * @section le_audio_configuration Configure the Audio
49  *
50  * The audio profile can be set with the le_audio_SetProfile() function.
51  *
52  * @warning Ensure to check the number of supported audio profiles for your specific platform.
53  *
54  * An audio profile can be retrieved with le_audio_GetProfile() and set with le_audio_SetProfile().
55  *
56  * Then, the following functions let you enable or disable the audio settings on the selected audio
57  * interface:
58  * - le_audio_EnableNoiseSuppressor()/le_audio_DisableNoiseSuppressor(): Noise Suppressor.
59  * - le_audio_EnableEchoCanceller()/ le_audio_DisableEchoCanceller(): Echo Canceller.
60  * - le_audio_EnableFirFilter()/ le_audio_DisableFirFilter(): downlink FIR Filter (Finite Impulse
61  * Response).
62  * - le_audio_EnableIirFilter()/ le_audio_DisableIirFilter(): downlink IIR Filter (Infinite Impulse
63  * Response).
64  * - le_audio_EnableAutomaticGainControl()/ le_audio_DisableAutomaticGainControl(): automatic
65  * gain on the selected audio stream.
66  *
67  * - le_audio_IsNoiseSuppressorEnabled(): To get the status of Noise Suppressor.
68  * - le_audio_IsEchoCancellerEnabled(): To get the status of Echo Canceller.
69  *
70  * To configure the encoding format, use le_audio_GetEncodingFormat() and le_audio_SetEncodingFormat().
71  *
72  * To configure gain settings, use le_audio_GetGain() and le_audio_SetGain().
73  *
74  * PCM has the following configuration get/set functions:
75  * - le_audio_GetPcmSamplingRate() and le_audio_SetPcmSamplingRate() for Hz rate.
76  * - le_audio_GetPcmSamplingResolution() and le_audio_SetPcmSamplingResolution() for bit/sample settings.
77  * - le_audio_GetPcmCompanding() and le_audio_SetPcmCompanding() for signal settings.
78  * - le_audio_GetSamplePcmChannelNumber() and le_audio_SetSamplePcmChannelNumber() for channel numbers.
79  *
80  * To Mute/Unmute the Call Waiting Tone to alert for an incoming voice call when a voice call is
81  * already in progress, use le_audio_MuteCallWaitingTone() and le_audio_UnmuteCallWaitingTone().
82  *
83  * @note The Call Waiting Supplementary Service must be enabled.
84  *
85  * @section le_audio_interfaces Open/Close an Audio Interface
86  *
87  * The following functions let you select the desired interface attributes:
88  * - le_audio_OpenMic(): returns an Audio Stream Reference of the analog audio signal coming from
89  * the microphone input.
90  * - le_audio_OpenSpeaker(): returns an Audio Stream Reference of the analog audio signal routed
91  * to the Speaker output.
92  * - le_audio_OpenUsbRx(): returns an Audio Stream Reference of the digitized audio signal coming
93  * from an external device connected via USB Audio Class.
94  * - le_audio_OpenUsbTx(): returns an Audio Stream Reference of the digitized audio signal routed
95  * to an external device connected via USB Audio Class.
96  * - le_audio_OpenPcmRx(): it returns an Audio Stream Reference of the digitized audio signal
97  * coming from an external device connected via the PCM interface.
98  * - le_audio_OpenPcmTx(): it returns an Audio Stream Reference of the digitized audio signal
99  * routed to an external device connected via the PCM interface.
100  * - le_audio_OpenI2sRx(): it returns an Audio Stream Reference of the digitized audio signal
101  * coming from an external device connected via the I2S interface.
102  * - le_audio_OpenI2sTx(): it returns an Audio Stream Reference of the digitized audio signal
103  * routed to an external device connected via the I2S interface.
104  * - le_audio_OpenModemVoiceRx(): returns an Audio Stream Reference of the digitized audio signal
105  * coming from a voice call. The audio format is negotiated with the
106  * network when the call is established.
107  * - le_audio_OpenModemVoiceTx(): returns an Audio Stream Reference of the digitized audio signal
108  * routed to a voice call. The audio format is negotiated with the
109  * network when the call is established.
110  *
111  * Multiple users can own the same stream at the same time.
112  *
113  * le_audio_GetDefaultPcmTimeSlot() can be called to get the default PCM time slot used on the
114  * current platform.
115  *
116  * le_audio_GetDefaultI2sMode() can be called to get the default I2s channel mode slot used on
117  * the current platform.
118  *
119  * Call le_audio_Close() to release it. If
120  * several users own the same, corresponding stream reference, the interface will
121  * close only after the last user releases the audio stream.
122  *
123  * You can configure the PCM interface with the le_audio_SetPcmSamplingRate(),
124  * le_audio_SetPcmSamplingResolution() and le_audio_SetPcmCompanding() functions.
125  * This function must be called before activating an audio path with the PCM interface, in other
126  * words you must call this function before connecting the PCM Stream to a connector.
127  *
128  * In addition, the le_audio_GetPcmSamplingRate(), le_audio_GetPcmSamplingResolution() and
129  * le_audio_GetPcmCompanding() functions allows you to retrieve the PCM interface configuration.
130  *
131  * @note Opening a Legato audio stream doesn’t necessarily interact with the audio HW interface.
132  * On most platforms, it only allocates a context in memory. The audio path becomes active when the
133  * streams are plugged into a connector.
134  *
135  *
136  * @section le_audio_streams Control an Audio Stream
137  *
138  * Once the users get an Audio Stream reference, they can control it with the following functions:
139  *
140  * - le_audio_SetGain(): adjust the gain of an audio stream (gain value is specific to the
141  * platform).
142  * - le_audio_GetGain(): retrieve the gain of an audio stream (gain value is specific to the
143  * platform).
144  * - le_audio_Mute(): mute an audio stream.
145  * - le_audio_Unmute(): unmute an audio stream.
146  *
147  * @note Multimedia (playback and recording) must be controlled separately from the main audio path
148  * (Microphone/Speaker, I2S, PCM, USB). Muting/Unmuting a multimedia is done by
149  * muting/unmuting the multimedia stream, and not the other connected stream. For example, in case
150  * of playback + voice on the speaker, if the user wants to mute all the audio coming out of the
151  * speaker, it must mute both the Speaker stream and the playback stream.
152  *
153  * @warning Ensure to check the list of supported audio streams for these functions on your
154  * specific platform.
155  *
156  * In the case your platform can support other gains in your audio subsystem, you can set or get
157  * the value of them with the following functions:
158  *
159  * - le_audio_SetPlatformSpecificGain(): adjust the value of a platform specific gain in the audio
160  * subsystem.
161  * - le_audio_GetPlatformSpecificGain(): retrieve the value of a platform specific gain in the
162  * audio subsystem.
163  *
164  * @warning Ensure to check the names of supported gains for your specific platform.
165  *
166  * @section le_audio_connectors Create Audio connectors
167  *
168  * You can create your own audio path by connecting several audio streams together.
169  *
170  * le_audio_CreateConnector() function creates a reference to an audio connector.
171  *
172  * You can tie an audio stream to a connector by calling the le_audio_Connect()
173  * function.
174  *
175  * You can remove an audio stream from a connector by calling the le_audio_Disconnect()
176  * function.
177  *
178  * When finished with it, delete it using the le_audio_DeleteConnector() function.
179  *
180  * The following image shows how to connect a Player stream to play a file towards a remote end
181  * during a voice call.
182  * @image html AudioConnector.png
183  *
184  * A sample code that implements audio connectors and audio streams during voice call can be found in
185  * \b audioMccTest.c file (please refer to @ref c_audioMcc page).
186  *
187  * @note It is recommended to set the connectors before the connected streams are used.
188  * In particular, a connector using Modem Voice Rx or Tx interfaces has to be created before dialing
189  * or answering the call if the application needs to customize the audio path.
190  *
191  * @section le_audio_pb_playback Playback
192  *
193  * An audio file can be played to any active output interfaces.
194  *
195  * Open a player interface by calling:
196  * - le_audio_OpenPlayer(): returns an Audio Stream Reference for file playback.
197  * An audio file can be played on the local audio interface like
198  * Speaker, USB Tx, PCM Tx, I2S Tx or on the remote audio
199  * interface Modem Voice Tx depending the kind of connector
200  * (input or output) is tied to.
201  *
202  * - le_audio_PlayFile(): plays a specified file. WAVE (Waveform audio file) and
203  * AMR (Adaptive Multi Rate) are supported.
204  * AMR is an audio compression format optimized for speech coding. Two codecs are supported:
205  * - AMR_NB (AMR Narrowband) codec that encodes narrowband (200--3400 Hz) signals at variable bit
206  * rates ranging from 4.75 to 12.2 kbit/s. It was adopted as the standard speech codec by 3GPP.
207  * - AMR-WB (AMR Wideband) is an ITU-T standard speech codec which improved speech quality due to a
208  * wider speech bandwidth of 50--7000 Hz.
209  *
210  * - le_audio_PlaySamples(): initiates a playback using an audio flow. A pipe has
211  * to be opened first, then the PCM samples are sent through the opened pipe.
212  * A play can be done only on a connected stream. For instance, the
213  * "I2S Tx", "Modem Voice Rx" and "Player" must be previously connected before playing a file.
214  * If there are no more PCM samples to be played, the playback must be stopped by calling
215  * le_audio_Stop().
216  *
217  * @section le_audio_pb_rec Record
218  *
219  * * Audio file recording can be done from any active input interface.
220  *
221  * Open a "File Recording" interface by calling:
222  * - le_audio_OpenRecorder(): returns an Audio Stream Reference for file recording.
223  * The local audio interface like Microphone, USB Rx, PCM Rx,
224  * I2S Rx is recorded into an audio file; or the Modem Voice Rx
225  * remote audio interface is recorded into an audio file,
226  * depending the kind of connector (input or output) is tied to.
227  * - le_audio_RecordFile(): records in a specified file.
228  * - le_audio_SetEncodingFormat(): sets the encoding format. The same formats as the
229  * player are supported.
230  * - le_audio_GetEncodingFormat(): gets the encoding format.
231  * - le_audio_GetSamples(): records the audio PCM samples. A pipe has
232  * to be opened first, then the PCM samples are sent through the opened pipe.
233  * Recording can only be done on a connected stream. For example, the
234  * "I2S Rx", "Modem Voice Tx" and "Recorder" must be previously connected before recording a file.
235  * If there are no more PCM samples to be retrieved, the recording must be stopped by calling
236  * le_audio_Stop().
237  *
238  * A PCM configuration must be set with:
239  * - le_audio_SetSamplePcmChannelNumber(): sets the channel number of a PCM
240  * sample.
241  * - le_audio_SetSamplePcmSamplingRate(): sets the sampling rate of a PCM
242  * sample.
243  * - le_audio_SetSamplePcmSamplingResolution(): sets the sampling resolution
244  * (in bits per sample) of a PCM sample.
245  *
246  * The PCM samples configuration can be retrieved with:
247  * - le_audio_GetSamplePcmChannelNumber(): gets the channel number of a PCM
248  * sample.
249  * - le_audio_GetSamplePcmSamplingRate(): gets the sampling rate of a PCM
250  * sample.
251  * - le_audio_GetSamplePcmSamplingResolution(): can be called to get the sampling resolution
252  * (in bits per sample) of a PCM sample.
253  * The default configuration is PCM 16-bit audio @ 8KHz one channel.
254  *
255  * An AMR configuration must be set with:
256  * - le_audio_SetSampleAmrMode(): sets the AMR mode (NB/WB, bitrate).
257  * - le_audio_SetSampleAmrDtx(): can be called to activate/deactivate the Discontinuous
258  * Transmission (DTX) to reduce bandwidth usage during silence periods.
259  * The AMR configuration can be retrieved with:
260  * - le_audio_GetSampleAmrMode(): gets the AMR mode.
261  * - le_audio_GetSampleAmrDtx(): gets the Discontinuous
262  * Transmission (DTX).
263  *
264  * To stop a play/record call le_audio_Stop():
265  * - The playback/record stops playing/recording, and the read/write position indicator associated
266  * with the file stream is rewound to the beginning of the file. A new file can be played/recorded
267  * using le_audio_PlayFile()/le_audio_PlaySamples()/le_audio_RecordFile()/le_audio_GetSamples().
268  * - le_audio_Pause(): can be called to pause a play/record. The file playing/recording is put on
269  * hold, the read/write position indicator of the file is not moved.
270  * - le_audio_Resume(): can be called to resume a paused play/record. The file playing/recording
271  * continues at the file's position indicator held after the pause.
272  * - le_audio_Flush(): can be called to flush the remaining audio samples before sending
273  * them to the audio driver.
274  *
275  * You can also register a handler function for media-related notifications like errors or audio
276  * events.
277  *
278  * le_audio_AddMediaHandler() function installs a handler for player/recorder stream
279  * notifications.
280  *
281  * le_audio_RemoveMediaHandler() function removes the player/recorder handler function.
282  *
283  * @note The @c LE_AUDIO_MEDIA_NO_MORE_SAMPLES event indicates when all samples put into the pipe
284  * by the user's App have been sent to the audio driver (see le_audio_PlaySamples()).
285  *
286  * A sample code that implements audio playback and capture can be found in \b audioPlaybackRec.c
287  * file (please refer to @ref c_audioCapturePlayback page).
288  *
289  * @section le_audio_dtmf DTMF
290  *
291  * The le_audio_PlayDtmf() function allows the application to play one or several DTMF on a playback
292  * stream. The duration and the pause of the DTMFs must also be specified with the input parameters.
293  *
294  * The le_audio_PlaySignallingDtmf() function allows the application to ask the Mobile Network to
295  * generate on the remote audio party the DTMFs. Compared with le_audio_PlayDtmf(),
296  * le_audio_PlaySignallingDtmf() function may offer a better signal quality, but the the duration
297  * and the pause timings may be less accurate.
298  *
299  * The application must register a handler function to detect incoming DTMF characters on a specific
300  * input audio stream. The le_audio_AddDtmfDetectorHandler() function installs a handler for DTMF
301  * detection.
302  *
303  * The le_audio_RemoveDtmfDetectorHandler() function uninstalls the handler function.
304  *
305  * The DTMFs are: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, *, #, A, B, C, D. Not case sensitive.
306  *
307  * @note The DTMF decoding works only on an active audio path.
308  *
309  * A sample code that implements DTMF playback and decoding can be found in \b audioDtmfTest.c file
310  * (please refer to @ref c_audiodtmf page).
311  *
312  * <HR>
313  *
314  * Copyright (C) Sierra Wireless Inc.
315  */
316 /**
317  * @file le_audio_interface.h
318  *
319  * Legato @ref c_audio include file.
320  *
321  * Copyright (C) Sierra Wireless Inc.
322  */
323 /**
324  * @page c_audioMcc Sample code of audio settings for a dialing call
325  *
326  * @include "apps/test/audio/audioMcc/audioMccComp/audioMccTest.c"
327  */
328 /**
329  * @page c_audiodtmf Sample code of dtmf playback and decoding
330  *
331  * @include "apps/test/audio/dtmf/dtmfTestComp/audioDtmfTest.c"
332  */
333 /**
334  * @page c_audioCapturePlayback Sample code of audio playback and capture
335  *
336  * @include "apps/test/audio/audioPlaybackRec/audioPlaybackRecComp/audioPlaybackRec.c"
337  */
338 
339 #ifndef LE_AUDIO_INTERFACE_H_INCLUDE_GUARD
340 #define LE_AUDIO_INTERFACE_H_INCLUDE_GUARD
341 
342 
343 #include "legato.h"
344 
345 
346 //--------------------------------------------------------------------------------------------------
347 /**
348  * Type for handler called when a server disconnects.
349  */
350 //--------------------------------------------------------------------------------------------------
351 typedef void (*le_audio_DisconnectHandler_t)(void *);
352 
353 //--------------------------------------------------------------------------------------------------
354 /**
355  *
356  * Connect the current client thread to the service providing this API. Block until the service is
357  * available.
358  *
359  * For each thread that wants to use this API, either ConnectService or TryConnectService must be
360  * called before any other functions in this API. Normally, ConnectService is automatically called
361  * for the main thread, but not for any other thread. For details, see @ref apiFilesC_client.
362  *
363  * This function is created automatically.
364  */
365 //--------------------------------------------------------------------------------------------------
367 (
368  void
369 );
370 
371 //--------------------------------------------------------------------------------------------------
372 /**
373  *
374  * Try to connect the current client thread to the service providing this API. Return with an error
375  * if the service is not available.
376  *
377  * For each thread that wants to use this API, either ConnectService or TryConnectService must be
378  * called before any other functions in this API. Normally, ConnectService is automatically called
379  * for the main thread, but not for any other thread. For details, see @ref apiFilesC_client.
380  *
381  * This function is created automatically.
382  *
383  * @return
384  * - LE_OK if the client connected successfully to the service.
385  * - LE_UNAVAILABLE if the server is not currently offering the service to which the client is
386  * bound.
387  * - LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).
388  * - LE_COMM_ERROR if the Service Directory cannot be reached.
389  */
390 //--------------------------------------------------------------------------------------------------
392 (
393  void
394 );
395 
396 //--------------------------------------------------------------------------------------------------
397 /**
398  * Set handler called when server disconnection is detected.
399  *
400  * When a server connection is lost, call this handler then exit with LE_FATAL. If a program wants
401  * to continue without exiting, it should call longjmp() from inside the handler.
402  */
403 //--------------------------------------------------------------------------------------------------
405 (
406  le_audio_DisconnectHandler_t disconnectHandler,
407  void *contextPtr
408 );
409 
410 //--------------------------------------------------------------------------------------------------
411 /**
412  *
413  * Disconnect the current client thread from the service providing this API.
414  *
415  * Normally, this function doesn't need to be called. After this function is called, there's no
416  * longer a connection to the service, and the functions in this API can't be used. For details, see
417  * @ref apiFilesC_client.
418  *
419  * This function is created automatically.
420  */
421 //--------------------------------------------------------------------------------------------------
423 (
424  void
425 );
426 
427 
428 //--------------------------------------------------------------------------------------------------
429 /**
430  * Maximum DTMF string length.
431  */
432 //--------------------------------------------------------------------------------------------------
433 #define LE_AUDIO_DTMF_MAX_LEN 100
434 
435 //--------------------------------------------------------------------------------------------------
436 /**
437  * Maximum DTMF string length.
438  * One extra byte is added for the null character.
439  */
440 //--------------------------------------------------------------------------------------------------
441 #define LE_AUDIO_DTMF_MAX_BYTES 101
442 
443 //--------------------------------------------------------------------------------------------------
444 /**
445  * No file descriptor define
446  */
447 //--------------------------------------------------------------------------------------------------
448 #define LE_AUDIO_NO_FD -1
449 
450 //--------------------------------------------------------------------------------------------------
451 /**
452  * Maximum gain name string length.
453  */
454 //--------------------------------------------------------------------------------------------------
455 #define LE_AUDIO_GAIN_NAME_MAX_LEN 100
456 
457 //--------------------------------------------------------------------------------------------------
458 /**
459  * Maximum gain name string length.
460  * One extra byte is added for the null character.
461  */
462 //--------------------------------------------------------------------------------------------------
463 #define LE_AUDIO_GAIN_NAME_MAX_BYTES 101
464 
465 //--------------------------------------------------------------------------------------------------
466 /**
467  * Audio recording/playback events.
468  */
469 //--------------------------------------------------------------------------------------------------
470 typedef enum
471 {
473  ///< Playback has reached the end of file.
475  ///< No more audio samples to play.
477  ///< Recording/playback has encountered an error.
479  ///< Enumerate max value.
480 }
482 
483 
484 //--------------------------------------------------------------------------------------------------
485 /**
486  * Companding.
487  */
488 //--------------------------------------------------------------------------------------------------
489 typedef enum
490 {
492  ///< A-law PCM (i.e. Europe and most of the rest of the world).
494  ///< MU-law PCM (i.e. North America and Japan).
496  ///< Linear PCM.
497 }
499 
500 
501 //--------------------------------------------------------------------------------------------------
502 /**
503  * I2S channel mode.
504  */
505 //--------------------------------------------------------------------------------------------------
506 typedef enum
507 {
509  ///< Left channel.
511  ///< Right channel.
513  ///< Mono mode.
515  ///< Stereo mode.
517  ///< Reverse mode (left & right reversed).
518 }
520 
521 
522 //--------------------------------------------------------------------------------------------------
523 /**
524  * Audio format.
525  */
526 //--------------------------------------------------------------------------------------------------
527 typedef enum
528 {
530  ///< Waveform audio file
532  ///< Adaptive Multi Rate
533  LE_AUDIO_FORMAT_MAX = 2
534  ///<
535 }
537 
538 
539 //--------------------------------------------------------------------------------------------------
540 /**
541  * AMR mode.
542  */
543 //--------------------------------------------------------------------------------------------------
544 typedef enum
545 {
547  ///< Not set
549  ///< AMR Narrowband in 4.75kbps
551  ///< AMR Narrowband in 5.15kbps
553  ///< AMR Narrowband in 5.9kbps
555  ///< AMR Narrowband in 6.7kbps
557  ///< AMR Narrowband in 7.4kbps (default value)
559  ///< AMR Narrowband in 7.95kbps
561  ///< AMR Narrowband in 10.3kbps
563  ///< AMR Narrowband in 12.2kbps
565  ///< AMR Wideband in 6.6kbps
567  ///< AMR Wideband in 8.85kbps
569  ///< AMR Wideband in 12.65kbps
571  ///< AMR Wideband in 14.25kbps
573  ///< AMR Wideband in 15.85kbps
575  ///< AMR Wideband in 18.25kbps
577  ///< AMR Wideband in 19.85kbps
579  ///< AMR Wideband in 23.05kbps
581  ///< AMR Wideband in 23.85kbps
582 }
584 
585 
586 //--------------------------------------------------------------------------------------------------
587 /**
588  * Reference type for Audio Stream
589  */
590 //--------------------------------------------------------------------------------------------------
591 typedef struct le_audio_Stream* le_audio_StreamRef_t;
592 
593 
594 //--------------------------------------------------------------------------------------------------
595 /**
596  * Reference type for Audio Connector
597  */
598 //--------------------------------------------------------------------------------------------------
599 typedef struct le_audio_Connector* le_audio_ConnectorRef_t;
600 
601 
602 //--------------------------------------------------------------------------------------------------
603 /**
604  * Reference type used by Add/Remove functions for EVENT 'le_audio_Media'
605  */
606 //--------------------------------------------------------------------------------------------------
607 typedef struct le_audio_MediaHandler* le_audio_MediaHandlerRef_t;
608 
609 
610 //--------------------------------------------------------------------------------------------------
611 /**
612  * Reference type used by Add/Remove functions for EVENT 'le_audio_DtmfDetector'
613  */
614 //--------------------------------------------------------------------------------------------------
615 typedef struct le_audio_DtmfDetectorHandler* le_audio_DtmfDetectorHandlerRef_t;
616 
617 
618 //--------------------------------------------------------------------------------------------------
619 /**
620  * Handler for audio stream event.
621  *
622  */
623 //--------------------------------------------------------------------------------------------------
624 typedef void (*le_audio_MediaHandlerFunc_t)
625 (
626  le_audio_StreamRef_t streamRef,
627  ///< Audio stream reference.
628  le_audio_MediaEvent_t event,
629  ///< Event value.
630  void* contextPtr
631  ///<
632 );
633 
634 //--------------------------------------------------------------------------------------------------
635 /**
636  * Handler for DTMF decoding.
637  *
638  */
639 //--------------------------------------------------------------------------------------------------
641 (
642  le_audio_StreamRef_t streamRef,
643  ///< Audio stream reference.
644  char dtmf,
645  ///< Detected DTMF.
646  void* contextPtr
647  ///<
648 );
649 
650 //--------------------------------------------------------------------------------------------------
651 /**
652  * Open the Microphone.
653  *
654  * @return Reference to the input audio stream, NULL if the function fails.
655  */
656 //--------------------------------------------------------------------------------------------------
658 (
659  void
660 );
661 
662 //--------------------------------------------------------------------------------------------------
663 /**
664  * Open the Speaker-phone.
665  *
666  * @return Reference to the output audio stream, NULL if the function fails.
667  */
668 //--------------------------------------------------------------------------------------------------
670 (
671  void
672 );
673 
674 //--------------------------------------------------------------------------------------------------
675 /**
676  * Open the received audio stream of an USB audio class.
677  *
678  * @return Reference to the input audio stream, NULL if the function fails.
679  */
680 //--------------------------------------------------------------------------------------------------
682 (
683  void
684 );
685 
686 //--------------------------------------------------------------------------------------------------
687 /**
688  * Open the transmitted audio stream of an USB audio class.
689  *
690  * @return Reference to the output audio stream, NULL if the function fails.
691  */
692 //--------------------------------------------------------------------------------------------------
694 (
695  void
696 );
697 
698 //--------------------------------------------------------------------------------------------------
699 /**
700  * Open the received audio stream of the PCM interface.
701  *
702  * @return Reference to the input audio stream, NULL if the function fails.
703  */
704 //--------------------------------------------------------------------------------------------------
706 (
707  uint32_t timeslot
708  ///< [IN] The time slot number.
709 );
710 
711 //--------------------------------------------------------------------------------------------------
712 /**
713  * Open the transmitted audio stream of the PCM interface.
714  *
715  * @return Reference to the output audio stream, NULL if the function fails.
716  */
717 //--------------------------------------------------------------------------------------------------
719 (
720  uint32_t timeslot
721  ///< [IN] The time slot number.
722 );
723 
724 //--------------------------------------------------------------------------------------------------
725 /**
726  * Open the received audio stream of the I2S interface.
727  *
728  * @return Reference to the input audio stream, NULL if the function fails.
729  */
730 //--------------------------------------------------------------------------------------------------
732 (
734  ///< [IN] The channel mode.
735 );
736 
737 //--------------------------------------------------------------------------------------------------
738 /**
739  * Open the transmitted audio stream of the I2S interface.
740  *
741  * @return Reference to the output audio stream, NULL if the function fails.
742  */
743 //--------------------------------------------------------------------------------------------------
745 (
747  ///< [IN] The channel mode.
748 );
749 
750 //--------------------------------------------------------------------------------------------------
751 /**
752  * Open the audio stream for playback.
753  *
754  * @return Reference to the audio stream, NULL if the function fails.
755  */
756 //--------------------------------------------------------------------------------------------------
758 (
759  void
760 );
761 
762 //--------------------------------------------------------------------------------------------------
763 /**
764  * Open the audio stream for recording.
765  *
766  * @return Reference to the audio stream, NULL if the function fails.
767  */
768 //--------------------------------------------------------------------------------------------------
770 (
771  void
772 );
773 
774 //--------------------------------------------------------------------------------------------------
775 /**
776  * Open the received audio stream of a voice call.
777  *
778  * @return Reference to the input audio stream, NULL if the function fails.
779  */
780 //--------------------------------------------------------------------------------------------------
782 (
783  void
784 );
785 
786 //--------------------------------------------------------------------------------------------------
787 /**
788  * Open the transmitted audio stream of a voice call.
789  *
790  * @return Reference to the output audio stream, NULL if the function fails.
791  */
792 //--------------------------------------------------------------------------------------------------
794 (
795  void
796 );
797 
798 //--------------------------------------------------------------------------------------------------
799 /**
800  * Add handler function for EVENT 'le_audio_Media'
801  *
802  * This event provides information on player / recorder stream events.
803  *
804  */
805 //--------------------------------------------------------------------------------------------------
807 (
808  le_audio_StreamRef_t streamRef,
809  ///< [IN] The audio stream reference.
810  le_audio_MediaHandlerFunc_t handlerPtr,
811  ///< [IN]
812  void* contextPtr
813  ///< [IN]
814 );
815 
816 //--------------------------------------------------------------------------------------------------
817 /**
818  * Remove handler function for EVENT 'le_audio_Media'
819  */
820 //--------------------------------------------------------------------------------------------------
822 (
823  le_audio_MediaHandlerRef_t handlerRef
824  ///< [IN]
825 );
826 
827 //--------------------------------------------------------------------------------------------------
828 /**
829  * Close an audio stream.
830  * If several users own the stream reference, the interface closes only after
831  * the last user closes the audio stream.
832  *
833  * @note If the caller is passing a bad reference into this function, it is a fatal error, the
834  * function will not return.
835  */
836 //--------------------------------------------------------------------------------------------------
837 void le_audio_Close
838 (
839  le_audio_StreamRef_t streamRef
840  ///< [IN] Audio stream reference.
841 );
842 
843 //--------------------------------------------------------------------------------------------------
844 /**
845  * Set the Gain value of an input or output stream.
846  *
847  * @return LE_BAD_PARAMETER The audio stream reference is invalid.
848  * @return LE_OUT_OF_RANGE The gain value is out of range.
849  * @return LE_UNAVAILABLE The audio service initialization failed.
850  * @return LE_FAULT On any other failure.
851  * @return LE_OK The function succeeded.
852  *
853  * @note If the caller is passing a bad reference into this function, it is a fatal error, the
854  * function will not return.
855  */
856 //--------------------------------------------------------------------------------------------------
858 (
859  le_audio_StreamRef_t streamRef,
860  ///< [IN] Audio stream reference.
861  int32_t gain
862  ///< [IN] Gain value (specific to the platform)
863 );
864 
865 //--------------------------------------------------------------------------------------------------
866 /**
867  * Get the Gain value of an input or output stream.
868  *
869  * @return LE_BAD_PARAMETER The audio stream reference is invalid.
870  * @return LE_UNAVAILABLE The audio service initialization failed.
871  * @return LE_FAULT On any other failure.
872  * @return LE_OK The function succeeded.
873  *
874  * @note If the caller is passing a bad reference into this function, it is a fatal error, the
875  * function will not return.
876  */
877 //--------------------------------------------------------------------------------------------------
879 (
880  le_audio_StreamRef_t streamRef,
881  ///< [IN] Audio stream reference.
882  int32_t* gainPtr
883  ///< [OUT] Gain value (specific to the platform)
884 );
885 
886 //--------------------------------------------------------------------------------------------------
887 /**
888  * Mute an audio stream.
889  *
890  * @return LE_BAD_PARAMETER The audio stream reference is invalid.
891  * @return LE_UNAVAILABLE The audio service initialization failed.
892  * @return LE_FAULT On any other failure.
893  * @return LE_OK The function succeeded.
894  *
895  * @note If the caller is passing a bad reference into this function, it is a fatal error, the
896  * function will not return.
897  */
898 //--------------------------------------------------------------------------------------------------
900 (
901  le_audio_StreamRef_t streamRef
902  ///< [IN] Audio stream reference.
903 );
904 
905 //--------------------------------------------------------------------------------------------------
906 /**
907  * Unmute an audio stream.
908  *
909  * @return LE_BAD_PARAMETER The audio stream reference is invalid.
910  * @return LE_UNAVAILABLE The audio service initialization failed.
911  * @return LE_FAULT On any other failure.
912  * @return LE_OK The function succeeded.
913  *
914  * @note If the caller is passing a bad reference into this function, it is a fatal error, the
915  * function will not return.
916  */
917 //--------------------------------------------------------------------------------------------------
919 (
920  le_audio_StreamRef_t streamRef
921  ///< [IN] Audio stream reference.
922 );
923 
924 //--------------------------------------------------------------------------------------------------
925 /**
926  * Create an audio connector reference.
927  *
928  * @return Reference to the audio connector, NULL if the function fails.
929  */
930 //--------------------------------------------------------------------------------------------------
932 (
933  void
934 );
935 
936 //--------------------------------------------------------------------------------------------------
937 /**
938  * Delete an audio connector reference.
939  *
940  * @note If the caller is passing a bad reference into this function, it is a fatal error, the
941  * function will not return.
942  */
943 //--------------------------------------------------------------------------------------------------
945 (
946  le_audio_ConnectorRef_t connectorRef
947  ///< [IN] Connector reference.
948 );
949 
950 //--------------------------------------------------------------------------------------------------
951 /**
952  * Connect an audio stream to the connector reference.
953  *
954  * @return LE_BUSY There are insufficient DSP resources available.
955  * @return LE_UNAVAILABLE The audio service initialization failed.
956  * @return LE_BAD_PARAMETER The connector and/or the audio stream references are invalid.
957  * @return LE_FAULT On any other failure.
958  * @return LE_OK The function succeeded.
959  *
960  * @note If the caller is passing a bad reference into this function, it is a fatal error, the
961  * function will not return.
962  */
963 //--------------------------------------------------------------------------------------------------
965 (
966  le_audio_ConnectorRef_t connectorRef,
967  ///< [IN] Connector reference.
968  le_audio_StreamRef_t streamRef
969  ///< [IN] Audio stream reference.
970 );
971 
972 //--------------------------------------------------------------------------------------------------
973 /**
974  * Disconnect an audio stream from the connector reference.
975  *
976  * @note If the caller is passing a bad reference into this function, it is a fatal error, the
977  * function will not return.
978  */
979 //--------------------------------------------------------------------------------------------------
981 (
982  le_audio_ConnectorRef_t connectorRef,
983  ///< [IN] Connector reference.
984  le_audio_StreamRef_t streamRef
985  ///< [IN] Audio stream reference.
986 );
987 
988 //--------------------------------------------------------------------------------------------------
989 /**
990  * Add handler function for EVENT 'le_audio_DtmfDetector'
991  *
992  * This event provides information on DTMF decoding for the specified streamRef
993  *
994  */
995 //--------------------------------------------------------------------------------------------------
997 (
998  le_audio_StreamRef_t streamRef,
999  ///< [IN] Audio stream reference.
1001  ///< [IN]
1002  void* contextPtr
1003  ///< [IN]
1004 );
1005 
1006 //--------------------------------------------------------------------------------------------------
1007 /**
1008  * Remove handler function for EVENT 'le_audio_DtmfDetector'
1009  */
1010 //--------------------------------------------------------------------------------------------------
1012 (
1014  ///< [IN]
1015 );
1016 
1017 //--------------------------------------------------------------------------------------------------
1018 /**
1019  * This function must be called to enable the Noise Suppressor.
1020  *
1021  * @return LE_BAD_PARAMETER The audio stream reference is invalid.
1022  * @return LE_UNAVAILABLE The audio service initialization failed.
1023  * @return LE_FAULT On any other failure.
1024  * @return LE_OK Function succeeded.
1025  *
1026  * @note The process exits, if an invalid audio stream reference is given.
1027  */
1028 //--------------------------------------------------------------------------------------------------
1030 (
1031  le_audio_StreamRef_t streamRef
1032  ///< [IN] Audio stream reference.
1033 );
1034 
1035 //--------------------------------------------------------------------------------------------------
1036 /**
1037  * This function must be called to disable the Noise Suppressor.
1038  *
1039  * @return LE_BAD_PARAMETER The audio stream reference is invalid.
1040  * @return LE_UNAVAILABLE The audio service initialization failed.
1041  * @return LE_FAULT On any other failure.
1042  * @return LE_OK Function succeeded.
1043  *
1044  * @note The process exits, if an invalid audio stream reference is given.
1045  */
1046 //--------------------------------------------------------------------------------------------------
1048 (
1049  le_audio_StreamRef_t streamRef
1050  ///< [IN] Audio stream reference.
1051 );
1052 
1053 //--------------------------------------------------------------------------------------------------
1054 /**
1055  * This function must be called to enable the Echo Canceller.
1056  *
1057  * @return LE_BAD_PARAMETER The audio stream reference is invalid.
1058  * @return LE_UNAVAILABLE The audio service initialization failed.
1059  * @return LE_FAULT On any other failure.
1060  * @return LE_OK Function succeeded.
1061  *
1062  * @note The process exits, if an invalid audio stream reference is given.
1063  */
1064 //--------------------------------------------------------------------------------------------------
1066 (
1067  le_audio_StreamRef_t streamRef
1068  ///< [IN] Audio stream reference.
1069 );
1070 
1071 //--------------------------------------------------------------------------------------------------
1072 /**
1073  * This function must be called to disable the Echo Canceller.
1074  *
1075  * @return LE_BAD_PARAMETER The audio stream reference is invalid.
1076  * @return LE_UNAVAILABLE The audio service initialization failed.
1077  * @return LE_FAULT On any other failure.
1078  * @return LE_OK Function succeeded.
1079  *
1080  * @note The process exits, if an invalid audio stream reference is given.
1081  */
1082 //--------------------------------------------------------------------------------------------------
1084 (
1085  le_audio_StreamRef_t streamRef
1086  ///< [IN] Audio stream reference.
1087 );
1088 
1089 //--------------------------------------------------------------------------------------------------
1090 /**
1091  * This function must be called to get the status of Noise Suppressor.
1092  *
1093  * @return LE_BAD_PARAMETER The audio stream reference is invalid.
1094  * @return LE_UNAVAILABLE The audio service initialization failed.
1095  * @return LE_FAULT On any other failure.
1096  * @return LE_OK Function succeeded.
1097  *
1098  * @note The process exits, if an invalid audio stream reference is given.
1099  */
1100 //--------------------------------------------------------------------------------------------------
1102 (
1103  le_audio_StreamRef_t streamRef,
1104  ///< [IN] Audio stream reference.
1105  bool* statusPtr
1106  ///< [OUT] true if NS is enabled, false otherwise
1107 );
1108 
1109 //--------------------------------------------------------------------------------------------------
1110 /**
1111  * This function must be called to get the status of Echo Canceller.
1112  *
1113  * @return LE_BAD_PARAMETER The audio stream reference is invalid.
1114  * @return LE_UNAVAILABLE The audio service initialization failed.
1115  * @return LE_FAULT On any other failure.
1116  * @return LE_OK Function succeeded.
1117  *
1118  * @note The process exits, if an invalid audio stream reference is given.
1119  */
1120 //--------------------------------------------------------------------------------------------------
1122 (
1123  le_audio_StreamRef_t streamRef,
1124  ///< [IN] Audio stream reference.
1125  bool* statusPtr
1126  ///< [OUT] true if EC is enabled, false otherwise
1127 );
1128 
1129 //--------------------------------------------------------------------------------------------------
1130 /**
1131  * This function must be called to enable the FIR (Finite Impulse Response) filter.
1132  *
1133  * @return LE_BAD_PARAMETER The audio stream reference is invalid.
1134  * @return LE_UNAVAILABLE The audio service initialization failed.
1135  * @return LE_FAULT On any other failure.
1136  * @return LE_OK Function succeeded.
1137  *
1138  * @note The process exits, if an invalid audio stream reference is given.
1139  */
1140 //--------------------------------------------------------------------------------------------------
1142 (
1143  le_audio_StreamRef_t streamRef
1144  ///< [IN] Audio stream reference.
1145 );
1146 
1147 //--------------------------------------------------------------------------------------------------
1148 /**
1149  * This function must be called to disable the FIR (Finite Impulse Response) filter.
1150  *
1151  * @return LE_BAD_PARAMETER The audio stream reference is invalid.
1152  * @return LE_UNAVAILABLE The audio service initialization failed.
1153  * @return LE_FAULT On any other failure.
1154  * @return LE_OK Function succeeded.
1155  *
1156  * @note The process exits, if an invalid audio stream reference is given.
1157  */
1158 //--------------------------------------------------------------------------------------------------
1160 (
1161  le_audio_StreamRef_t streamRef
1162  ///< [IN] Audio stream reference.
1163 );
1164 
1165 //--------------------------------------------------------------------------------------------------
1166 /**
1167  * This function must be called to enable the IIR (Infinite Impulse Response) filter.
1168  *
1169  * @return LE_BAD_PARAMETER The audio stream reference is invalid.
1170  * @return LE_UNAVAILABLE The audio service initialization failed.
1171  * @return LE_FAULT On any other failure.
1172  * @return LE_OK Function succeeded.
1173  *
1174  * @note The process exits, if an invalid audio stream reference is given.
1175  */
1176 //--------------------------------------------------------------------------------------------------
1178 (
1179  le_audio_StreamRef_t streamRef
1180  ///< [IN] Audio stream reference.
1181 );
1182 
1183 //--------------------------------------------------------------------------------------------------
1184 /**
1185  * This function must be called to disable the IIR (Infinite Impulse Response) filter.
1186  *
1187  * @return LE_BAD_PARAMETER The audio stream reference is invalid.
1188  * @return LE_UNAVAILABLE The audio service initialization failed.
1189  * @return LE_FAULT On any other failure.
1190  * @return LE_OK Function succeeded.
1191  *
1192  * @note The process exits, if an invalid audio stream reference is given.
1193  */
1194 //--------------------------------------------------------------------------------------------------
1196 (
1197  le_audio_StreamRef_t streamRef
1198  ///< [IN] Audio stream reference.
1199 );
1200 
1201 //--------------------------------------------------------------------------------------------------
1202 /**
1203  * This function must be called to enable the automatic gain control on the selected audio stream.
1204  *
1205  * @return LE_BAD_PARAMETER The audio stream reference is invalid.
1206  * @return LE_UNAVAILABLE The audio service initialization failed.
1207  * @return LE_FAULT On any other failure.
1208  * @return LE_OK Function succeeded.
1209  *
1210  * @note The process exits, if an invalid audio stream reference is given.
1211  */
1212 //--------------------------------------------------------------------------------------------------
1214 (
1215  le_audio_StreamRef_t streamRef
1216  ///< [IN] Audio stream reference.
1217 );
1218 
1219 //--------------------------------------------------------------------------------------------------
1220 /**
1221  * This function must be called to disable the automatic gain control on the selected audio stream.
1222  *
1223  * @return LE_BAD_PARAMETER The audio stream reference is invalid.
1224  * @return LE_UNAVAILABLE The audio service initialization failed.
1225  * @return LE_FAULT On any other failure.
1226  * @return LE_OK Function succeeded.
1227  *
1228  * @note The process exits, if an invalid audio stream reference is given.
1229  */
1230 //--------------------------------------------------------------------------------------------------
1232 (
1233  le_audio_StreamRef_t streamRef
1234  ///< [IN] Audio stream reference.
1235 );
1236 
1237 //--------------------------------------------------------------------------------------------------
1238 /**
1239  * This function must be called to set the audio profile.
1240  *
1241  * @return LE_UNAVAILABLE On audio service initialization failure.
1242  * @return LE_FAULT On any other failure.
1243  * @return LE_OK Function succeeded.
1244  *
1245  */
1246 //--------------------------------------------------------------------------------------------------
1248 (
1249  uint32_t profile
1250  ///< [IN] Audio profile.
1251 );
1252 
1253 //--------------------------------------------------------------------------------------------------
1254 /**
1255  * This function must be called to get the audio profile in use.
1256  *
1257  * @return LE_UNAVAILABLE On audio service initialization failure.
1258  * @return LE_FAULT On any other failure.
1259  * @return LE_OK Function succeeded.
1260  *
1261  */
1262 //--------------------------------------------------------------------------------------------------
1264 (
1265  uint32_t* profilePtr
1266  ///< [OUT] Audio profile.
1267 );
1268 
1269 //--------------------------------------------------------------------------------------------------
1270 /**
1271  * Configure the PCM Sampling Rate.
1272  *
1273  * @return LE_FAULT Function failed.
1274  * @return LE_OUT_OF_RANGE Your platform does not support the setting's value.
1275  * @return LE_BUSY PCM interface is already active.
1276  * @return LE_OK Function succeeded.
1277  */
1278 //--------------------------------------------------------------------------------------------------
1280 (
1281  uint32_t rate
1282  ///< [IN] Sampling rate in Hz.
1283 );
1284 
1285 //--------------------------------------------------------------------------------------------------
1286 /**
1287  * Configure the PCM Sampling Resolution.
1288  *
1289  * @return LE_FAULT Function failed.
1290  * @return LE_OUT_OF_RANGE Your platform does not support the setting's value.
1291  * @return LE_BUSY PCM interface is already active.
1292  * @return LE_OK Function succeeded.
1293  */
1294 //--------------------------------------------------------------------------------------------------
1296 (
1297  uint32_t bitsPerSample
1298  ///< [IN] Sampling resolution (bits/sample).
1299 );
1300 
1301 //--------------------------------------------------------------------------------------------------
1302 /**
1303  * Configure the PCM Companding.
1304  *
1305  * @return LE_FAULT Function failed.
1306  * @return LE_OUT_OF_RANGE Your platform does not support the setting's value.
1307  * @return LE_BUSY PCM interface is already active.
1308  * @return LE_OK Function succeeded.
1309  */
1310 //--------------------------------------------------------------------------------------------------
1312 (
1313  le_audio_Companding_t companding
1314  ///< [IN] Companding.
1315 );
1316 
1317 //--------------------------------------------------------------------------------------------------
1318 /**
1319  * Retrieve the PCM Sampling Rate.
1320  *
1321  * @return The sampling rate in Hz.
1322  */
1323 //--------------------------------------------------------------------------------------------------
1325 (
1326  void
1327 );
1328 
1329 //--------------------------------------------------------------------------------------------------
1330 /**
1331  * Retrieve the PCM Sampling Resolution.
1332  *
1333  * @return The sampling resolution (bits/sample).
1334  */
1335 //--------------------------------------------------------------------------------------------------
1337 (
1338  void
1339 );
1340 
1341 //--------------------------------------------------------------------------------------------------
1342 /**
1343  * Retrieve the PCM Companding.
1344  *
1345  * @return The PCM companding.
1346  */
1347 //--------------------------------------------------------------------------------------------------
1349 (
1350  void
1351 );
1352 
1353 //--------------------------------------------------------------------------------------------------
1354 /**
1355  * Get the default PCM time slot used on the current platform.
1356  *
1357  * @return the time slot number.
1358  */
1359 //--------------------------------------------------------------------------------------------------
1361 (
1362  void
1363 );
1364 
1365 //--------------------------------------------------------------------------------------------------
1366 /**
1367  * Get the default I2S channel mode used on the current platform.
1368  *
1369  * @return the I2S channel mode.
1370  */
1371 //--------------------------------------------------------------------------------------------------
1373 (
1374  void
1375 );
1376 
1377 //--------------------------------------------------------------------------------------------------
1378 /**
1379  * Play a file on a playback stream.
1380  *
1381  * @return LE_FAULT Function failed.
1382  * @return LE_BAD_PARAMETER Audio stream reference is invalid.
1383  * @return LE_BUSY Player interface is already active.
1384  * @return LE_OK Function succeeded.
1385  *
1386  * @note
1387  * - The fd is closed by the IPC API. To play again the same file, the fd parameter can be set
1388  * to LE_AUDIO_NO_FD: in this case, the previous file descriptor is re-used.
1389  * If the fd as to be kept on its side, the application should duplicate the fd (e.g., using
1390  * dup() ) before calling the API.
1391  * In that case, the old and new file descriptors refer to the same open file description and
1392  * thus share file offset. So, once a playback has reached the end of file, the application must
1393  * reset the file offset by using lseek on the duplicated descriptor to start the playback from
1394  * the beginning.
1395  *
1396  * @note
1397  * - Calling le_audio_PlayFile(<..>, LE_AUDIO_NO_FD) will rewind the audio file to the
1398  * beginning when a playback is already in progress.
1399  *
1400  */
1401 //--------------------------------------------------------------------------------------------------
1403 (
1404  le_audio_StreamRef_t streamRef,
1405  ///< [IN] Audio stream reference.
1406  int fd
1407  ///< [IN] File descriptor.
1408 );
1409 
1410 //--------------------------------------------------------------------------------------------------
1411 /**
1412  * Initiate a playback sending samples over a pipe.
1413  *
1414  * @return LE_FAULT Function failed.
1415  * @return LE_BUSY Player interface is already active.
1416  * @return LE_OK Function succeeded.
1417  *
1418  * @note The fd is closed by the IPC API. To use again the same pipe, the fd parameter can be set
1419  * to LE_AUDIO_NO_FD: in this case, the previous file descriptor is re-used.
1420  * If the fd as to be kept on its side, the application should duplicate the fd (e.g., using dup() )
1421  * before calling the API.
1422  *
1423  * @note Playback initiated with this function must be stopped by calling le_audio_Stop().
1424  */
1425 //--------------------------------------------------------------------------------------------------
1427 (
1428  le_audio_StreamRef_t streamRef,
1429  ///< [IN] Audio stream reference.
1430  int fd
1431  ///< [IN] File descriptor.
1432 );
1433 
1434 //--------------------------------------------------------------------------------------------------
1435 /**
1436  * Record a file on a recorder stream.
1437  *
1438  * @return LE_FAULT Function failed.
1439  * @return LE_BAD_PARAMETER The audio stream reference is invalid.
1440  * @return LE_BUSY Recorder interface is already active.
1441  * @return LE_OK Function succeeded.
1442  *
1443  * @note the fd is closed by the API. To record again the same file, the fd parameter can be set to
1444  * LE_AUDIO_NO_FD: in this case, the previous file descriptor is re-used.
1445  * If the fd as to be kept on its side, the application should duplicate the fd (e.g., using dup() )
1446  * before calling the API.
1447  *
1448  */
1449 //--------------------------------------------------------------------------------------------------
1451 (
1452  le_audio_StreamRef_t streamRef,
1453  ///< [IN] Audio stream reference.
1454  int fd
1455  ///< [IN] File descriptor.
1456 );
1457 
1458 //--------------------------------------------------------------------------------------------------
1459 /**
1460  * Get samples from a recorder stream.
1461  *
1462  * @return LE_FAULT Function failed.
1463  * @return LE_BUSY Recorder interface is already active.
1464  * @return LE_OK Function succeeded.
1465  *
1466  * @note The fd is closed by the API. To use again the same pipe, the fd parameter can be set to
1467  * LE_AUDIO_NO_FD: in this case, the previous file descriptor is re-used.
1468  * If the fd as to be kept on its side, the application should duplicate the fd (e.g., using dup() )
1469  * before calling the API.
1470  *
1471  * @note When using this function recording must be stopped by calling le_audio_Stop().
1472  */
1473 //--------------------------------------------------------------------------------------------------
1475 (
1476  le_audio_StreamRef_t streamRef,
1477  ///< [IN] Audio stream reference.
1478  int fd
1479  ///< [IN] File descriptor.
1480 );
1481 
1482 //--------------------------------------------------------------------------------------------------
1483 /**
1484  * Stop the file playback/recording.
1485  *
1486  * @return LE_FAULT Function failed.
1487  * @return LE_OK Function succeeded.
1488  *
1489  * @note The used file descriptor is not deallocated, but is is rewound to the beginning.
1490  *
1491  */
1492 //--------------------------------------------------------------------------------------------------
1494 (
1495  le_audio_StreamRef_t streamRef
1496  ///< [IN] Audio stream reference.
1497 );
1498 
1499 //--------------------------------------------------------------------------------------------------
1500 /**
1501  * Pause the file playback/recording.
1502  *
1503  * @return LE_FAULT Function failed.
1504  * @return LE_OK Function succeeded.
1505  *
1506  */
1507 //--------------------------------------------------------------------------------------------------
1509 (
1510  le_audio_StreamRef_t streamRef
1511  ///< [IN] Audio stream reference.
1512 );
1513 
1514 //--------------------------------------------------------------------------------------------------
1515 /**
1516  * Flush the remaining audio samples.
1517  *
1518  * @return LE_FAULT Function failed.
1519  * @return LE_OK Function succeeded.
1520  *
1521  */
1522 //--------------------------------------------------------------------------------------------------
1524 (
1525  le_audio_StreamRef_t streamRef
1526  ///< [IN] Audio stream reference.
1527 );
1528 
1529 //--------------------------------------------------------------------------------------------------
1530 /**
1531  * Resume a file playback/recording (need to be in pause state).
1532  *
1533  * @return LE_FAULT Function failed.
1534  * @return LE_OK Function succeeded.
1535  *
1536  */
1537 //--------------------------------------------------------------------------------------------------
1539 (
1540  le_audio_StreamRef_t streamRef
1541  ///< [IN] Audio stream reference.
1542 );
1543 
1544 //--------------------------------------------------------------------------------------------------
1545 /**
1546  * Set the channel number of a PCM sample.
1547  *
1548  * @return LE_FAULT Function failed.
1549  * @return LE_OK Function succeeded.
1550  *
1551  */
1552 //--------------------------------------------------------------------------------------------------
1554 (
1555  le_audio_StreamRef_t streamRef,
1556  ///< [IN] Audio stream reference.
1557  uint32_t nbChannel
1558  ///< [IN] Channel Number
1559 );
1560 
1561 //--------------------------------------------------------------------------------------------------
1562 /**
1563  * Get the channel number of a PCM sample.
1564  *
1565  * @return LE_FAULT Function failed.
1566  * @return LE_OK Function succeeded.
1567  *
1568  */
1569 //--------------------------------------------------------------------------------------------------
1571 (
1572  le_audio_StreamRef_t streamRef,
1573  ///< [IN] Audio stream reference.
1574  uint32_t* nbChannelPtr
1575  ///< [OUT] Channel Number
1576 );
1577 
1578 //--------------------------------------------------------------------------------------------------
1579 /**
1580  * Set the PCM sampling rate of a PCM sample.
1581  *
1582  * @return LE_FAULT Function failed.
1583  * @return LE_OK Function succeeded.
1584  *
1585  */
1586 //--------------------------------------------------------------------------------------------------
1588 (
1589  le_audio_StreamRef_t streamRef,
1590  ///< [IN] Audio stream reference.
1591  uint32_t rate
1592  ///< [IN] PCM sampling Rate.
1593 );
1594 
1595 //--------------------------------------------------------------------------------------------------
1596 /**
1597  * Get the PCM sampling rate of a PCM sample.
1598  *
1599  * @return LE_FAULT Function failed.
1600  * @return LE_OK Function succeeded.
1601  *
1602  */
1603 //--------------------------------------------------------------------------------------------------
1605 (
1606  le_audio_StreamRef_t streamRef,
1607  ///< [IN] Audio stream reference.
1608  uint32_t* ratePtr
1609  ///< [OUT] PCM sampling Rate.
1610 );
1611 
1612 //--------------------------------------------------------------------------------------------------
1613 /**
1614  * Set the sampling resolution (in bits per sample) of a PCM sample.
1615  *
1616  * @return LE_FAULT Function failed.
1617  * @return LE_OK Function succeeded.
1618  *
1619  */
1620 //--------------------------------------------------------------------------------------------------
1622 (
1623  le_audio_StreamRef_t streamRef,
1624  ///< [IN] Audio stream reference.
1625  uint32_t samplingRes
1626  ///< [IN] Sampling resolution (in bits per sample).
1627 );
1628 
1629 //--------------------------------------------------------------------------------------------------
1630 /**
1631  * Get the sampling resolution (in bits per sample) of a PCM sample.
1632  *
1633  * @return LE_FAULT Function failed.
1634  * @return LE_OK Function succeeded.
1635  *
1636  */
1637 //--------------------------------------------------------------------------------------------------
1639 (
1640  le_audio_StreamRef_t streamRef,
1641  ///< [IN] Audio stream reference.
1642  uint32_t* samplingResPtr
1643  ///< [OUT] Sampling resolution (in bits per sample).
1644 );
1645 
1646 //--------------------------------------------------------------------------------------------------
1647 /**
1648  * This function must be called to play a DTMF on a specific audio stream.
1649  *
1650  * @return LE_FORMAT_ERROR The DTMF characters are invalid.
1651  * @return LE_BUSY A DTMF playback is already in progress on the playback stream.
1652  * @return LE_FAULT Function failed to play the DTMFs.
1653  * @return LE_OK Function succeeded.
1654  *
1655  * @note If the DTMF string is too long (max DTMF_MAX_LEN characters), it is a fatal
1656  * error, the function will not return.
1657  * @note The process exits, if an invalid audio stream reference is given.
1658  */
1659 //--------------------------------------------------------------------------------------------------
1661 (
1662  le_audio_StreamRef_t streamRef,
1663  ///< [IN] Audio stream reference.
1664  const char* LE_NONNULL dtmf,
1665  ///< [IN] DTMFs to play.
1666  uint32_t duration,
1667  ///< [IN] DTMF duration in milliseconds.
1668  uint32_t pause
1669  ///< [IN] Pause duration between tones in milliseconds.
1670 );
1671 
1672 //--------------------------------------------------------------------------------------------------
1673 /**
1674  * This function must be called to ask to the Mobile Network to generate on the remote audio party
1675  * the DTMFs.
1676  *
1677  * @return LE_FORMAT_ERROR The DTMF characters are invalid.
1678  * @return LE_BUSY A DTMF playback is in progress.
1679  * @return LE_FAULT Function failed.
1680  * @return LE_OK Function succeeded.
1681  *
1682  * @note If the DTMF string is too long (max DTMF_MAX_LEN characters), it is a fatal
1683  * error, the function will not return.
1684  */
1685 //--------------------------------------------------------------------------------------------------
1687 (
1688  const char* LE_NONNULL dtmf,
1689  ///< [IN] DTMFs to play.
1690  uint32_t duration,
1691  ///< [IN] DTMF duration in milliseconds.
1692  uint32_t pause
1693  ///< [IN] Pause duration between tones in milliseconds.
1694 );
1695 
1696 //--------------------------------------------------------------------------------------------------
1697 /**
1698  * Set the encoding format of a recorder stream.
1699  *
1700  * @return LE_FAULT Function failed.
1701  * @return LE_OK Function succeeded.
1702  *
1703  */
1704 //--------------------------------------------------------------------------------------------------
1706 (
1707  le_audio_StreamRef_t streamRef,
1708  ///< [IN] Audio stream reference.
1709  le_audio_Format_t format
1710  ///< [IN] Encoding format.
1711 );
1712 
1713 //--------------------------------------------------------------------------------------------------
1714 /**
1715  * Get the encoding format of a recorder stream.
1716  *
1717  * @return LE_FAULT Function failed.
1718  * @return LE_OK Function succeeded.
1719  *
1720  * @note A client calling this function with either an invalid
1721  * streamRef or null out pointer parameter will be killed and the
1722  * function will not return.
1723  */
1724 //--------------------------------------------------------------------------------------------------
1726 (
1727  le_audio_StreamRef_t streamRef,
1728  ///< [IN] Audio stream reference.
1729  le_audio_Format_t* formatPtr
1730  ///< [OUT] Encoding format.
1731 );
1732 
1733 //--------------------------------------------------------------------------------------------------
1734 /**
1735  * Set the AMR mode for AMR encoder.
1736  *
1737  * @return LE_FAULT Function failed.
1738  * @return LE_OK Function succeeded.
1739  *
1740  */
1741 //--------------------------------------------------------------------------------------------------
1743 (
1744  le_audio_StreamRef_t streamRef,
1745  ///< [IN] Audio stream reference.
1746  le_audio_AmrMode_t mode
1747  ///< [IN] AMR mode.
1748 );
1749 
1750 //--------------------------------------------------------------------------------------------------
1751 /**
1752  * Get the AMR mode for AMR encoder.
1753  *
1754  * @return LE_FAULT Function failed.
1755  * @return LE_OK Function succeeded.
1756  *
1757  * @note A client calling this function with a null out pointer
1758  * parameter will be killed and the function will not return.
1759  */
1760 //--------------------------------------------------------------------------------------------------
1762 (
1763  le_audio_StreamRef_t streamRef,
1764  ///< [IN] Audio stream reference.
1765  le_audio_AmrMode_t* modePtr
1766  ///< [OUT] AMR mode.
1767 );
1768 
1769 //--------------------------------------------------------------------------------------------------
1770 /**
1771  * Set the AMR discontinuous transmission (DTX). The DTX is activated by default.
1772  *
1773  * @return LE_FAULT Function failed.
1774  * @return LE_OK Function succeeded.
1775  *
1776  * @note If the caller is passing a bad reference into this function, it is a fatal error, the
1777  * function will not return.
1778  */
1779 //--------------------------------------------------------------------------------------------------
1781 (
1782  le_audio_StreamRef_t streamRef,
1783  ///< [IN] Audio stream reference.
1784  bool dtx
1785  ///< [IN] DTX.
1786 );
1787 
1788 //--------------------------------------------------------------------------------------------------
1789 /**
1790  * Get the AMR discontinuous transmission (DTX) value.
1791  *
1792  * @return LE_FAULT Function failed.
1793  * @return LE_OK Function succeeded.
1794  *
1795  * @note If the caller is passing a bad reference into this function, it is a fatal error, the
1796  * function will not return.
1797  */
1798 //--------------------------------------------------------------------------------------------------
1800 (
1801  le_audio_StreamRef_t streamRef,
1802  ///< [IN] Audio stream reference.
1803  bool* dtxPtr
1804  ///< [OUT] DTX.
1805 );
1806 
1807 //--------------------------------------------------------------------------------------------------
1808 /**
1809  * Set the value of a platform specific gain in the audio subsystem.
1810  *
1811  * @return LE_BAD_PARAMETER The pointer to the name of the platform specific gain is invalid.
1812  * @return LE_NOT_FOUND The specified gain's name is not recognized in your audio subsystem.
1813  * @return LE_OUT_OF_RANGE The gain parameter is out of range.
1814  * @return LE_UNAVAILABLE The audio service initialization failed.
1815  * @return LE_FAULT On any other failure.
1816  * @return LE_OK The function succeeded.
1817  *
1818  * @note If the caller is passing a bad reference into this function, it is a fatal error, the
1819  * function will not return.
1820  * @warning Ensure to check the names of supported gains for your specific platform.
1821  */
1822 //--------------------------------------------------------------------------------------------------
1824 (
1825  const char* LE_NONNULL gainName,
1826  ///< [IN] Name of the platform specific gain.
1827  int32_t gain
1828  ///< [IN] The gain value (specific to the platform)
1829 );
1830 
1831 //--------------------------------------------------------------------------------------------------
1832 /**
1833  * Get the value of a platform specific gain in the audio subsystem.
1834  *
1835  * @return LE_BAD_PARAMETER The pointer to the name of the platform specific gain is invalid.
1836  * @return LE_NOT_FOUND The specified gain's name is not recognized in your audio subsystem.
1837  * @return LE_UNAVAILABLE The audio service initialization failed.
1838  * @return LE_FAULT On any other failure.
1839  * @return LE_OK The function succeeded.
1840  *
1841  * @note If the caller is passing a bad reference into this function, it is a fatal error, the
1842  * function will not return.
1843  * @warning Ensure to check the names of supported gains for your specific platform.
1844  */
1845 //--------------------------------------------------------------------------------------------------
1847 (
1848  const char* LE_NONNULL gainName,
1849  ///< [IN] Name of the platform specific gain.
1850  int32_t* gainPtr
1851  ///< [OUT] The gain value (specific to the platform)
1852 );
1853 
1854 //--------------------------------------------------------------------------------------------------
1855 /**
1856  * Mute the Call Waiting Tone.
1857  *
1858  * @return LE_UNAVAILABLE On audio service initialization failure.
1859  * @return LE_FAULT On any other failure.
1860  * @return LE_OK The function succeeded.
1861  */
1862 //--------------------------------------------------------------------------------------------------
1864 (
1865  void
1866 );
1867 
1868 //--------------------------------------------------------------------------------------------------
1869 /**
1870  * Unmute the Call Waiting Tone.
1871  *
1872  * @return LE_UNAVAILABLE On audio service initialization failure.
1873  * @return LE_FAULT On any other failure.
1874  * @return LE_OK The function succeeded.
1875  */
1876 //--------------------------------------------------------------------------------------------------
1878 (
1879  void
1880 );
1881 
1882 #endif // LE_AUDIO_INTERFACE_H_INCLUDE_GUARD
le_result_t le_audio_SetSamplePcmSamplingRate(le_audio_StreamRef_t streamRef, uint32_t rate)
le_result_t le_audio_GetSamplePcmSamplingRate(le_audio_StreamRef_t streamRef, uint32_t *ratePtr)
le_result_t le_audio_DisableNoiseSuppressor(le_audio_StreamRef_t streamRef)
Linear PCM.
Definition: le_audio_interface.h:495
le_result_t le_audio_Pause(le_audio_StreamRef_t streamRef)
uint32_t le_audio_GetPcmSamplingResolution(void)
le_result_t le_audio_SetSamplePcmChannelNumber(le_audio_StreamRef_t streamRef, uint32_t nbChannel)
void le_audio_RemoveMediaHandler(le_audio_MediaHandlerRef_t handlerRef)
le_result_t le_audio_GetSamplePcmChannelNumber(le_audio_StreamRef_t streamRef, uint32_t *nbChannelPtr)
le_result_t le_audio_DisableEchoCanceller(le_audio_StreamRef_t streamRef)
le_result_t le_audio_SetPcmSamplingRate(uint32_t rate)
le_result_t le_audio_RecordFile(le_audio_StreamRef_t streamRef, int fd)
MU-law PCM (i.e. North America and Japan).
Definition: le_audio_interface.h:493
le_result_t
Definition: le_basics.h:35
le_audio_StreamRef_t le_audio_OpenModemVoiceTx(void)
le_result_t le_audio_IsEchoCancellerEnabled(le_audio_StreamRef_t streamRef, bool *statusPtr)
le_audio_MediaEvent_t
Definition: le_audio_interface.h:470
le_result_t le_audio_GetSampleAmrDtx(le_audio_StreamRef_t streamRef, bool *dtxPtr)
AMR Wideband in 14.25kbps.
Definition: le_audio_interface.h:570
le_audio_StreamRef_t le_audio_OpenI2sTx(le_audio_I2SChannel_t mode)
void le_audio_RemoveDtmfDetectorHandler(le_audio_DtmfDetectorHandlerRef_t handlerRef)
le_audio_StreamRef_t le_audio_OpenI2sRx(le_audio_I2SChannel_t mode)
le_result_t le_audio_GetSamples(le_audio_StreamRef_t streamRef, int fd)
le_result_t le_audio_Flush(le_audio_StreamRef_t streamRef)
le_result_t le_audio_DisableIirFilter(le_audio_StreamRef_t streamRef)
struct le_audio_Stream * le_audio_StreamRef_t
Definition: le_audio_interface.h:591
AMR Narrowband in 7.4kbps (default value)
Definition: le_audio_interface.h:556
Waveform audio file.
Definition: le_audio_interface.h:529
le_result_t le_audio_GetPlatformSpecificGain(const char *LE_NONNULL gainName, int32_t *gainPtr)
le_result_t le_audio_GetProfile(uint32_t *profilePtr)
le_result_t le_audio_TryConnectService(void)
le_audio_StreamRef_t le_audio_OpenUsbTx(void)
Reverse mode (left & right reversed).
Definition: le_audio_interface.h:516
le_result_t le_audio_Connect(le_audio_ConnectorRef_t connectorRef, le_audio_StreamRef_t streamRef)
le_result_t le_audio_Unmute(le_audio_StreamRef_t streamRef)
void(* le_audio_DtmfDetectorHandlerFunc_t)(le_audio_StreamRef_t streamRef, char dtmf, void *contextPtr)
Definition: le_audio_interface.h:641
AMR Wideband in 8.85kbps.
Definition: le_audio_interface.h:566
le_audio_StreamRef_t le_audio_OpenSpeaker(void)
struct le_audio_Connector * le_audio_ConnectorRef_t
Definition: le_audio_interface.h:599
Not set.
Definition: le_audio_interface.h:546
le_audio_Format_t
Definition: le_audio_interface.h:527
AMR Narrowband in 6.7kbps.
Definition: le_audio_interface.h:554
Enumerate max value.
Definition: le_audio_interface.h:478
le_result_t le_audio_EnableFirFilter(le_audio_StreamRef_t streamRef)
AMR Narrowband in 4.75kbps.
Definition: le_audio_interface.h:548
uint32_t le_audio_GetPcmSamplingRate(void)
Adaptive Multi Rate.
Definition: le_audio_interface.h:531
le_result_t le_audio_MuteCallWaitingTone(void)
le_result_t le_audio_PlaySamples(le_audio_StreamRef_t streamRef, int fd)
le_audio_I2SChannel_t le_audio_GetDefaultI2sMode(void)
struct le_audio_DtmfDetectorHandler * le_audio_DtmfDetectorHandlerRef_t
Definition: le_audio_interface.h:615
AMR Narrowband in 10.3kbps.
Definition: le_audio_interface.h:560
le_result_t le_audio_DisableAutomaticGainControl(le_audio_StreamRef_t streamRef)
le_audio_ConnectorRef_t le_audio_CreateConnector(void)
AMR Narrowband in 5.9kbps.
Definition: le_audio_interface.h:552
le_result_t le_audio_PlayFile(le_audio_StreamRef_t streamRef, int fd)
le_audio_StreamRef_t le_audio_OpenPcmTx(uint32_t timeslot)
le_result_t le_audio_PlayDtmf(le_audio_StreamRef_t streamRef, const char *LE_NONNULL dtmf, uint32_t duration, uint32_t pause)
le_result_t le_audio_SetPcmCompanding(le_audio_Companding_t companding)
le_result_t le_audio_GetSamplePcmSamplingResolution(le_audio_StreamRef_t streamRef, uint32_t *samplingResPtr)
AMR Wideband in 23.85kbps.
Definition: le_audio_interface.h:580
le_result_t le_audio_IsNoiseSuppressorEnabled(le_audio_StreamRef_t streamRef, bool *statusPtr)
le_audio_AmrMode_t
Definition: le_audio_interface.h:544
le_result_t le_audio_SetProfile(uint32_t profile)
AMR Wideband in 18.25kbps.
Definition: le_audio_interface.h:574
le_audio_StreamRef_t le_audio_OpenModemVoiceRx(void)
AMR Narrowband in 5.15kbps.
Definition: le_audio_interface.h:550
le_audio_StreamRef_t le_audio_OpenRecorder(void)
le_result_t le_audio_Resume(le_audio_StreamRef_t streamRef)
void(* le_audio_DisconnectHandler_t)(void *)
Definition: le_audio_interface.h:351
void le_audio_Close(le_audio_StreamRef_t streamRef)
AMR Wideband in 6.6kbps.
Definition: le_audio_interface.h:564
AMR Narrowband in 12.2kbps.
Definition: le_audio_interface.h:562
A-law PCM (i.e. Europe and most of the rest of the world).
Definition: le_audio_interface.h:491
AMR Narrowband in 7.95kbps.
Definition: le_audio_interface.h:558
le_audio_StreamRef_t le_audio_OpenPlayer(void)
void le_audio_DisconnectService(void)
uint32_t le_audio_GetDefaultPcmTimeSlot(void)
le_result_t le_audio_Stop(le_audio_StreamRef_t streamRef)
le_result_t le_audio_SetGain(le_audio_StreamRef_t streamRef, int32_t gain)
le_audio_StreamRef_t le_audio_OpenPcmRx(uint32_t timeslot)
le_audio_I2SChannel_t
Definition: le_audio_interface.h:506
AMR Wideband in 12.65kbps.
Definition: le_audio_interface.h:568
AMR Wideband in 23.05kbps.
Definition: le_audio_interface.h:578
Mono mode.
Definition: le_audio_interface.h:512
le_result_t le_audio_SetPcmSamplingResolution(uint32_t bitsPerSample)
struct le_audio_MediaHandler * le_audio_MediaHandlerRef_t
Definition: le_audio_interface.h:607
AMR Wideband in 15.85kbps.
Definition: le_audio_interface.h:572
le_result_t le_audio_SetEncodingFormat(le_audio_StreamRef_t streamRef, le_audio_Format_t format)
le_audio_StreamRef_t le_audio_OpenUsbRx(void)
le_result_t le_audio_EnableEchoCanceller(le_audio_StreamRef_t streamRef)
le_result_t le_audio_SetSampleAmrMode(le_audio_StreamRef_t streamRef, le_audio_AmrMode_t mode)
Stereo mode.
Definition: le_audio_interface.h:514
le_result_t le_audio_DisableFirFilter(le_audio_StreamRef_t streamRef)
Recording/playback has encountered an error.
Definition: le_audio_interface.h:476
Right channel.
Definition: le_audio_interface.h:510
void le_audio_ConnectService(void)
le_audio_Companding_t
Definition: le_audio_interface.h:489
le_result_t le_audio_GetGain(le_audio_StreamRef_t streamRef, int32_t *gainPtr)
le_result_t le_audio_SetSampleAmrDtx(le_audio_StreamRef_t streamRef, bool dtx)
void le_audio_SetServerDisconnectHandler(le_audio_DisconnectHandler_t disconnectHandler, void *contextPtr)
le_result_t le_audio_SetSamplePcmSamplingResolution(le_audio_StreamRef_t streamRef, uint32_t samplingRes)
Playback has reached the end of file.
Definition: le_audio_interface.h:472
le_audio_MediaHandlerRef_t le_audio_AddMediaHandler(le_audio_StreamRef_t streamRef, le_audio_MediaHandlerFunc_t handlerPtr, void *contextPtr)
AMR Wideband in 19.85kbps.
Definition: le_audio_interface.h:576
le_result_t le_audio_GetEncodingFormat(le_audio_StreamRef_t streamRef, le_audio_Format_t *formatPtr)
Left channel.
Definition: le_audio_interface.h:508
le_audio_Companding_t le_audio_GetPcmCompanding(void)
le_audio_DtmfDetectorHandlerRef_t le_audio_AddDtmfDetectorHandler(le_audio_StreamRef_t streamRef, le_audio_DtmfDetectorHandlerFunc_t handlerPtr, void *contextPtr)
void le_audio_Disconnect(le_audio_ConnectorRef_t connectorRef, le_audio_StreamRef_t streamRef)
void le_audio_DeleteConnector(le_audio_ConnectorRef_t connectorRef)
No more audio samples to play.
Definition: le_audio_interface.h:474
le_result_t le_audio_SetPlatformSpecificGain(const char *LE_NONNULL gainName, int32_t gain)
le_result_t le_audio_EnableNoiseSuppressor(le_audio_StreamRef_t streamRef)
le_result_t le_audio_UnmuteCallWaitingTone(void)
le_result_t le_audio_PlaySignallingDtmf(const char *LE_NONNULL dtmf, uint32_t duration, uint32_t pause)
le_result_t le_audio_GetSampleAmrMode(le_audio_StreamRef_t streamRef, le_audio_AmrMode_t *modePtr)
le_audio_StreamRef_t le_audio_OpenMic(void)
void(* le_audio_MediaHandlerFunc_t)(le_audio_StreamRef_t streamRef, le_audio_MediaEvent_t event, void *contextPtr)
Definition: le_audio_interface.h:625
le_result_t le_audio_EnableIirFilter(le_audio_StreamRef_t streamRef)
le_result_t le_audio_EnableAutomaticGainControl(le_audio_StreamRef_t streamRef)
le_result_t le_audio_Mute(le_audio_StreamRef_t streamRef)