diff options
Diffstat (limited to 'firmware/target')
-rw-r--r-- | firmware/target/arm/audio-pp.c | 4 | ||||
-rw-r--r-- | firmware/target/arm/pcm-pp.c | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/firmware/target/arm/audio-pp.c b/firmware/target/arm/audio-pp.c index 8163295661..994b223d43 100644 --- a/firmware/target/arm/audio-pp.c +++ b/firmware/target/arm/audio-pp.c | |||
@@ -29,6 +29,7 @@ void audio_set_output_source(int source) | |||
29 | 29 | ||
30 | void audio_set_source(int source, unsigned flags) | 30 | void audio_set_source(int source, unsigned flags) |
31 | { | 31 | { |
32 | (void)flags; | ||
32 | /* Prevent pops from unneeded switching */ | 33 | /* Prevent pops from unneeded switching */ |
33 | static int last_source = AUDIO_SRC_PLAYBACK; | 34 | static int last_source = AUDIO_SRC_PLAYBACK; |
34 | #ifdef CONFIG_TUNER | 35 | #ifdef CONFIG_TUNER |
@@ -39,6 +40,7 @@ void audio_set_source(int source, unsigned flags) | |||
39 | { | 40 | { |
40 | default: /* playback - no recording */ | 41 | default: /* playback - no recording */ |
41 | source = AUDIO_SRC_PLAYBACK; | 42 | source = AUDIO_SRC_PLAYBACK; |
43 | #ifdef HAVE_RECORDING | ||
42 | case AUDIO_SRC_PLAYBACK: | 44 | case AUDIO_SRC_PLAYBACK: |
43 | if (source != last_source) | 45 | if (source != last_source) |
44 | { | 46 | { |
@@ -46,7 +48,6 @@ void audio_set_source(int source, unsigned flags) | |||
46 | audiohw_set_monitor(false); | 48 | audiohw_set_monitor(false); |
47 | } | 49 | } |
48 | break; | 50 | break; |
49 | |||
50 | case AUDIO_SRC_MIC: /* recording only */ | 51 | case AUDIO_SRC_MIC: /* recording only */ |
51 | if (source != last_source) | 52 | if (source != last_source) |
52 | { | 53 | { |
@@ -62,6 +63,7 @@ void audio_set_source(int source, unsigned flags) | |||
62 | audiohw_set_monitor(false); | 63 | audiohw_set_monitor(false); |
63 | } | 64 | } |
64 | break; | 65 | break; |
66 | #endif | ||
65 | #ifdef CONFIG_TUNER | 67 | #ifdef CONFIG_TUNER |
66 | case AUDIO_SRC_FMRADIO: /* recording and playback */ | 68 | case AUDIO_SRC_FMRADIO: /* recording and playback */ |
67 | if (!recording) | 69 | if (!recording) |
diff --git a/firmware/target/arm/pcm-pp.c b/firmware/target/arm/pcm-pp.c index 77dedc1535..d05884e8eb 100644 --- a/firmware/target/arm/pcm-pp.c +++ b/firmware/target/arm/pcm-pp.c | |||
@@ -32,8 +32,10 @@ | |||
32 | 32 | ||
33 | 33 | ||
34 | /* peaks */ | 34 | /* peaks */ |
35 | #ifdef HAVE_RECORDING | ||
35 | static unsigned long *rec_peak_addr; | 36 | static unsigned long *rec_peak_addr; |
36 | static int rec_peak_left, rec_peak_right; | 37 | static int rec_peak_left, rec_peak_right; |
38 | #endif | ||
37 | 39 | ||
38 | /** DMA **/ | 40 | /** DMA **/ |
39 | #if CONFIG_CPU == PP5020 | 41 | #if CONFIG_CPU == PP5020 |
@@ -356,6 +358,7 @@ void pcm_init(void) | |||
356 | /**************************************************************************** | 358 | /**************************************************************************** |
357 | ** Recording DMA transfer | 359 | ** Recording DMA transfer |
358 | **/ | 360 | **/ |
361 | #ifdef HAVE_RECORDING | ||
359 | static short peak_l, peak_r IBSS_ATTR; | 362 | static short peak_l, peak_r IBSS_ATTR; |
360 | 363 | ||
361 | void fiq_record(void) ICODE_ATTR __attribute__ ((interrupt ("FIQ"))); | 364 | void fiq_record(void) ICODE_ATTR __attribute__ ((interrupt ("FIQ"))); |
@@ -502,6 +505,7 @@ void pcm_calculate_rec_peaks(int *left, int *right) | |||
502 | *left = rec_peak_left; | 505 | *left = rec_peak_left; |
503 | *right = rec_peak_right; | 506 | *right = rec_peak_right; |
504 | } | 507 | } |
508 | #endif | ||
505 | 509 | ||
506 | /* | 510 | /* |
507 | * This function goes directly into the DMA buffer to calculate the left and | 511 | * This function goes directly into the DMA buffer to calculate the left and |