alanorth / android_device_huawei_u8150

Huawei IDEOS U8150 build configuration for CyanogenMod 7
9 stars 6 forks source link

Video recording using CM7 camera is broken #4

Closed alanorth closed 12 years ago

alanorth commented 12 years ago

Not sure when this broke, but a user mentioned it on the message board and I just checked in a personal build of mine and it's true; video recording using the CM7 camera isn't working. Here's the relevant parts of adb logcat:

V/videocamera( 731): initializeRecorder W/MediaProfiles( 126): could not find media config xml file V/videocamera( 731): Current camera video filename: /mnt/sdcard/DCIM/Camera/VID_20111102_234009.3gp I/MediaRecorderJNI( 731): prepare: surface=0x170b28 (identity=12) E/AudioHardwareMSM72XX( 126): Cannot open PreProc Ctl device I/AudioHardwareMSM72XX( 126): do input routing device 40000 I/AudioHardwareMSM72XX( 126): Routing audio to Speakerphone D/AudioHardwareMSM72XX( 126): doAudioRouteOrMute() device 6, mMode 0, mMicMute 1, mBuiltinMicSelected 1, muted E/AudioRecord( 126): Could not get audio input for record source 5 E/StagefrightRecorder( 126): audio source is not initialized I/MPEG4Writer( 126): The mp4 file will not be streamable. E/MediaRecorder( 731): start failed: -2147483648 E/videocamera( 731): Could not start media recorder.

psyke83 commented 12 years ago

The problem is that /dev/msm_preproc_ctl has the wrong permissions. I noticed that libaudio now requires the proper permissions on this device due to my recent change in adding the AutoVolumeControl.txt file. The Sound Recorder will also be affected.

My suspicion is that your phone is not properly parsing the /ueventd.huawei.rc file. Verify this by checking the permissions of /dev/msm_* on your running phone. If some of them are still using root permission (especially the problematic device, /dev/msm_preproc_ctl), I assume you'll need to rename the file back to ueventd.u8150.rc.

tilal6991 renamed ueventd.u8150.rc to ueventd.huawei.rc due to one of my commits for my phone. My U8160 it wasn't parsing the ueventd.u8160.rc file properly for some reason (even though /proc/cmdline properly lists androidboot.hardware=u8160). That doesn't mean it's necessary/will work on your phone. I suggest you rename it back to the original ueventd.u8150.rc, but keep my changes that tilal6991 kanged.

alanorth commented 12 years ago

In a build I compiled last night... you're certainly right, the permissions are messed up.

$ adb shell ls -l /dev/msm* crw-rw---- 1 system audio 10, 49 Nov 3 07:48 /dev/msm_aac crw------- 1 root root 10, 50 Nov 3 07:48 /dev/msm_amrnb crw------- 1 root root 10, 48 Nov 3 07:48 /dev/msm_amrnb_in crw------- 1 root root 10, 45 Nov 3 07:48 /dev/msm_amrwb crw------- 1 root root 10, 52 Nov 3 07:48 /dev/msm_evrc crw-rw---- 1 system audio 10, 53 Nov 3 07:48 /dev/msm_mp3 crw-rw---- 1 system audio 10, 56 Nov 3 07:48 /dev/msm_pcm_ctl crw------- 1 root root 10, 46 Nov 3 07:48 /dev/msm_pcm_dec crw-rw---- 1 system audio 10, 55 Nov 3 07:48 /dev/msm_pcm_in crw-rw---- 1 system audio 10, 57 Nov 3 07:48 /dev/msm_pcm_out crw------- 1 root root 10, 54 Nov 3 07:48 /dev/msm_preproc_ctl crw------- 1 root root 10, 51 Nov 3 07:48 /dev/msm_qcelp crw-rw---- 1 system audio 10, 43 Nov 3 07:48 /dev/msm_snd crw------- 1 root root 10, 42 Nov 3 07:48 /dev/msm_voicememo crw------- 1 root root 10, 47 Nov 3 07:48 /dev/msm_wma crw------- 1 root root 10, 44 Nov 3 07:48 /dev/msm_wmapro

I'm not on my compile box, but manually changing these to system:audio and 660 indeed fixes video recording: http://youtu.be/EopPXKX2ZKY

I'll get to the bottom of the ueventd errors tonight and then try to submit to CM gerrit, as that's a fairly-straightforward fix.

*btw, my device tree is behind tilal's, as I'm trying to clean up commits for merging to CM. So I rebased my work on the official CM u8150 tree and will backport individual commits from my and tilal's repos.

alanorth commented 12 years ago

Funny enough, this commit (which I actually committed!), sets the /dev/msm* stuff to the proper permissions but this change wasn't on my local branch:

https://github.com/tilal6991/android_device_huawei_u8150/commit/87f576e108bffc6829b7428acd119b95b4e2c250

There are lots of commits in my and tilal's repos which I haven't merged yet because I know that now we have to THINK before committing... gerrit code review means no untested patches, etc. ;)

alanorth commented 12 years ago

Cool, I figured out how to upload to Gerrit: http://review.cyanogenmod.com/#change,9770