diff options
author | Takashi Iwai <tiwai@suse.de> | 2011-01-14 10:30:46 +0100 |
---|---|---|
committer | Ryan Wong <ryanw@nvidia.com> | 2011-09-26 17:10:50 -0700 |
commit | 91f509f7c8c795691f37d2ad1554e5ea7f9c4770 (patch) | |
tree | 224231a5b28a5ed8d48cc3db34ec544ebf19700d | |
parent | 7742e7756c0637ae5378e394ca03978826e31a78 (diff) |
ALSA: hda - Store PCM parameters properly in HDMI open callback
In hdmi_pcm_open(), the evaluated PCM hw parameters are stored in
hinfo, but these aren't properly set back to the current runtime
record since these have been set beforehand in azx_pcm_open().
This patch fixes the behavior.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com>
(cherry picked from commit 639cef0eb6df05d5516520aa89b0c9fe62ee2d3b)
Bug 879658
Change-Id: Id8eea5a9516a92192671e081f5284de184a12b3a
Reviewed-on: http://git-master/r/54281
Tested-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-by: Scott Peterson <speterson@nvidia.com>
-rw-r--r-- | sound/pci/hda/patch_hdmi.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index 4ab7c5c80838..50c03595ad88 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c @@ -757,6 +757,7 @@ static int hdmi_pcm_open(struct hda_pcm_stream *hinfo, struct hdmi_spec *spec = codec->spec; struct hdmi_eld *eld; struct hda_pcm_stream *codec_pars; + struct snd_pcm_runtime *runtime = substream->runtime; unsigned int idx; for (idx = 0; idx < spec->num_cvts; idx++) @@ -784,6 +785,11 @@ static int hdmi_pcm_open(struct hda_pcm_stream *hinfo, hinfo->formats = codec_pars->formats; hinfo->maxbps = codec_pars->maxbps; } + /* store the updated parameters */ + runtime->hw.channels_min = hinfo->channels_min; + runtime->hw.channels_max = hinfo->channels_max; + runtime->hw.formats = hinfo->formats; + runtime->hw.rates = hinfo->rates; return 0; } |