summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzymon Dziok <b0hoon@o2.pl>2014-06-15 20:01:15 +0000
committerSzymon Dziok <b0hoon@o2.pl>2014-06-18 18:06:17 +0000
commit0c3dca1f33596cb10345601de32d681ed6ece972 (patch)
tree5fab7e5f056ad0cd153d20767681cd47b5d0f22b
parent63632945914071b9481a29cdce7a415cfdcb7955 (diff)
downloadrockbox-0c3dca1f33596cb10345601de32d681ed6ece972.tar.gz
rockbox-0c3dca1f33596cb10345601de32d681ed6ece972.zip
Samsung YH820/YH92X: Improve recording.
Because of architecture of the codec it's always necessary to route the input signal from ADC to DAC, in order to have a control over the monitoring volume and in order to hear anything while recording. Change-Id: I1089894c949ab7371857d74aedb6bdf5a7d39c41
-rw-r--r--firmware/drivers/audio/ak4537.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/firmware/drivers/audio/ak4537.c b/firmware/drivers/audio/ak4537.c
index 799bf83946..bea3dc7019 100644
--- a/firmware/drivers/audio/ak4537.c
+++ b/firmware/drivers/audio/ak4537.c
@@ -273,6 +273,8 @@ void audiohw_enable_recording(bool source_mic)
273 /* power up right channel input and ADC */ 273 /* power up right channel input and ADC */
274 akc_set(AK4537_PM3, PMADR | PMIPGR); 274 akc_set(AK4537_PM3, PMADR | PMIPGR);
275 } 275 }
276 /* ADC -> DAC, external data to DAC ignored */
277 akc_set(AK4537_MODE2, LOOP);
276} 278}
277 279
278void audiohw_disable_recording(void) 280void audiohw_disable_recording(void)
@@ -286,6 +288,9 @@ void audiohw_disable_recording(void)
286 /* power down ADC, mic preamp and line amp */ 288 /* power down ADC, mic preamp and line amp */
287 akc_clear(AK4537_PM1, PMADL | PMMICL | PMIPGL); 289 akc_clear(AK4537_PM1, PMADL | PMMICL | PMIPGL);
288 akc_clear(AK4537_PM3, PMADR | PMMICR | PMIPGR); 290 akc_clear(AK4537_PM3, PMADR | PMMICR | PMIPGR);
291
292 /* break ADC -> DAC connection */
293 akc_clear(AK4537_MODE2, LOOP);
289} 294}
290 295
291void audiohw_set_recvol(int left, int right, int type) 296void audiohw_set_recvol(int left, int right, int type)
@@ -329,10 +334,6 @@ void audiohw_set_recvol(int left, int right, int type)
329 334
330void audiohw_set_monitor(bool enable) 335void audiohw_set_monitor(bool enable)
331{ 336{
332 if (enable) 337 (void)enable;
333 /* mix input signal to headphone output */
334 akc_set(AK4537_SIGSEL2, MICL);
335 else
336 akc_clear(AK4537_SIGSEL2, MICL);
337} 338}
338#endif /* HAVE_RECORDING */ 339#endif /* HAVE_RECORDING */