diff options
author | Manoj Gangwal <mgangwal@nvidia.com> | 2012-04-30 21:06:45 +0530 |
---|---|---|
committer | Simone Willett <swillett@nvidia.com> | 2012-05-01 14:39:01 -0700 |
commit | 5e03e0db07043177b677b5890711568c586fcfc4 (patch) | |
tree | 3731accab4e443cdb8e8130fd028fd2ff542298c | |
parent | 7f7ea77ef60a0fc4b02b7a23388ba42b11e2a774 (diff) |
asoc: tegra: pcm: Add support for setting bias level
Allow setting bias level to turn off clock extern1 when codec
is idle.
Bug 964287
Change-Id: I48056b86a9fdaea70202bee9326debaaddf69c0c
Signed-off-by: Manoj Gangwal <mgangwal@nvidia.com>
Reviewed-on: http://git-master/r/99665
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
-rw-r--r-- | sound/soc/tegra/tegra_pcm.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sound/soc/tegra/tegra_pcm.c b/sound/soc/tegra/tegra_pcm.c index 89fd3ff8fb15..3b475a24c9a8 100644 --- a/sound/soc/tegra/tegra_pcm.c +++ b/sound/soc/tegra/tegra_pcm.c @@ -2,7 +2,7 @@ * tegra_pcm.c - Tegra PCM driver * * Author: Stephen Warren <swarren@nvidia.com> - * Copyright (C) 2010 - NVIDIA, Inc. + * Copyright (C) 2010-2012 - NVIDIA, Inc. * * Based on code copyright/by: * @@ -29,6 +29,7 @@ * */ +#include <asm/mach-types.h> #include <linux/module.h> #include <linux/dma-mapping.h> #include <linux/slab.h> @@ -416,10 +417,19 @@ void tegra_pcm_free(struct snd_pcm *pcm) tegra_pcm_deallocate_dma_buffer(pcm, SNDRV_PCM_STREAM_PLAYBACK); } +static int tegra_pcm_probe(struct snd_soc_platform *platform) +{ + if(machine_is_kai()) + platform->dapm.idle_bias_off = 1; + + return 0; +} + struct snd_soc_platform_driver tegra_pcm_platform = { .ops = &tegra_pcm_ops, .pcm_new = tegra_pcm_new, .pcm_free = tegra_pcm_free, + .probe = tegra_pcm_probe, }; static int __devinit tegra_pcm_platform_probe(struct platform_device *pdev) |