Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp3117301ybh; Mon, 5 Aug 2019 12:21:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqyw17/e+OY5K8h2yEAtcXPOjmHBj3crMEMWOl/CizSYTmsQdMdq55UUIjdrrinWP8mhzUib X-Received: by 2002:a17:902:b20c:: with SMTP id t12mr146934907plr.285.1565032867899; Mon, 05 Aug 2019 12:21:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565032867; cv=none; d=google.com; s=arc-20160816; b=sILVP2Wbn/yb9aA/wxwbgWNimWquE3PbygIitf1Tp8YIch4h5XBLpUp8AUghWVzCTs nAtYXz9V1d8NSIzwirgdLazF+CuBiFz+KkC+Vjm08HHw6LASKIL1xf+D3HbmbEH9ALs7 4Bf145JeUeDuZf/dFneGyLSUWb5Ubpgi3VYlbpukIkeys1Iz5t2QuNhAI+Gvor54vtzs Lm+KhT2SGNmbVBkAlQVqKQ9C7rIRFN7vB5vsrlltum7ZalK+V16khmBAGV9zrHQrcIzH 1h4nfSMZkpIbLuUeZPWHGOcyw4fkltgHeUQHkzTtF9RG780/yn7HuuVUU5na+orFY/wL h6mg== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=dhf9fNK6eU2ks6vIQxjjnHv/4gJt3MouxdJhptub2/g=; b=u4OjgxWkqTPlbf9Kk+jGLO39stks2TOpaVv+tYRsb3dGAb/7Wbxt84T9nr/59ZaCFu ZgTV1ueo8lfnuQziKonaqNPIPowMct6trfrPRaZT2t3iz+7l+lW+C9LUof69y+dFpCzP YncoEDztpAqYP2Xrjei75kiGPQ9hJih+lvIoXkY9c9LblEYfQ3JMtXBJEgNo9Hac173W 5SnbJXh47c1s9bInZ7Bcr0U8GetAmRI5EEExhBqIiDo5Tiw/SpGARxWKviiYSjOJNMmn +RbSBSeU7fZ4ezvLpPG/i+W2cYMrnnLq9EjN104JxY1hCJMMKgpvNO1NZdXWUMlqsuwV YdwA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t3si45814199pfh.218.2019.08.05.12.20.52; Mon, 05 Aug 2019 12:21:07 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730371AbfHETS4 (ORCPT + 99 others); Mon, 5 Aug 2019 15:18:56 -0400 Received: from mga02.intel.com ([134.134.136.20]:37794 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728831AbfHETS4 (ORCPT ); Mon, 5 Aug 2019 15:18:56 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Aug 2019 12:18:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,350,1559545200"; d="scan'208";a="373180072" Received: from amerhebi-mobl1.amr.corp.intel.com (HELO [10.251.154.70]) ([10.251.154.70]) by fmsmga005.fm.intel.com with ESMTP; 05 Aug 2019 12:18:35 -0700 Subject: Re: [alsa-devel] [RFC PATCH 28/40] soundwire: intel: handle disabled links To: Sanyog Kale Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, tiwai@suse.de, broonie@kernel.org, vkoul@kernel.org, gregkh@linuxfoundation.org, jank@cadence.com, srinivas.kandagatla@linaro.org, slawomir.blauciak@intel.com References: <20190725234032.21152-1-pierre-louis.bossart@linux.intel.com> <20190725234032.21152-29-pierre-louis.bossart@linux.intel.com> <20190805165729.GC24889@buildpc-HP-Z230> From: Pierre-Louis Bossart Message-ID: <4c4e64fb-9657-0312-a19f-2a17b44fbae3@linux.intel.com> Date: Mon, 5 Aug 2019 14:18:35 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190805165729.GC24889@buildpc-HP-Z230> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/5/19 11:57 AM, Sanyog Kale wrote: > On Thu, Jul 25, 2019 at 06:40:20PM -0500, Pierre-Louis Bossart wrote: >> On most hardware platforms, SoundWire interfaces are pin-muxed with >> other interfaces (typically DMIC or I2S) and the status of each link >> needs to be checked at boot time. >> >> For Intel platforms, the BIOS provides a menu to enable/disable the >> links separately, and the information is provided to the OS with an >> Intel-specific _DSD property. The same capability will be added to >> revisions of the MIPI DisCo specification. [snip] >> diff --git a/include/linux/soundwire/sdw.h b/include/linux/soundwire/sdw.h >> index c7dfc824be80..f78b076a8782 100644 >> --- a/include/linux/soundwire/sdw.h >> +++ b/include/linux/soundwire/sdw.h >> @@ -380,6 +380,7 @@ struct sdw_slave_prop { >> * @err_threshold: Number of times that software may retry sending a single >> * command >> * @mclk_freq: clock reference passed to SoundWire Master, in Hz. >> + * @hw_disabled: if true, the Master is not functional, typically due to pin-mux >> */ >> struct sdw_master_prop { >> u32 revision; >> @@ -395,6 +396,7 @@ struct sdw_master_prop { >> bool dynamic_frame; >> u32 err_threshold; >> u32 mclk_freq; >> + bool hw_disabled; > > Do we have such cases where some of SoundWire links are disabled and > some enabled? Yes, by default my ICL test board uses HDaudio for the codec so the SoundWire link0 is disabled. If I rework the board and change the BIOS advanced menu then SoundWire link0 is enabled. This information is dynamically provided to the OS after the _INI step. SoundWire-2/3 are used typically for attached DMICs or for a combination of SoundWire amplifier and mic capture. It's really platform-specific. > >> }; >> >> int sdw_master_read_prop(struct sdw_bus *bus); >> -- >> 2.20.1 >> >