From 0c3dca1f33596cb10345601de32d681ed6ece972 Mon Sep 17 00:00:00 2001 From: Szymon Dziok Date: Sun, 15 Jun 2014 20:01:15 +0000 Subject: 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 --- firmware/drivers/audio/ak4537.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'firmware/drivers') 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) /* power up right channel input and ADC */ akc_set(AK4537_PM3, PMADR | PMIPGR); } + /* ADC -> DAC, external data to DAC ignored */ + akc_set(AK4537_MODE2, LOOP); } void audiohw_disable_recording(void) @@ -286,6 +288,9 @@ void audiohw_disable_recording(void) /* power down ADC, mic preamp and line amp */ akc_clear(AK4537_PM1, PMADL | PMMICL | PMIPGL); akc_clear(AK4537_PM3, PMADR | PMMICR | PMIPGR); + + /* break ADC -> DAC connection */ + akc_clear(AK4537_MODE2, LOOP); } void audiohw_set_recvol(int left, int right, int type) @@ -329,10 +334,6 @@ void audiohw_set_recvol(int left, int right, int type) void audiohw_set_monitor(bool enable) { - if (enable) - /* mix input signal to headphone output */ - akc_set(AK4537_SIGSEL2, MICL); - else - akc_clear(AK4537_SIGSEL2, MICL); + (void)enable; } #endif /* HAVE_RECORDING */ -- cgit v1.2.3