summaryrefslogtreecommitdiff
path: root/firmware/target/arm/pcm-pp.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/pcm-pp.c')
-rw-r--r--firmware/target/arm/pcm-pp.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/firmware/target/arm/pcm-pp.c b/firmware/target/arm/pcm-pp.c
index 10ac2a1d0c..e98054ab9e 100644
--- a/firmware/target/arm/pcm-pp.c
+++ b/firmware/target/arm/pcm-pp.c
@@ -365,7 +365,7 @@ void pcm_play_dma_init(void)
365 /* Initialize default register values. */ 365 /* Initialize default register values. */
366 audiohw_init(); 366 audiohw_init();
367 367
368#if !defined(HAVE_WM8731) && !defined(HAVE_WM8751) 368#if !defined(HAVE_WM8731) && !defined(HAVE_WM8751) && !defined(HAVE_WM8975)
369 /* Power on */ 369 /* Power on */
370 audiohw_enable_output(true); 370 audiohw_enable_output(true);
371 /* Unmute the master channel (DAC should be at zero point now). */ 371 /* Unmute the master channel (DAC should be at zero point now). */
@@ -590,6 +590,13 @@ void pcm_rec_dma_start(void *addr, size_t size)
590void pcm_rec_dma_close(void) 590void pcm_rec_dma_close(void)
591{ 591{
592 pcm_rec_dma_stop(); 592 pcm_rec_dma_stop();
593
594#if defined(IPOD_COLOR) || defined (IPOD_4G)
595 /* The usual magic from IPL - I'm guessing this configures the headphone
596 socket to be input or output - in this case, output. */
597 GPIO_SET_BITWISE(GPIOI_OUTPUT_VAL, 0x40);
598 GPIO_SET_BITWISE(GPIOA_OUTPUT_VAL, 0x04);
599#endif
593} /* pcm_close_recording */ 600} /* pcm_close_recording */
594 601
595void pcm_rec_dma_init(void) 602void pcm_rec_dma_init(void)
@@ -597,8 +604,8 @@ void pcm_rec_dma_init(void)
597#if defined(IPOD_COLOR) || defined (IPOD_4G) 604#if defined(IPOD_COLOR) || defined (IPOD_4G)
598 /* The usual magic from IPL - I'm guessing this configures the headphone 605 /* The usual magic from IPL - I'm guessing this configures the headphone
599 socket to be input or output - in this case, input. */ 606 socket to be input or output - in this case, input. */
600 GPIOI_OUTPUT_VAL &= ~0x40; 607 GPIO_CLEAR_BITWISE(GPIOI_OUTPUT_VAL, 0x40);
601 GPIOA_OUTPUT_VAL &= ~0x4; 608 GPIO_CLEAR_BITWISE(GPIOA_OUTPUT_VAL, 0x04);
602#endif 609#endif
603 610
604 pcm_rec_dma_stop(); 611 pcm_rec_dma_stop();