Error Building Eclair for a generic ARM target w/ ALSA

21 views
Skip to first unread message

whiplash

unread,
Nov 20, 2009, 10:25:49 PM11/20/09
to android-porting
Hey everyone, I've been trying to build Eclair with ALSA support and
here's what I've done so far:

Initialized the repo in a directory

Created a file in the .repo directory in the project's root called
local_manifest.xml with the following contents:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="platform/external/alsa-lib" path="external/alsa-lib"/>
<project name="platform/hardware/alsa_sound" path="hardware/
alsa_sound"/>
</manifest>

Ran repo sync, and then edited build/target/board/generic/
BoardConfig.mk to look like this:
# config.mk
#
# Product-specific compile-time definitions.
#

# The generic product target doesn't have any hardware-specific
pieces.
TARGET_NO_BOOTLOADER := true
TARGET_NO_KERNEL := true
TARGET_CPU_ABI := armeabi
#HAVE_HTC_AUDIO_DRIVER := true
#BOARD_USES_GENERIC_AUDIO := true
BOARD_USES_ALSA_AUDIO := true
BUILD_WITH_ALSA_UTILS := true

Then I ran make and got these errors. What am I missing? Any
suggestions?

hardware/alsa_sound/AudioHardwareALSA.cpp: At global scope:
hardware/alsa_sound/AudioHardwareALSA.cpp:73: error: 'audio_routes' in
class 'android::AudioSystem' does not name a type
hardware/alsa_sound/AudioHardwareALSA.cpp:131: error: 'audio_routes'
does not name a type
hardware/alsa_sound/AudioHardwareALSA.cpp:139: error: 'ROUTE_ALL' is
not a member of 'android::AudioSystem'
hardware/alsa_sound/AudioHardwareALSA.cpp:140: error: 'ROUTE_ALL' is
not a member of 'android::AudioSystem'
hardware/alsa_sound/AudioHardwareALSA.cpp:146: error: 'ROUTE_EARPIECE'
is not a member of 'android::AudioSystem'
hardware/alsa_sound/AudioHardwareALSA.cpp:147: error: 'ROUTE_EARPIECE'
is not a member of 'android::AudioSystem'
hardware/alsa_sound/AudioHardwareALSA.cpp:150: error: 'ROUTE_SPEAKER'
is not a member of 'android::AudioSystem'
hardware/alsa_sound/AudioHardwareALSA.cpp:151: error: 'ROUTE_SPEAKER'
is not a member of 'android::AudioSystem'
hardware/alsa_sound/AudioHardwareALSA.cpp:154: error:
'ROUTE_BLUETOOTH_SCO' is not a member of 'android::AudioSystem'
hardware/alsa_sound/AudioHardwareALSA.cpp:155: error:
'ROUTE_BLUETOOTH_SCO' is not a member of 'android::AudioSystem'
hardware/alsa_sound/AudioHardwareALSA.cpp:158: error: 'ROUTE_HEADSET'
is not a member of 'android::AudioSystem'
hardware/alsa_sound/AudioHardwareALSA.cpp:159: error: 'ROUTE_HEADSET'
is not a member of 'android::AudioSystem'
hardware/alsa_sound/AudioHardwareALSA.cpp:162: error:
'ROUTE_BLUETOOTH_A2DP' is not a member of 'android::AudioSystem'
hardware/alsa_sound/AudioHardwareALSA.cpp:163: error:
'ROUTE_BLUETOOTH_A2DP' is not a member of 'android::AudioSystem'
hardware/alsa_sound/AudioHardwareALSA.cpp:172: error: expected type-
specifier before 'audio_routes'
hardware/alsa_sound/AudioHardwareALSA.cpp:172: error: expected '>'
before 'audio_routes'
hardware/alsa_sound/AudioHardwareALSA.cpp:172: error: expected '('
before 'audio_routes'
hardware/alsa_sound/AudioHardwareALSA.cpp:172: error: 'audio_routes'
was not declared in this scope
hardware/alsa_sound/AudioHardwareALSA.cpp:172: error: expected ')'
before '}' token
hardware/alsa_sound/AudioHardwareALSA.cpp:173: error: expected type-
specifier before 'audio_routes'
hardware/alsa_sound/AudioHardwareALSA.cpp:173: error: expected '>'
before 'audio_routes'
hardware/alsa_sound/AudioHardwareALSA.cpp:173: error: expected '('
before 'audio_routes'
hardware/alsa_sound/AudioHardwareALSA.cpp:173: error: 'audio_routes'
was not declared in this scope
hardware/alsa_sound/AudioHardwareALSA.cpp:173: error: expected ')'
before '}' token
hardware/alsa_sound/AudioHardwareALSA.cpp: In member function 'virtual
android::status_t android::AudioHardwareALSA::setVoiceVolume(float)':
hardware/alsa_sound/AudioHardwareALSA.cpp:221: error: 'ROUTE_EARPIECE'
is not a member of 'android::AudioSystem'
hardware/alsa_sound/AudioHardwareALSA.cpp: In member function 'virtual
android::AudioStreamOut* android::AudioHardwareALSA::openOutputStream
(int, int, uint32_t, android::status_t*)':
hardware/alsa_sound/AudioHardwareALSA.cpp:248: error: cannot allocate
an object of abstract type 'android::AudioStreamOutALSA'
hardware/alsa_sound/AudioHardwareALSA.h:154: note: because the
following virtual functions are pure within
'android::AudioStreamOutALSA':
hardware/libhardware_legacy/include/hardware_legacy/
AudioHardwareInterface.h:54: note: virtual uint32_t
android::AudioStreamOut::channels() const
hardware/libhardware_legacy/include/hardware_legacy/
AudioHardwareInterface.h:79: note: virtual android::status_t
android::AudioStreamOut::setVolume(float, float)
hardware/libhardware_legacy/include/hardware_legacy/
AudioHardwareInterface.h:99: note: virtual android::status_t
android::AudioStreamOut::setParameters(const android::String8&)
hardware/libhardware_legacy/include/hardware_legacy/
AudioHardwareInterface.h:100: note: virtual android::String8
android::AudioStreamOut::getParameters(const android::String8&)
hardware/alsa_sound/AudioHardwareALSA.cpp:256: error: 'mRoutes' was
not declared in this scope
hardware/alsa_sound/AudioHardwareALSA.cpp: In member function 'virtual
android::AudioStreamIn* android::AudioHardwareALSA::openInputStream
(int, int, int, uint32_t, android::status_t*,
android::AudioSystem::audio_in_acoustics)':
hardware/alsa_sound/AudioHardwareALSA.cpp:274: error: 'DEFAULT_INPUT'
is not a member of 'android::AudioRecord'
hardware/alsa_sound/AudioHardwareALSA.cpp:275: error:
'NUM_INPUT_SOURCES' is not a member of 'android::AudioRecord'
hardware/alsa_sound/AudioHardwareALSA.cpp:287: error: cannot allocate
an object of abstract type 'android::AudioStreamInALSA'
hardware/alsa_sound/AudioHardwareALSA.h:198: note: because the
following virtual functions are pure within
'android::AudioStreamInALSA':
hardware/libhardware_legacy/include/hardware_legacy/
AudioHardwareInterface.h:113: note: virtual uint32_t
android::AudioStreamIn::sampleRate() const
hardware/libhardware_legacy/include/hardware_legacy/
AudioHardwareInterface.h:119: note: virtual uint32_t
android::AudioStreamIn::channels() const
hardware/libhardware_legacy/include/hardware_legacy/
AudioHardwareInterface.h:154: note: virtual android::status_t
android::AudioStreamIn::setParameters(const android::String8&)
hardware/libhardware_legacy/include/hardware_legacy/
AudioHardwareInterface.h:155: note: virtual android::String8
android::AudioStreamIn::getParameters(const android::String8&)
hardware/alsa_sound/AudioHardwareALSA.cpp:294: error: 'mRoutes' was
not declared in this scope
hardware/alsa_sound/AudioHardwareALSA.cpp: In member function 'virtual
android::status_t android::AudioHardwareALSA::doRouting()':
hardware/alsa_sound/AudioHardwareALSA.cpp:310: error: 'mRoutes' was
not declared in this scope
hardware/alsa_sound/AudioHardwareALSA.cpp: In member function 'virtual
android::status_t android::AudioHardwareALSA::setMicMute(bool)':
hardware/alsa_sound/AudioHardwareALSA.cpp:316: error: 'ROUTE_EARPIECE'
is not a member of 'android::AudioSystem'
hardware/alsa_sound/AudioHardwareALSA.cpp: In member function 'virtual
android::status_t android::AudioHardwareALSA::getMicMute(bool*)':
hardware/alsa_sound/AudioHardwareALSA.cpp:324: error: 'ROUTE_EARPIECE'
is not a member of 'android::AudioSystem'
hardware/alsa_sound/AudioHardwareALSA.cpp: In constructor
'android::ALSAMixer::ALSAMixer()':
hardware/alsa_sound/AudioHardwareALSA.cpp:1249: error: 'struct
android::alsa_properties_t' has no member named 'routes'
hardware/alsa_sound/AudioHardwareALSA.cpp: In destructor 'virtual
android::ALSAMixer::~ALSAMixer()':
hardware/alsa_sound/AudioHardwareALSA.cpp:1297: error: 'struct
android::alsa_properties_t' has no member named 'routes'
hardware/alsa_sound/AudioHardwareALSA.cpp: In member function
'android::status_t android::ALSAMixer::setVolume(uint32_t, float)':
hardware/alsa_sound/AudioHardwareALSA.cpp:1347: error: 'struct
android::alsa_properties_t' has no member named 'routes'
hardware/alsa_sound/AudioHardwareALSA.cpp:1348: error: 'struct
android::alsa_properties_t' has no member named 'routes'
hardware/alsa_sound/AudioHardwareALSA.cpp: In member function
'android::status_t android::ALSAMixer::setGain(uint32_t, float)':
hardware/alsa_sound/AudioHardwareALSA.cpp:1370: error: 'struct
android::alsa_properties_t' has no member named 'routes'
hardware/alsa_sound/AudioHardwareALSA.cpp:1371: error: 'struct
android::alsa_properties_t' has no member named 'routes'
hardware/alsa_sound/AudioHardwareALSA.cpp: In member function
'android::status_t android::ALSAMixer::setCaptureMuteState(uint32_t,
bool)':
hardware/alsa_sound/AudioHardwareALSA.cpp:1393: error: 'struct
android::alsa_properties_t' has no member named 'routes'
hardware/alsa_sound/AudioHardwareALSA.cpp:1394: error: 'struct
android::alsa_properties_t' has no member named 'routes'
hardware/alsa_sound/AudioHardwareALSA.cpp: In member function
'android::status_t android::ALSAMixer::getCaptureMuteState(uint32_t,
bool*)':
hardware/alsa_sound/AudioHardwareALSA.cpp:1419: error: 'struct
android::alsa_properties_t' has no member named 'routes'
hardware/alsa_sound/AudioHardwareALSA.cpp:1420: error: 'struct
android::alsa_properties_t' has no member named 'routes'
hardware/alsa_sound/AudioHardwareALSA.cpp: In member function
'android::status_t android::ALSAMixer::setPlaybackMuteState(uint32_t,
bool)':
hardware/alsa_sound/AudioHardwareALSA.cpp:1434: error: 'struct
android::alsa_properties_t' has no member named 'routes'
hardware/alsa_sound/AudioHardwareALSA.cpp:1435: error: 'struct
android::alsa_properties_t' has no member named 'routes'
hardware/alsa_sound/AudioHardwareALSA.cpp: In member function
'android::status_t android::ALSAMixer::getPlaybackMuteState(uint32_t,
bool*)':
hardware/alsa_sound/AudioHardwareALSA.cpp:1460: error: 'struct
android::alsa_properties_t' has no member named 'routes'
hardware/alsa_sound/AudioHardwareALSA.cpp:1461: error: 'struct
android::alsa_properties_t' has no member named 'routes'
make: *** [out/target/product/generic/obj/SHARED_LIBRARIES/
libaudio_intermediates/AudioHardwareALSA.o] Error 1

