From patchwork Sun May 4 23:38:43 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anssi Hannula X-Patchwork-Id: 4111061 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7879E9F23C for ; Sun, 4 May 2014 23:39:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8DE9B20412 for ; Sun, 4 May 2014 23:39:51 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 64B7220411 for ; Sun, 4 May 2014 23:39:50 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 59516261AFF; Mon, 5 May 2014 01:39:49 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NO_DNS_FOR_FROM, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 36FA7261A92; Mon, 5 May 2014 01:39:05 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 19B3E261A88; Mon, 5 May 2014 01:39:01 +0200 (CEST) Received: from sirokuusama.dnainternet.net (sirokuusama.dnainternet.net [83.102.40.133]) by alsa0.perex.cz (Postfix) with ESMTP id A433C261A68 for ; Mon, 5 May 2014 01:38:53 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by sirokuusama.dnainternet.net (Postfix) with ESMTP id 598083F939; Mon, 5 May 2014 02:38:53 +0300 (EEST) X-Virus-Scanned: DNA Postiturva at dnainternet.net Received: from sirokuusama.dnainternet.net ([83.102.40.133]) by localhost (sirokuusama.dnainternet.net [127.0.0.1]) (DNA Postiturva, port 10041) with ESMTP id XN2fY0yqTHHY; Mon, 5 May 2014 02:38:52 +0300 (EEST) Received: from kirsikkapuu.dnainternet.net (kirsikkapuu.dnainternet.net [83.102.40.214]) by sirokuusama.dnainternet.net (Postfix) with ESMTP id E9EF03F8E0; Mon, 5 May 2014 02:38:52 +0300 (EEST) Received: from mail.onse.fi (unknown [109.204.216.205]) by kirsikkapuu.dnainternet.net (Postfix) with ESMTP id C54995FA91; Mon, 5 May 2014 02:38:48 +0300 (EEST) Received: by mail.onse.fi (Postfix, from userid 501) id 9F2CE40346; Mon, 5 May 2014 02:38:48 +0300 (EEST) From: Anssi Hannula To: tiwai@suse.de Date: Mon, 5 May 2014 02:38:43 +0300 Message-Id: <1399246724-16611-1-git-send-email-anssi.hannula@iki.fi> X-Mailer: git-send-email 1.8.4.5 Cc: Stephan Raue , alsa-devel@alsa-project.org, stable@vger.kernel.org Subject: [alsa-devel] [PATCH 1/2] ALSA: hda - hdmi: Set converter channel count even without sink X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Reported-by: Stephan Raue Tested-by: Stephan Raue Cc: # 3.12+ --- sound/pci/hda/patch_hdmi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index 0cb5b89cd0c8..1edbb9c47c2d 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c @@ -1127,8 +1127,10 @@ static void hdmi_setup_audio_infoframe(struct hda_codec *codec, AMP_OUT_UNMUTE); eld = &per_pin->sink_eld; - if (!eld->monitor_present) + if (!eld->monitor_present) { + hdmi_set_channel_count(codec, per_pin->cvt_nid, channels); return; + } if (!non_pcm && per_pin->chmap_set) ca = hdmi_manual_channel_allocation(channels, per_pin->chmap);