Skip to content

Commit

Permalink
ALSA: hda - Store PCM parameters properly in HDMI open callback
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
tiwai committed Jan 14, 2011
1 parent 361fe6e commit 639cef0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sound/pci/hda/patch_hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++)
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 639cef0

Please sign in to comment.