Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1404395ybi; Fri, 2 Aug 2019 15:07:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqy7lo7XMSsktB/HsCAdV1DSzXRX8twrvYd0VuQJq6kM8mcnXKD0Ns8gCc1/pbXbMF5JgSUV X-Received: by 2002:a17:90a:de02:: with SMTP id m2mr6375639pjv.18.1564783664919; Fri, 02 Aug 2019 15:07:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564783664; cv=none; d=google.com; s=arc-20160816; b=imVKzzwnKbWITBrp9SCLeBg/+Rw/j1Vg17mIxX5AwiZQfFDU+u8MFwm++fAp4GcZId JiqL4GjfCFaxIvn5JDooSqxgeECjZBDSlsqJ0wn1CMiNhn/8LNi/NYENMS9Zhd1vNwBm FjcHrmwP6E4wDDBBmdkbmR1dNGnEOE5AtlaCiIgy6iVToovP8+U/OWBz8zQ7yXbq+xZF 9TTnJhoD1c2BHJFBCbxxDD8ECsRqPtu53XyXEEbSU4nf9K0pkYsmzY7RmoKXIyh1W2G+ xD+283gGk0W0RUA95S5v4gcQYDOUr+0NjzlmtkIdvKNnGqn2pJ+lKqEtyHCZ7zGGm4ic f4Ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=1Vca3C1gRczyoAbhqRGTBlm0AqJEbd5nkty2myAe63k=; b=FtruN+V39mxbF+a1q162XyUIwbf0rxNl5DjjARlsb/w5IDTdAkEXoSRbK5Lo4ejHfN hC4AwuT4pRvQGuqQq+N4aiBg6RVBIgxZW/zcbbMXU7d9K6J4uvtvjotwOnt+O0BEXJDc 7uEFlQvjPV4sCdU712yNpuCwKB0TPfGEbMJuCd2YxxVz1PzI7HpA203gBS4glVl+TTQL ST/n1WdWX2b9xS1mO4A5X40XPbo04up8n8XGzF7Vi2EjPqfoh/ACFU1koBSH1eptQNVf uPFrUVOaDIDWfy1czypZ9YvPrIuiic5QwQpgYaGVYxzLtOrZKKDxKD7sZxM1MX5cBQn9 iSkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=PJnDK709; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e14si31873070pgg.442.2019.08.02.15.07.29; Fri, 02 Aug 2019 15:07:44 -0700 (PDT) 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=PJnDK709; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392474AbfHBL6e (ORCPT + 99 others); Fri, 2 Aug 2019 07:58:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:52932 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725985AbfHBL6e (ORCPT ); Fri, 2 Aug 2019 07:58:34 -0400 Received: from localhost (unknown [122.167.106.83]) (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 D8F7021726; Fri, 2 Aug 2019 11:58:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564747113; bh=wg1TVivugkT9AShchO3kL9mJx3kBK6RvLWgk7noK1jM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=PJnDK709i8msN2ZlkE4Rf681VV5Hqb7yn6TC1VgSRDoY/LfqwRj36pwTJy9w1Vh3v 4HwAsyYMfFWlngs173KzNMGip3vwmvGT5XEmoJ1OkMG/I81jh8TKfTm7cIP1Iy4jl3 zn9ttp59yCXnGDR0PJBuGfGWHzvbiouAxLKSH/Ak= Date: Fri, 2 Aug 2019 17:27:19 +0530 From: Vinod Koul To: Pierre-Louis Bossart Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, tiwai@suse.de, broonie@kernel.org, gregkh@linuxfoundation.org, jank@cadence.com, srinivas.kandagatla@linaro.org, slawomir.blauciak@intel.com, Sanyog Kale Subject: Re: [RFC PATCH 07/40] soundwire: intel: fix channel number reported by hardware Message-ID: <20190802115719.GJ12733@vkoul-mobl.Dlink> References: <20190725234032.21152-1-pierre-louis.bossart@linux.intel.com> <20190725234032.21152-8-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190725234032.21152-8-pierre-louis.bossart@linux.intel.com> User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 25-07-19, 18:39, Pierre-Louis Bossart wrote: > PDI2 reports an invalid count, force the correct hardware-supported > value > > Signed-off-by: Pierre-Louis Bossart > --- > drivers/soundwire/intel.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c > index 497879dd9c0d..51990b192dc0 100644 > --- a/drivers/soundwire/intel.c > +++ b/drivers/soundwire/intel.c > @@ -401,6 +401,15 @@ intel_pdi_get_ch_cap(struct sdw_intel *sdw, unsigned int pdi_num, bool pcm) > > if (pcm) { > count = intel_readw(shim, SDW_SHIM_PCMSYCHC(link_id, pdi_num)); > + > + /* > + * TODO: pdi number 2 reports channel count as 1 even though > + * it supports 8 channel. Performing hardcoding for pdi > + * number 2. > + */ > + if (pdi_num == 2) > + count = 7; Is that true for all Intel controllers or some generations. Would it not be better to put this under some flag which is set on platform basis? > + > } else { > count = intel_readw(shim, SDW_SHIM_PDMSCAP(link_id)); > count = ((count & SDW_SHIM_PDMSCAP_CPSS) >> > -- > 2.20.1 -- ~Vinod