1
0
Fork 0
forked from len0rd/rockbox

Add pcm_set_mux() for switching between FM radio and Line input

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7315 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Linus Nielsen Feltzing 2005-08-13 17:28:59 +00:00
parent c0fc2054c2
commit 4af4251076
2 changed files with 12 additions and 1 deletions

View file

@ -48,4 +48,6 @@ unsigned long pcm_num_recorded_bytes(void);
void pcm_pause_recording(void);
void pcm_resume_recording(void);
void pcmrec_set_mux(int source);
#endif

View file

@ -655,4 +655,13 @@ static void pcmrec_thread(void)
logf("thread pcmrec done");
}
void pcmrec_set_mux(int source)
{
if(source == 0)
and_l(~0x00800000, &GPIO_OUT); /* Line In */
else
or_l(0x00800000, &GPIO_OUT); /* FM radio */
or_l(0x00800000, &GPIO_ENABLE);
or_l(0x00800000, &GPIO_FUNCTION);
}