From 5c36e2f21c13196cc0b6b34c8ee8149b0595bd82 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Wed, 23 May 2012 10:18:32 -0400 Subject: Gigabeat S: Fix the recording locking upon using it a second time. Apparently I got the "just-in-case" RXFIFO purge in there before the RXFIFO was enabled, causing severe hardware spasms. Change-Id: I2ea4b6d28e06372b61cb3f21ab2fce71dd408213 --- firmware/target/arm/imx31/gigabeat-s/pcm-gigabeat-s.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/firmware/target/arm/imx31/gigabeat-s/pcm-gigabeat-s.c b/firmware/target/arm/imx31/gigabeat-s/pcm-gigabeat-s.c index c26349b72e..76789a7dbd 100644 --- a/firmware/target/arm/imx31/gigabeat-s/pcm-gigabeat-s.c +++ b/firmware/target/arm/imx31/gigabeat-s/pcm-gigabeat-s.c @@ -428,20 +428,20 @@ void pcm_rec_dma_start(void *addr, size_t size) if (!sdma_channel_reset(DMA_REC_CH_NUM)) return; + SSI_SRCR1 |= SSI_SRCR_RFEN0; /* Enable RX FIFO */ + /* Ensure clear FIFO */ while (SSI_SFCSR1 & SSI_SFCSR_RFCNT0) SSI_SRX0_1; - dma_rec_data.state = 1; /* Check callback on unlock */ - - SSI_SRCR1 |= SSI_SRCR_RFEN0; /* Enable RX FIFO */ - /* Enable receive */ SSI_SCR1 |= SSI_SCR_RE; SSI_SIER1 |= SSI_SIER_RDMAE; /* Enable DMA req. */ /* Begin DMA transfer */ rec_start_dma(addr, size); + + dma_rec_data.state = 1; /* Check callback on unlock */ } void pcm_rec_dma_close(void) -- cgit v1.2.3