diff options
author | Sumit Bhattacharya <sumitb@nvidia.com> | 2011-10-21 16:50:30 +0530 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:50:07 -0800 |
commit | f5397783fb3039dd2ef225a56e0bf2341127062f (patch) | |
tree | 731159f2b8d7c36cb3e0180c1992b7369e805b24 /sound/pci | |
parent | 3e6b424e14636a558c081290d14f8fc64ff16e87 (diff) |
ALSA: hda: Set samplerate to Tegra HDMI driver
Set playback stream samplerate to Tegra HDMI driver.
Bug 872652
Change-Id: Ie288ebf448e2000a53024e47941dfdc7aa9ce276
Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-on: http://git-master/r/64343
Reviewed-by: Scott Peterson <speterson@nvidia.com>
Tested-by: Gerrit_Virtual_Submit
Rebase-Id: R5f1e35081f70bcca2d6332abddda6883f883cbc8
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/hda/patch_hdmi.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index 22f238f9d851..e968cc9cbf31 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c @@ -34,6 +34,11 @@ #include <linux/moduleparam.h> #include <sound/core.h> #include <sound/jack.h> + +#ifdef CONFIG_SND_HDA_PLATFORM_NVIDIA_TEGRA +#include <mach/hdmi-audio.h> +#endif + #include "hda_codec.h" #include "hda_local.h" @@ -1089,6 +1094,21 @@ static int generic_hdmi_playback_pcm_prepare(struct hda_pcm_stream *hinfo, int pin_idx = hinfo_to_pin_index(spec, hinfo); hda_nid_t pin_nid = spec->pins[pin_idx].pin_nid; +#if defined(CONFIG_SND_HDA_PLATFORM_NVIDIA_TEGRA) && defined(CONFIG_TEGRA_DC) + if (codec->preset->id == 0x10de0020) { + int err = 0; + /* Set hdmi:audio freq and source selection*/ + err = tegra_hdmi_setup_audio_freq_source( + substream->runtime->rate, HDA); + if ( err < 0 ) { + snd_printk(KERN_ERR + "Unable to set hdmi audio freq to %d \n", + substream->runtime->rate); + return err; + } + } +#endif + hdmi_set_channel_count(codec, cvt_nid, substream->runtime->channels); hdmi_setup_audio_infoframe(codec, pin_idx, substream); |