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