summaryrefslogtreecommitdiff
path: root/sound/soc/tegra/tegra_sndfx.h
blob: 5b59b7587a825ab9151a5e96e93a020338fa9d00 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
/*
 * Copyright (c) 2010 NVIDIA Corporation.
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 *
 * Redistributions in binary form must reproduce the above copyright notice,
 * this list of conditions and the following disclaimer in the documentation
 * and/or other materials provided with the distribution.
 *
 * Neither the name of the NVIDIA Corporation nor the names of its contributors
 * may be used to endorse or promote products derived from this software
 * without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 *
 */

#ifndef INCLUDED_nvddk_audiofx_H
#define INCLUDED_nvddk_audiofx_H


#if defined(__cplusplus)
extern "C"
{
#endif

#include "nvrm_module.h"
#include "nvrm_transport.h"
#include "nvrm_init.h"

/** @file
 * @brief <b>NVIDIA Driver Development Kit: NvAudioFx APIs</b>
 *
 * @b Description: Declares Interface for NvAudioFx APIs.
 */

/**
 *  @brief API Object Handles.
 *
 *  NvAudioFxObjectHandle is the base handle for every type in the API.
 */

typedef struct NvAudioFxObjectRec *NvAudioFxObjectHandle;

typedef struct NvAudioFxRec *NvAudioFxHandle;

typedef struct NvAudioFxMixBufferRec *NvAudioFxMixBufferHandle;

typedef struct NvAudioFxMixerRec *NvAudioFxMixerHandle;

typedef struct NvAudioFxNotifierRec *NvAudioFxNotifierHandle;

typedef struct NvAudioFxStreamRec *NvAudioFxStreamHandle;

/**
 *  @brief Object IDs.
 */

typedef NvS32 NvObjectId;
#define NvObjectNullId (0x0)
#define NvAudioFxObjectId (0x10000000)
#define NvAudioFxId (0x11000000)
#define NvAudioFxIoId (0x11100000)
#define NvAudioFxPluginId (0x11200000)
#define NvAudioFxMixBufferId (0x12000000)
#define NvAudioFx3dGroupId (0x14000000)
#define NvAudioFxNotifierId (0x30000000)
#define NvAudioFxConvertId (0x11000001)
#define NvAudioFxDrcId (0x11000002)
#define NvAudioFxEqId (0x11000003)
#define NvAudioFxMixerId (0x11000004)
#define NvAudioFxMixId (0x11000005)
#define NvAudioFxPeqId (0x11000006)
#define NvAudioFxResizeId (0x11000007)
#define NvAudioFxSplitId (0x11000008)
#define NvAudioFxSpreaderId (0x11000009)
#define NvAudioFxSrcId (0x1100000a)
#define NvAudioFxSwitchId (0x1100000b)
#define NvAudioFxVolumeId (0x1100000c)
#define NvAudioFxStreamId (0x11100000)
#define NvAudioFxSpdifId (0x11100001)
#define NvAudioFxSilenceId (0x11100002)
#define NvAudioFxI2s1Id (0x11110000)
#define NvAudioFxI2s2Id (0x11110001)
#define NvAudioFxPlaybackMixId (0x11300000)
#define NvAudioFxPlaybackSplitId (0x11300001)
#define NvAudioFxRecordMixId (0x11300002)
#define NvAudioFxRecordSplitId (0x11300003)
#define NvAudioFxSpdifPlaybackMixId (0x11300004)
#define NvAudioFxSpdifRecordSplitId (0x11300005)
#define NvAudioFxSpdifLoopbackSplitId (0x11300006)
#define NvAudioFxSpdifVolumeId (0x1130000c)
#define NvAudioFxMusicMixId (0x11300007)
#define NvAudioFxMusicSplitId (0x11300008)
#define NvAudioFxRingtoneMixId (0x11300009)
#define NvAudioFxMusicVolumeId (0x1130000a)
#define NvAudioFxRingtoneVolumeId (0x1130000b)
#define NvAudioFxI2s1PlaybackMixId (0x11310000)
#define NvAudioFxI2s1RecordSplitId (0x11310001)
#define NvAudioFxI2s1LoopbackSplitId (0x11310002)
#define NvAudioFxI2s1VolumeId (0x11310003)
#define NvAudioFxI2s2PlaybackMixId (0x11311000)
#define NvAudioFxI2s2RecordSplitId (0x11311001)
#define NvAudioFxI2s2LoopbackSplitId (0x11311002)
#define NvAudioFxI2s2VolumeId (0x11311003)

//
//                  Mixer
//                +------+
//                |      |
//                |  FX  |--@ ScratchSource ------------+
//                |      |                              |
//                +------+                              |
//
//                 Source                              Sink
//                +------+                           +------+
//   Copy Sink @--|      |--@ Loopback  Copy Sink @--|      |--@ Loopback
//                |  FX  |                           |  FX  |
//  ----> Sink @--|      |--@ Source ------> Sink @--|      |--@ Source ---->
//                +------+                           +------+
//

typedef NvS32 NvAudioFxPin;
#define NvAudioFxScratchSourcePin (-4)
#define NvAudioFxLoopbackPin (-3)
#define NvAudioFxCopySinkPin (-2)
#define NvAudioFxInvalidPin (-1)
#define NvAudioFxSinkPin (0)
#define NvAudioFxSourcePin (1)

typedef NvS32 NvAudioFxProperty;
#define NvAudioFxProperty_Attach (0x1000)
#define NvAudioFxProperty_Detach (0x1010)
#define NvAudioFxProperty_Format (0x1020)
#define NvAudioFxProperty_Method (0x1030)
#define NvAudioFxProperty_PowerState (0x1040)
#define NvAudioFxProperty_SampleRate (0x1050)
#define NvAudioFxProperty_State (0x1060)
#define NvAudioFxPinProperty_Format (0x2000)
#define NvAudioFxDrcProperty_Drc (0x3000)
#define NvAudioFxEqProperty_Eq (0x4000)
#define NvAudioFxI2sProperty_AllocChannel (0x4a01)
#define NvAudioFxI2sProperty_InputAvailable (0x4a02)
#define NvAudioFxI2sProperty_InputDisable (0x4a04)
#define NvAudioFxI2sProperty_InputEnable (0x4a03)
#define NvAudioFxI2sProperty_InputSelect (0x4a05)
#define NvAudioFxI2sProperty_OutputAvailable (0x4a06)
#define NvAudioFxI2sProperty_OutputDisable (0x4a08)
#define NvAudioFxI2sProperty_OutputEnable (0x4a07)
#define NvAudioFxI2sProperty_OutputSelect (0x4a09)
#define NvAudioFxI2sProperty_IoDeviceVolume (0x4a0a)
#define NvAudioFxIoProperty_AddEvent (0x5000)
#define NvAudioFxIoProperty_Position (0x5010)
#define NvAudioFxIoProperty_RemoveEvent (0x5020)
#define NvAudioFxIoProperty_SetMappedPositionBuffer (0x5030)
#define NvAudioFxMixerProperty_ProcessBufferSize (0x6000)
#define NvAudioFxMixerProperty_ModeAvailable (0x6001)
#define NvAudioFxMixerProperty_ModeDisable (0x6002)
#define NvAudioFxMixerProperty_ModeEnable (0x6003)
#define NvAudioFxMixerProperty_ModeSelect (0x6004)
#define NvAudioFxMixProperty_Headroom (0x7000)
#define NvAudioFxNotifierProperty_Connect (0x8000)
#define NvAudioFxNotifierProperty_Disconnect (0x8010)
#define NvAudioFxPeqProperty_Peq (0x9000)
#define NvAudioFxResizeProperty_OutputSize (0xa000)
#define NvAudioFxSpreaderProperty_Spreader (0xb000)
#define NvAudioFxSrcProperty_SampleRateShift (0xc000)
#define NvAudioFxVolumeProperty_Ramping (0xd000)
#define NvAudioFxVolumeProperty_Volume (0xd010)

// Description of the NvAudioFxProperty_Attach and
// NvAudioFxProperty_Detach properties.

typedef struct NvAudioFxConnectionDescriptorRec
{
    NvAudioFxHandle hSource;
    NvAudioFxPin SourcePin;
    NvAudioFxHandle hSink;
    NvAudioFxPin SinkPin;
} NvAudioFxConnectionDescriptor;

// Audio format information of the stream or buffer.

typedef struct NvAudioFxFormatRec
{
    NvU32 FormatTag;
    NvU32 SampleRate;
    NvU32 Channels;
    NvU32 BitsPerSample;
    NvU32 ChannelMask;
    NvU32 ValidBitsPerSample;
} NvAudioFxFormat;

// Description of the Mode property.

typedef NvS32 NvAudioFxMode;
#define NvAudioFxMode_Normal (0x0)
#define NvAudioFxMode_Bluetooth (0x1)
#define NvAudioFxMode_Ringtone (0x2)
#define NvAudioFxMode_InCall (0x4)
#define NvAudioFxMode_Radio (0x8)
#define NvAudioFxMode_All (0xffffffff)

// Description of the position property.

typedef NvU64 NvAudioFxPosition;

// Description of supported power states in AudioFx.

typedef NvS32 NvAudioFxPowerState;
#define NvAudioFxPowerState_Low (0x1000)
#define NvAudioFxPowerState_High (0x1010)
#define NvAudioFxPowerState_Full (0x1020)
#define NvAudioFxPowerState_Ready (0x1030)
#define NvAudioFxPowerState_Off (0x1040)

// Description of the supported priority states.

typedef NvS32 NvAudioFxPriority;
#define NvAudioFxPriority_Normal (0x1000)
#define NvAudioFxPriority_Medium (0x1010)
#define NvAudioFxPriority_High (0x1020)
#define NvAudioFxPriority_Critical (0x1030)

// Description of the NvAudioFxProperty_State property.

typedef NvS32 NvAudioFxState;
#define NvAudioFxState_Uninitialized (0x1000)
#define NvAudioFxState_Initialized (0x1010)
#define NvAudioFxState_Stop (0x1020)
#define NvAudioFxState_Run (0x1030)
#define NvAudioFxState_Pause (0x1040)
#define NvAudioFxState_Disable (0x1050)
#define NvAudioFxState_EndOfStream (0x1060)
#define NvAudioFxState_Locked (0x1070)

// Audio DRC information.

typedef struct NvAudioFxDrcDescriptorRec
{
    NvS32 EnableDrc;
    NvS32 NoiseGateThreshold;
    NvS32 LowerCompThreshold;
    NvS32 UpperCompThreshold;
    NvS32 ClippingThreshold;
} NvAudioFxDrcDescriptor;

// Audio EQ information.
#define NvAudioFxEqNumFilters (5)
#define NvAudioFxEqNumChannels (2)

// AudioFx Default Volume Settings
#define NvAudioFxVolumeDefault (256)
#define NvAudioFxVolumeMax (1024)

typedef struct NvAudioFxEqDescriptorRec
{
    NvS32 dBGain[NvAudioFxEqNumChannels][NvAudioFxEqNumFilters];

} NvAudioFxEqDescriptor;

// Audio Spreader information.

typedef struct NvAudioFxSpreaderDescriptorRec
{
    NvU32 SpeakerWidth;
} NvAudioFxSpreaderDescriptor;

typedef enum
{
    NvAudioFxIirFilter_Undefined,
    NvAudioFxIirFilter_Bandpass,
    NvAudioFxIirFilter_Highpass,
    NvAudioFxIirFilter_Lowpass,
    NvAudioFxIirFilter_Num,
    NvAudioFxIirFilter_Force32 = 0x7FFFFFFF
} NvAudioFxIirFilter;

// IO Devices

typedef NvS32 NvAudioFxIoDevice;

// Default is configurable based on the device.
#define NvAudioFxIoDevice_Default (0x0)
#define NvAudioFxIoDevice_All (0xffffffff)

// Inputs
#define NvAudioFxIoDevice_BuiltInMic (0x1)
#define NvAudioFxIoDevice_Mic (0x2)
#define NvAudioFxIoDevice_LineIn (0x4)

// Outputs
#define NvAudioFxIoDevice_BuiltInSpeaker (0x100)
#define NvAudioFxIoDevice_EarSpeaker (0x200)
#define NvAudioFxIoDevice_LineOut (0x400)
#define NvAudioFxIoDevice_HeadphoneOut (0x800)

// Both
#define NvAudioFxIoDevice_Aux (0x10000)
#define NvAudioFxIoDevice_Phone (0x20000)
#define NvAudioFxIoDevice_Radio (0x40000)
#define NvAudioFxIoDevice_Bluetooth (0x80000)

typedef struct NvAudioFxPeqDescriptorRec
{
    NvU32 Enable;
    NvU32 FilterType[NvAudioFxIirFilter_Num];
    NvS32 CenterFrequency[NvAudioFxIirFilter_Num];
    NvS32 Bandwidth[NvAudioFxIirFilter_Num];
    NvS32 dBGain[NvAudioFxIirFilter_Num];

} NvAudioFxPeqDescriptor;

// Audio pin-specific format information of the stream or buffer.

typedef struct NvAudioFxPinFormatDescriptorRec
{
    NvAudioFxFormat Format;
    NvAudioFxPin Pin;
} NvAudioFxPinFormatDescriptor;

// Audio volume information of the stream or buffer.

typedef struct NvAudioFxVolumeDescriptorRec
{
    NvS32 LeftVolume;
    NvS32 RightVolume;
    NvU32 Mute;
} NvAudioFxVolumeDescriptor;

// Description of the IoDeviceVolume property.

typedef struct NvAudioFxIoDeviceVolumeDescriptorRec
{
    NvAudioFxIoDevice IoDevice;
    NvAudioFxVolumeDescriptor Volume;
} NvAudioFxIoDeviceVolumeDescriptor;

// Description of the NvAudioFxVoiceProperty_SetMappedPositionBuffer property.

typedef struct NvAudioFxMappedBufferDescriptorRec
{
    NvAudioFxMixBufferHandle hMixBuffer;
    NvU32 Offset;
} NvAudioFxMappedBufferDescriptor;

 /**
 * @brief Defines the structure for adding a buffer to a stream.
 */

typedef struct NvAudioFxBufferDescriptorRec
{

    // A pointer which may be used for already mapped buffers.
    void* pAddr;

    // A physical address for accessing the buffer.
    NvRmPhysAddr PhysicalAddr;

    // The MixBuffer handle returned from NvAudioFxMixerMapBuffer.
    NvAudioFxMixBufferHandle hMixBuffer;

    // Buffer offset in bytes.
    NvU32 Offset;

    // Buffer size in bytes.
    NvU32 Size;

    // Size of non-Zero Fill data in buffer, usually same as Size
    NvU32 ValidSize;

    // The buffer format information.
    NvAudioFxFormat Format;
} NvAudioFxBufferDescriptor;

// Description of the NvAudioFxNotifierProperty_Connect property.

typedef struct NvAudioFxNotifierConnectionDescriptorRec
{
    NvU8 PortName[16];
} NvAudioFxNotifierConnectionDescriptor;

// Description of the NvAudioFxI2sProperty_AllocChannel property.

typedef struct NvAudioFxI2sChannelDescriptorRec
{
    NvAudioFxPin Pin;
    NvU32 Id;
} NvAudioFxI2sChannelDescriptor;

// Description of the NvAudioFxProperty_AddEvent and
// NvAudioFxProperty_RemoveEvent properties.

typedef NvS32 NvAudioFxEvent;
#define NvAudioFxEventBufferDone (0x1)
#define NvAudioFxEventStateChange (0x2)
#define NvAudioFxEventFormatChange (0x4)
#define NvAudioFxEventEndOfStream (0x8)
#define NvAudioFxEventPowerStateChange (0x10)
#define NvAudioFxEventIoChange (0x20)
#define NvAudioFxEventControlChange (0x40)
#define NvAudioFxEventAll (0xffffffff)

typedef struct NvAudioFxMessageRec
{
    NvAudioFxEvent Event;
    NvAudioFxHandle hFx;
    void* pContext;
} NvAudioFxMessage;

typedef struct NvAudioFxBufferDoneMessageRec
{
    NvAudioFxMessage m;
    NvAudioFxPosition Position;
} NvAudioFxBufferDoneMessage;

typedef struct NvAudioFxControlChangeMessageRec
{
    NvAudioFxMessage m;
    NvAudioFxProperty Property;
} NvAudioFxControlChangeMessage;

typedef struct NvAudioFxIoDeviceControlChangeMessageRec
{
    NvAudioFxControlChangeMessage m;
    NvAudioFxIoDevice IoDevice;
} NvAudioFxIoDeviceControlChangeMessage;

typedef struct NvAudioFxIoDeviceVolumeControlChangeMessageRec
{
    NvAudioFxControlChangeMessage m;
    NvAudioFxIoDeviceVolumeDescriptor idv;
} NvAudioFxIoDeviceVolumeControlChangeMessage;

typedef struct NvAudioFxModeControlChangeMessageRec
{
    NvAudioFxControlChangeMessage m;
    NvAudioFxMode Mode;
} NvAudioFxModeControlChangeMessage;

typedef struct NvAudioFxStateChangeMessageRec
{
    NvAudioFxMessage m;
    NvAudioFxState State;
} NvAudioFxStateChangeMessage;

typedef struct NvAudioFxFormatChangeMessageRec
{
    NvAudioFxMessage m;
    NvAudioFxFormat Format;
} NvAudioFxFormatChangeMessage;

typedef struct NvAudioFxPowerStateChangeMessageRec
{
    NvAudioFxMessage m;
    NvAudioFxPowerState PowerState;
} NvAudioFxPowerStateChangeMessage;

typedef struct NvAudioFxIoChangeMessageRec
{
    NvAudioFxMessage m;
    NvAudioFxProperty Property;
    NvAudioFxConnectionDescriptor Connection;
} NvAudioFxIoChangeMessage;

 /**
 * @brief Initializes and opens the AudioFX Mixer.
 *
 * @retval NvAudioFxMixerHandle A non-NULL value will be returned if the mixer
 * is successfully opened.
 */

 NvAudioFxMixerHandle NvddkAudioFxMixerOpen(
    void  );

 /**
 * @brief Closes the AudioFX Mixer. This function frees the resources associated
 * with the Mixer handle and cannot fail.
 *
 * @param hMixer A handle from NvAudioFxMixerOpen().  If hMixer is NULL or
 * invalid, this API does nothing.
 */

 void NvddkAudioFxMixerClose(
    NvAudioFxMixerHandle hMixer );

 /**
 * @brief Creates and initializes an AudioFX object.
 *
 * @param hMixer A handle from NvAudioFxMixerOpen().  If hMixer is NULL the
 * object will be created by the Global Mixer.  A NULL handle should only be
 * used from the driver and not a normal client application.
 * @param Id The ID of the object to create.
 *
 * @retval NvAudioFxObjectHandle A non-NULL value will be returned if the
 * object is successfully created.
 */

 NvAudioFxObjectHandle NvddkAudioFxMixerCreateObject(
    NvAudioFxMixerHandle hMixer,
    NvObjectId Id );

 /**
 * @brief Destroys the AudioFX object.
 *
 * @param hObject A handle from NvAudioFxMixerCreateObject.  If hObject is
 * NULL, this API does nothing.
 */

 void NvddkAudioFxMixerDestroyObject(
    NvAudioFxObjectHandle hObject );

 /**
 * @brief Maps a buffer to AudioFX address space.
 */

 NvAudioFxMixBufferHandle NvddkAudioFxMixerMapBuffer(
    NvAudioFxMixerHandle hMixer,
    NvU32 NvRmMemHandleId,
    NvU32 Offset,
    NvU32 Size );

 /**
 * @brief Unmaps a buffer from the AudioFX address space.
 */

 void NvddkAudioFxMixerUnmapBuffer(
    NvAudioFxMixBufferHandle hMixBuffer );

 /**
 * @brief Adds a buffer to a Stream object.
 *
 * @param hStream Handle to the Stream object to add the buffer.
 * @param pDescriptor Description of the buffer to add to the stream.
 *
 * @retval NvSuccess Indicates the operation succeeded.
 */

 NvError NvddkAudioFxStreamAddBuffer(
    NvAudioFxStreamHandle hStream,
    NvAudioFxBufferDescriptor * pDescriptor );

/**
 * @brief Get the property value from an AudioFX object.
 *
 * @param hObject Handle of the object to get the property value.
 * @param Property The property of interest.
 * @param Size Size of the descriptor.
 * @param pDescriptor Holds the value of the current property.
 *
 * @retval NvSuccess Indicates the operation succeeded.
 */

 NvError NvddkAudioFxGetProperty(
    NvAudioFxObjectHandle hObject,
    NvAudioFxProperty Property,
    NvU32 Size,
    void* pProperty );

/**
 * @brief Set a property value on an AudioFX object.
 *
 * @param hObject Handle of the object to set the property on.
 * @param Property The property of interest.
 * @param Size Size of the property descriptor.
 * @param pProperty Holds the value of the property to set.
 *
 * @retval NvSuccess Indicates the operation succeeded.
 */

 NvError NvddkAudioFxSetProperty(
    NvAudioFxObjectHandle hObject,
    NvAudioFxProperty Property,
    NvU32 Size,
    void* pProperty );

/**
 * @brief AVP API Function Table
 */

typedef struct NvddkAudioFxFxnTableRec
{
    NvAudioFxMixerHandle (*MixerOpen)(void);
    void (*MixerClose)(NvAudioFxMixerHandle hMixer);
    NvAudioFxObjectHandle (*MixerCreateObject)(NvAudioFxMixerHandle hMixer, NvObjectId Id);
    void (*MixerDestroyObject)(NvAudioFxObjectHandle hObject);
    NvAudioFxMixBufferHandle (*MixerMapBuffer)(NvAudioFxMixerHandle hMixer, NvU32 NvRmMemHandleId, NvU32 Offset, NvU32 Size);
    void (*MixerUnmapBuffer)(NvAudioFxMixBufferHandle hMixBuffer);
    NvError (*StreamAddBuffer)(NvAudioFxStreamHandle hStream, NvAudioFxBufferDescriptor* pDescriptor);
    NvError (*GetProperty)(NvAudioFxObjectHandle hObject, NvAudioFxProperty Property, NvU32 Size, void* pProperty);
    NvError (*SetProperty)(NvAudioFxObjectHandle hObject, NvAudioFxProperty Property, NvU32 Size, void* pProperty);

} NvddkAudioFxFxnTable;

static const NvU32 NvddkAudioFxFxnTableId = 0x6e766178;  // 'nvax'

typedef enum
{
    NvAudioFxIoctl_Generic   = 5020,
    NvAudioFxIoctl_ForceWord = 0x7FFFFFFF,

} NvAudioFxIoctl;

#if defined(__cplusplus)
}
#endif

#endif