ALSA: hda - Suppress the odd number of channels for HDMI
authorTakashi Iwai <tiwai@suse.de>
Fri, 14 Jan 2011 08:42:27 +0000 (09:42 +0100)
committerTakashi Iwai <tiwai@suse.de>
Fri, 14 Jan 2011 08:42:27 +0000 (09:42 +0100)
It looks like that HDMI codecs don't support the odd number of channels
although HD-audio spec doesn't have the restriction.  Add the
hw_constraint to limit to only the even number of channels.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/patch_hdmi.c

index f29b97b5de8f36e53fc459e90cc8cc41870e54f5..2d288793ceb3776e73018aa84c9477f09b9a7716 100644 (file)
@@ -1238,6 +1238,9 @@ static int simple_playback_pcm_open(struct hda_pcm_stream *hinfo,
                snd_pcm_hw_constraint_list(substream->runtime, 0,
                                SNDRV_PCM_HW_PARAM_CHANNELS,
                                hw_constraints_channels);
+       } else {
+               snd_pcm_hw_constraint_step(substream->runtime, 0,
+                                          SNDRV_PCM_HW_PARAM_CHANNELS, 2);
        }
 
        return snd_hda_multi_out_dig_open(codec, &spec->multiout);