diff options
author | Sumit Bhattacharya <sumitb@nvidia.com> | 2011-08-30 20:57:58 +0530 |
---|---|---|
committer | Varun Colbert <vcolbert@nvidia.com> | 2011-08-30 19:31:06 -0700 |
commit | 92f7736b51618ad3eed8b00086670fe17a39af5f (patch) | |
tree | f34a7810a1ab2bebec22cef87654d0f8a2af98b8 /sound | |
parent | dccf55e9769471f482bd452ea62eb6a07d57ce03 (diff) |
ARM: tegra: hda: Fix kernel panic during HDMI plug
Set HDMI audio frequency source from HDA driver during
hotplug-in of HDMI device instead of restarting HDA alsa
stream.
Bug 861185
Change-Id: I36dc7a0debd5caebbf1287e5cf5cedfd1cd36dbf
Reviewed-on: http://git-master/r/49868
Tested-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-by: Scott Peterson <speterson@nvidia.com>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/patch_nvhdmi.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/sound/pci/hda/patch_nvhdmi.c b/sound/pci/hda/patch_nvhdmi.c index 6776573d8124..af26bc5bbd5a 100644 --- a/sound/pci/hda/patch_nvhdmi.c +++ b/sound/pci/hda/patch_nvhdmi.c @@ -169,7 +169,9 @@ static void nvhdmi_unsol_event(struct hda_codec *codec, unsigned int res) int sink_state_old = spec->sink_eld[index].monitor_present & spec->sink_eld[index].eld_valid; int sink_state_new; +#if defined(CONFIG_SND_HDA_TEGRA) struct snd_pcm_substream *s; +#endif hdmi_unsol_event(codec, res); sink_state_new = spec->sink_eld[index].monitor_present & @@ -181,13 +183,17 @@ static void nvhdmi_unsol_event(struct hda_codec *codec, unsigned int res) if (!codec->pcm_info || !codec->pcm_info->pcm) return; +#if defined(CONFIG_SND_HDA_TEGRA) s = codec->pcm_info->pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; - if (s && s->runtime) { - if (snd_pcm_running(s)) { - snd_pcm_stop(s, SNDRV_PCM_STATE_XRUN); - snd_pcm_start(s); - } + if (s && s->runtime && s->runtime->rate) { + int err = tegra_hdmi_setup_audio_freq_source( + s->runtime->rate, AUTO); + if ( err < 0 ) + snd_printk(KERN_ERR + "Unable to set hdmi audio freq:%d \n", + s->runtime->rate); } +#endif } static void nvhdmi_shutup(struct hda_codec *codec) |