Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp463622ybl; Tue, 28 Jan 2020 06:22:16 -0800 (PST) X-Google-Smtp-Source: APXvYqzwVmvq3zl48bbzumATp4FGo+9hU8Zr1z3NVSdov9K3+m2MN7LQ228n4clvXp6PyuJ2Ay9N X-Received: by 2002:aca:3d7:: with SMTP id 206mr2992995oid.98.1580221335860; Tue, 28 Jan 2020 06:22:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580221335; cv=none; d=google.com; s=arc-20160816; b=QU6Z4pmKA3VcVl5QstlZpSb0BnlcQ52wWjtjuyfoY4+4654mGiSBLIPVCNyfiPUzca 1gE/VKfPF56NMTEIm/YiSs6pgb8B9/hLBHkO5e956fNix7SGnWY/SAyQRcM8+xsqUx39 4gzV8jSHVRYOpIpnFh3sjgOzv55Xx1EPts9+QgAs1VqVtuUvpGZkzq0W8Ry746mdbrCj 0VM1axlhBvrCMeIcNjO29ma9+5rGv/uDAxAFtto9dspuJVD1Y5g/tz5VEvaoLsjRU5nH yghvsRxqJQ51jyvArRfX9vtGrP2O7csyhUufCtQRKtFChJT9Ar8Bg2ZWaOvS+3vgchbZ lbiA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=/fZEhAbCuI1P6fRP+VgOUQY+DTicSF0tFA5X9Vb42mA=; b=CiPxIWMFWL3v9/Secx/cdsGCxh9R4ugoBt5d7WgDrYLQZJOHLCaBrrNYDzjqhSXWq3 Re0ola4fvnacw5vw9ylCMBZGq5/UNjOFKbW36JQnk4Z+dux7jyKrK8c7w8YtWZd7mDmE z9fFWTIQqy8i8QriysUX58etaA9YEqA3O90lREJSLKaMF7oHBVUzfAwD7vvuDvJgL6D9 /Wo7cOKkIQaiNQVorRNNvZLlNuKiKAhtQyIGHIKuEXhdnUqm2swsIKdarPKiPB/wNm18 rWtZTsQV1N5n3t7e/Tf00N6cnTCgPBT3QIXBPMOL9DWrxaE/qxELpfjSxPP0BDSiq3Yc 0Zuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=CYCs1ogD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r21si1831824otd.135.2020.01.28.06.22.04; Tue, 28 Jan 2020 06:22:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=CYCs1ogD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731214AbgA1OVL (ORCPT + 99 others); Tue, 28 Jan 2020 09:21:11 -0500 Received: from mail.kernel.org ([198.145.29.99]:46340 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730964AbgA1OVJ (ORCPT ); Tue, 28 Jan 2020 09:21:09 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3EAFB2071E; Tue, 28 Jan 2020 14:21:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580221268; bh=wr7vc4SoJLBtIjyAhanGPbbBAnDcXjvvJ5Y3dM69tAc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CYCs1ogD3WTm2DUjKN7gAfZEuiPLBU3LFo8kR7+BDRhTErZAMKWycs8PqjQx9k+Nl g6JyT0Z5prjvHOq2fMZoMRDhe3Mf9+hgk39JCnlx7Z9Y6HMOj/jQFdYxRrl1qlrrUI Oyh+CxFnd+WGz1k5OMP2uH38JrpsHw7cmQlkYpuY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Peter Ujfalusi , Mark Brown , Sasha Levin Subject: [PATCH 4.9 157/271] ASoC: ti: davinci-mcasp: Fix slot mask settings when using multiple AXRs Date: Tue, 28 Jan 2020 15:05:06 +0100 Message-Id: <20200128135904.255212099@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200128135852.449088278@linuxfoundation.org> References: <20200128135852.449088278@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Peter Ujfalusi [ Upstream commit fd14f4436fd47d5418023c90e933e66d3645552e ] If multiple serializers are connected in the system and the number of channels will need to use more than one serializer the mask to enable the serializers were left to 0 if tdm_mask is provided Fixes: dd55ff8346a97 ("ASoC: davinci-mcasp: Add set_tdm_slots() support") Signed-off-by: Peter Ujfalusi Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/davinci/davinci-mcasp.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c index 624c209c94981..d1935c5c3602b 100644 --- a/sound/soc/davinci/davinci-mcasp.c +++ b/sound/soc/davinci/davinci-mcasp.c @@ -882,14 +882,13 @@ static int mcasp_i2s_hw_param(struct davinci_mcasp *mcasp, int stream, active_slots = hweight32(mcasp->tdm_mask[stream]); active_serializers = (channels + active_slots - 1) / active_slots; - if (active_serializers == 1) { + if (active_serializers == 1) active_slots = channels; - for (i = 0; i < total_slots; i++) { - if ((1 << i) & mcasp->tdm_mask[stream]) { - mask |= (1 << i); - if (--active_slots <= 0) - break; - } + for (i = 0; i < total_slots; i++) { + if ((1 << i) & mcasp->tdm_mask[stream]) { + mask |= (1 << i); + if (--active_slots <= 0) + break; } } } else { -- 2.20.1