whiplash

unread,
Nov 23, 2009, 4:01:19 PM11/23/09
to android-porting
One other thing: I had also added <project path="external/alsa-utils"
name="platform/external/alsa-utils"/> to the local_manifest.xml file
and still got the same errors.

paj...@163.com

unread,
Nov 29, 2009, 9:00:49 PM11/29/09
to android-porting
I have get the same error with you.
waiting for someone to fix it..

On 11月21日, 上午11时25分, whiplash <whiplash...@gmail.com> wrote:
> Hey everyone, I've been trying to buildEclairwithALSAsupport and
> android::alsa_properties_t' has no member named 'routes' ...
>
> 阅读更多 >>

whiplash

unread,
Dec 1, 2009, 1:59:55 PM12/1/09
to android-porting
If I had to make an educated guess, I'd say that the alsa stuff isn't
updated for 2.0
> ...
>
> read more >>

Fasil

unread,
Dec 11, 2009, 4:03:55 AM12/11/09
to android-porting
This problem is there in Donut too.. As Alsa is completely integrated
only with cupcake...After that alsa is getting from the master
branch... I m getting the same error in donut..
Looking around for the fix.
> ...
>
> read more >>

Sean McNeil

unread,
Dec 11, 2009, 4:13:11 AM12/11/09
to android...@googlegroups.com
Fasil,

