diff options
-rw-r--r-- | audio/silence.wav | bin | 0 -> 326686 bytes | |||
-rw-r--r-- | camera/exynos_camera.c | 8 | ||||
-rw-r--r-- | common.mk | 3 | ||||
-rwxr-xr-x | configs/media_codecs.xml | 23 | ||||
-rw-r--r-- | configs/media_profiles.xml | 124 | ||||
-rw-r--r-- | recovery/recovery_keys.c | 36 | ||||
-rwxr-xr-x | rootdir/init.smdk4x12.rc | 7 |
7 files changed, 55 insertions, 146 deletions
diff --git a/audio/silence.wav b/audio/silence.wav Binary files differnew file mode 100644 index 0000000..5fe31d2 --- /dev/null +++ b/audio/silence.wav diff --git a/camera/exynos_camera.c b/camera/exynos_camera.c index 7e551dc..6ef2dc6 100644 --- a/camera/exynos_camera.c +++ b/camera/exynos_camera.c @@ -1086,9 +1086,11 @@ int exynos_camera_params_apply(struct exynos_camera *exynos_camera, int force) } } - rc = exynos_v4l2_s_ctrl(exynos_camera, 0, V4L2_CID_CAMERA_FOCUS_MODE, focus_mode); - if (rc < 0) - ALOGE("%s: Unable to set focus mode", __func__); + if (focus_mode != exynos_camera->focus_mode || force) { + rc = exynos_v4l2_s_ctrl(exynos_camera, 0, V4L2_CID_CAMERA_FOCUS_MODE, focus_mode); + if (rc < 0) + ALOGE("%s: Unable to set focus mode", __func__); + } exynos_camera->focus_mode = focus_mode; sprintf(exynos_camera->raw_focus_mode, "%s", focus_mode_string); @@ -37,7 +37,8 @@ PRODUCT_COPY_FILES := \ # Audio PRODUCT_COPY_FILES += \ $(COMMON_PATH)/configs/audio_effects.conf:system/etc/audio_effects.conf \ - $(COMMON_PATH)/configs/audio_policy.conf:system/etc/audio_policy.conf + $(COMMON_PATH)/configs/audio_policy.conf:system/etc/audio_policy.conf \ + $(COMMON_PATH)/audio/silence.wav:system/etc/sound/silence.wav # Camera FW PRODUCT_COPY_FILES += \ diff --git a/configs/media_codecs.xml b/configs/media_codecs.xml index ddebc53..92e1915 100755 --- a/configs/media_codecs.xml +++ b/configs/media_codecs.xml @@ -94,6 +94,29 @@ Only the three quirks included above are recognized at this point: <MediaCodec name="OMX.google.h264.decoder" type="video/avc" /> <MediaCodec name="OMX.google.vp8.decoder" type="video/x-vnd.on2.vp8" /> <MediaCodec name="OMX.google.vp9.decoder" type="video/x-vnd.on2.vp9" /> + + <!-- ffmpeg audio codecs --> + <MediaCodec name="OMX.ffmpeg.ra.decoder" type="audio/vnd.rn-realaudio"/> + <MediaCodec name="OMX.ffmpeg.flac.decoder" type="audio/flac"/> + <MediaCodec name="OMX.ffmpeg.mp2.decoder" type="audio/mpeg-L2"/> + <MediaCodec name="OMX.ffmpeg.ac3.decoder" type="audio/ac3"/> + <MediaCodec name="OMX.ffmpeg.ape.decoder" type="audio/x-ape"/> + <MediaCodec name="OMX.ffmpeg.dts.decoder" type="audio/vnd.dts"/> + <MediaCodec name="OMX.ffmpeg.atrial.decoder" type="audio/ffmpeg"/> + + <!-- ffmpeg video codecs --> + <MediaCodec name="OMX.ffmpeg.mpeg2v.decoder" type="video/mpeg2"/> + <MediaCodec name="OMX.ffmpeg.h263.decoder" type="video/3gpp"/> + <MediaCodec name="OMX.ffmpeg.mpeg4.decoder" type="video/mp4v-es"/> + <MediaCodec name="OMX.ffmpeg.wmv.decoder" type="video/x-ms-wmv"/> + <MediaCodec name="OMX.ffmpeg.rv.decoder" type="video/vnd.rn-realvideo"/> + <MediaCodec name="OMX.ffmpeg.h264.decoder" type="video/avc"/> + <MediaCodec name="OMX.ffmpeg.vc1.decoder" type="video/vc1"/> + <MediaCodec name="OMX.ffmpeg.flv1.decoder" type="video/x-flv"/> + <MediaCodec name="OMX.ffmpeg.divx.decoder" type="video/divx"/> + <MediaCodec name="OMX.ffmpeg.hevc.decoder" type="video/hevc"/> + <MediaCodec name="OMX.ffmpeg.vtrial.decoder" type="video/ffmpeg"/> + </Decoders> <Encoders> diff --git a/configs/media_profiles.xml b/configs/media_profiles.xml index 2de9af9..4dc5f0d 100644 --- a/configs/media_profiles.xml +++ b/configs/media_profiles.xml @@ -25,6 +25,7 @@ <!ATTLIST EncoderProfile quality (timelapse1080p|timelapse720p|timelapse480p|timelapsehigh|timelapselow|480p|qcif|high|low) #REQUIRED> <!ATTLIST EncoderProfile fileFormat (mp4|3gp) #REQUIRED> <!ATTLIST EncoderProfile duration (30|60) #REQUIRED> + <!ATTLIST EncoderProfile cameraId (0|1) #REQUIRED> <!ELEMENT Video EMPTY> <!ATTLIST Video codec (h264|h263|m4v) #REQUIRED> <!ATTLIST Video bitRate CDATA #REQUIRED> @@ -89,25 +90,12 @@ <!-- Back Camera --> <CamcorderProfiles cameraId="0"> - <EncoderProfile quality="low" fileFormat="mp4" duration="30"> + <EncoderProfile quality="qvga" fileFormat="mp4" duration="30"> <Video codec="h264" bitRate="384000" - width="176" - height="144" - frameRate="30" /> - - <Audio codec="aac" - bitRate="128000" - sampleRate="48000" - channels="2" /> - </EncoderProfile> - - <EncoderProfile quality="qcif" fileFormat="mp4" duration="30"> - <Video codec="h264" - bitRate="384000" - width="176" - height="144" - frameRate="30" /> + width="320" + height="240" + frameRate="15" /> <Audio codec="aac" bitRate="128000" @@ -154,40 +142,6 @@ channels="2" /> </EncoderProfile> - <EncoderProfile quality="timelapselow" fileFormat="3gp" duration="30"> - <Video codec="h264" - bitRate="384000" - width="176" - height="144" - frameRate="30" /> - - <!-- - The Audio part of the profile will not be used since time lapse mode - does not capture audio - --> - <Audio codec="aac" - bitRate="128000" - sampleRate="48000" - channels="1" /> - </EncoderProfile> - - <EncoderProfile quality="timelapsehigh" fileFormat="mp4" duration="30"> - <Video codec="h264" - bitRate="17000000" - width="1920" - height="1080" - frameRate="30" /> - - <!-- - The Audio part of the profile will not be used since time lapse mode - does not capture audio - --> - <Audio codec="aac" - bitRate="128000" - sampleRate="48000" - channels="1" /> - </EncoderProfile> - <EncoderProfile quality="timelapseqcif" fileFormat="3gp" duration="30"> <Video codec="h264" bitRate="384000" @@ -266,38 +220,12 @@ <!-- Front Camera --> <CamcorderProfiles cameraId="1"> - <EncoderProfile quality="low" fileFormat="3gp" duration="30"> - <Video codec="h264" - bitRate="384000" - width="176" - height="144" - frameRate="30" /> - - <Audio codec="aac" - bitRate="128000" - sampleRate="48000" - channels="1" /> - </EncoderProfile> - - <EncoderProfile quality="high" fileFormat="mp4" duration="30"> - <Video codec="h264" - bitRate="3078000" - width="640" - height="480" - frameRate="30" /> - - <Audio codec="aac" - bitRate="128000" - sampleRate="48000" - channels="1" /> - </EncoderProfile> - - <EncoderProfile quality="qcif" fileFormat="3gp" duration="30"> + <EncoderProfile quality="qvga" fileFormat="3gp" duration="30"> <Video codec="h264" bitRate="384000" - width="176" - height="144" - frameRate="30" /> + width="320" + height="240" + frameRate="15" /> <Audio codec="aac" bitRate="128000" @@ -318,40 +246,6 @@ channels="1" /> </EncoderProfile> - <EncoderProfile quality="timelapselow" fileFormat="3gp" duration="30"> - <Video codec="h264" - bitRate="384000" - width="176" - height="144" - frameRate="30" /> - - <!-- - The Audio part of the profile will not be used since time lapse mode - does not capture audio - --> - <Audio codec="aac" - bitRate="128000" - sampleRate="48000" - channels="1" /> - </EncoderProfile> - - <EncoderProfile quality="timelapsehigh" fileFormat="mp4" duration="30"> - <Video codec="h264" - bitRate="3078000" - width="640" - height="480" - frameRate="30" /> - - <!-- - The Audio part of the profile will not be used since time lapse mode - does not capture audio - --> - <Audio codec="aac" - bitRate="128000" - sampleRate="48000" - channels="1" /> - </EncoderProfile> - <EncoderProfile quality="timelapseqcif" fileFormat="3gp" duration="30"> <Video codec="h264" bitRate="384000" diff --git a/recovery/recovery_keys.c b/recovery/recovery_keys.c index 528a796..f9a1072 100644 --- a/recovery/recovery_keys.c +++ b/recovery/recovery_keys.c @@ -4,19 +4,6 @@ #include "common.h" #include "extendedcommands.h" - -int device_toggle_display(volatile char* key_pressed, int key_code) { - int alt = key_pressed[KEY_LEFTALT] || key_pressed[KEY_RIGHTALT]; - if (alt && key_code == KEY_L) - return 1; - // allow toggling of the display if the correct key is pressed, and the display toggle is allowed or the display is currently off - if (ui_get_showing_back_button()) { - return 0; - //return get_allow_toggle_display() && (key_code == KEY_HOME || key_code == KEY_MENU || key_code == KEY_END); - } - return get_allow_toggle_display() && (key_code == KEY_HOMEPAGE || key_code == KEY_MENU || key_code == KEY_POWER || key_code == KEY_END); -} - int device_handle_key(int key_code, int visible) { if (visible) { switch (key_code) { @@ -24,37 +11,32 @@ int device_handle_key(int key_code, int visible) { case KEY_DOWN: case KEY_VOLUMEDOWN: return HIGHLIGHT_DOWN; + case KEY_MENU: return NO_ACTION; + case KEY_LEFTSHIFT: case KEY_UP: case KEY_VOLUMEUP: return HIGHLIGHT_UP; + case KEY_HOMEPAGE: - if (ui_get_showing_back_button()) { - return SELECT_ITEM; - } - if (!get_allow_toggle_display()) - return GO_BACK; - break; case KEY_POWER: - if (ui_get_showing_back_button()) { - return SELECT_ITEM; - } - if (!get_allow_toggle_display()) - return GO_BACK; - break; case KEY_LEFTBRACE: case KEY_ENTER: case BTN_MOUSE: case KEY_CAMERA: case KEY_F21: - case KEY_SEND: + case KEY_SEND: + return SELECT_ITEM; + case KEY_END: case KEY_BACKSPACE: case KEY_SEARCH: case KEY_BACK: - return GO_BACK; + if (!ui_root_menu) { + return GO_BACK; + } } } diff --git a/rootdir/init.smdk4x12.rc b/rootdir/init.smdk4x12.rc index 023e943..1c1515e 100755 --- a/rootdir/init.smdk4x12.rc +++ b/rootdir/init.smdk4x12.rc @@ -502,3 +502,10 @@ service iprenew_bt-pan /system/bin/dhcpcd -n service macloader /system/bin/macloader class main oneshot + +# Workaround for broken incall audio +service bootsnd /system/bin/tinyplay /system/etc/sound/silence.wav -D 0 -d 0 -p 880 + class late_start + user root + group audio + oneshot |