1
0
Fork 0
forked from len0rd/rockbox

No S/PDIF playback on H300

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8076 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Linus Nielsen Feltzing 2005-11-27 01:11:25 +00:00
parent e5ce01f056
commit ec5366ac79
3 changed files with 18 additions and 1 deletions

View file

@ -104,6 +104,9 @@
#endif
/* Define this for S/PDIF output available */
#define HAVE_SPDIF_OUT
/* Define this if you can control the S/PDIF power */
#define HAVE_SPDIF_POWER
#define SPDIF_POWER_INVERTED

View file

@ -99,6 +99,9 @@
#endif
/* Define this for S/PDIF output available */
#define HAVE_SPDIF_OUT
/* Define this if you can control the S/PDIF power */
#define HAVE_SPDIF_POWER

View file

@ -47,7 +47,9 @@
#ifdef HAVE_UDA1380
#ifdef HAVE_SPDIF_OUT
#define EBU_DEFPARM ((7 << 12) | (3 << 8) | (1 << 5) | (5 << 2))
#endif
#define IIS_DEFPARM(freq) ((freq << 12) | 0x300 | 4 << 2)
#define IIS_RESET 0x800
@ -67,8 +69,9 @@ static void dma_start(const void *addr, long size)
size &= ~3; /* Size must be multiple of 4 */
/* Reset the audio FIFO */
//IIS2CONFIG = IIS_RESET;
#ifdef HAVE_SPDIF_OUT
EBU1CONFIG = IIS_RESET;
#endif
/* Set up DMA transfer */
SAR0 = ((unsigned long)addr); /* Source address */
@ -78,7 +81,9 @@ static void dma_start(const void *addr, long size)
/* Enable the FIFO and force one write to it */
IIS2CONFIG = IIS_DEFPARM(pcm_freq);
/* Also send the audio to S/PDIF */
#ifdef HAVE_SPDIF_OUT
EBU1CONFIG = EBU_DEFPARM;
#endif
DCR0 = DMA_INT | DMA_EEXT | DMA_CS | DMA_SINC | DMA_START;
}
@ -90,7 +95,9 @@ static void dma_stop(void)
DCR0 = 0;
/* Reset the FIFO */
IIS2CONFIG = IIS_RESET | IIS_DEFPARM(pcm_freq);
#ifdef HAVE_SPDIF_OUT
EBU1CONFIG = IIS_RESET;
#endif
next_start = NULL;
next_size = 0;
@ -220,7 +227,9 @@ void pcm_play_pause(bool play)
//BCR0 = next_size;
/* Enable the FIFO and force one write to it */
IIS2CONFIG = IIS_DEFPARM(pcm_freq);
#ifdef HAVE_SPDIF_OUT
EBU1CONFIG = EBU_DEFPARM;
#endif
DCR0 |= DMA_EEXT | DMA_START;
}
else if(!pcm_paused && !play)
@ -230,7 +239,9 @@ void pcm_play_pause(bool play)
/* Disable DMA peripheral request. */
DCR0 &= ~DMA_EEXT;
IIS2CONFIG = IIS_RESET | IIS_DEFPARM(pcm_freq);
#ifdef HAVE_SPDIF_OUT
EBU1CONFIG = IIS_RESET;
#endif
}
pcm_paused = !play;
}