diff options
Diffstat (limited to 'sound/pci/hda/patch_hdmi.c')
| -rw-r--r-- | sound/pci/hda/patch_hdmi.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index f29b97b5de8f..2d5b83fa8d24 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, | |||
| 817 | struct hdmi_spec *spec = codec->spec; | 817 | struct hdmi_spec *spec = codec->spec; |
| 818 | struct hdmi_eld *eld; | 818 | struct hdmi_eld *eld; |
| 819 | struct hda_pcm_stream *codec_pars; | 819 | struct hda_pcm_stream *codec_pars; |
| 820 | struct snd_pcm_runtime *runtime = substream->runtime; | ||
| 820 | unsigned int idx; | 821 | unsigned int idx; |
| 821 | 822 | ||
| 822 | for (idx = 0; idx < spec->num_cvts; idx++) | 823 | for (idx = 0; idx < spec->num_cvts; idx++) |
| @@ -844,6 +845,14 @@ static int hdmi_pcm_open(struct hda_pcm_stream *hinfo, | |||
| 844 | hinfo->formats = codec_pars->formats; | 845 | hinfo->formats = codec_pars->formats; |
| 845 | hinfo->maxbps = codec_pars->maxbps; | 846 | hinfo->maxbps = codec_pars->maxbps; |
| 846 | } | 847 | } |
| 848 | /* store the updated parameters */ | ||
| 849 | runtime->hw.channels_min = hinfo->channels_min; | ||
| 850 | runtime->hw.channels_max = hinfo->channels_max; | ||
| 851 | runtime->hw.formats = hinfo->formats; | ||
| 852 | runtime->hw.rates = hinfo->rates; | ||
| 853 | |||
| 854 | snd_pcm_hw_constraint_step(substream->runtime, 0, | ||
| 855 | SNDRV_PCM_HW_PARAM_CHANNELS, 2); | ||
| 847 | return 0; | 856 | return 0; |
| 848 | } | 857 | } |
| 849 | 858 | ||
| @@ -1238,6 +1247,9 @@ static int simple_playback_pcm_open(struct hda_pcm_stream *hinfo, | |||
| 1238 | snd_pcm_hw_constraint_list(substream->runtime, 0, | 1247 | snd_pcm_hw_constraint_list(substream->runtime, 0, |
| 1239 | SNDRV_PCM_HW_PARAM_CHANNELS, | 1248 | SNDRV_PCM_HW_PARAM_CHANNELS, |
| 1240 | hw_constraints_channels); | 1249 | hw_constraints_channels); |
| 1250 | } else { | ||
| 1251 | snd_pcm_hw_constraint_step(substream->runtime, 0, | ||
| 1252 | SNDRV_PCM_HW_PARAM_CHANNELS, 2); | ||
| 1241 | } | 1253 | } |
| 1242 | 1254 | ||
| 1243 | return snd_hda_multi_out_dig_open(codec, &spec->multiout); | 1255 | return snd_hda_multi_out_dig_open(codec, &spec->multiout); |
