htcleo: add support for custom DSP like from desire.
For normal use don't activate it, you need some other stuff for testing.
This commit is contained in:
parent
e3698da382
commit
a236d1a6e3
@ -231,6 +231,7 @@ CONFIG_MSM_DEBUG_UART_NONE=y
|
||||
# CONFIG_MACH_MAHIMAHI is not set
|
||||
# CONFIG_MACH_BRAVO is not set
|
||||
CONFIG_MACH_HTCLEO=y
|
||||
# CONFIG_USING_BRAVOS_DSP is not set
|
||||
# CONFIG_HTCLEO_BLINK_AT_BOOT is not set
|
||||
# CONFIG_MACH_PASSIONC is not set
|
||||
# CONFIG_MACH_BRAVOC is not set
|
||||
@ -1649,7 +1650,7 @@ CONFIG_INOTIFY_USER=y
|
||||
# CONFIG_QUOTA is not set
|
||||
# CONFIG_AUTOFS_FS is not set
|
||||
# CONFIG_AUTOFS4_FS is not set
|
||||
# CONFIG_FUSE_FS is not set
|
||||
CONFIG_FUSE_FS=m
|
||||
|
||||
#
|
||||
# Caches
|
||||
@ -1722,7 +1723,7 @@ CONFIG_NETWORK_FILESYSTEMS=y
|
||||
# CONFIG_NFS_FS is not set
|
||||
# CONFIG_NFSD is not set
|
||||
# CONFIG_SMB_FS is not set
|
||||
# CONFIG_CIFS is not set
|
||||
CONFIG_CIFS=m
|
||||
# CONFIG_NCP_FS is not set
|
||||
# CONFIG_CODA_FS is not set
|
||||
# CONFIG_AFS_FS is not set
|
||||
@ -1732,7 +1733,7 @@ CONFIG_NETWORK_FILESYSTEMS=y
|
||||
#
|
||||
# CONFIG_PARTITION_ADVANCED is not set
|
||||
CONFIG_MSDOS_PARTITION=y
|
||||
CONFIG_NLS=y
|
||||
CONFIG_NLS=m
|
||||
CONFIG_NLS_DEFAULT="iso8859-1"
|
||||
CONFIG_NLS_CODEPAGE_437=y
|
||||
# CONFIG_NLS_CODEPAGE_737 is not set
|
||||
@ -1771,7 +1772,7 @@ CONFIG_NLS_ISO8859_1=y
|
||||
# CONFIG_NLS_ISO8859_15 is not set
|
||||
# CONFIG_NLS_KOI8_R is not set
|
||||
# CONFIG_NLS_KOI8_U is not set
|
||||
# CONFIG_NLS_UTF8 is not set
|
||||
CONFIG_NLS_UTF8=m
|
||||
# CONFIG_DLM is not set
|
||||
|
||||
#
|
||||
|
@ -282,6 +282,13 @@ config MACH_HTCLEO
|
||||
help
|
||||
Select this to support the HTC Leo device
|
||||
|
||||
config USING_BRAVOS_DSP
|
||||
depends on MACH_HTCLEO
|
||||
default n
|
||||
bool "Bravos DSP for Leo"
|
||||
help
|
||||
Enable this if you use Bravos DSP on a Leo
|
||||
|
||||
config HTCLEO_BLINK_AT_BOOT
|
||||
depends on MACH_HTCLEO
|
||||
default n
|
||||
|
@ -59,7 +59,11 @@ obj-$(CONFIG_MSM_ADSP) += qdsp5/
|
||||
obj-$(CONFIG_MSM_ADSP_COMP) += qdsp5_comp/
|
||||
obj-$(CONFIG_MSM7KV2_AUDIO) += qdsp5v2/
|
||||
ifdef CONFIG_MSM_AMSS_VERSION_1550
|
||||
ifdef CONFIG_USING_BRAVOS_DSP
|
||||
obj-$(CONFIG_QSD_AUDIO) += qdsp6/
|
||||
else
|
||||
obj-$(CONFIG_QSD_AUDIO) += qdsp6_1550/
|
||||
endif
|
||||
else
|
||||
obj-$(CONFIG_QSD_AUDIO) += qdsp6/
|
||||
endif
|
||||
|
@ -28,7 +28,11 @@
|
||||
#include <mach/msm_rpcrouter.h>
|
||||
#include <mach/msm_iomap.h>
|
||||
#include <mach/htc_acoustic_qsd.h>
|
||||
#if defined(CONFIG_USING_BRAVOS_DSP)
|
||||
#include <mach/msm_qdsp6_audio.h>
|
||||
#else
|
||||
#include <mach/msm_qdsp6_audio_1550.h>
|
||||
#endif
|
||||
|
||||
#include "smd_private.h"
|
||||
#include "dex_comm.h"
|
||||
|
@ -15,7 +15,11 @@
|
||||
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/delay.h>
|
||||
#if defined(CONFIG_USING_BRAVOS_DSP)
|
||||
#include <mach/msm_qdsp6_audio.h>
|
||||
#else
|
||||
#include <mach/msm_qdsp6_audio_1550.h>
|
||||
#endif
|
||||
#include <mach/htc_acoustic_qsd.h>
|
||||
#include <asm/gpio.h>
|
||||
#include <mach/gpio.h>
|
||||
|
@ -20,7 +20,11 @@
|
||||
|
||||
#define MSM_EBI1_BANK0_BASE 0x11800000
|
||||
//#define MSM_EBI1_BANK0_SIZE 0x1E800000 /* 488MB */
|
||||
#if defined(CONFIG_USING_BRAVOS_DSP)
|
||||
#define MSM_EBI1_BANK0_SIZE 0x1CFC0000 /* 488MB - DESIRE DSP - 0x00040000 RAM CONSOLE*/
|
||||
#else
|
||||
#define MSM_EBI1_BANK0_SIZE 0x1E7C0000 /* 488MB - 0x00040000 RAM CONSOLE*/
|
||||
#endif
|
||||
|
||||
/* Don't change that */
|
||||
#define MSM_SMI_BASE 0x00000000
|
||||
|
@ -168,7 +168,12 @@
|
||||
// but is required to make early_ramconsole work.
|
||||
// These values must match the values used in
|
||||
// the defconfig.
|
||||
|
||||
#define MSM_RAM_CONSOLE_BASE IOMEM(0xF9100000)
|
||||
#if defined(CONFIG_USING_BRAVOS_DSP)
|
||||
#define MSM_RAM_CONSOLE_PHYS 0x2E7C0000
|
||||
#else
|
||||
#define MSM_RAM_CONSOLE_PHYS 0x2FFC0000
|
||||
#endif
|
||||
#define MSM_RAM_CONSOLE_SIZE 0x00040000
|
||||
|
||||
|
@ -33,9 +33,7 @@ struct audio_client {
|
||||
int dsp_buf; /* next buffer the DSP will touch */
|
||||
int running;
|
||||
int session;
|
||||
|
||||
int open_done;
|
||||
int open_status;
|
||||
|
||||
wait_queue_head_t wait;
|
||||
struct dal_client *client;
|
||||
|
||||
@ -93,7 +91,6 @@ int q6audio_set_tx_mute(int mute);
|
||||
int q6audio_reinit_acdb(char* filename);
|
||||
int q6audio_update_acdb(uint32_t id_src, uint32_t id_dst);
|
||||
int q6audio_set_rx_volume(int level);
|
||||
int q6audio_set_rx_mute(int mute);
|
||||
int q6audio_set_stream_volume(struct audio_client *ac, int vol);
|
||||
|
||||
struct q6audio_analog_ops {
|
||||
|
114
arch/arm/mach-msm/include/mach/msm_qdsp6_audio_1550.h
Normal file
114
arch/arm/mach-msm/include/mach/msm_qdsp6_audio_1550.h
Normal file
@ -0,0 +1,114 @@
|
||||
/* arch/arm/mach-msm/include/mach/msm_qdsp6_audio.h
|
||||
*
|
||||
* Copyright (C) 2009 Google, Inc.
|
||||
* Author: Brian Swetland <swetland@google.com>
|
||||
*
|
||||
* This software is licensed under the terms of the GNU General Public
|
||||
* License version 2, as published by the Free Software Foundation, and
|
||||
* may be copied, distributed, and modified under those terms.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _MACH_MSM_QDSP6_Q6AUDIO_
|
||||
#define _MACH_MSM_QDSP6_Q6AUDIO_
|
||||
|
||||
#define AUDIO_FLAG_READ 0
|
||||
#define AUDIO_FLAG_WRITE 1
|
||||
|
||||
struct audio_buffer {
|
||||
dma_addr_t phys;
|
||||
void *data;
|
||||
uint32_t size;
|
||||
uint32_t used; /* 1 = CPU is waiting for DSP to consume this buf */
|
||||
};
|
||||
|
||||
struct audio_client {
|
||||
struct audio_buffer buf[2];
|
||||
int cpu_buf; /* next buffer the CPU will touch */
|
||||
int dsp_buf; /* next buffer the DSP will touch */
|
||||
int running;
|
||||
int session;
|
||||
|
||||
int open_done;
|
||||
int open_status;
|
||||
wait_queue_head_t wait;
|
||||
struct dal_client *client;
|
||||
|
||||
int cb_status;
|
||||
uint32_t flags;
|
||||
};
|
||||
|
||||
#define Q6_HW_HANDSET 0
|
||||
#define Q6_HW_HEADSET 1
|
||||
#define Q6_HW_SPEAKER 2
|
||||
#define Q6_HW_TTY 3
|
||||
#define Q6_HW_BT_SCO 4
|
||||
#define Q6_HW_BT_A2DP 5
|
||||
|
||||
#define Q6_HW_COUNT 6
|
||||
|
||||
struct q6_hw_info {
|
||||
int min_gain;
|
||||
int max_gain;
|
||||
};
|
||||
|
||||
/* Obtain a 16bit signed, interleaved audio channel of the specified
|
||||
* rate (Hz) and channels (1 or 2), with two buffers of bufsz bytes.
|
||||
*/
|
||||
struct audio_client *q6audio_open_pcm(uint32_t bufsz, uint32_t rate,
|
||||
uint32_t channels, uint32_t flags,
|
||||
uint32_t acdb_id);
|
||||
|
||||
struct audio_client *q6voice_open(uint32_t flags, uint32_t acdb_id);
|
||||
|
||||
struct audio_client *q6audio_open_mp3(uint32_t bufsz, uint32_t rate,
|
||||
uint32_t channels, uint32_t acdb_id);
|
||||
|
||||
struct audio_client *q6fm_open(void);
|
||||
|
||||
struct audio_client *q6audio_open_aac(uint32_t bufsz, uint32_t rate,
|
||||
uint32_t flags, void *data, uint32_t acdb_id);
|
||||
|
||||
struct audio_client *q6audio_open_qcelp(uint32_t bufsz, uint32_t rate,
|
||||
void *data, uint32_t acdb_id);
|
||||
|
||||
int q6audio_close(struct audio_client *ac);
|
||||
int q6voice_close(struct audio_client *ac);
|
||||
int q6audio_mp3_close(struct audio_client *ac);
|
||||
int q6fm_close(struct audio_client *ac);
|
||||
int q6audio_aac_close(struct audio_client *ac);
|
||||
int q6audio_qcelp_close(struct audio_client *ac);
|
||||
|
||||
int q6audio_read(struct audio_client *ac, struct audio_buffer *ab);
|
||||
int q6audio_write(struct audio_client *ac, struct audio_buffer *ab);
|
||||
int q6audio_async(struct audio_client *ac);
|
||||
|
||||
int q6audio_do_routing(uint32_t route, uint32_t acdb_id);
|
||||
int q6audio_set_tx_mute(int mute);
|
||||
int q6audio_reinit_acdb(char* filename);
|
||||
int q6audio_update_acdb(uint32_t id_src, uint32_t id_dst);
|
||||
int q6audio_set_rx_volume(int level);
|
||||
int q6audio_set_rx_mute(int mute);
|
||||
int q6audio_set_stream_volume(struct audio_client *ac, int vol);
|
||||
|
||||
struct q6audio_analog_ops {
|
||||
void (*init)(void);
|
||||
void (*speaker_enable)(int en);
|
||||
void (*headset_enable)(int en);
|
||||
void (*receiver_enable)(int en);
|
||||
void (*bt_sco_enable)(int en);
|
||||
void (*int_mic_enable)(int en);
|
||||
void (*ext_mic_enable)(int en);
|
||||
void (*i2s_enable)(int en);
|
||||
int (*get_rx_vol)(uint8_t hw, int level);
|
||||
};
|
||||
|
||||
void q6audio_register_analog_ops(struct q6audio_analog_ops *ops);
|
||||
void q6audio_set_acdb_file(char* filename);
|
||||
|
||||
#endif
|
@ -27,7 +27,12 @@
|
||||
*/
|
||||
|
||||
#define ACDB_DAL_DEVICE 0x02000069
|
||||
|
||||
#if defined(CONFIG_MACH_HTCLEO)
|
||||
#define ACDB_DAL_PORT "SMD_DAL00"
|
||||
#else
|
||||
#define ACDB_DAL_PORT "SMD_DAL_AM_AUD"
|
||||
#endif
|
||||
|
||||
#define ACDB_OP_IOCTL DAL_OP_FIRST_DEVICE_API
|
||||
|
||||
|
@ -32,7 +32,11 @@
|
||||
#include "dal.h"
|
||||
|
||||
#define ADIE_DAL_DEVICE 0x02000029
|
||||
#if defined(CONFIG_MACH_HTCLEO)
|
||||
#define ADIE_DAL_PORT "SMD_DAL00"
|
||||
#else
|
||||
#define ADIE_DAL_PORT "SMD_DAL_AM_AUD"
|
||||
#endif
|
||||
|
||||
enum {
|
||||
ADIE_OP_GET_NUM_PATHS = DAL_OP_FIRST_DEVICE_API,
|
||||
|
@ -342,7 +342,9 @@ static int audio_ioctl(struct audio_client *ac, void *ptr, uint32_t len)
|
||||
hdr->src = AUDIO_ADDR(ac->session, 0, AUDIO_DOMAIN_MODEM);
|
||||
hdr->context = ac->session;
|
||||
ac->cb_status = -EBUSY;
|
||||
pr_info("DAL CALL OPCODE: %d\n", hdr->opcode);
|
||||
r = dal_call(ac->client, AUDIO_OP_CONTROL, 5, ptr, len, &tmp, sizeof(tmp));
|
||||
pr_info("DAL CALL RET: %d\n", r);
|
||||
if (r != 4)
|
||||
return -EIO;
|
||||
if (!wait_event_timeout(ac->wait, (ac->cb_status != -EBUSY), 5*HZ)) {
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include <linux/wait.h>
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/msm_audio.h>
|
||||
#include <mach/msm_qdsp6_audio.h>
|
||||
#include <mach/msm_qdsp6_audio_1550.h>
|
||||
|
||||
#define BUFSZ (4096)
|
||||
#define DMASZ (BUFSZ * 2)
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/msm_audio.h>
|
||||
|
||||
#include <mach/msm_qdsp6_audio.h>
|
||||
#include <mach/msm_qdsp6_audio_1550.h>
|
||||
#include <mach/htc_acoustic_qsd.h>
|
||||
|
||||
#define BUFSZ (0)
|
||||
|
@ -19,6 +19,12 @@
|
||||
|
||||
struct dal_client;
|
||||
|
||||
struct dal_info {
|
||||
uint32_t size;
|
||||
uint32_t version;
|
||||
char name[32];
|
||||
};
|
||||
|
||||
typedef void (*dal_event_func_t)(void *data, int len, void *cookie);
|
||||
|
||||
struct dal_client *dal_attach(uint32_t device_id, const char *name, dal_event_func_t func, void *cookie);
|
||||
|
@ -31,7 +31,7 @@
|
||||
|
||||
#include "dal_audio_format.h"
|
||||
#include "dal.h"
|
||||
#include <mach/msm_qdsp6_audio.h>
|
||||
#include <mach/msm_qdsp6_audio_1550.h>
|
||||
|
||||
#define AUDIO_DAL_DEVICE 0x02000028
|
||||
#define AUDIO_DAL_PORT "DSP_DAL_AQ_AUD"
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
#include <linux/msm_audio.h>
|
||||
|
||||
#include <mach/msm_qdsp6_audio.h>
|
||||
#include <mach/msm_qdsp6_audio_1550.h>
|
||||
#include "dal_audio.h"
|
||||
|
||||
#define BUFSZ (8192)
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
#include <linux/msm_audio.h>
|
||||
|
||||
#include <mach/msm_qdsp6_audio.h>
|
||||
#include <mach/msm_qdsp6_audio_1550.h>
|
||||
|
||||
#define BUFSZ (4096)
|
||||
#define DMASZ (BUFSZ * 2)
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
#include <linux/msm_audio.h>
|
||||
|
||||
#include <mach/msm_qdsp6_audio.h>
|
||||
#include <mach/msm_qdsp6_audio_1550.h>
|
||||
#include "dal_audio.h"
|
||||
|
||||
#if 0
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include "dal_audio_format.h"
|
||||
#include "dal_acdb.h"
|
||||
#include "dal_adie.h"
|
||||
#include <mach/msm_qdsp6_audio.h>
|
||||
#include <mach/msm_qdsp6_audio_1550.h>
|
||||
#include <linux/msm_audio.h>
|
||||
#include <mach/htc_acoustic_qsd.h>
|
||||
#include <mach/msm_audio_qcp.h>
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include <linux/wait.h>
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/msm_audio.h>
|
||||
#include <mach/msm_qdsp6_audio.h>
|
||||
#include <mach/msm_qdsp6_audio_1550.h>
|
||||
#include <mach/msm_audio_qcp.h>
|
||||
|
||||
#define BUFSZ (734)
|
||||
|
Loading…
x
Reference in New Issue
Block a user