mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-10 21:55:10 -05:00
as3525: move audio loopback handling to audio_set_output_source
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26308 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
6ecb4d0344
commit
1c967b788e
2 changed files with 4 additions and 4 deletions
|
|
@ -29,7 +29,10 @@ int audio_channels = 2;
|
|||
|
||||
void audio_set_output_source(int source)
|
||||
{
|
||||
(void)source;
|
||||
if (source == AUDIO_SRC_PLAYBACK)
|
||||
I2SOUT_CONTROL &= ~(1<<5);
|
||||
else
|
||||
I2SOUT_CONTROL |= 1<<5; /* source = loopback from i2sin fifo */
|
||||
}
|
||||
|
||||
void audio_input_mux(int source, unsigned flags)
|
||||
|
|
|
|||
|
|
@ -291,7 +291,6 @@ void pcm_rec_dma_stop(void)
|
|||
dma_release();
|
||||
rec_dma_size = 0;
|
||||
|
||||
I2SOUT_CONTROL &= ~(1<<5); /* source = i2soutif fifo */
|
||||
I2SIN_CONTROL &= ~(1<<11); /* disable dma */
|
||||
|
||||
CGU_AUDIO &= ~((1<<23)|(1<<11));
|
||||
|
|
@ -313,8 +312,6 @@ void pcm_rec_dma_start(void *addr, size_t size)
|
|||
CGU_PERI |= CGU_I2SIN_APB_CLOCK_ENABLE|CGU_I2SOUT_APB_CLOCK_ENABLE;
|
||||
CGU_AUDIO |= ((1<<23)|(1<<11));
|
||||
|
||||
I2SOUT_CONTROL |= 1<<5; /* source = loopback from i2sin fifo */
|
||||
|
||||
I2SIN_CONTROL |= (1<<11)|(1<<5); /* enable dma, 14bits samples */
|
||||
|
||||
rec_dma_start();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue