Failed to open /dev/mem from Anroid opencore framework

by Ling Wan » Fri, 07 Aug 2009 02:36:50 GMT


Sponsored Links
 Hi,

We try to open "/dev/mem" from user space, within the opencore multimedia 
framework. The purpose is to allow access to hardware register of a 
peripheral, as well as map chunks of DMA safe memory between kernel and user 
space.

 int fd = open("/dev/mem", O_RDONLY);

 While we can open and use "/dev/mem" under busybox (2.6.27 kernel and we have 
root permission), we got file descriptor -1 , when it's done from the opencore 
framework, where device driver is supposed to be added. We tried changing 777 
on "/dev/mem", no improvement.

What is the likely reason for that ? Is this due to Android's security
 restriction or some other reason? (We didn't enable SELinux option)

 And how do we solve it, or any alternative on sharing buffer between user / 
kernel space ? Some pointers / links would be great.

Thanks!




      
--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---



Other Threads

1. R.drawable.my_icon Missing

Hi,

For some strange reason one of my drawable resources will not get
written to R.drawable!?!

The icon i am trying to use is in the correct directory, has a legal
name, but when i compile i get:

target Java: MobilePowerSurvey (out/target/common/obj/APPS/
MobilePowerSurvey_intermediates/classes)
packages/apps/MobilePowerSurvey/src/com/mobilepowersurvey/
MobilePowerSurvey.java:174: cannot find symbol
symbol  : variable close
location: class com.mobilepowersurvey.R.drawable
                .setIcon(R.drawable.close);

I have done exactly the same thing with many other icons and it all
compiles fine. My only concern is that there is a limit to the amount
of resources you can add, but i haven't noticed this documented any
where, does anyone know if this is the case? or if i could be doing
something stupid and not noticing it!?!

Cheers,

Liam
--~--~---------~--~----~------------~-------~--~----~

2. How to configure the sampling rate/period while audio capture?

I am working on a VOIP based application. I need to capture the audio
from mic at 8000 hz sampling rate, get the 20msec packets, encode and
send the packets over the network.

Can somebody tell me how to configure the mic for the desired sampling
rate?
--~--~---------~--~----~------------~-------~--~----~

3. How to capture audio data from mic into a buffer?

4. issue with playing .wma file

5. Using ADB in VirtualBox

6. ARCHOS 5: MediaPlayer create method returns null

7. Programmatically get maximum heap size?