Thanks Vishwanath for your suggestions.

Indeed that's waht I've tried already. I found several compile errors after
placing the folders below in the JB tree. Compilation errors came from
files in hardware/alsa_sound which are also present in JB tree under
hardware/libhardware_legacy/audio, but with a significantly modified
content. Specifically, these ones:

 audio_hw_hal.cpp
 AudioPolicyCompatClient.cpp
 AudioPolicyCompatClient.h
 audio_policy_hal.cpp

So, my first idea was to pull these files from JB
hardware/libhardware_legacy/audio and replace those in hardware/alsa_sound.

This makes the build succeed, but during boot of mediaserver a crash is
issued while loading my alsa.<device>.so.

I know it isn't easy to help without going into the source code details,
but what I was looking for is the approach to follow (which Vishwanath
sketched below - thanks - but a bit more details would help) and try to
understand why some files are found both in my custom hardware/alsa_sound
and in hardware/libhardware_legacy/audio.

BTW - the project code is hosted here:

https://github.com/Renesas-EMEV2  (on branch "emev-4.1")


On Fri, Nov 9, 2012 at 4:45 AM, Vishwanath Hegde <vnhe...@gmail.com> wrote:

> The approach here would be to place the folders below in respective
> folders of JB project tree.
> external/alsa-lib
> hardware/alsa_sound
>
> Now don't expect things to work as is. Fix the bugs whatever gets thrown
> when you compile it. Check the hardware/alsa_sound folder for the place
> where the hardware gets called. There you may have some audio hardware
> specific change to take care. This is the portion of code which leads to
> crash when you integrate ALSA from some where else.
>
> Then check the basic commands of ALSA Amixer commands from adb shell to
> play /pause/ stop a bare wave file. If that works you are done with your
> ALSA integration.
> If you encounter any issues, you should suspect your integration, as ALSA
> is pretty much independent code, where  you may not have issues.Another
> place where you might have to debug is audio policy related files.
>
>
>
> On Thu, Nov 8, 2012 at 7:12 PM, ffxx68 <ffum...@googlemail.com> wrote:
>
>> Hi
>>
>> I'm trying to port a ICS implementation of ALSA audio to JB, or a tablet
>> device, under this project:
>>
>> Mainly, I have the following to integrate (which I have the patch for
>> ICS):
>>
>> external/alsa-lib
>> hardware/alsa_sound
>>
>> plus some other smaller fix around, but I want to understand first of all
>> what to do with these two first.
>>
>> For example, I have the some files with the same names in both
>> hardware/alsa_sound and hardware/libhardware_legacy/
>> **audio (from AOSP), but their content is very different in the two
>> locations.
>>
>> If I keep the ones from hardware/alsa_sound, build fails.
>> If I copy them from hardware/libhardware_legacy/audio to
>> hardware/alsa_sound, I can build but I get a crash during boot.
>>
>> Which one should I keep and compile?
>> Once compiled, which libraries should I use from alsa_sound or
>> libhardware_legacy/audio?
>>
>> Basically, I don't know the approach to follow, with the ALSA
>> integration. I couldn't find any guide, or tutorial, so any help in that
>> sense is welcome too.
>>
>> Thanks in advance
>> Fabio
>>
>> --
>> unsubscribe: android-porting+unsubscr...@googlegroups.com
>> website: http://groups.google.com/group/android-porting
>>
>
>

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-porting

Reply via email to