diff options
-rw-r--r-- | libc/arch-arm/bionic/memcpy.S | 20 | ||||
-rw-r--r-- | libc/kernel/common/linux/msm_audio.h | 34 |
2 files changed, 40 insertions, 14 deletions
diff --git a/libc/arch-arm/bionic/memcpy.S b/libc/arch-arm/bionic/memcpy.S index fcb58cd..1e8f5f6 100644 --- a/libc/arch-arm/bionic/memcpy.S +++ b/libc/arch-arm/bionic/memcpy.S @@ -1,6 +1,7 @@ /* * Copyright (C) 2008 The Android Open Source Project * All rights reserved. + * Copyright (c) 2009, Code Aurora Forum. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -123,7 +124,7 @@ cached_aligned32: blo less_than_32_left /* - * We preload a cache-line up to 64 bytes ahead. On the 926, this will + * We preload a cache-line up to 32 bytes ahead. On the 926, this will * stall only until the requested world is fetched, but the linefill * continues in the the background. * While the linefill is going, we write our previous cache-line @@ -139,24 +140,15 @@ cached_aligned32: * */ - // Align the preload register to a cache-line because the cpu does - // "critical word first" (the first word requested is loaded first). - bic r12, r1, #0x1F - add r12, r12, #64 - 1: ldmia r1!, { r4-r11 } - PLD (r12, #64) + PLD [r12, #32] subs r2, r2, #32 - // NOTE: if r12 is more than 64 ahead of r1, the following ldrhi - // for ARM9 preload will not be safely guarded by the preceding subs. - // When it is safely guarded the only possibility to have SIGSEGV here - // is because the caller overstates the length. - ldrhi r3, [r12], #32 /* cheap ARM9 preload */ stmia r0!, { r4-r11 } - bhs 1b + blo 2f + b 1b - add r2, r2, #32 +2: add r2, r2, #32 diff --git a/libc/kernel/common/linux/msm_audio.h b/libc/kernel/common/linux/msm_audio.h index a632cb4..14e4a8b 100644 --- a/libc/kernel/common/linux/msm_audio.h +++ b/libc/kernel/common/linux/msm_audio.h @@ -33,10 +33,15 @@ #define AUDIO_PLAY_DTMF _IOW(AUDIO_IOCTL_MAGIC, 12, unsigned) #define AUDIO_GET_EVENT _IOR(AUDIO_IOCTL_MAGIC, 13, unsigned) #define AUDIO_ABORT_GET_EVENT _IOW(AUDIO_IOCTL_MAGIC, 14, unsigned) +#define AUDIO_REGISTER_PMEM _IOW(AUDIO_IOCTL_MAGIC, 15, unsigned) +#define AUDIO_DEREGISTER_PMEM _IOW(AUDIO_IOCTL_MAGIC, 16, unsigned) +#define AUDIO_ASYNC_WRITE _IOW(AUDIO_IOCTL_MAGIC, 17, unsigned) +#define AUDIO_ASYNC_READ _IOW(AUDIO_IOCTL_MAGIC, 18, unsigned) #define AUDIO_GET_PCM_CONFIG _IOR(AUDIO_IOCTL_MAGIC, 30, unsigned) #define AUDIO_SET_PCM_CONFIG _IOW(AUDIO_IOCTL_MAGIC, 31, unsigned) #define AUDIO_SWITCH_DEVICE _IOW(AUDIO_IOCTL_MAGIC, 32, unsigned) #define AUDIO_SET_MUTE _IOW(AUDIO_IOCTL_MAGIC, 33, unsigned) +#define AUDIO_GET_STREAM_INFO _IOR(AUDIO_IOCTL_MAGIC, 34, struct msm_audio_bitstream_info) #define AUDIO_MAX_COMMON_IOCTL_NUM 100 @@ -82,6 +87,18 @@ struct msm_audio_stats { uint32_t unused[2]; }; +struct msm_audio_pmem_info { + int fd; + void *vaddr; +}; + +struct msm_audio_aio_buf { + void *buf_addr; + uint32_t buf_len; + uint32_t data_len; + void *private_data; +}; + #define SND_IOCTL_MAGIC 's' #define SND_MUTE_UNMUTED 0 @@ -130,8 +147,25 @@ struct msm_audio_pcm_config { #define AUDIO_EVENT_SUSPEND 0 #define AUDIO_EVENT_RESUME 1 +#define AUDIO_EVENT_WRITE_DONE 2 +#define AUDIO_EVENT_READ_DONE 3 +#define AUDIO_EVENT_STREAM_INFO 4 + +#define AUDIO_CODEC_TYPE_MP3 0 +#define AUDIO_CODEC_TYPE_AAC 1 + +struct msm_audio_bitstream_info { + uint32_t codec_type; + uint32_t chan_info; + uint32_t sample_rate; + uint32_t bit_stream_info; + uint32_t bit_rate; + uint32_t unused[3]; +}; union msm_audio_event_payload { + struct msm_audio_aio_buf aio_buf; + struct msm_audio_bitstream_info stream_info; int reserved; }; |