ASoc: msm: Add machine driver for 8064.

Change-Id: Ie1babbf5a3c690b81dd5265e7f3773dc247711a2
Signed-off-by: Bharath Ramachandramurthy <bramacha@codeaurora.org>
This commit is contained in:
Bharath Ramachandramurthy
2011-11-30 12:08:42 -08:00
parent 8d3c9501d1
commit b8e797f7cb
6 changed files with 1346 additions and 22 deletions

View File

@@ -466,27 +466,28 @@ static struct platform_device *common_devices[] __initdata = {
#ifdef CONFIG_HW_RANDOM_MSM
&apq8064_device_rng,
#endif
&msm_pcm,
&msm_pcm_routing,
&msm_cpudai0,
&msm_cpudai1,
&msm_cpudai_hdmi_rx,
&msm_cpudai_bt_rx,
&msm_cpudai_bt_tx,
&msm_cpudai_fm_rx,
&msm_cpudai_fm_tx,
&msm_cpu_fe,
&msm_stub_codec,
&msm_voice,
&msm_voip,
&msm_lpa_pcm,
&msm_cpudai_afe_01_rx,
&msm_cpudai_afe_01_tx,
&msm_cpudai_afe_02_rx,
&msm_cpudai_afe_02_tx,
&msm_pcm_afe,
&msm_cpudai_auxpcm_rx,
&msm_cpudai_auxpcm_tx,
&apq_pcm,
&apq_pcm_routing,
&apq_cpudai0,
&apq_cpudai1,
&apq_cpudai_hdmi_rx,
&apq_cpudai_bt_rx,
&apq_cpudai_bt_tx,
&apq_cpudai_fm_rx,
&apq_cpudai_fm_tx,
&apq_cpu_fe,
&apq_stub_codec,
&apq_voice,
&apq_voip,
&apq_lpa_pcm,
&apq_pcm_hostless,
&apq_cpudai_afe_01_rx,
&apq_cpudai_afe_01_tx,
&apq_cpudai_afe_02_rx,
&apq_cpudai_afe_02_tx,
&apq_pcm_afe,
&apq_cpudai_auxpcm_rx,
&apq_cpudai_auxpcm_tx,
};
static struct platform_device *sim_devices[] __initdata = {

View File

@@ -22,6 +22,8 @@
#include <mach/usbdiag.h>
#include <mach/msm_sps.h>
#include <mach/dma.h>
#include <sound/msm-dai-q6.h>
#include <sound/apr_audio.h>
#include "clock.h"
#include "devices.h"
#include "msm_watchdog.h"
@@ -206,6 +208,134 @@ struct platform_device apq8064_device_qup_spi_gsbi5 = {
.resource = resources_qup_spi_gsbi5,
};
struct platform_device apq_pcm = {
.name = "msm-pcm-dsp",
.id = -1,
};
struct platform_device apq_pcm_routing = {
.name = "msm-pcm-routing",
.id = -1,
};
struct platform_device apq_cpudai0 = {
.name = "msm-dai-q6",
.id = 0x4000,
};
struct platform_device apq_cpudai1 = {
.name = "msm-dai-q6",
.id = 0x4001,
};
struct platform_device apq_cpudai_hdmi_rx = {
.name = "msm-dai-q6",
.id = 8,
};
struct platform_device apq_cpudai_bt_rx = {
.name = "msm-dai-q6",
.id = 0x3000,
};
struct platform_device apq_cpudai_bt_tx = {
.name = "msm-dai-q6",
.id = 0x3001,
};
struct platform_device apq_cpudai_fm_rx = {
.name = "msm-dai-q6",
.id = 0x3004,
};
struct platform_device apq_cpudai_fm_tx = {
.name = "msm-dai-q6",
.id = 0x3005,
};
/*
* Machine specific data for AUX PCM Interface
* which the driver will be unware of.
*/
struct msm_dai_auxpcm_pdata apq_auxpcm_rx_pdata = {
.clk = "pcm_clk",
.mode = AFE_PCM_CFG_MODE_PCM,
.sync = AFE_PCM_CFG_SYNC_INT,
.frame = AFE_PCM_CFG_FRM_256BPF,
.quant = AFE_PCM_CFG_QUANT_LINEAR_NOPAD,
.slot = 0,
.data = AFE_PCM_CFG_CDATAOE_MASTER,
.pcm_clk_rate = 2048000,
};
struct platform_device apq_cpudai_auxpcm_rx = {
.name = "msm-dai-q6",
.id = 2,
.dev = {
.platform_data = &apq_auxpcm_rx_pdata,
},
};
struct platform_device apq_cpudai_auxpcm_tx = {
.name = "msm-dai-q6",
.id = 3,
};
struct platform_device apq_cpu_fe = {
.name = "msm-dai-fe",
.id = -1,
};
struct platform_device apq_stub_codec = {
.name = "msm-stub-codec",
.id = 1,
};
struct platform_device apq_voice = {
.name = "msm-pcm-voice",
.id = -1,
};
struct platform_device apq_voip = {
.name = "msm-voip-dsp",
.id = -1,
};
struct platform_device apq_lpa_pcm = {
.name = "msm-pcm-lpa",
.id = -1,
};
struct platform_device apq_pcm_hostless = {
.name = "msm-pcm-hostless",
.id = -1,
};
struct platform_device apq_cpudai_afe_01_rx = {
.name = "msm-dai-q6",
.id = 0xE0,
};
struct platform_device apq_cpudai_afe_01_tx = {
.name = "msm-dai-q6",
.id = 0xF0,
};
struct platform_device apq_cpudai_afe_02_rx = {
.name = "msm-dai-q6",
.id = 0xF1,
};
struct platform_device apq_cpudai_afe_02_tx = {
.name = "msm-dai-q6",
.id = 0xE1,
};
struct platform_device apq_pcm_afe = {
.name = "msm-pcm-afe",
.id = -1,
};
static struct resource resources_ssbi_pmic1[] = {
{
.start = MSM_PMIC1_SSBI_CMD_PHYS,

View File

@@ -179,6 +179,29 @@ extern struct platform_device msm_8960_q6_lpass;
extern struct platform_device msm_8960_q6_mss_fw;
extern struct platform_device msm_8960_q6_mss_sw;
extern struct platform_device apq_pcm;
extern struct platform_device apq_pcm_routing;
extern struct platform_device apq_cpudai0;
extern struct platform_device apq_cpudai1;
extern struct platform_device apq_cpudai_hdmi_rx;
extern struct platform_device apq_cpudai_bt_rx;
extern struct platform_device apq_cpudai_bt_tx;
extern struct platform_device apq_cpudai_fm_rx;
extern struct platform_device apq_cpudai_fm_tx;
extern struct platform_device apq_cpudai_auxpcm_rx;
extern struct platform_device apq_cpudai_auxpcm_tx;
extern struct platform_device apq_cpu_fe;
extern struct platform_device apq_stub_codec;
extern struct platform_device apq_voice;
extern struct platform_device apq_voip;
extern struct platform_device apq_lpa_pcm;
extern struct platform_device apq_pcm_hostless;
extern struct platform_device apq_cpudai_afe_01_rx;
extern struct platform_device apq_cpudai_afe_01_tx;
extern struct platform_device apq_cpudai_afe_02_rx;
extern struct platform_device apq_cpudai_afe_02_tx;
extern struct platform_device apq_pcm_afe;
extern struct platform_device *msm_footswitch_devices[];
extern unsigned msm_num_footswitch_devices;

View File

@@ -61,7 +61,7 @@ obj-$(CONFIG_SND_SOC_VOICE) += msm-pcm-voice.o msm-pcm-voip.o
snd-soc-qdsp6-objs += msm-pcm-lpa.o msm-pcm-afe.o
obj-$(CONFIG_SND_SOC_QDSP6) += snd-soc-qdsp6.o
snd-soc-msm8960-objs := msm8960.o
snd-soc-msm8960-objs := msm8960.o apq8064.o
obj-$(CONFIG_SND_SOC_MSM8960) += snd-soc-msm8960.o
# Generic MSM drivers

1161
sound/soc/msm/apq8064.c Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -24,6 +24,7 @@
#include <sound/pcm.h>
#include <sound/jack.h>
#include <asm/mach-types.h>
#include <mach/socinfo.h>
#include "msm-pcm-routing.h"
#include "../codecs/wcd9310.h"
@@ -1125,6 +1126,10 @@ static int __init msm8960_audio_init(void)
{
int ret;
if (!cpu_is_msm8960()) {
pr_err("%s: Not the right machine type\n", __func__);
return -ENODEV ;
}
msm8960_snd_device = platform_device_alloc("soc-audio", 0);
if (!msm8960_snd_device) {
pr_err("Platform device allocation failed\n");
@@ -1151,6 +1156,10 @@ module_init(msm8960_audio_init);
static void __exit msm8960_audio_exit(void)
{
if (!cpu_is_msm8960()) {
pr_err("%s: Not the right machine type\n", __func__);
return ;
}
msm8960_free_headset_mic_gpios();
platform_device_unregister(msm8960_snd_device);
}