Fix some more errors and warnings from 0c7b787.

Change-Id: Ib67d0ab344e36964cadbcc982dc2afe35733770b
This commit is contained in:
Michael Sevakis 2013-04-15 13:24:29 -04:00
parent 0971f57634
commit bbd991ad63
9 changed files with 10 additions and 62 deletions

View file

@ -33,16 +33,6 @@
static char volume_left = 0, volume_right = 0;
const struct sound_settings_info audiohw_settings[] = {
[SOUND_VOLUME] = {"dB", 0, 1, VOLUME_MIN/10, VOLUME_MAX/10, -25},
/* HAVE_SW_TONE_CONTROLS */
[SOUND_BASS] = {"dB", 0, 1, -24, 24, 0},
[SOUND_TREBLE] = {"dB", 0, 1, -24, 24, 0},
[SOUND_BALANCE] = {"%", 0, 1,-100, 100, 0},
[SOUND_CHANNELS] = {"", 0, 1, 0, 5, 0},
[SOUND_STEREO_WIDTH] = {"%", 0, 5, 0, 250, 100},
};
/* convert tenth of dB volume to master volume register value */
static int vol_tenthdb2hw(int db)
{

View file

@ -31,21 +31,6 @@
#include "audiohw.h"
#include "sound.h"
const struct sound_settings_info audiohw_settings[] = {
[SOUND_VOLUME] = {"dB", 0, 1,-127, 0, -25},
/* HAVE_SW_TONE_CONTROLS */
[SOUND_BASS] = {"dB", 0, 1, -24, 24, 0},
[SOUND_TREBLE] = {"dB", 0, 1, -24, 24, 0},
[SOUND_BALANCE] = {"%", 0, 1,-100, 100, 0},
[SOUND_CHANNELS] = {"", 0, 1, 0, 5, 0},
[SOUND_STEREO_WIDTH] = {"%", 0, 5, 0, 250, 100},
#if defined(HAVE_RECORDING)
[SOUND_LEFT_GAIN] = {"dB", 1, 1, 0, 31, 23},
[SOUND_RIGHT_GAIN] = {"dB", 1, 1, 0, 31, 23},
[SOUND_MIC_GAIN] = {"dB", 1, 1, 0, 1, 0},
#endif
};
static unsigned char akc_regs[AKC_NUM_REGS];
static void akc_write(int reg, unsigned val)

View file

@ -43,7 +43,7 @@ void audiohw_close(void)
imx233_audioin_close();
}
void audiohw_set_headphone_vol(int vol_l, int vol_r)
void audiohw_set_volume(int vol_l, int vol_r)
{
imx233_audioout_set_hp_vol(vol_l / 5, vol_r / 5);
}

View file

@ -24,7 +24,7 @@
#include "config.h"
#include "system.h" /* MAX MIN macros */
#include "audiohw.h"
#include "sound.h"
int channel_configuration = SOUND_CHAN_STEREO;
int stereo_width = 100;

View file

@ -93,29 +93,6 @@ static void wmc_write_masked(int reg, unsigned bits, unsigned mask)
wmc_write(reg, (wmc_regs[reg] & ~mask) | (bits & mask));
}
int sound_val2phys(int setting, int value)
{
int result;
switch(setting)
{
#ifdef HAVE_RECORDING
case SOUND_LEFT_GAIN:
case SOUND_RIGHT_GAIN:
result = (value - 23) * 15;
break;
case SOUND_MIC_GAIN:
result = value * 200;
break;
#endif
default:
result = value;
break;
}
return result;
}
/* convert tenth of dB volume (-730..60) to master volume register value */
static int vol_tenthdb2hw(int db)
{

View file

@ -24,6 +24,7 @@
#include "config.h"
#include <stdbool.h>
#include <inttypes.h>
/* define some audiohw caps */
#define TREBLE_CAP (1 << 0)

View file

@ -291,9 +291,6 @@ extern void audiohw_set_mdb_center(int value);
extern void audiohw_set_mdb_shape(int value);
extern void audiohw_set_mdb_enable(int value);
extern void audiohw_set_superbass(int value);
extern void audiohw_set_balance(int val);
extern void audiohw_set_pitch(int32_t val);
extern int audiohw_get_pitch(void);
#endif /* CONFIG_CODEC */

View file

@ -25,8 +25,6 @@
#define VOLUME_MIN -730
#define VOLUME_MAX 60
#define AUDIOHW_SETTING(name, us, nd, st, minv, maxv, defv, expr...)
#if defined(HAVE_WM8750)
#define AUDIOHW_CAPS (BASS_CAP | TREBLE_CAP | PRESCALER_CAP | \
BASS_CUTOFF_CAP | TREBLE_CUTOFF_CAP | \

View file

@ -103,13 +103,6 @@ void sound_set(int setting, int value)
sound_set_val(value);
}
/* Return the sound value scaled to centibels (tenth-decibels) */
static int sound_value_to_cb(int setting, int value)
{
long e = (1 - sound_numdecimals(setting)) << 16;
return fp_mul(value, fp_exp10(e, 16), 16);
}
#if !defined(AUDIOHW_HAVE_CLIPPING)
/*
* The prescaler compensates for any kind of boosts, to prevent clipping.
@ -132,6 +125,13 @@ static int current_bass = 0; /* tenth dB */
static int current_eq_band_gain[AUDIOHW_EQ_BAND_NUM]; /* tenth dB */
#endif
/* Return the sound value scaled to centibels (tenth-decibels) */
static int sound_value_to_cb(int setting, int value)
{
long e = (1 - sound_numdecimals(setting)) << 16;
return fp_mul(value, fp_exp10(e, 16), 16);
}
static void set_prescaled_volume(void)
{
int prescale = 0;