Fasil wrote:
> This problem is there in Donut too.. As Alsa is completely integrated
> only with cupcake...After that alsa is getting from the master
> branch... I m getting the same error in donut..
> Looking around for the fix.
>

This is completely untrue. You must not know what you are doing with
respect to using the proper repo and branch. The korg repo has sources
for the donut, eclair, and master branches. You have to use the
appropriate branch. From the error messages below, I would say that
either korg isn't being used as the repository or the donut branch
sources are being used to compile for eclair.

Some minor bugs still exist for the latest code, but they are being
addressed. It all certainly compiles and works on a number of platforms
when the appropriate branch is used.

Cheers,
Sean

zp

unread,
Dec 11, 2009, 6:10:39 PM12/11/09
to android-porting
Hi Sean:

Are you saying that ALSA is working with Eclair now? no major
problems?
Where should I get the ALSA package?

On Dec 11, 1:13 am, Sean McNeil <seanmcne...@gmail.com> wrote:
> Fasil,
>
> Fasil wrote:
> > This problem is there in Donut too.. AsAlsais completely integrated
> > only with cupcake...After thatalsais getting from the master
> > branch... I m getting the same error in donut..
> > Looking around for the fix.
>
> This is completely untrue. You must not know what you are doing with
> respect to using the proper repo and branch. The korg repo has sources
> for the donut, eclair, and master branches. You have to use the
> appropriate branch. From the error messages below, I would say that
> either korg isn't being used as the repository or the donut branch
> sources are being used to compile for eclair.
>
> Some minor bugs still exist for the latest code, but they are being
> addressed. It all certainly compiles and works on a number of platforms
> when the appropriate branch is used.
>
> Cheers,
> Sean
>
> > On Dec 1, 11:59 pm, whiplash <whiplash...@gmail.com> wrote:
>
> >> If I had to make an educated guess, I'd say that thealsastuff isn't
> >> updated for 2.0
>
> >> On Nov 29, 9:00 pm, "paj...@163.com" <paj...@163.com> wrote:
>
> >>> I have get the same error with you.
> >>> waiting for someone to fix it..
>
> ...
>
> read more »

