ALSA: hda - hdmi: Set converter channel count even without sink
authorAnssi Hannula <anssi.hannula@iki.fi>
Sun, 4 May 2014 23:38:43 +0000 (02:38 +0300)
committerJiri Slaby <jslaby@suse.cz>
Mon, 9 Jun 2014 13:53:30 +0000 (15:53 +0200)
commite2f96a8342766367f5d75d4852bc7bea7622d27b
treebb5ce1620145ef30d29e671a7fed923716f5df35
parent35d8219f51e94d375511500b21e4488ead93775e
ALSA: hda - hdmi: Set converter channel count even without sink

commit f06ab794af7055d0949b09885f79f8b493deec64 upstream.

Since commit 1df5a06a ("ALSA: hda - hdmi: Fix programmed active channel
count") channel count is no longer being set if monitor_present is 0.
This is because setting the count was moved after the CA value is
determined, which is only after the monitor_present check in
hdmi_setup_audio_infoframe().

Unfortunately, in some cases, such as with a non-spec-compliant codec or
with a problematic video driver, monitor_present is always 0. As a
specific example, this seems to happen with gen1 ATV (SiI1390 codec),
causing left-channel-only stereo playback (multi-channel playback has
apparently never worked with this codec despite it reporting 8 channels,
reason unknown).

Simply setting converter channel count without setting the pin infoframe
and channel mapping as well does not theoretically make much sense as
this will just mean they are out-of-sync and multichannel playback will
have a wrong channel mapping.

However, adding back just setting the converter channel count even in
no-monitor case is the safest change which at least fixes the stereo
playback regression on SiI1390 codec. Do that.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Reported-by: Stephan Raue <stephan@openelec.tv>
Tested-by: Stephan Raue <stephan@openelec.tv>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
sound/pci/hda/patch_hdmi.c