diff options
author | Manjula Gupta <magupta@nvidia.com> | 2010-04-12 19:45:13 +0530 |
---|---|---|
committer | Gary King <gking@nvidia.com> | 2010-04-13 09:22:12 -0700 |
commit | 48444f251c3c0cfec8aee192e4abe26a65e9f942 (patch) | |
tree | fd3bf333924f287d76a3f637225b8365a14d2ce4 | |
parent | 7be266624f37e8a2d3783c405d19716f24ccc1b4 (diff) |
[tegra ALSA] Updating sndfx header file
In order to keep sndfx file in sync with audiofx header
file updating tegra_sndfx.h with structures and
definitions, made the corresponding changes in code.
Verified both playback and record are working fine.
Change-Id: Ibfa400fcf1b62c55f169d427ae40aa9467d13f82
Reviewed-on: http://git-master/r/1079
Reviewed-by: Vijay Mali <vmali@nvidia.com>
Tested-by: Vijay Mali <vmali@nvidia.com>
Reviewed-by: Gary King <gking@nvidia.com>
-rw-r--r-- | sound/soc/tegra/tegra_sndfx.h | 48 | ||||
-rw-r--r-- | sound/soc/tegra/tegra_transport.c | 4 |
2 files changed, 45 insertions, 7 deletions
diff --git a/sound/soc/tegra/tegra_sndfx.h b/sound/soc/tegra/tegra_sndfx.h index 514221f42c8e..6a6f720d859d 100644 --- a/sound/soc/tegra/tegra_sndfx.h +++ b/sound/soc/tegra/tegra_sndfx.h @@ -59,8 +59,6 @@ typedef struct NvAudioFxObjectRec *NvAudioFxObjectHandle; typedef struct NvAudioFxRec *NvAudioFxHandle; -typedef struct NvAudioFxIoRec *NvAudioFxIoHandle; - typedef struct NvAudioFxMixBufferRec *NvAudioFxMixBufferHandle; typedef struct NvAudioFxMixerRec *NvAudioFxMixerHandle; @@ -98,6 +96,7 @@ typedef NvS32 NvObjectId; #define NvAudioFxI2sId (0x11100002) #define NvAudioFxI2s2Id (0x11100002) #define NvAudioFxSpdifId (0x11100003) +#define NvAudioFxSilenceId (0x11100004) #define NvAudioFxDefaultPlaybackMixId (0x11300001) #define NvAudioFxDefaultPlaybackSplitId (0x11300002) #define NvAudioFxDefaultRecordMixId (0x11300003) @@ -113,8 +112,7 @@ typedef NvS32 NvObjectId; #define NvAudioFxSpdifLoopbackSplitId (0x1130000d) #define NvAudioFxMusicMixId (0x1130000e) #define NvAudioFxMusicSplitId (0x1130000f) -#define NvAudioFxPhoneMixId (0x11300010) -#define NvAudioFxPhoneSplitId (0x11300011) +#define NvAudioFxRingtoneMixId (0x11300010) // // Mixer @@ -151,6 +149,7 @@ typedef NvS32 NvAudioFxProperty; #define NvAudioFxPinProperty_Format (0x2000) #define NvAudioFxDrcProperty_Drc (0x3000) #define NvAudioFxEqProperty_Eq (0x4000) +#define NvAudioFxI2sProperty_InputSelect (0x4a00) #define NvAudioFxIoProperty_AddEvent (0x5000) #define NvAudioFxIoProperty_Position (0x5010) #define NvAudioFxIoProperty_RemoveEvent (0x5020) @@ -171,6 +170,7 @@ typedef NvS32 NvAudioFxProperty; typedef struct NvAudioFxConnectionDescriptorRec { + NvAudioFxHandle hSource; NvAudioFxPin SourcePin; NvAudioFxHandle hSink; NvAudioFxPin SinkPin; @@ -244,7 +244,7 @@ typedef struct NvAudioFxEqDescriptorRec { NvS32 dBGain[NvAudioFxEqNumChannels][NvAudioFxEqNumFilters]; -}NvAudioFxEqDescriptor; +} NvAudioFxEqDescriptor; // Audio Spreader information. @@ -253,7 +253,20 @@ typedef struct NvAudioFxSpreaderDescriptorRec NvU32 SpeakerWidth; } NvAudioFxSpreaderDescriptor; -// Parameteric EQ Filter types +// I2S inputs. + +typedef NvS32 NvAudioFxI2sInputSelect; + +// Default is configurable based on the device. +#define NvAudioFxI2sInputSelect_Default (0x0) +#define NvAudioFxI2sInputSelect_Bluetooth (0x1) +#define NvAudioFxI2sInputSelect_BuiltinMic (0x2) +#define NvAudioFxI2sInputSelect_LineIn (0x3) +#define NvAudioFxI2sInputSelect_Mic (0x4) +#define NvAudioFxI2sInputSelect_Phone (0x5) +#define NvAudioFxI2sInputSelect_Radio (0x6) + +// Parameteric EQ Filter types. typedef enum { @@ -273,7 +286,7 @@ typedef struct NvAudioFxPeqDescriptorRec NvS32 Bandwidth[NvAudioFxIirFilter_Num]; NvS32 dBGain[NvAudioFxIirFilter_Num]; -}NvAudioFxPeqDescriptor; +} NvAudioFxPeqDescriptor; // Audio pin-specific format information of the stream or buffer. @@ -345,6 +358,8 @@ typedef NvS32 NvAudioFxEvent; #define NvAudioFxEventFormatChange (0x4) #define NvAudioFxEventEndOfStream (0x8) #define NvAudioFxEventPowerStateChange (0x10) +#define NvAudioFxEventIoChange (0x20) +#define NvAudioFxEventControlChange (0x40) #define NvAudioFxEventAll (0xffffffff) typedef struct NvAudioFxMessageRec @@ -360,6 +375,18 @@ typedef struct NvAudioFxBufferDoneMessageRec NvAudioFxPosition Position; } NvAudioFxBufferDoneMessage; +typedef struct NvAudioFxControlChangeMessageRec +{ + NvAudioFxMessage m; + NvAudioFxProperty Property; +} NvAudioFxControlChangeMessage; + +typedef struct NvAudioFxI2sControlChangeMessageRec +{ + NvAudioFxControlChangeMessage m; + NvAudioFxI2sInputSelect InputSelect; +} NvAudioFxI2sControlChangeMessage; + typedef struct NvAudioFxStateChangeMessageRec { NvAudioFxMessage m; @@ -378,6 +405,13 @@ typedef struct NvAudioFxPowerStateChangeMessageRec NvAudioFxPowerState PowerState; } NvAudioFxPowerStateChangeMessage; +typedef struct NvAudioFxIoChangeMessageRec +{ + NvAudioFxMessage m; + NvAudioFxProperty Property; + NvAudioFxConnectionDescriptor Connection; +} NvAudioFxIoChangeMessage; + /** * @brief Initializes and opens the AudioFX Mixer. * diff --git a/sound/soc/tegra/tegra_transport.c b/sound/soc/tegra/tegra_transport.c index a220ea20c7cf..e9a630785050 100644 --- a/sound/soc/tegra/tegra_transport.c +++ b/sound/soc/tegra/tegra_transport.c @@ -755,6 +755,7 @@ void tegra_audiofx_destroyfx(struct tegra_audio_data *audio_context) } #define audiofx_path_connect(path_object, sink_object) \ + connection.hSource = path_object, \ connection.SourcePin = NvAudioFxSourcePin; \ connection.SinkPin = NvAudioFxSinkPin; \ connection.hSink = (NvAudioFxHandle)sink_object; \ @@ -791,6 +792,7 @@ NvError tegra_audiofx_create_output(NvRmDeviceHandle hRmDevice, audiofx_path_connect(pPath->Convert, pPath->Resize); audiofx_path_connect(pPath->Resize, pPath->Volume); + connection.hSource = pPath->Volume; connection.SourcePin = NvAudioFxSourcePin; connection.hSink = 0; connection.SinkPin = NvAudioFxSinkPin; @@ -872,6 +874,7 @@ NvError tegra_audiofx_create_input(NvRmDeviceHandle hRmDevice, audiofx_create_object(pInput->Convert,NvAudioFxConvertId); /* Wire 1 */ + connection.hSource = pInput->Stream; connection.SourcePin = NvAudioFxSourcePin; connection.hSink = (NvAudioFxHandle)pInput->Resize; connection.SinkPin = NvAudioFxCopySinkPin; @@ -889,6 +892,7 @@ NvError tegra_audiofx_create_input(NvRmDeviceHandle hRmDevice, audiofx_path_connect(pInput->Src, pInput->Convert); /* Wire 5 */ + connection.hSource = 0; connection.SourcePin = (InputSelect == NvAudioInputSelect_Record) ? NvAudioFxSourcePin : NvAudioFxLoopbackPin; connection.hSink = (NvAudioFxHandle)pInput->Src; |