This shows you the differences between two versions of the page.
Next revision | Previous revisionNext revisionBoth sides next revision | ||
resources:tools-software:sigmastudiov2:modules:gpioconditioning:rotaryvolume [21 Mar 2021 08:44] – created Prasad Kamath | resources:tools-software:sigmastudiov2:modules:gpioconditioning:rotaryvolume [10 May 2021 14:49] – [DSP Parameter Computation] Prasad Kamath | ||
---|---|---|---|
Line 1: | Line 1: | ||
[[resources/ | [[resources/ | ||
====== Rotary Volume ====== | ====== Rotary Volume ====== | ||
+ | \\ | ||
+ | {{: | ||
+ | \\ | ||
+ | ===== Description ===== | ||
+ | \\ | ||
+ | The Rotary Volume block controls the volume level of an input audio signal, using the GPIO rotary encoder inputs. This block has the functionality of the Rotary Encoder, Up/Down Control, Index lookup Table, and SW External Volume control blocks all in one algorithm control. The user has the flexibility to define a custom volume curve that will be scrolled through by the rotary encoder. | ||
+ | |||
+ | \\ | ||
+ | ===== Usage ===== | ||
+ | \\ | ||
+ | The Rotary Volume control allows a GPIO inputs from a rotary encoder to control a custom volume curve. The volume curve can be any linear, logarithmic, | ||
+ | |||
+ | The following image shows how two GPIO inputs are used to control the volume algorithm in the Rotary Volume block. The Rotary Volume algorithm has been grown in order to support stereo audio. A mux switch allows comparison between the direct signal from the Inputs, and the volume adjusted signal, routed to the Outputs. The Interface Read and Write blocks allow the last volume level to be saved and recalled. | ||
+ | \\ | ||
+ | {{: | ||
+ | \\ | ||
+ | ===== Targets Supported ===== | ||
+ | ^Name^ADSP-214xx^ADSP-215xx/ | ||
+ | |----------------------------------------|------------------------------------------|--------------------------------------------------|-------------------------------------------| | ||
+ | |Push and Hold| Not supported | Not supported | Sample| | ||
+ | \\ | ||
+ | ===== Pins ===== | ||
+ | ==== Input==== | ||
+ | ^Name^Type^Description^ | ||
+ | |------------------------|------------------------------|------------------------------------------------------------| | ||
+ | |Up Volume|Control|Control Signal input for rotary volume increment| | ||
+ | |Down Volume|Control|Control Signal input for rotary volume decrement| | ||
+ | |InterfaceIn|Logic|Interface Read register to load previous constant volume data value to algorithm| | ||
+ | |Input0|Audio|Audio to the volume control| | ||
+ | |||
+ | ==== Output==== | ||
+ | ^Name^Type^Description^ | ||
+ | |----------------------|---------------------------|-----------------------------------------------------------------------------| | ||
+ | |InterfaceOut|Logic|Interface Write register to store constant volume data for recall| | ||
+ | |Output0|Audio|Volume adjusted audio output| | ||
+ | |||
+ | \\ | ||
+ | ===== Configurable Parameters ===== | ||
+ | ^GUI Parameter Name^Default Value^Range^Function Description^ | ||
+ | | ---------------------------------------- | ---------------------- | ------------------------------------- | ---------------------------------------- | | ||
+ | |CountMax|20|[0, | ||
+ | |NoOfTableValues|33 pts|[2, 800]|Sets the table size: the number of points used in the volume table curve.| | ||
+ | |TableValues|1|[-16, | ||
+ | |SWSlew|12|[1, | ||
+ | \\ | ||
+ | ===== DSP Parameters ===== | ||
+ | ^Parameter Name^Description^ADAU145x/ | ||
+ | |----------------------------|------------------------------------------------------------------------------------------------------- |---------------------------------| | ||
+ | |countmax|The integer number is directly written to the DSP| Fixed Point 32.0| | ||
+ | |table_p0|All the points in the table are written to the DSP in their linear gain format|Fixed Point 8.24| | ||
+ | |step|RotaryVolAlg1step|The value for the slew rate|Fixed Point 8.24| | ||
+ | \\ | ||
+ | ===== DSP Parameter Computation ===== | ||
+ | \\ | ||
+ | step = 2^(-1*SWSlew) | ||
+ | \\ |