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