forked from len0rd/rockbox
imx233: fix recording gain
For some reason, there was a mismatch between the setting (decibel) and the audiohw code (centicel). This resulted in a gain divided by 10. This may explain why some people experienced low volume with the mic on the fuze+. Change-Id: I138ac18dd93c36f43a7dfce735efc826405c598c
This commit is contained in:
parent
1f8ea9fe27
commit
9dc4b00df1
2 changed files with 4 additions and 4 deletions
|
|
@ -49,6 +49,7 @@ void audiohw_close(void)
|
||||||
/* volume in centibels */
|
/* volume in centibels */
|
||||||
void audiohw_set_volume(int vol_l, int vol_r)
|
void audiohw_set_volume(int vol_l, int vol_r)
|
||||||
{
|
{
|
||||||
|
/* convert to half-dB */
|
||||||
imx233_audioout_set_hp_vol(vol_l / 5, vol_r / 5);
|
imx233_audioout_set_hp_vol(vol_l / 5, vol_r / 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -72,11 +73,11 @@ void audiohw_disable_recording(void)
|
||||||
imx233_audioin_close();
|
imx233_audioin_close();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* volume in centibels */
|
/* volume in decibels */
|
||||||
void audiohw_set_recvol(int left, int right, int type)
|
void audiohw_set_recvol(int left, int right, int type)
|
||||||
{
|
{
|
||||||
left /= 5;
|
left *= 2; /* convert to half-dB */
|
||||||
right /= 5;
|
right *= 2;
|
||||||
if(type == AUDIO_GAIN_LINEIN)
|
if(type == AUDIO_GAIN_LINEIN)
|
||||||
{
|
{
|
||||||
imx233_audioin_set_vol(false, left, AUDIOIN_SELECT_LINE1);
|
imx233_audioin_set_vol(false, left, AUDIOIN_SELECT_LINE1);
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,6 @@ static int hp_unmute_cb(struct timeout *tmo)
|
||||||
|
|
||||||
void imx233_audioout_preinit(void)
|
void imx233_audioout_preinit(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
/* Enable AUDIOOUT block */
|
/* Enable AUDIOOUT block */
|
||||||
imx233_reset_block(&HW_AUDIOOUT_CTRL);
|
imx233_reset_block(&HW_AUDIOOUT_CTRL);
|
||||||
/* Enable digital filter clock */
|
/* Enable digital filter clock */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue