]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: hda - hdmi: Fix programmed active channel count
authorAnssi Hannula <anssi.hannula@iki.fi>
Fri, 4 Oct 2013 23:25:40 +0000 (02:25 +0300)
committerTakashi Iwai <tiwai@suse.de>
Mon, 7 Oct 2013 10:47:06 +0000 (12:47 +0200)
commita4eb5be153986d46a4c3bf7fccb4c0ff37f92452
tree583c6a7c30799493813dfa8a331863429d659717
parentf92e22e2f9d3fb73c0b34ca982087bf6729f4874
ALSA: hda - hdmi: Fix programmed active channel count

Currently the converter channel count is set to the number of actual
input channels. The audio infoframe channel count field is set
similarly.

However, sometimes the used channel map does not map all input channels
to outputs. Notably, 3 channel modes (e.g. 2.1) require a dummy input
channel so there are 4 input channels. According to the HDA
specification, converter channel count should be programmed according to
the number of _active_ channels.

On Intel HDMI codecs (but not on NVIDIA), setting the converter channel
to a higher value than there are actually mapped channels to HDMI slots
will cause no audio to be output at all.

Note that the effects of this issue are currently partially masked by
other bugs that prevent the driver from actually unmapping channels in
certain cases. For example, if a 4 channel stream is first created and
prepared, it gets a FL,FR,RL,RR mapping (ALSA->HDMI slot mapping 0->0,
1->1, 2->4, 3->5). If one thereafter assigns a FR,FL,FC mapping to it,
the driver will remap 2->3 but fail to unmap 2->4 and 3->5, so there are
still 4 active channels and the issue will not trigger in this case.
These bugs will be fixed separately.

Fix the channel counts in the converter channel count field and in the
audio infoframe channel count field to match the actual number of active
channels.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/patch_hdmi.c