diff options
author | Amaury Pouly <amaury.pouly@gmail.com> | 2016-09-21 00:00:22 +0100 |
---|---|---|
committer | Amaury Pouly <amaury.pouly@gmail.com> | 2016-09-21 00:29:14 +0100 |
commit | 9dc4b00df1a997e8b9223c040c27392d1d2151e3 (patch) | |
tree | 4d158b9c16176f20536a51ee8cc07c855125734c | |
parent | 1f8ea9fe27313228e5df67ce6447830b5c30e5e3 (diff) | |
download | rockbox-9dc4b00df1a997e8b9223c040c27392d1d2151e3.tar.gz rockbox-9dc4b00df1a997e8b9223c040c27392d1d2151e3.zip |
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
-rw-r--r-- | firmware/drivers/audio/imx233-codec.c | 7 | ||||
-rw-r--r-- | firmware/target/arm/imx233/audioout-imx233.c | 1 |
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) | |||
49 | /* volume in centibels */ | 49 | /* volume in centibels */ |
50 | void audiohw_set_volume(int vol_l, int vol_r) | 50 | void audiohw_set_volume(int vol_l, int vol_r) |
51 | { | 51 | { |
52 | /* convert to half-dB */ | ||
52 | imx233_audioout_set_hp_vol(vol_l / 5, vol_r / 5); | 53 | imx233_audioout_set_hp_vol(vol_l / 5, vol_r / 5); |
53 | } | 54 | } |
54 | 55 | ||
@@ -72,11 +73,11 @@ void audiohw_disable_recording(void) | |||
72 | imx233_audioin_close(); | 73 | imx233_audioin_close(); |
73 | } | 74 | } |
74 | 75 | ||
75 | /* volume in centibels */ | 76 | /* volume in decibels */ |
76 | void audiohw_set_recvol(int left, int right, int type) | 77 | void audiohw_set_recvol(int left, int right, int type) |
77 | { | 78 | { |
78 | left /= 5; | 79 | left *= 2; /* convert to half-dB */ |
79 | right /= 5; | 80 | right *= 2; |
80 | if(type == AUDIO_GAIN_LINEIN) | 81 | if(type == AUDIO_GAIN_LINEIN) |
81 | { | 82 | { |
82 | imx233_audioin_set_vol(false, left, AUDIOIN_SELECT_LINE1); | 83 | 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) | |||
54 | 54 | ||
55 | void imx233_audioout_preinit(void) | 55 | void imx233_audioout_preinit(void) |
56 | { | 56 | { |
57 | |||
58 | /* Enable AUDIOOUT block */ | 57 | /* Enable AUDIOOUT block */ |
59 | imx233_reset_block(&HW_AUDIOOUT_CTRL); | 58 | imx233_reset_block(&HW_AUDIOOUT_CTRL); |
60 | /* Enable digital filter clock */ | 59 | /* Enable digital filter clock */ |