Commit graph

15 commits

Author SHA1 Message Date
Eric Laurent
188c223c7d Fix hw module lookup order.
Make sure hw_get_module_by_class() first scans /vendor/lib/hw
and then /system/lib/hw so that vendor specific modules override
default ones.

Change-Id: Iaec61c3b4bb6fde202acb4412aaec3b318cc1cbd
2011-05-27 15:46:27 -07:00
Dima Zavin
54921de415 libhardware: add concept of module classes
Needed for things like audio and audio effects. Provides a
new interface to loading modules named 'hw_get_module_by_class'.
This takes two parameters: 'class_id' and 'instance' which are
used to construct the filename for the module to be loaded. If
instance is NULL, then this function acts identically to
hw_get_module where 'class_id' == 'id' (and in fact the latter
implemented exactly this way).

For audio, this new mechanism allows us to load multiple audio
interfaces by doing:

hw_get_module_by_class("audio", "primary", &module);
hw_get_module_by_class("audio", "a2dp", &module);
hw_get_module_by_class("audio", "usb", &module);
...

In the future we will likely want to add the ability to load a set of
module instances based on a config file, which will have a standard
syntax and the mechanism will be provided by libhardware.

Change-Id: I9976cc6d59a85a414b18e7b398a36edfbce4abd8
Signed-off-by: Dima Zavin <dima@android.com>
2011-04-18 15:59:13 -07:00
Brian Swetland
e755bd4038 add /vendor support
Search /vendor/lib/hw/... as well as /system/lib/hw/... for hal modules.

Change-Id: I1aecafcc884e11b2f17edf28e8c8ca2926184807
2010-09-19 03:41:01 -07:00
David 'Digit' Turner
2b811adcbc Fix a bug that prevents default hw modules to be loaded properly.
The problem was a simple typo, which prevented modules like
/system/lib/hw/lib<module>.default.so from being loaded even if they
were found on the system.

This is required to fix the generic build when run in the emulator.
2009-09-25 02:31:47 -07:00
Mathias Agopian
cab816fb6d fix a bug I introduced recently where the "default" HAL module would not be loaded. 2009-09-24 15:11:04 -07:00
Mathias Agopian
3f03e98dbf don't loas inapropriate HAL for a device.
Once we have determined which HAL to load and checked that the library exists,
we should not try to load another (more generic) HAL if a failure occurs, because
this could result in different process using different HALs for the same component.
Instead we just return an error.
2009-09-21 22:50:44 -07:00
Mathias Agopian
6d125da5d2 generic gralloc HAL doesn't need to support partial updates using msm7k specific ioctl. 2009-07-15 15:12:13 -07:00
Mathias Agopian
8c4ab1fa14 pmem allocator in gralloc. enabled for all surfaces. currently it uses a lot more address space than needed. 2009-06-16 18:16:38 -07:00
Mathias Agopian
a8a75166a2 Integrate from //sandbox/mathias/donut/...@145728
SurfaceFlinger rework for new EGL driver model support.
2009-04-10 14:24:31 -07:00
The Android Open Source Project
8232b50d98 auto import from //branches/cupcake_rel/...@138607 2009-03-13 13:04:23 -07:00
The Android Open Source Project
f53ebec387 auto import from //depot/cupcake/@135843 2009-03-03 19:32:14 -08:00
The Android Open Source Project
d51f49a11d auto import from //depot/cupcake/@135843 2009-03-03 18:28:48 -08:00
The Android Open Source Project
b5d75924d7 auto import from //branches/cupcake/...@132569 2009-02-20 07:38:32 -08:00
The Android Open Source Project
0100d517b1 auto import from //branches/cupcake/...@126645 2009-01-15 16:12:12 -08:00
The Android Open Source Project
51704bed79 Code drop from //branches/cupcake/...@124589 2008-12-17 18:05:50 -08:00