aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWu Fengguang <fengguang.wu@intel.com>2009-10-30 06:45:04 -0400
committerTakashi Iwai <tiwai@suse.de>2009-10-30 06:45:04 -0400
commit69fb346896b4265c0cbcbd2fdd1a97ae09fe198d (patch)
treeb28e4b824656443444c60883b1db634e3f61cee5
parent54a25f87e943fc77f57e86849897ad6602519286 (diff)
ALSA: hda - get intelhdmi max channels from widget caps
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/pci/hda/patch_intelhdmi.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sound/pci/hda/patch_intelhdmi.c b/sound/pci/hda/patch_intelhdmi.c
index 08ea88deba6f..3c68aa9742d7 100644
--- a/sound/pci/hda/patch_intelhdmi.c
+++ b/sound/pci/hda/patch_intelhdmi.c
@@ -650,7 +650,6 @@ static int intel_hdmi_playback_pcm_cleanup(struct hda_pcm_stream *hinfo,
650static struct hda_pcm_stream intel_hdmi_pcm_playback = { 650static struct hda_pcm_stream intel_hdmi_pcm_playback = {
651 .substreams = 1, 651 .substreams = 1,
652 .channels_min = 2, 652 .channels_min = 2,
653 .channels_max = 8,
654 .ops = { 653 .ops = {
655 .prepare = intel_hdmi_playback_pcm_prepare, 654 .prepare = intel_hdmi_playback_pcm_prepare,
656 .cleanup = intel_hdmi_playback_pcm_cleanup, 655 .cleanup = intel_hdmi_playback_pcm_cleanup,
@@ -667,11 +666,17 @@ static int intel_hdmi_build_pcms(struct hda_codec *codec)
667 codec->pcm_info = info; 666 codec->pcm_info = info;
668 667
669 for (i = 0; i < codec->num_pcms; i++, info++) { 668 for (i = 0; i < codec->num_pcms; i++, info++) {
669 unsigned int chans;
670
671 chans = get_wcaps(codec, spec->cvt[i]);
672 chans = get_wcaps_channels(chans);
673
670 info->name = intel_hdmi_pcm_names[i]; 674 info->name = intel_hdmi_pcm_names[i];
671 info->pcm_type = HDA_PCM_TYPE_HDMI; 675 info->pcm_type = HDA_PCM_TYPE_HDMI;
672 info->stream[SNDRV_PCM_STREAM_PLAYBACK] = 676 info->stream[SNDRV_PCM_STREAM_PLAYBACK] =
673 intel_hdmi_pcm_playback; 677 intel_hdmi_pcm_playback;
674 info->stream[SNDRV_PCM_STREAM_PLAYBACK].nid = spec->cvt[i]; 678 info->stream[SNDRV_PCM_STREAM_PLAYBACK].nid = spec->cvt[i];
679 info->stream[SNDRV_PCM_STREAM_PLAYBACK].channels_max = chans;
675 } 680 }
676 681
677 return 0; 682 return 0;