summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorShashank Sharma <shashanks@nvidia.com>2012-09-28 16:29:24 +0530
committerMatthew Pedro <mapedro@nvidia.com>2012-10-09 11:49:06 -0700
commitb02a1cb7dbb6b0815ddd8e104ad8819e847947a0 (patch)
treec28e1ac6585ff30aefac302ecbe3c99c566f0e9b /sound
parent49eac6c2664809abd41c0b0b368ab093bcf5a783 (diff)
asoc: tegra: WAR: Check AVP id before setting DMA
WAR to check souncard data's avp_id before trying to set DMA address. An invalid avp_id can cause invlaid rtd, causing panic in control ioctl calls. Bug 1046249 Bug 1044761 Bug 1049940 Bug 1050152 Change-Id: Ib536220fdb92f8256c777d6fa14b66e47bc6b7be Signed-off-by: Shashank Sharma <shashanks@nvidia.com> Reviewed-on: http://git-master/r/134426 (cherry picked from commit 007fd7b1ae101c5be2a3d35ad11e7190862c04ca) Reviewed-on: http://git-master/r/142493 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Tested-by: Matthew Pedro <mapedro@nvidia.com> Reviewed-by: Winnie Hsu <whsu@nvidia.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/tegra/tegra_asoc_utils.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/soc/tegra/tegra_asoc_utils.c b/sound/soc/tegra/tegra_asoc_utils.c
index 80d22d203fb6..99ba90d9fc7b 100644
--- a/sound/soc/tegra/tegra_asoc_utils.c
+++ b/sound/soc/tegra/tegra_asoc_utils.c
@@ -133,6 +133,9 @@ static int tegra_set_dma_addr(struct snd_kcontrol *kcontrol,
struct snd_pcm_substream *substream;
struct tegra_runtime_data *prtd;
+ if (data->avp_device_id < 0)
+ return 0;
+
data->avp_dma_addr = ucontrol->value.integer.value[0];
rtd = &card->rtd[data->avp_device_id];