diff options
Diffstat (limited to 'firmware/target/coldfire/iaudio/x5/audio-x5.c')
-rw-r--r-- | firmware/target/coldfire/iaudio/x5/audio-x5.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/firmware/target/coldfire/iaudio/x5/audio-x5.c b/firmware/target/coldfire/iaudio/x5/audio-x5.c index 70d5313a7e..0e2ba60c1d 100644 --- a/firmware/target/coldfire/iaudio/x5/audio-x5.c +++ b/firmware/target/coldfire/iaudio/x5/audio-x5.c | |||
@@ -23,7 +23,7 @@ | |||
23 | 23 | ||
24 | /** | 24 | /** |
25 | * Note that microphone is mono, only left value is used | 25 | * Note that microphone is mono, only left value is used |
26 | * See tlv320_set_recvol() for exact ranges. | 26 | * See audiohw_set_recvol() for exact ranges. |
27 | * | 27 | * |
28 | * @param type AUDIO_GAIN_MIC, AUDIO_GAIN_LINEIN | 28 | * @param type AUDIO_GAIN_MIC, AUDIO_GAIN_LINEIN |
29 | * | 29 | * |
@@ -31,7 +31,7 @@ | |||
31 | void audio_set_recording_gain(int left, int right, int type) | 31 | void audio_set_recording_gain(int left, int right, int type) |
32 | { | 32 | { |
33 | //logf("rcmrec: t=%d l=%d r=%d", type, left, right); | 33 | //logf("rcmrec: t=%d l=%d r=%d", type, left, right); |
34 | tlv320_set_recvol(left, right, type); | 34 | audiohw_set_recvol(left, right, type); |
35 | } /* audio_set_recording_gain */ | 35 | } /* audio_set_recording_gain */ |
36 | 36 | ||
37 | void audio_set_output_source(int source) | 37 | void audio_set_output_source(int source) |
@@ -61,8 +61,8 @@ void audio_set_source(int source, unsigned flags) | |||
61 | case AUDIO_SRC_PLAYBACK: | 61 | case AUDIO_SRC_PLAYBACK: |
62 | if (source != last_source) | 62 | if (source != last_source) |
63 | { | 63 | { |
64 | tlv320_disable_recording(); | 64 | audiohw_disable_recording(); |
65 | tlv320_set_monitor(false); | 65 | audiohw_set_monitor(false); |
66 | /* Reset PDIR2 data flow */ | 66 | /* Reset PDIR2 data flow */ |
67 | DATAINCONTROL = (1 << 9); | 67 | DATAINCONTROL = (1 << 9); |
68 | } | 68 | } |
@@ -71,7 +71,7 @@ void audio_set_source(int source, unsigned flags) | |||
71 | case AUDIO_SRC_MIC: /* recording only */ | 71 | case AUDIO_SRC_MIC: /* recording only */ |
72 | if (source != last_source) | 72 | if (source != last_source) |
73 | { | 73 | { |
74 | tlv320_enable_recording(true); /* source mic */ | 74 | audiohw_enable_recording(true); /* source mic */ |
75 | /* Int. when 6 samples in FIFO, PDIR2 src = iis1RcvData */ | 75 | /* Int. when 6 samples in FIFO, PDIR2 src = iis1RcvData */ |
76 | DATAINCONTROL = (3 << 14) | (4 << 3); | 76 | DATAINCONTROL = (3 << 14) | (4 << 3); |
77 | } | 77 | } |
@@ -80,7 +80,7 @@ void audio_set_source(int source, unsigned flags) | |||
80 | case AUDIO_SRC_LINEIN: /* recording only */ | 80 | case AUDIO_SRC_LINEIN: /* recording only */ |
81 | if (source != last_source) | 81 | if (source != last_source) |
82 | { | 82 | { |
83 | tlv320_enable_recording(false); /* source line */ | 83 | audiohw_enable_recording(false); /* source line */ |
84 | /* Int. when 6 samples in FIFO, PDIR2 src = iis1RcvData */ | 84 | /* Int. when 6 samples in FIFO, PDIR2 src = iis1RcvData */ |
85 | DATAINCONTROL = (3 << 14) | (4 << 3); | 85 | DATAINCONTROL = (3 << 14) | (4 << 3); |
86 | } | 86 | } |
@@ -88,7 +88,7 @@ void audio_set_source(int source, unsigned flags) | |||
88 | 88 | ||
89 | case AUDIO_SRC_FMRADIO: /* recording and playback */ | 89 | case AUDIO_SRC_FMRADIO: /* recording and playback */ |
90 | if (!recording) | 90 | if (!recording) |
91 | tlv320_set_recvol(23, 23, AUDIO_GAIN_LINEIN); | 91 | audiohw_set_recvol(23, 23, AUDIO_GAIN_LINEIN); |
92 | 92 | ||
93 | /* I2S recording and analog playback */ | 93 | /* I2S recording and analog playback */ |
94 | if (source == last_source && recording == last_recording) | 94 | if (source == last_source && recording == last_recording) |
@@ -100,12 +100,12 @@ void audio_set_source(int source, unsigned flags) | |||
100 | { | 100 | { |
101 | /* Int. when 6 samples in FIFO, PDIR2 src = iis1RcvData */ | 101 | /* Int. when 6 samples in FIFO, PDIR2 src = iis1RcvData */ |
102 | DATAINCONTROL = (3 << 14) | (4 << 3); | 102 | DATAINCONTROL = (3 << 14) | (4 << 3); |
103 | tlv320_enable_recording(false); /* source line */ | 103 | audiohw_enable_recording(false); /* source line */ |
104 | } | 104 | } |
105 | else | 105 | else |
106 | { | 106 | { |
107 | tlv320_disable_recording(); | 107 | audiohw_disable_recording(); |
108 | tlv320_set_monitor(true); /* analog bypass */ | 108 | audiohw_set_monitor(true); /* analog bypass */ |
109 | /* Reset PDIR2 data flow */ | 109 | /* Reset PDIR2 data flow */ |
110 | DATAINCONTROL = (1 << 9); | 110 | DATAINCONTROL = (1 << 9); |
111 | } | 111 | } |