Hello, Paul, thank you for patch, but seems it's not complete. ALSA is compiled, but linkage fails (AudioPolicyManagerALSA need to be updated for new iface too).
Modified patch -- http://newsycat.com/android/n900/alsa_froyo_fixes.diff (hope it'll help somebody) DJ_Steve, special for you -- see #nitdroid logs;) On 24 июн, 19:01, Paul Burton <paulburto...@gmail.com> wrote: > Whether this works or not I can't yet say, but it does > compile:http://pastebin.com/R43SrZKk > > From a2619fa7ea10a7ff61d2a559fdfe5c2ce5693f8f Mon Sep 17 00:00:00 2001 > From: Paul Burton <paulburto...@gmail.com> > Date: Thu, 24 Jun 2010 15:54:37 +0100 > Subject: [PATCH] Stub out methods required for froyo > > --- > AudioHardwareALSA.h | 4 ++++ > AudioStreamInALSA.cpp | 5 +++++ > AudioStreamOutALSA.cpp | 7 +++++++ > 3 files changed, 16 insertions(+), 0 deletions(-) > > diff --git a/AudioHardwareALSA.h b/AudioHardwareALSA.h > index d2a9bec..6e33cbf 100644 > --- a/AudioHardwareALSA.h > +++ b/AudioHardwareALSA.h > @@ -201,6 +201,8 @@ public: > > status_t open(int mode); > status_t close(); > + > + status_t getRenderPosition(uint32_t *dspFrames); > }; > > class AudioStreamInALSA : public AudioStreamIn, public ALSAStreamOps > @@ -252,6 +254,8 @@ public: > > status_t open(int mode); > status_t close(); > + > + unsigned int getInputFramesLost() const; > > private: > AudioSystem::audio_in_acoustics mAcoustics; > diff --git a/AudioStreamInALSA.cpp b/AudioStreamInALSA.cpp > index 970dafd..642ad9a 100644 > --- a/AudioStreamInALSA.cpp > +++ b/AudioStreamInALSA.cpp > @@ -152,4 +152,9 @@ status_t AudioStreamInALSA::setAcousticParams(void > *params) > return aDev ? aDev->set_params(aDev, mAcoustics, params) : > (status_t)NO_ERROR; > } > > +unsigned int AudioStreamInALSA::getInputFramesLost() const > +{ > + return 0; > +} > + > } // namespace android > diff --git a/AudioStreamOutALSA.cpp b/AudioStreamOutALSA.cpp > index 781afbb..6938da8 100644 > --- a/AudioStreamOutALSA.cpp > +++ b/AudioStreamOutALSA.cpp > @@ -166,4 +166,11 @@ uint32_t AudioStreamOutALSA::latency() const > return USEC_TO_MSEC (mHandle->latency); > } > > +status_t AudioStreamOutALSA::getRenderPosition(uint32_t *dspFrames) > +{ > + *dspFrames = 0; > + > + return NO_ERROR; > +} > + > } // namespace android > -- > 1.7.0.4 > > On Jun 24, 10:34 am, DJ_Steve <steve103...@gmail.com> wrote: > > > > > hello again all, I'm working on porting froyo to n900 (trying to keep > > to porting the latest version) but for some reason (could be due to > > using the eclair alsa files since their are no froyo ones) i get the > > following build errors? any ideas how I can fix ? > > > target arm C++: libaudio <= hardware/alsa_sound/AudioHardwareALSA.cpp > > hardware/alsa_sound/AudioHardwareALSA.cpp: In member function 'virtual > > android::AudioStreamOut* > > android::AudioHardwareALSA::openOutputStream(uint32_t, int*, > > uint32_t*, uint32_t*, android::status_t*)': > > hardware/alsa_sound/AudioHardwareALSA.cpp:190: error: cannot allocate > > an object of abstract type 'android::AudioStreamOutALSA' > > hardware/alsa_sound/AudioHardwareALSA.h:163: note: because the > > following virtual functions are pure within > > 'android::AudioStreamOutALSA': > > hardware/libhardware_legacy/include/hardware_legacy/ > > AudioHardwareInterface.h:104: note: virtual android::status_t > > android::AudioStreamOut::getRenderPosition(uint32_t*) > > hardware/alsa_sound/AudioHardwareALSA.cpp: In member function 'virtual > > android::AudioStreamIn* > > android::AudioHardwareALSA::openInputStream(uint32_t, int*, uint32_t*, > > uint32_t*, android::status_t*, > > android::AudioSystem::audio_in_acoustics)': > > hardware/alsa_sound/AudioHardwareALSA.cpp:230: error: cannot allocate > > an object of abstract type 'android::AudioStreamInALSA' > > hardware/alsa_sound/AudioHardwareALSA.h:207: note: because the > > following virtual functions are pure within > > 'android::AudioStreamInALSA': > > hardware/libhardware_legacy/include/hardware_legacy/ > > AudioHardwareInterface.h:166: note: virtual unsigned int > > android::AudioStreamIn::getInputFramesLost() const > > make: *** [out/target/product/n900/obj/SHARED_LIBRARIES/ > > libaudio_intermediates/AudioHardwareALSA.o] Error 1 > > make: *** Waiting for unfinished jobs.... -- unsubscribe: android-porting+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-porting