diff options
-rwxr-xr-x | audio/audio_hw.c | 30 | ||||
-rw-r--r-- | device.mk | 3 | ||||
-rw-r--r-- | kernel | bin | 3773036 -> 3773576 bytes | |||
-rwxr-xr-x | media_profiles.xml | 4 | ||||
-rw-r--r-- | overlay/frameworks/base/core/res/res/values/config.xml | 5 |
5 files changed, 28 insertions, 14 deletions
diff --git a/audio/audio_hw.c b/audio/audio_hw.c index 99c746b..e70f767 100755 --- a/audio/audio_hw.c +++ b/audio/audio_hw.c @@ -108,6 +108,8 @@ #define PORT_VIBRA 4 #define PORT_MODEM 5 #define PORT_MM_LP 6 +#define PORT_SPDIF 9 +#define PORT_HDMI 0 #define RESAMPLER_BUFFER_SIZE 8192 @@ -596,12 +598,12 @@ static int start_call(struct tuna_audio_device *adev) return 0; -err_open_dl: - pcm_close(adev->pcm_modem_dl); - adev->pcm_modem_dl = NULL; err_open_ul: pcm_close(adev->pcm_modem_ul); adev->pcm_modem_ul = NULL; +err_open_dl: + pcm_close(adev->pcm_modem_dl); + adev->pcm_modem_dl = NULL; return -ENOMEM; } @@ -982,6 +984,7 @@ static int start_output_stream(struct tuna_stream_out *out) { struct tuna_audio_device *adev = out->dev; unsigned int card = CARD_TUNA_DEFAULT; + unsigned int port = PORT_MM; adev->active_output = out; @@ -989,10 +992,15 @@ static int start_output_stream(struct tuna_stream_out *out) /* FIXME: only works if only one output can be active at a time */ select_output_device(adev); } - /* in the case of multiple devices, this will cause use of HDMI only */ - if(adev->devices & AUDIO_DEVICE_OUT_AUX_DIGITAL) + /* S/PDIF takes priority over HDMI audio. In the case of multiple + * devices, this will cause use of S/PDIF or HDMI only */ + if (adev->devices & AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET) + port = PORT_SPDIF; + else if(adev->devices & AUDIO_DEVICE_OUT_AUX_DIGITAL) { card = CARD_OMAP4_HDMI; - out->pcm = pcm_open(card, PORT_MM, PCM_OUT, &out->config); + port = PORT_HDMI; + } + out->pcm = pcm_open(card, port, PCM_OUT, &out->config); if (!pcm_is_ready(out->pcm)) { LOGE("cannot open pcm_out driver: %s", pcm_get_error(out->pcm)); pcm_close(out->pcm); @@ -1246,9 +1254,11 @@ static int out_set_parameters(struct audio_stream *stream, const char *kvpairs) force_input_standby = true; } /* force standby if moving to/from HDMI */ - if ((val & AUDIO_DEVICE_OUT_AUX_DIGITAL) ^ - (adev->devices & AUDIO_DEVICE_OUT_AUX_DIGITAL)) - do_output_standby(out); + if (((val & AUDIO_DEVICE_OUT_AUX_DIGITAL) ^ + (adev->devices & AUDIO_DEVICE_OUT_AUX_DIGITAL)) || + ((val & AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET) ^ + (adev->devices & AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET))) + do_output_standby(out); } adev->devices &= ~AUDIO_DEVICE_OUT_ALL; adev->devices |= val; @@ -1334,7 +1344,7 @@ static ssize_t out_write(struct audio_stream_out *stream, const void* buffer, if (out->echo_reference != NULL) { struct echo_reference_buffer b; b.raw = (void *)buffer; - b.frame_count = out_frames; + b.frame_count = in_frames; get_playback_delay(out, out_frames, &b); out->echo_reference->write(out->echo_reference, &b); @@ -142,8 +142,7 @@ ifneq ($(TARGET_BUILD_VARIANT),user) system/extras/bugmailer/send_bug:system/bin/send_bug endif -# XXX: should be including hd-phone-dalvik-heap.mk or something? -$(call inherit-product, frameworks/base/build/tablet-dalvik-heap.mk) +$(call inherit-product, frameworks/base/build/phone-xhdpi-1024-dalvik-heap.mk) $(call inherit-product-if-exists, vendor/nxp/pn544/nxp-pn544-fw-vendor.mk) $(call inherit-product, hardware/ti/omap4xxx/omap4.mk) Binary files differdiff --git a/media_profiles.xml b/media_profiles.xml index 19dbda7..28cb2c2 100755 --- a/media_profiles.xml +++ b/media_profiles.xml @@ -88,7 +88,7 @@ <!-- Each camcorder profile defines a set of predefined configuration parameters --> <CamcorderProfiles cameraId="0"> - <EncoderProfile quality="qvga" fileFormat="mp4" duration="60"> + <EncoderProfile quality="qvga" fileFormat="3gp" duration="60"> <Video codec="m4v" bitRate="128000" width="320" @@ -222,7 +222,7 @@ <CamcorderProfiles cameraId="1"> - <EncoderProfile quality="qvga" fileFormat="mp4" duration="60"> + <EncoderProfile quality="qvga" fileFormat="3gp" duration="60"> <Video codec="m4v" bitRate="128000" width="320" diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml index d42f644..55aac19 100644 --- a/overlay/frameworks/base/core/res/res/values/config.xml +++ b/overlay/frameworks/base/core/res/res/values/config.xml @@ -193,4 +193,9 @@ specified --> <string name="default_wallpaper_component">com.android.phasebeam/.PhaseBeamWallpaper</string> + <!-- Vibrator pattern for feedback about touching a virtual key --> + <integer-array name="config_virtualKeyVibePattern"> + <item>10</item> + </integer-array> + </resources> |