Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1886399ybz; Thu, 30 Apr 2020 07:13:35 -0700 (PDT) X-Google-Smtp-Source: APiQypL4F14WLNuTqT8BizIEFEV54hYM7ui8AkEXcL60o76rj7hwKGCT8KNmNvlk9+aQmdxceYC0 X-Received: by 2002:a17:906:548:: with SMTP id k8mr2776598eja.259.1588256015522; Thu, 30 Apr 2020 07:13:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588256015; cv=none; d=google.com; s=arc-20160816; b=RRqnVGSOk2NOOQBYPo8pttI/wsJwW2vFvvX2i2h5iMNtgpIWSTSuuinbVR2pH95dpY DBaHbI/c26fa361xYJhQWCOcSUfSSLMiYsZynxNN9YJLLObKkrQYVnnakNqQYCzx7AHO rO+cBT4IoIQwvBuT4M1qcFkJrrek0hbWCX9DuUIYYND4vHK25TcXlE4mBbbH/uDBOKcz F/23vo6dIiyQptWJtu9BYPU45UbVl8f2OqK5D0bdLk9840BbfXEB6PYdJw5lG0m9vJZI TSoAJtSGhx/+L4GzCuqICVYsOQ51WynU6MvRPQ6/rJe6kQv3KJJ8NU2+L5ICfhzIP7EA wDLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=fnbHi4CVXjNqplI0qYClZjvhpQt/io4juYZWGQdWK7U=; b=r15d17YYtYx3huZvvgwgtpzkNh6E9wGBHisSSuwQgsbAkWoCANwiCTp/yZVVe2w0XH +miq7KUSivUn/xsnYC8ygvAJwr4ceYZLUfvdy1IeFYYTPq1CBHEvUVQNyIGFvaEC+6J0 KI02EJ7/jVjdil0wzniYyYVyuKGWKyNBVg9ehCXJo7tOoP4kmK2AaYJcNUOijA42PKGl rDoYFwpdr93Ys6GvBRJ6LCL9xZ22WYBoFIDHGUm9frsmwEFQWNYYeXXkXsmUoBYWQYX6 1WdCB+y430eGnfj/0E3q/myhyjzV7bkRYrv5na8wvAGxmKhB3JP8RYM4KrOcfUx2lr3n GVlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=CmISad+w; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m12si5788466edq.510.2020.04.30.07.13.11; Thu, 30 Apr 2020 07:13:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=CmISad+w; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728230AbgD3OLs (ORCPT + 99 others); Thu, 30 Apr 2020 10:11:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:59460 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728012AbgD3NvT (ORCPT ); Thu, 30 Apr 2020 09:51:19 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 13A57208DB; Thu, 30 Apr 2020 13:51:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588254678; bh=nsssbZy682qJB1nLB7JZpO040fXKDc94Bx3ipos/8Ik=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CmISad+wyL6ocs1NjbGu0GWHl4IDqdVLG1YXzsFtNqiCCLARSfus+Cialyb4RPOT/ ccH/hYgkf2VvQTMxrD98+IaNHhV8dQr8WiAbdiQl9ccycVbqceAkqWIEpI9Lp+OqGU hoxLu5A9B6+X3mIZTb+Rg3MeKwdCWSI+5oSSlBYk= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Matthias Blankertz , Kuninori Morimoto , Mark Brown , Sasha Levin , alsa-devel@alsa-project.org Subject: [PATCH AUTOSEL 5.6 30/79] ASoC: rsnd: Fix HDMI channel mapping for multi-SSI mode Date: Thu, 30 Apr 2020 09:49:54 -0400 Message-Id: <20200430135043.19851-30-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200430135043.19851-1-sashal@kernel.org> References: <20200430135043.19851-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Matthias Blankertz [ Upstream commit b94e164759b82d0c1c80d4b1c8f12c9bee83f11d ] The HDMI?_SEL register maps up to four stereo SSI data lanes onto the sdata[0..3] inputs of the HDMI output block. The upper half of the register contains four blocks of 4 bits, with the most significant controlling the sdata3 line and the least significant the sdata0 line. The shift calculation has an off-by-one error, causing the parent SSI to be mapped to sdata3, the first multi-SSI child to sdata0 and so forth. As the parent SSI transmits the stereo L/R channels, and the HDMI core expects it on the sdata0 line, this causes no audio to be output when playing stereo audio on a multichannel capable HDMI out, and multichannel audio has permutated channels. Fix the shift calculation to map the parent SSI to sdata0, the first child to sdata1 etc. Signed-off-by: Matthias Blankertz Acked-by: Kuninori Morimoto Link: https://lore.kernel.org/r/20200415141017.384017-3-matthias.blankertz@cetitec.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/sh/rcar/ssiu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/sh/rcar/ssiu.c b/sound/soc/sh/rcar/ssiu.c index f35d882118874..9c7c3e7539c93 100644 --- a/sound/soc/sh/rcar/ssiu.c +++ b/sound/soc/sh/rcar/ssiu.c @@ -221,7 +221,7 @@ static int rsnd_ssiu_init_gen2(struct rsnd_mod *mod, i; for_each_rsnd_mod_array(i, pos, io, rsnd_ssi_array) { - shift = (i * 4) + 16; + shift = (i * 4) + 20; val = (val & ~(0xF << shift)) | rsnd_mod_id(pos) << shift; } -- 2.20.1