summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorDara Ramesh <dramesh@nvidia.com>2011-03-14 18:11:54 +0530
committerDan Willemsen <dwillemsen@nvidia.com>2011-04-26 15:53:50 -0700
commit3ed3465cec880e110a490cab1f300540d07c62fe (patch)
tree9086a79270dcc103fb80657f4f25f9a05da0d701 /sound
parentcb17cbd42774aad00ccd4a354622398894c08248 (diff)
arm: tegra: hda: audio sample rate and source selection
Dynamically set audio sample rate and source selection to hdmi from hda driver. Original-Change-Id: I982137560d7d506d9f1cc680f7c39ee89112eb0f Reviewed-on: http://git-master/r/22817 Tested-by: Dara Ramesh <dramesh@nvidia.com> Reviewed-by: Scott Peterson <speterson@nvidia.com> Change-Id: I0505fc4c5b994d72f463bfe63dd7f49bad321ff0
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/patch_nvhdmi.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_nvhdmi.c b/sound/pci/hda/patch_nvhdmi.c
index 2c1e01a4b095..fafd054955cb 100644
--- a/sound/pci/hda/patch_nvhdmi.c
+++ b/sound/pci/hda/patch_nvhdmi.c
@@ -26,6 +26,9 @@
#include <linux/delay.h>
#include <linux/slab.h>
#include <sound/core.h>
+#if defined(CONFIG_SND_HDA_TEGRA)
+#include <mach/hdmi-audio.h>
+#endif
#include "hda_codec.h"
#include "hda_local.h"
@@ -202,6 +205,15 @@ static int nvhdmi_dig_playback_pcm_prepare_8ch_89(struct hda_pcm_stream *hinfo,
unsigned int format,
struct snd_pcm_substream *substream)
{
+#if defined(CONFIG_SND_HDA_TEGRA)
+ int err = 0;
+ /* Set hdmi:audio freq and source selection*/
+ err = tegra_hdmi_setup_audio_freq_source(substream->runtime->rate, AUTO);
+ if ( err < 0 ) {
+ snd_printk(KERN_ERR
+ "Unable to set hdmi audio freq:%d \n", substream->runtime->rate);
+ }
+#endif
hdmi_set_channel_count(codec, hinfo->nid,
substream->runtime->channels);