summaryrefslogtreecommitdiff
path: root/firmware/target
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target')
-rw-r--r--firmware/target/coldfire/mpio/audio-mpio.c7
-rw-r--r--firmware/target/coldfire/pcm-coldfire.c13
2 files changed, 13 insertions, 7 deletions
diff --git a/firmware/target/coldfire/mpio/audio-mpio.c b/firmware/target/coldfire/mpio/audio-mpio.c
index 217881547e..88c43383ca 100644
--- a/firmware/target/coldfire/mpio/audio-mpio.c
+++ b/firmware/target/coldfire/mpio/audio-mpio.c
@@ -46,6 +46,7 @@ void audio_set_output_source(int source)
46 if ((unsigned)source >= AUDIO_NUM_SOURCES) 46 if ((unsigned)source >= AUDIO_NUM_SOURCES)
47 source = AUDIO_SRC_PLAYBACK; 47 source = AUDIO_SRC_PLAYBACK;
48 48
49 /* route incoming audio samples to DAC */
49 IIS2CONFIG = (IIS2CONFIG & ~(7 << 8)) | (txsrc_select[source+1] << 8); 50 IIS2CONFIG = (IIS2CONFIG & ~(7 << 8)) | (txsrc_select[source+1] << 8);
50 51
51 restore_irq(level); 52 restore_irq(level);
@@ -73,8 +74,8 @@ void audio_input_mux(int source, unsigned flags)
73 break; 74 break;
74 75
75 case AUDIO_SRC_MIC: 76 case AUDIO_SRC_MIC:
76 case AUDIO_SRC_LINEIN: 77 case AUDIO_SRC_LINEIN:
77 /* recording only */ 78 /* recording only */
78 if (source != last_source) 79 if (source != last_source)
79 { 80 {
80 audiohw_set_recsrc(source,true); 81 audiohw_set_recsrc(source,true);
@@ -89,10 +90,10 @@ void audio_input_mux(int source, unsigned flags)
89 90
90 last_recording = recording; 91 last_recording = recording;
91 92
93 audiohw_set_recsrc(source,recording);
92 /* Int. when 6 samples in FIFO, PDIR2 src = iis1RcvData */ 94 /* Int. when 6 samples in FIFO, PDIR2 src = iis1RcvData */
93 coldfire_set_dataincontrol(recording ? 95 coldfire_set_dataincontrol(recording ?
94 ((3 << 14) | (4 << 3)) : 0); 96 ((3 << 14) | (4 << 3)) : 0);
95 audiohw_set_recsrc(source, recording);
96 break; 97 break;
97 } 98 }
98 99
diff --git a/firmware/target/coldfire/pcm-coldfire.c b/firmware/target/coldfire/pcm-coldfire.c
index 06f17d1170..fa320dff3f 100644
--- a/firmware/target/coldfire/pcm-coldfire.c
+++ b/firmware/target/coldfire/pcm-coldfire.c
@@ -84,13 +84,18 @@ static const unsigned char pcm_freq_parms[HW_NUM_FREQ][2] =
84#endif 84#endif
85 85
86#if CONFIG_CPU == MCF5249 && defined(HAVE_WM8750) 86#if CONFIG_CPU == MCF5249 && defined(HAVE_WM8750)
87/* We run codec in master mode.
88 * Codec can reconstruct all frequencies
89 * from single 11.2896 MHz master clock
90 */
87static const unsigned char pcm_freq_parms[HW_NUM_FREQ][2] = 91static const unsigned char pcm_freq_parms[HW_NUM_FREQ][2] =
88{ 92{
89 [HW_FREQ_88] = { 0x0c, 0x01 }, 93 [HW_FREQ_88] = { 0x00, 0x01 },
90 [HW_FREQ_44] = { 0x06, 0x01 }, 94 [HW_FREQ_44] = { 0x00, 0x01 },
91 [HW_FREQ_22] = { 0x04, 0x01 }, 95 [HW_FREQ_22] = { 0x00, 0x01 },
92 [HW_FREQ_11] = { 0x02, 0x01 }, 96 [HW_FREQ_11] = { 0x00, 0x01 },
93}; 97};
98
94#endif 99#endif
95 100
96#if (CONFIG_CPU == MCF5250 || CONFIG_CPU == MCF5249) && defined(HAVE_TLV320) 101#if (CONFIG_CPU == MCF5250 || CONFIG_CPU == MCF5249) && defined(HAVE_TLV320)