wm8751: document and fix audiohw settings
Document 3D depth range. Fix mismatch in recording volume: the displayed volume is completely off the chart Change-Id: I4c363f369e5d72f332391a6f96457b4e450404f9
This commit is contained in:
parent
cc031d41ab
commit
90a32ccad6
|
@ -385,7 +385,8 @@ void audiohw_set_frequency(int fsel)
|
|||
|
||||
#ifdef HAVE_WM8750
|
||||
#ifdef AUDIOHW_HAVE_DEPTH_3D
|
||||
/* Set the depth of the 3D effect */
|
||||
/* Set the depth of the 3D effect
|
||||
* value in 0 .. 15, corresponds to 0% .. 100% in 6.66% steps */
|
||||
void audiohw_set_depth_3d(int val)
|
||||
{
|
||||
if (val > 0)
|
||||
|
@ -631,6 +632,7 @@ static int pga_gain2hw(int value)
|
|||
return ((4 * value) / 300) + 23;
|
||||
}
|
||||
|
||||
/* volume in hundredth of dB in -1725 .. 6000 */
|
||||
void audiohw_set_recvol(int vol_l, int vol_r, int type)
|
||||
{
|
||||
int d_vol_l = 0;
|
||||
|
|
|
@ -25,18 +25,21 @@
|
|||
#define AUDIOHW_CAPS (BASS_CAP | TREBLE_CAP | PRESCALER_CAP | \
|
||||
BASS_CUTOFF_CAP | TREBLE_CUTOFF_CAP | \
|
||||
DEPTH_3D_CAP | LIN_GAIN_CAP | MIC_GAIN_CAP)
|
||||
|
||||
/* Percentage from 0% to 100% in steps of 6.66%:
|
||||
* Values: 0, 1, 2, ... 14, 15
|
||||
* => 0%, 6%, 14%, ..., 93%, 100%
|
||||
*/
|
||||
AUDIOHW_SETTING(DEPTH_3D, "%", 0, 1, 0, 15, 0, (100 * val + 8) / 15)
|
||||
#ifdef HAVE_RECORDING
|
||||
/* PGA -17.25dB to 30.0dB in 0.75dB increments 64 steps
|
||||
* digital gain 0dB to 30.0dB in 0.5dB increments
|
||||
* we use 0.75dB fake steps through whole range
|
||||
*
|
||||
* This combined gives -17.25 to 60.0dB
|
||||
* This combined gives -17.25 to 60.0dB
|
||||
*/
|
||||
AUDIOHW_SETTING(LEFT_GAIN, "dB", 2, 75,-1725, 6000, 0, val * 5)
|
||||
AUDIOHW_SETTING(RIGHT_GAIN, "dB", 2, 75,-1725, 6000, 0, val * 5)
|
||||
AUDIOHW_SETTING(MIC_GAIN, "dB", 2, 75,-1725, 6000, 3000, val * 5)
|
||||
AUDIOHW_SETTING(LEFT_GAIN, "dB", 2, 75,-1725, 6000, 0)
|
||||
AUDIOHW_SETTING(RIGHT_GAIN, "dB", 2, 75,-1725, 6000, 0)
|
||||
AUDIOHW_SETTING(MIC_GAIN, "dB", 2, 75,-1725, 6000, 3000)
|
||||
|
||||
void audiohw_set_recsrc(int source, bool recording);
|
||||
#endif /* HAVE_RECORDING */
|
||||
|
|
Loading…
Reference in New Issue