summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRavindra Lokhande <rlokhande@nvidia.com>2010-11-30 19:00:44 +0530
committerVarun Colbert <vcolbert@nvidia.com>2010-12-01 15:20:25 -0800
commitcd25a25d7a70ec8d45f24f4183e8b3f35a1b5411 (patch)
tree07513f066f9160439209cdc65636dacee68ce833
parent0fb1d22236e062c48a112d3cd0c1f6e6d90023a3 (diff)
[tegra ALSA] separated i2s1 and i2s2 path
In order to support concurrent playback/record from i2s1 and i2s2, separated i2s1 and i2s2 path. Change-Id: I2c19d76605d243e3e5375047ea0e799c4eb823b5 Reviewed-on: http://git-master/r/11677 Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com> Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com> Tested-by: Ravindra Lokhande <rlokhande@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com>
-rw-r--r--sound/soc/tegra/tegra_pcm_rpc.c11
-rw-r--r--sound/soc/tegra/tegra_transport.c16
-rw-r--r--sound/soc/tegra/tegra_transport.h5
3 files changed, 26 insertions, 6 deletions
diff --git a/sound/soc/tegra/tegra_pcm_rpc.c b/sound/soc/tegra/tegra_pcm_rpc.c
index fd1c8cb55ee3..f6cd0861a698 100644
--- a/sound/soc/tegra/tegra_pcm_rpc.c
+++ b/sound/soc/tegra/tegra_pcm_rpc.c
@@ -540,10 +540,11 @@ static int tegra_pcm_open(struct snd_pcm_substream *substream)
sema_init(&prtd->buf_done_sem, 0);
sema_init(&prtd->stop_done_sem, 0);
- if (pcm->device == I2S2)
- hSource = ptscx->mi2s2;
-
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK){
+ hSource = ptscx->i2s1_play_mix;
+ if (pcm->device == I2S2)
+ hSource = ptscx->i2s2_play_mix;
+
prtd->mixer_buffer = ptscx->mixer_buffer[0];
prtd->stdoutpath = (StandardPath*)kzalloc(sizeof(StandardPath),
GFP_KERNEL);
@@ -594,6 +595,10 @@ static int tegra_pcm_open(struct snd_pcm_substream *substream)
goto fail;
}
} else {
+ hSource = ptscx->i2s1_rec_split;
+ if (pcm->device == I2S2)
+ hSource = ptscx->i2s2_rec_split;
+
prtd->mixer_buffer = ptscx->mixer_buffer[1];
prtd->stdinpath = (StandardPath*)kzalloc(sizeof(StandardPath),
GFP_KERNEL);
diff --git a/sound/soc/tegra/tegra_transport.c b/sound/soc/tegra/tegra_transport.c
index cdf2de2cc3f1..038309ac27ef 100644
--- a/sound/soc/tegra/tegra_transport.c
+++ b/sound/soc/tegra/tegra_transport.c
@@ -550,9 +550,21 @@ int tegra_audiofx_init(struct tegra_audio_data* tegra_snd_cx)
NvAudioFxI2s1Id);
tegra_snd_cx->mi2s1_device_available = NvAudioFxIoDevice_Default;
- tegra_snd_cx->mi2s2 = tegra_snd_cx->xrt_fxn.MixerCreateObject(
+ tegra_snd_cx->i2s1_play_mix = tegra_snd_cx->xrt_fxn.MixerCreateObject(
tegra_snd_cx->mixer_handle,
- NvAudioFxI2s2Id);
+ NvAudioFxI2s1PlaybackMixId);
+
+ tegra_snd_cx->i2s2_play_mix = tegra_snd_cx->xrt_fxn.MixerCreateObject(
+ tegra_snd_cx->mixer_handle,
+ NvAudioFxI2s2PlaybackMixId);
+
+ tegra_snd_cx->i2s1_rec_split = tegra_snd_cx->xrt_fxn.MixerCreateObject(
+ tegra_snd_cx->mixer_handle,
+ NvAudioFxI2s1RecordSplitId);
+
+ tegra_snd_cx->i2s2_rec_split = tegra_snd_cx->xrt_fxn.MixerCreateObject(
+ tegra_snd_cx->mixer_handle,
+ NvAudioFxI2s2RecordSplitId);
memset(&message, 0, sizeof(NvAudioFxMessage));
message.Event = NvAudioFxEventControlChange;
diff --git a/sound/soc/tegra/tegra_transport.h b/sound/soc/tegra/tegra_transport.h
index 49eee47b1373..7863efbee64d 100644
--- a/sound/soc/tegra/tegra_transport.h
+++ b/sound/soc/tegra/tegra_transport.h
@@ -415,7 +415,10 @@ struct tegra_audio_data {
NvRmMemHandle mem_handle[2];
NvAudioFxObjectHandle mvolume;
NvAudioFxObjectHandle mi2s1;
- NvAudioFxObjectHandle mi2s2;
+ NvAudioFxObjectHandle i2s1_play_mix;
+ NvAudioFxObjectHandle i2s2_play_mix;
+ NvAudioFxObjectHandle i2s1_rec_split;
+ NvAudioFxObjectHandle i2s2_rec_split;
NvAudioFxObjectHandle mroute;
NvAudioFxIoDevice mi2s1_device_available;
NvAudioFxIoDevice mspdif_device_available;