From 5e03e0db07043177b677b5890711568c586fcfc4 Mon Sep 17 00:00:00 2001 From: Manoj Gangwal Date: Mon, 30 Apr 2012 21:06:45 +0530 Subject: 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 Reviewed-on: http://git-master/r/99665 Reviewed-by: Simone Willett Tested-by: Simone Willett --- sound/soc/tegra/tegra_pcm.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'sound') 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 - * Copyright (C) 2010 - NVIDIA, Inc. + * Copyright (C) 2010-2012 - NVIDIA, Inc. * * Based on code copyright/by: * @@ -29,6 +29,7 @@ * */ +#include #include #include #include @@ -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) -- cgit v1.2.3