mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 21:22:39 -05:00
imx233: fix red when target cannot record
Change-Id: Ia5f6b290da2f645021ef8becdfbac7436407ec0b
This commit is contained in:
parent
a1e557bbdd
commit
070e27933c
2 changed files with 6 additions and 3 deletions
|
|
@ -75,8 +75,6 @@ static void select_audio_path(void)
|
|||
{
|
||||
#if defined(HAVE_RECORDING)
|
||||
const bool recording = input_flags & SRCF_RECORDING;
|
||||
#else
|
||||
const bool recording = false;
|
||||
#endif
|
||||
|
||||
switch(input_source)
|
||||
|
|
@ -87,7 +85,9 @@ static void select_audio_path(void)
|
|||
/* fallthrough */
|
||||
case AUDIO_SRC_PLAYBACK:
|
||||
audiohw_set_monitor(false);
|
||||
#if defined(HAVE_RECORDING)
|
||||
audiohw_disable_recording();
|
||||
#endif
|
||||
break;
|
||||
|
||||
#if defined(HAVE_RECORDING) && (INPUT_SRC_CAPS & SRC_CAP_MIC)
|
||||
|
|
@ -102,10 +102,12 @@ static void select_audio_path(void)
|
|||
/* recording and playback */
|
||||
case AUDIO_SRC_FMRADIO:
|
||||
audiohw_set_monitor(true);
|
||||
#if defined(HAVE_RECORDING)
|
||||
if(recording)
|
||||
audiohw_enable_recording(false);
|
||||
else
|
||||
audiohw_disable_recording();
|
||||
#endif
|
||||
break;
|
||||
#endif /* (INPUT_SRC_CAPS & SRC_CAP_FMRADIO) */
|
||||
}
|
||||
|
|
|
|||
|
|
@ -205,7 +205,7 @@ const void *pcm_play_dma_get_peak_buffer(int *count)
|
|||
* we can only let the tranfer finish on stop. However if the transfer is very
|
||||
* long it could take a while. We work around this by splitting big transfers
|
||||
* into small burst to make sure we can stop quickly. */
|
||||
|
||||
#ifdef HAVE_RECORDING
|
||||
static int adc_locked = 0;
|
||||
static struct pcm_dma_command_t adc_dma;
|
||||
|
||||
|
|
@ -322,3 +322,4 @@ const void *pcm_rec_dma_get_peak_buffer(void)
|
|||
struct imx233_dma_info_t info = imx233_dma_get_info(APB_AUDIO_ADC, DMA_INFO_BAR);
|
||||
return (void *)info.bar;
|
||||
}
|
||||
#endif /* HAVE_RECORDING */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue