summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2011-01-14 10:30:46 +0100
committerTakashi Iwai <tiwai@suse.de>2011-01-14 10:30:46 +0100
commit639cef0eb6df05d5516520aa89b0c9fe62ee2d3b (patch)
treed0d902b1b75a58d0b1c0bf6cab83bf9118735133 /sound/pci/hda
parentALSA: hda - Rearrange fixup struct in patch_realtek.c (diff)
downloadlinux-639cef0eb6df05d5516520aa89b0c9fe62ee2d3b.tar.xz
linux-639cef0eb6df05d5516520aa89b0c9fe62ee2d3b.zip
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>
Diffstat (limited to 'sound/pci/hda')
-rw-r--r--sound/pci/hda/patch_hdmi.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index 2d288793ceb3..5980552f5970 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -817,6 +817,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++)
@@ -844,6 +845,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;
}