summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/drivers/audio/imx233-codec.c7
-rw-r--r--firmware/target/arm/imx233/audioout-imx233.c1
2 files changed, 4 insertions, 4 deletions
diff --git a/firmware/drivers/audio/imx233-codec.c b/firmware/drivers/audio/imx233-codec.c
index b2dcaa3d23..357aa33bb5 100644
--- a/firmware/drivers/audio/imx233-codec.c
+++ b/firmware/drivers/audio/imx233-codec.c
@@ -49,6 +49,7 @@ void audiohw_close(void)
/* volume in centibels */
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);
}
@@ -72,11 +73,11 @@ void audiohw_disable_recording(void)
imx233_audioin_close();
}
-/* volume in centibels */
+/* volume in decibels */
void audiohw_set_recvol(int left, int right, int type)
{
- left /= 5;
- right /= 5;
+ left *= 2; /* convert to half-dB */
+ right *= 2;
if(type == AUDIO_GAIN_LINEIN)
{
imx233_audioin_set_vol(false, left, AUDIOIN_SELECT_LINE1);
diff --git a/firmware/target/arm/imx233/audioout-imx233.c b/firmware/target/arm/imx233/audioout-imx233.c
index 6ebeb8a469..6c2c579536 100644
--- a/firmware/target/arm/imx233/audioout-imx233.c
+++ b/firmware/target/arm/imx233/audioout-imx233.c
@@ -54,7 +54,6 @@ static int hp_unmute_cb(struct timeout *tmo)
void imx233_audioout_preinit(void)
{
-
/* Enable AUDIOOUT block */
imx233_reset_block(&HW_AUDIOOUT_CTRL);
/* Enable digital filter clock */