aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorSimon Wilson <simonwilson@google.com>2011-07-14 16:19:11 -0700
committerSimon Wilson <simonwilson@google.com>2011-07-14 16:19:22 -0700
commit3bfc0619c2746abfdec7a6464827ac70d3cec77e (patch)
tree7c910be930763bfd4ca9297b268dc143926f4167 /sound
parent726f1bf67a99d2ff80b98bb5e3ca1be5827bd0e6 (diff)
parentcf32e8e5bf2f51bb291afb802b86c82b44520873 (diff)
downloadkernel_samsung_tuna-3bfc0619c2746abfdec7a6464827ac70d3cec77e.zip
kernel_samsung_tuna-3bfc0619c2746abfdec7a6464827ac70d3cec77e.tar.gz
kernel_samsung_tuna-3bfc0619c2746abfdec7a6464827ac70d3cec77e.tar.bz2
Merge branch 'linux-omap-audio-3.0' into linux-omap-3.0
Signed-off-by: Simon Wilson <simonwilson@google.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/omap/omap-abe-dsp.c3
-rw-r--r--sound/soc/omap/omap-abe.c20
-rw-r--r--sound/soc/omap/omap-abe.h3
-rw-r--r--sound/soc/omap/sdp4430.c39
4 files changed, 49 insertions, 16 deletions
diff --git a/sound/soc/omap/omap-abe-dsp.c b/sound/soc/omap/omap-abe-dsp.c
index b5c7e8a..953d25e 100644
--- a/sound/soc/omap/omap-abe-dsp.c
+++ b/sound/soc/omap/omap-abe-dsp.c
@@ -192,7 +192,6 @@ static int abe_dsp_write(struct snd_soc_platform *platform, unsigned int reg,
static void abe_irq_pingpong_subroutine(u32 *data)
{
- struct abe_data *abe = (struct abe_data *)data;
u32 dst, n_bytes;
abe_read_next_ping_pong_buffer(MM_DL_PORT, &dst, &n_bytes);
@@ -2334,7 +2333,7 @@ static int __devinit abe_engine_probe(struct platform_device *pdev)
struct resource *res;
struct omap4_abe_dsp_pdata *pdata = pdev->dev.platform_data;
struct abe_data *abe;
- int ret = -EINVAL, i, k;
+ int ret = -EINVAL, i;
abe = kzalloc(sizeof(struct abe_data), GFP_KERNEL);
if (abe == NULL)
diff --git a/sound/soc/omap/omap-abe.c b/sound/soc/omap/omap-abe.c
index 56ecf4e..6555a82 100644
--- a/sound/soc/omap/omap-abe.c
+++ b/sound/soc/omap/omap-abe.c
@@ -808,6 +808,7 @@ static int omap_abe_dai_hw_params(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{
struct omap_abe_data *abe_priv = snd_soc_dai_get_drvdata(dai);
+ struct omap_pcm_dma_data *dma_data;
abe_data_format_t format;
abe_dma_t dma_sink;
abe_dma_t dma_params;
@@ -815,12 +816,16 @@ static int omap_abe_dai_hw_params(struct snd_pcm_substream *substream,
dev_dbg(dai->dev, "%s: %s\n", __func__, dai->name);
+ dma_data = &omap_abe_dai_dma_params[dai->id][substream->stream];
+
switch (params_channels(params)) {
case 1:
- if (params_format(params) == SNDRV_PCM_FORMAT_S16_LE)
+ if (params_format(params) == SNDRV_PCM_FORMAT_S16_LE) {
format.samp_format = MONO_RSHIFTED_16;
- else
+ dma_data->data_type = OMAP_DMA_DATA_TYPE_S16;
+ } else {
format.samp_format = MONO_MSB;
+ }
break;
case 2:
if (params_format(params) == SNDRV_PCM_FORMAT_S16_LE)
@@ -924,15 +929,13 @@ static int omap_abe_dai_hw_params(struct snd_pcm_substream *substream,
}
/* configure frontend SDMA data */
- omap_abe_dai_dma_params[dai->id][substream->stream].port_addr =
- (unsigned long)dma_params.data;
- omap_abe_dai_dma_params[dai->id][substream->stream].packet_size =
- dma_params.iter;
+ dma_data->port_addr = (unsigned long)dma_params.data;
+ dma_data->packet_size = dma_params.iter;
if (dai->id == ABE_FRONTEND_DAI_MODEM) {
/* call hw_params on McBSP with correct DMA data */
snd_soc_dai_set_dma_data(abe_priv->modem_dai, substream,
- &omap_abe_dai_dma_params[dai->id][substream->stream]);
+ dma_data);
dev_dbg(abe_priv->modem_dai->dev, "%s: MODEM stream %d\n",
__func__, substream->stream);
@@ -944,8 +947,7 @@ static int omap_abe_dai_hw_params(struct snd_pcm_substream *substream,
return ret;
}
- snd_soc_dai_set_dma_data(dai, substream,
- &omap_abe_dai_dma_params[dai->id][substream->stream]);
+ snd_soc_dai_set_dma_data(dai, substream, dma_data);
return 0;
}
diff --git a/sound/soc/omap/omap-abe.h b/sound/soc/omap/omap-abe.h
index f6fad97..7aca33e 100644
--- a/sound/soc/omap/omap-abe.h
+++ b/sound/soc/omap/omap-abe.h
@@ -48,7 +48,8 @@
#define OMAP_ABE_BE_PDM_UL1 "PDM-UL1"
#define OMAP_ABE_BE_PDM_DL2 "PDM-DL2"
#define OMAP_ABE_BE_PDM_VIB "PDM-VIB"
-#define OMAP_ABE_BE_BT_VX "BT-VX"
+#define OMAP_ABE_BE_BT_VX_UL "BT-VX-UL"
+#define OMAP_ABE_BE_BT_VX_DL "BT-VX-DL"
#define OMAP_ABE_BE_MM_EXT0 "FM-EXT"
#define OMAP_ABE_BE_MM_EXT1 "MODEM-EXT"
#define OMAP_ABE_BE_DMIC0 "DMIC0"
diff --git a/sound/soc/omap/sdp4430.c b/sound/soc/omap/sdp4430.c
index 3d6a554..b84399a 100644
--- a/sound/soc/omap/sdp4430.c
+++ b/sound/soc/omap/sdp4430.c
@@ -126,7 +126,6 @@ static int sdp4430_mcpdm_hw_params(struct snd_pcm_substream *substream,
if (dsp_params->fe->cpu_dai->id != ABE_FRONTEND_DAI_MODEM)
continue;
- /* freed Modem McBSP configuration */
ret = sdp4430_modem_mcbsp_configure(substream, params, 1);
if (ret < 0) {
printk(KERN_ERR "can't set Modem cpu DAI configuration\n");
@@ -149,7 +148,6 @@ static int sdp4430_mcpdm_hw_free(struct snd_pcm_substream *substream)
if (dsp_params->fe->cpu_dai->id != ABE_FRONTEND_DAI_MODEM)
continue;
- /* freed Modem McBSP configuration */
ret = sdp4430_modem_mcbsp_configure(substream, NULL, 0);
if (ret < 0) {
printk(KERN_ERR "can't set Modem cpu DAI configuration\n");
@@ -169,9 +167,12 @@ static int sdp4430_mcbsp_hw_params(struct snd_pcm_substream *substream,
{
struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
+ struct snd_soc_dsp_params *dsp_params;
+ int stream = substream->stream;
int ret = 0;
unsigned int be_id;
+
be_id = rtd->dai_link->be_id;
if (be_id == OMAP_ABE_DAI_MM_FM) {
@@ -204,6 +205,19 @@ static int sdp4430_mcbsp_hw_params(struct snd_pcm_substream *substream,
printk(KERN_ERR "can't set cpu system clock\n");
return ret;
}
+
+ list_for_each_entry(dsp_params, &rtd->dsp[stream].fe_clients, list_fe) {
+
+ if (dsp_params->fe->cpu_dai->id != ABE_FRONTEND_DAI_MODEM)
+ continue;
+
+ ret = sdp4430_modem_mcbsp_configure(substream, params, 1);
+ if (ret < 0) {
+ printk(KERN_ERR "can't set Modem cpu DAI configuration\n");
+ return ret;
+ }
+ }
+
return 0;
}
@@ -654,8 +668,25 @@ static struct snd_soc_dai_link sdp4430_dai[] = {
.be_id = OMAP_ABE_DAI_PDM_VIB,
},
{
- .name = OMAP_ABE_BE_BT_VX,
- .stream_name = "BT",
+ .name = OMAP_ABE_BE_BT_VX_UL,
+ .stream_name = "BT Capture",
+
+ /* ABE components - MCBSP1 - BT-VX */
+ .cpu_dai_name = "omap-mcbsp-dai.0",
+ .platform_name = "aess",
+
+ /* Bluetooth */
+ .codec_dai_name = "Bluetooth",
+
+ .no_pcm = 1, /* don't create ALSA pcm for this */
+ .no_codec = 1, /* TODO: have a dummy CODEC */
+ .be_hw_params_fixup = mcbsp_be_hw_params_fixup,
+ .ops = &sdp4430_mcbsp_ops,
+ .be_id = OMAP_ABE_DAI_BT_VX,
+ },
+ {
+ .name = OMAP_ABE_BE_BT_VX_DL,
+ .stream_name = "BT Playback",
/* ABE components - MCBSP1 - BT-VX */
.cpu_dai_name = "omap-mcbsp-dai.0",