Sean McNeil

unread,
Dec 11, 2009, 6:49:29 PM12/11/09
to android...@googlegroups.com
Yes, that is what I am saying. It is in the korg repo under both the
eclair and master branches.

Fasil

unread,
Dec 14, 2009, 6:01:00 AM12/14/09
to android-porting
Hi Sean,

you are right I found out the correct version of Alsa for donut and
took the snapshot from the gitweb of android..

http://android.git.kernel.org/?p=platform/external/alsa-lib.git;a=tree;h=refs/heads/donut;hb=donut

I took the snapshot from the above links and follow similar way for
alsa-utils and hardware/alsa_sound.

Now the ALSA for donut is compiling properly..

PS : Adding alsa lines to manifest.xml is fetching from the master
branch and not from donut, even after specifying -b donut while
initializing git.

Regards
Fasil
> ...
>
> read more »

Sean McNeil

unread,
Dec 14, 2009, 6:07:57 AM12/14/09
to android...@googlegroups.com
Fasil wrote:
> Hi Sean,
>
> you are right I found out the correct version of Alsa for donut and
> took the snapshot from the gitweb of android..
>
> http://android.git.kernel.org/?p=platform/external/alsa-lib.git;a=tree;h=refs/heads/donut;hb=donut
>
> I took the snapshot from the above links and follow similar way for
> alsa-utils and hardware/alsa_sound.
>
> Now the ALSA for donut is compiling properly..
>
> PS : Adding alsa lines to manifest.xml is fetching from the master
> branch and not from donut, even after specifying -b donut while
> initializing git.
>

Check your .repo/manifest.xml and see what the default revision is set
to. You can add it to your local_manifest.xml (and you might also want
to make sure you use the right repo) as:

<manifest>
<project path="external/alsa-lib" name="platform/external/alsa-lib"
revision="donut" remote="korg" />
<project path="external/alsa-utils" name="platform/external/alsa-utils"
revision="donut" remote="korg" />
<project path="hardware/alsa_sound" name="platform/hardware/alsa_sound"
revision="donut" remote="korg" />
</manifest>

but I'm not sure why you don't have donut as your default revision when
you use -b donut.

Cheers,
Sean
Reply all
Reply to author
Forward
0 new messages