DeprecatedBuildAndroid » History » Version 13
Denis 'GNUtoo' Carikli, 08/30/2009 04:09 PM
1 | 1 | Denis 'GNUtoo' Carikli | == Build system == |
---|---|---|---|
2 | 8 | Denis 'GNUtoo' Carikli | * root your phone |
3 | * Backup your current system!!! |
||
4 | 12 | Denis 'GNUtoo' Carikli | * Check out the Dream Android repository following that howto: [http://source.android.com/documentation/building-for-dream],but be carefull...DO NOT put the files extracted by extract-files.sh in the build system...it would put proprietary files in your build,that you can't even redistribute,but keep wifi firmware for pushing it later if you can stand proprietary firmwares(/system/etc/wifi/Fw1251r1c.bin ) |
5 | 1 | Denis 'GNUtoo' Carikli | Android use a custom Makefile based buildsystem |
6 | 8 | Denis 'GNUtoo' Carikli | * Add the patches that can be find here [http://groups.fsf.org/wiki/Freest_hardware_comparisons/replicant] |
7 | 13 | Denis 'GNUtoo' Carikli | * Add HAVE_HTC_AUDIO_DRIVER := true to BoardConfig.mk |
8 | 8 | Denis 'GNUtoo' Carikli | * Add this patch for sound: |
9 | {{{ |
||
10 | diff --git a/include/hardware_legacy/AudioHardwareInterface.h b/include/hardware_legacy/AudioHardwareInterface.h |
||
11 | index 0aa3a95..371ee48 100644 |
||
12 | --- a/include/hardware_legacy/AudioHardwareInterface.h |
||
13 | +++ b/include/hardware_legacy/AudioHardwareInterface.h |
||
14 | -211,8 +211,7 @@ public: |
||
15 | int format, |
||
16 | int channelCount, |
||
17 | uint32_t sampleRate, |
||
18 | - status_t *status, |
||
19 | - AudioSystem::audio_in_acoustics acoustics) = 0; |
||
20 | + status_t *status) = 0; |
||
21 | |||
22 | /**This method dumps the state of the audio hardware */ |
||
23 | virtual status_t dumpState(int fd, const Vector<String16>& args) = 0; |
||
24 | diff --git a/libs/audioflinger/A2dpAudioInterface.cpp b/libs/audioflinger/A2dpAudioInterface.cpp |
||
25 | index b6d5078..15ce1dd 100644 |
||
26 | --- a/libs/audioflinger/A2dpAudioInterface.cpp |
||
27 | +++ b/libs/audioflinger/A2dpAudioInterface.cpp |
||
28 | -71,8 +71,7 @@ AudioStreamOut* A2dpAudioInterface::openOutputStream( |
||
29 | } |
||
30 | |||
31 | AudioStreamIn* A2dpAudioInterface::openInputStream( |
||
32 | - int format, int channelCount, uint32_t sampleRate, status_t *status, |
||
33 | - AudioSystem::audio_in_acoustics acoustics) |
||
34 | + int format, int channelCount, uint32_t sampleRate, status_t *status) |
||
35 | { |
||
36 | if (status) |
||
37 | *status = -1; |
||
38 | diff --git a/libs/audioflinger/A2dpAudioInterface.h b/libs/audioflinger/A2dpAudioInterface.h |
||
39 | index 7901a8c..e67f05f 100644 |
||
40 | --- a/libs/audioflinger/A2dpAudioInterface.h |
||
41 | +++ b/libs/audioflinger/A2dpAudioInterface.h |
||
42 | -58,8 +58,7 @@ public: |
||
43 | int format, |
||
44 | int channelCount, |
||
45 | uint32_t sampleRate, |
||
46 | - status_t *status, |
||
47 | - AudioSystem::audio_in_acoustics acoustics); |
||
48 | + status_t *status); |
||
49 | |||
50 | protected: |
||
51 | virtual status_t doRouting(); |
||
52 | diff --git a/libs/audioflinger/AudioDumpInterface.h b/libs/audioflinger/AudioDumpInterface.h |
||
53 | index 9a94102..42204d6 100644 |
||
54 | --- a/libs/audioflinger/AudioDumpInterface.h |
||
55 | +++ b/libs/audioflinger/AudioDumpInterface.h |
||
56 | -78,9 +78,8 @@ public: |
||
57 | virtual status_t setParameter(const char* key, const char* value) |
||
58 | {return mFinalInterface->setParameter(key, value);} |
||
59 | |||
60 | - virtual AudioStreamIn* openInputStream( int format, int channelCount, uint32_t sampleRate, status_t *status, |
||
61 | - AudioSystem::audio_in_acoustics acoustics) |
||
62 | - {return mFinalInterface->openInputStream( format, channelCount, sampleRate, status, acoustics);} |
||
63 | + virtual AudioStreamIn* openInputStream( int format, int channelCount, uint32_t sampleRate, status_t *status) |
||
64 | + {return mFinalInterface->openInputStream( format, channelCount, sampleRate, status);} |
||
65 | |||
66 | virtual status_t dump(int fd, const Vector<String16>& args) { return mFinalInterface->dumpState(fd, args); } |
||
67 | |||
68 | diff --git a/libs/audioflinger/AudioFlinger.cpp b/libs/audioflinger/AudioFlinger.cpp |
||
69 | index 43df7dd..f376b67 100644 |
||
70 | --- a/libs/audioflinger/AudioFlinger.cpp |
||
71 | +++ b/libs/audioflinger/AudioFlinger.cpp |
||
72 | -2435,8 +2435,7 @@ bool AudioFlinger::AudioRecordThread::threadLoop() |
||
73 | input = mAudioHardware->openInputStream(mRecordTrack->format(), |
||
74 | mRecordTrack->channelCount(), |
||
75 | mRecordTrack->sampleRate(), |
||
76 | - &mStartStatus, |
||
77 | - (AudioSystem::audio_in_acoustics)(mRecordTrack->mFlags >> 16)); |
||
78 | + &mStartStatus); |
||
79 | if (input != 0) { |
||
80 | inBufferSize = input->bufferSize(); |
||
81 | inFrameCount = inBufferSize/input->frameSize(); |
||
82 | diff --git a/libs/audioflinger/AudioHardwareGeneric.cpp b/libs/audioflinger/AudioHardwareGeneric.cpp |
||
83 | index 62beada..e455186 100644 |
||
84 | --- a/libs/audioflinger/AudioHardwareGeneric.cpp |
||
85 | +++ b/libs/audioflinger/AudioHardwareGeneric.cpp |
||
86 | -93,8 +93,7 @@ void AudioHardwareGeneric::closeOutputStream(AudioStreamOutGeneric* out) { |
||
87 | } |
||
88 | |||
89 | AudioStreamIn* AudioHardwareGeneric::openInputStream( |
||
90 | - int format, int channelCount, uint32_t sampleRate, status_t *status, |
||
91 | - AudioSystem::audio_in_acoustics acoustics) |
||
92 | + int format, int channelCount, uint32_t sampleRate, status_t *status) |
||
93 | { |
||
94 | AutoMutex lock(mLock); |
||
95 | |||
96 | -108,7 +107,7 @@ AudioStreamIn* AudioHardwareGeneric::openInputStream( |
||
97 | |||
98 | // create new output stream |
||
99 | AudioStreamInGeneric* in = new AudioStreamInGeneric(); |
||
100 | - status_t lStatus = in->set(this, mFd, format, channelCount, sampleRate, acoustics); |
||
101 | + status_t lStatus = in->set(this, mFd, format, channelCount, sampleRate); |
||
102 | if (status) { |
||
103 | *status = lStatus; |
||
104 | } |
||
105 | -247,8 +246,7 @@ status_t AudioStreamInGeneric::set( |
||
106 | int fd, |
||
107 | int format, |
||
108 | int channels, |
||
109 | - uint32_t rate, |
||
110 | - AudioSystem::audio_in_acoustics acoustics) |
||
111 | + uint32_t rate) |
||
112 | { |
||
113 | // FIXME: remove logging |
||
114 | LOGD("AudioStreamInGeneric::set(%p, %d, %d, %d, %u)", hw, fd, format, channels, rate); |
||
115 | diff --git a/libs/audioflinger/AudioHardwareGeneric.h b/libs/audioflinger/AudioHardwareGeneric.h |
||
116 | index c949aa1..64e0396 100644 |
||
117 | --- a/libs/audioflinger/AudioHardwareGeneric.h |
||
118 | +++ b/libs/audioflinger/AudioHardwareGeneric.h |
||
119 | -69,8 +69,7 @@ public: |
||
120 | int mFd, |
||
121 | int format, |
||
122 | int channelCount, |
||
123 | - uint32_t sampleRate, |
||
124 | - AudioSystem::audio_in_acoustics acoustics); |
||
125 | + uint32_t sampleRate); |
||
126 | |||
127 | uint32_t sampleRate() const { return 8000; } |
||
128 | virtual size_t bufferSize() const { return 320; } |
||
129 | -115,8 +114,7 @@ public: |
||
130 | int format, |
||
131 | int channelCount, |
||
132 | uint32_t sampleRate, |
||
133 | - status_t *status, |
||
134 | - AudioSystem::audio_in_acoustics acoustics); |
||
135 | + status_t *status); |
||
136 | |||
137 | void closeOutputStream(AudioStreamOutGeneric* out); |
||
138 | void closeInputStream(AudioStreamInGeneric* in); |
||
139 | diff --git a/libs/audioflinger/AudioHardwareStub.cpp b/libs/audioflinger/AudioHardwareStub.cpp |
||
140 | index b13cb1c..683af04 100644 |
||
141 | --- a/libs/audioflinger/AudioHardwareStub.cpp |
||
142 | +++ b/libs/audioflinger/AudioHardwareStub.cpp |
||
143 | -57,10 +57,10 @@ AudioStreamOut* AudioHardwareStub::openOutputStream( |
||
144 | |||
145 | AudioStreamIn* AudioHardwareStub::openInputStream( |
||
146 | int format, int channelCount, uint32_t sampleRate, |
||
147 | - status_t *status, AudioSystem::audio_in_acoustics acoustics) |
||
148 | + status_t *status) |
||
149 | { |
||
150 | AudioStreamInStub* in = new AudioStreamInStub(); |
||
151 | - status_t lStatus = in->set(format, channelCount, sampleRate, acoustics); |
||
152 | + status_t lStatus = in->set(format, channelCount, sampleRate); |
||
153 | if (status) { |
||
154 | *status = lStatus; |
||
155 | } |
||
156 | -143,8 +143,7 @@ status_t AudioStreamOutStub::dump(int fd, const Vector<String16>& args) |
||
157 | |||
158 | // ---------------------------------------------------------------------------- |
||
159 | |||
160 | -status_t AudioStreamInStub::set(int format, int channels, uint32_t rate, |
||
161 | - AudioSystem::audio_in_acoustics acoustics) |
||
162 | +status_t AudioStreamInStub::set(int format, int channels, uint32_t rate) |
||
163 | { |
||
164 | if ((format == AudioSystem::PCM_16_BIT) && |
||
165 | (channels == channelCount()) && |
||
166 | diff --git a/libs/audioflinger/AudioHardwareStub.h b/libs/audioflinger/AudioHardwareStub.h |
||
167 | index d406424..24736ed 100644 |
||
168 | --- a/libs/audioflinger/AudioHardwareStub.h |
||
169 | +++ b/libs/audioflinger/AudioHardwareStub.h |
||
170 | -43,7 +43,7 @@ public: |
||
171 | |||
172 | class AudioStreamInStub : public AudioStreamIn { |
||
173 | public: |
||
174 | - virtual status_t set(int format, int channelCount, uint32_t sampleRate, AudioSystem::audio_in_acoustics acoustics); |
||
175 | + virtual status_t set(int format, int channelCount, uint32_t sampleRate); |
||
176 | virtual uint32_t sampleRate() const { return 8000; } |
||
177 | virtual size_t bufferSize() const { return 320; } |
||
178 | virtual int channelCount() const { return 1; } |
||
179 | -81,8 +81,7 @@ public: |
||
180 | int format, |
||
181 | int channelCount, |
||
182 | uint32_t sampleRate, |
||
183 | - status_t *status, |
||
184 | - AudioSystem::audio_in_acoustics acoustics); |
||
185 | + status_t *status); |
||
186 | |||
187 | protected: |
||
188 | virtual status_t doRouting() { return NO_ERROR; } |
||
189 | diff --git a/libaudio/AudioHardware.cpp b/libaudio/AudioHardware.cpp |
||
190 | index 0ece3f7..88dd46f 100644 |
||
191 | --- a/libaudio/AudioHardware.cpp |
||
192 | +++ b/libaudio/AudioHardware.cpp |
||
193 | -36,12 +36,51 @@ |
||
194 | #define LOG_SND_RPC 0 // Set to 1 to log sound RPC's |
||
195 | |||
196 | namespace android { |
||
197 | -static int audpre_index, tx_iir_index; |
||
198 | -static void * acoustic; |
||
199 | const uint32_t AudioHardware::inputSamplingRates[] = { |
||
200 | 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000 |
||
201 | }; |
||
202 | + |
||
203 | + |
||
204 | + |
||
205 | // ---------------------------------------------------------------------------- |
||
206 | +static int snd_get_endpoint( int cnt,msm_snd_endpoint * ept) |
||
207 | +{ |
||
208 | + int fd; |
||
209 | + int status; |
||
210 | + fd = open("/dev/msm_snd",O_RDWR); |
||
211 | + if (fd < 0) |
||
212 | + { |
||
213 | + perror("Cannot open msm_snd device"); |
||
214 | + close(fd); |
||
215 | + return -1; |
||
216 | + } |
||
217 | + status = ioctl(fd,SND_GET_ENDPOINT, ept); |
||
218 | + close(fd); |
||
219 | + return status; |
||
220 | +} |
||
221 | + |
||
222 | +static int snd_get_num() |
||
223 | +{ |
||
224 | + int fd; |
||
225 | + int status; |
||
226 | + int mNumSndEndpoints; |
||
227 | + fd = open("/dev/msm_snd",O_RDWR); |
||
228 | + if (fd < 0) |
||
229 | + { |
||
230 | + perror("Cannot open msm_snd device"); |
||
231 | + return -1; |
||
232 | + } |
||
233 | + |
||
234 | + if(ioctl(fd,SND_GET_NUM_ENDPOINTS,&mNumSndEndpoints)<0 ) |
||
235 | + { |
||
236 | + perror("get number of endpoints error"); |
||
237 | + close(fd); |
||
238 | + return -1; |
||
239 | + } |
||
240 | + close(fd); |
||
241 | + return mNumSndEndpoints; |
||
242 | + |
||
243 | +} |
||
244 | |||
245 | AudioHardware::AudioHardware() : |
||
246 | mInit(false), mMicMute(true), mBluetoothNrec(true), mBluetoothId(0), |
||
247 | -54,44 +93,22 @@ AudioHardware::AudioHardware() : |
||
248 | SND_DEVICE_HEADSET(-1), |
||
249 | SND_DEVICE_HEADSET_AND_SPEAKER(-1) |
||
250 | { |
||
251 | - |
||
252 | - int (*snd_get_num)(); |
||
253 | - int (*snd_get_endpoint)(int, msm_snd_endpoint *); |
||
254 | - int (*set_acoustic_parameters)(); |
||
255 | + LOGE("inside AudioHardware::AudioHardware()"); |
||
256 | + //int snd_get_num(); |
||
257 | + //int snd_get_endpoint(int cnt,msm_snd_endpoint *ept); |
||
258 | + //int (*snd_get_num)(); |
||
259 | + //int (*snd_get_endpoint)(int, msm_snd_endpoint *); |
||
260 | |||
261 | struct msm_snd_endpoint *ept; |
||
262 | - |
||
263 | - acoustic = ::dlopen("/system/lib/libhtc_acoustic.so", RTLD_NOW); |
||
264 | - if (acoustic == NULL ) { |
||
265 | - LOGE("Could not open libhtc_acoustic.so"); |
||
266 | - return; |
||
267 | - } |
||
268 | - |
||
269 | - set_acoustic_parameters = (int (*)(void))::dlsym(acoustic, "set_acoustic_parameters"); |
||
270 | - if ((*set_acoustic_parameters) == 0 ) { |
||
271 | - LOGE("Could not open set_acoustic_parameters()"); |
||
272 | - return; |
||
273 | - } |
||
274 | - |
||
275 | - int rc = set_acoustic_parameters(); |
||
276 | - if (rc < 0) { |
||
277 | - LOGE("Could not set acoustic parameters to share memory: %d", rc); |
||
278 | -// return; |
||
279 | - } |
||
280 | - |
||
281 | - snd_get_num = (int (*)(void))::dlsym(acoustic, "snd_get_num_endpoints"); |
||
282 | - if ((*snd_get_num) == 0 ) { |
||
283 | - LOGE("Could not open snd_get_num()"); |
||
284 | -// return; |
||
285 | - } |
||
286 | - |
||
287 | + LOGE("before"); |
||
288 | mNumSndEndpoints = snd_get_num(); |
||
289 | + LOGE("after"); |
||
290 | LOGD("mNumSndEndpoints = %d", mNumSndEndpoints); |
||
291 | mSndEndpoints = new msm_snd_endpoint[mNumSndEndpoints]; |
||
292 | mInit = true; |
||
293 | LOGV("constructed %d SND endpoints)", mNumSndEndpoints); |
||
294 | - ept = mSndEndpoints; |
||
295 | - snd_get_endpoint = (int (*)(int, msm_snd_endpoint *))::dlsym(acoustic, "snd_get_endpoint"); |
||
296 | + ept = mSndEndpoints; //LOOK AT mSndEndpoints type... |
||
297 | + |
||
298 | if ((*snd_get_endpoint) == 0 ) { |
||
299 | LOGE("Could not open snd_get_endpoint()"); |
||
300 | return; |
||
301 | -121,7 +138,6 @@ AudioHardware::~AudioHardware() |
||
302 | delete mInput; |
||
303 | delete mOutput; |
||
304 | delete [] mSndEndpoints; |
||
305 | - ::dlclose(acoustic); |
||
306 | mInit = false; |
||
307 | } |
||
308 | |||
309 | -168,8 +184,7 @@ void AudioHardware::closeOutputStream(AudioStreamOutMSM72xx* out) { |
||
310 | } |
||
311 | |||
312 | AudioStreamIn* AudioHardware::openInputStream( |
||
313 | - int format, int channelCount, uint32_t sampleRate, status_t *status, |
||
314 | - AudioSystem::audio_in_acoustics acoustic_flags) |
||
315 | + int format, int channelCount, uint32_t sampleRate, status_t *status) |
||
316 | { |
||
317 | mLock.lock(); |
||
318 | // input stream already open? |
||
319 | -182,7 +197,7 @@ AudioStreamIn* AudioHardware::openInputStream( |
||
320 | } |
||
321 | |||
322 | AudioStreamInMSM72xx* in = new AudioStreamInMSM72xx(); |
||
323 | - status_t lStatus = in->set(this, format, channelCount, sampleRate, acoustic_flags); |
||
324 | + status_t lStatus = in->set(this, format, channelCount, sampleRate); |
||
325 | if (status) { |
||
326 | *status = lStatus; |
||
327 | } |
||
328 | -449,6 +464,42 @@ static int count_bits(uint32_t vector) |
||
329 | return bits; |
||
330 | } |
||
331 | |||
332 | +static int msm72xx_enable_audpp (uint16_t enable_mask) |
||
333 | +{ |
||
334 | + int fd; |
||
335 | + |
||
336 | +// if (!audpp_filter_inited) |
||
337 | +// return -1; |
||
338 | + |
||
339 | + fd = open ("/dev/msm_pcm_ctl", O_RDWR); |
||
340 | + if (fd < 0) |
||
341 | + { |
||
342 | + perror ("Cannot open audio device"); |
||
343 | + return -1; |
||
344 | + } |
||
345 | + |
||
346 | + if (enable_mask & ADRC_ENABLE) |
||
347 | + enable_mask &= ~ADRC_ENABLE; |
||
348 | + if (enable_mask & EQ_ENABLE) |
||
349 | + enable_mask &= ~EQ_ENABLE; |
||
350 | + if (enable_mask & RX_IIR_ENABLE) |
||
351 | + enable_mask &= ~RX_IIR_ENABLE; |
||
352 | + |
||
353 | + printf ("msm72xx_enable_audpp: 0x%04x", enable_mask); |
||
354 | + if (ioctl (fd, AUDIO_ENABLE_AUDPP, &enable_mask) < 0) |
||
355 | + { |
||
356 | + perror ("enable audpp error"); |
||
357 | + close (fd); |
||
358 | + return -1; |
||
359 | + } |
||
360 | + |
||
361 | + close (fd); |
||
362 | + return 0; |
||
363 | +} |
||
364 | + |
||
365 | + |
||
366 | + |
||
367 | + |
||
368 | status_t AudioHardware::doRouting() |
||
369 | { |
||
370 | Mutex::Autolock lock(mLock); |
||
371 | -460,8 +511,7 @@ status_t AudioHardware::doRouting() |
||
372 | " picking closest possible route...", routes); |
||
373 | } |
||
374 | } |
||
375 | - int (*msm72xx_enable_audpp)(int); |
||
376 | - msm72xx_enable_audpp = (int (*)(int))::dlsym(acoustic, "msm72xx_enable_audpp"); |
||
377 | + |
||
378 | status_t ret = NO_ERROR; |
||
379 | if (routes & AudioSystem::ROUTE_BLUETOOTH_SCO) { |
||
380 | LOGI("Routing audio to Bluetooth PCM\n"); |
||
381 | -700,14 +750,12 @@ bool AudioHardware::AudioStreamOutMSM72xx::checkStandby() |
||
382 | AudioHardware::AudioStreamInMSM72xx::AudioStreamInMSM72xx() : |
||
383 | mHardware(0), mFd(-1), mState(AUDIO_INPUT_CLOSED), mRetryCount(0), |
||
384 | mFormat(AUDIO_HW_IN_FORMAT), mChannelCount(AUDIO_HW_IN_CHANNELS), |
||
385 | - mSampleRate(AUDIO_HW_IN_SAMPLERATE), mBufferSize(AUDIO_HW_IN_BUFFERSIZE), |
||
386 | - mAcoustics((AudioSystem::audio_in_acoustics)0) |
||
387 | + mSampleRate(AUDIO_HW_IN_SAMPLERATE), mBufferSize(AUDIO_HW_IN_BUFFERSIZE) |
||
388 | { |
||
389 | } |
||
390 | |||
391 | status_t AudioHardware::AudioStreamInMSM72xx::set( |
||
392 | - AudioHardware* hw, int format, int channelCount, uint32_t sampleRate, |
||
393 | - AudioSystem::audio_in_acoustics acoustic_flags) |
||
394 | + AudioHardware* hw, int format, int channelCount, uint32_t sampleRate) |
||
395 | { |
||
396 | LOGV("AudioStreamInMSM72xx::set(%d, %d, %u)", format, channelCount, sampleRate); |
||
397 | if (mFd >= 0) { |
||
398 | -763,26 +811,7 @@ status_t AudioHardware::AudioStreamInMSM72xx::set( |
||
399 | mHardware = hw; |
||
400 | mHardware->setMicMute_nosync(false); |
||
401 | mState = AUDIO_INPUT_OPENED; |
||
402 | - audpre_index = calculate_audpre_table_index(sampleRate); |
||
403 | - tx_iir_index = (audpre_index * 2) + (hw->checkOutputStandby() ? 0 : 1); |
||
404 | - LOGD("audpre_index = %d, tx_iir_index = %d\n", audpre_index, tx_iir_index); |
||
405 | - |
||
406 | - /** |
||
407 | - * If audio-preprocessing failed, we should not block record. |
||
408 | - */ |
||
409 | - int (*msm72xx_set_audpre_params)(int, int); |
||
410 | - msm72xx_set_audpre_params = (int (*)(int, int))::dlsym(acoustic, "msm72xx_set_audpre_params"); |
||
411 | - status = msm72xx_set_audpre_params(audpre_index, tx_iir_index); |
||
412 | - if (status < 0) |
||
413 | - LOGE("Cannot set audpre parameters"); |
||
414 | - |
||
415 | - int (*msm72xx_enable_audpre)(int, int, int); |
||
416 | - msm72xx_enable_audpre = (int (*)(int, int, int))::dlsym(acoustic, "msm72xx_enable_audpre"); |
||
417 | - mAcoustics = acoustic_flags; |
||
418 | - status = msm72xx_enable_audpre((int)acoustic_flags, audpre_index, tx_iir_index); |
||
419 | - if (status < 0) |
||
420 | - LOGE("Cannot enable audpre"); |
||
421 | - |
||
422 | + |
||
423 | return NO_ERROR; |
||
424 | |||
425 | Error: |
||
426 | -811,7 +840,7 @@ ssize_t AudioHardware::AudioStreamInMSM72xx::read( void* buffer, ssize_t bytes) |
||
427 | uint8_t* p = static_cast<uint8_t*>(buffer); |
||
428 | |||
429 | if (mState < AUDIO_INPUT_OPENED) { |
||
430 | - if (set(mHardware, mFormat, mChannelCount, mSampleRate, mAcoustics) != NO_ERROR) { |
||
431 | + if (set(mHardware, mFormat, mChannelCount, mSampleRate) != NO_ERROR) { |
||
432 | return -1; |
||
433 | } |
||
434 | } |
||
435 | diff --git a/libaudio/AudioHardware.h b/libaudio/AudioHardware.h |
||
436 | index 047bad3..2111e16 100644 |
||
437 | --- a/libaudio/AudioHardware.h |
||
438 | +++ b/libaudio/AudioHardware.h |
||
439 | -128,8 +128,8 @@ public: |
||
440 | int format, |
||
441 | int channelCount, |
||
442 | uint32_t sampleRate, |
||
443 | - status_t *status, |
||
444 | - AudioSystem::audio_in_acoustics acoustics); |
||
445 | + status_t *status |
||
446 | + ); |
||
447 | |||
448 | void closeOutputStream(AudioStreamOutMSM72xx* out); |
||
449 | void closeInputStream(AudioStreamInMSM72xx* in); |
||
450 | -190,8 +190,8 @@ private: |
||
451 | status_t set(AudioHardware* mHardware, |
||
452 | int format, |
||
453 | int channelCount, |
||
454 | - uint32_t sampleRate, |
||
455 | - AudioSystem::audio_in_acoustics acoustics); |
||
456 | + uint32_t sampleRate |
||
457 | + ); |
||
458 | virtual size_t bufferSize() const { return mBufferSize; } |
||
459 | virtual int channelCount() const { return mChannelCount; } |
||
460 | virtual int format() const { return mFormat; } |
||
461 | -210,7 +210,7 @@ private: |
||
462 | int mChannelCount; |
||
463 | uint32_t mSampleRate; |
||
464 | size_t mBufferSize; |
||
465 | - AudioSystem::audio_in_acoustics mAcoustics; |
||
466 | + |
||
467 | }; |
||
468 | |||
469 | static const uint32_t inputSamplingRates[]; |
||
470 | }}} |
||
471 | 5 | Denis 'GNUtoo' Carikli | Build process: |
472 | Let's say that our build directory is ~/replicant |
||
473 | * Add that file: |
||
474 | {{{ |
||
475 | TARGET_PRODUCT := htc_dream |
||
476 | }}} |
||
477 | To ~/replicant/buildspec.mk |
||
478 | * Then type |
||
479 | {{{ |
||
480 | cd ~/replicant |
||
481 | export ANDROID_JAVA_HOME=$JAVA_HOME |
||
482 | make |
||
483 | }}} |
||
484 | 12 | Denis 'GNUtoo' Carikli | * The files to flash are in ~/replicant/out/target/product/dream,flash them and then clear the cache |
485 | * boot and push the wifi firmware if you want it |
||
486 | 5 | Denis 'GNUtoo' Carikli | |
487 | 1 | Denis 'GNUtoo' Carikli | |
488 | |||
489 | |||
490 | == Status == |
||
491 | 4 | Denis 'GNUtoo' Carikli | * web browser crashes |
492 | * ril seem to work(I made some calls and received sms) |
||
493 | 12 | Denis 'GNUtoo' Carikli | * sound on the application cpu(the baseband cpu has sound too) now works |