Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1403484ybl; Tue, 13 Aug 2019 12:00:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqzkJfNbuMCK5b4N3FbvVCMZrodLTUJ+b7mzj2FelAXLqADOMC/o1HwgpCZBZCXYAFA+TfYm X-Received: by 2002:a62:8246:: with SMTP id w67mr43452948pfd.226.1565722833517; Tue, 13 Aug 2019 12:00:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565722833; cv=none; d=google.com; s=arc-20160816; b=aCLqj2oUAbDYMo16nsj690VC17ndYrqk/zQQFFN5IVn60GeZPyn5YkNVHdmjWmMA1f MQoK7XFu+eZLDRYI0Zurs6ZEYC4W+tfhY4PDeicT/rWg3HCggNozkUALzq1TnqL7nKDW pRAqRvTzwkD9wfDhC6cReAklIUhEfgjuFbxEg2utU/0AUDLs3d9ksglkxNO8BQWYnfTW H5iB4ZQWt4YE9WR65YNmdUE6skZNh8GX+qbRVF28JD/cxOs8Hi+HGSxA4WYCRpuoQP91 weyDGwyZhFWKBQ0HmOLe4qsnau0extZThZldFIF1el3prZNzarhEEvYY7PQM1LBllAar uoBg== 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=rv6/Fb3YONn4TQ1jOoTSZ10tRGCezkbtvXvreA3r1uc=; b=N/07Ovf5U4SFeTSaAxe6oCyqu8RepsJXD143gKyAotMUV766NQJBhX3He59DUgfKVB fqGb291Ru21uHjosEtNCqCiFFzxvzF3q1bIqYCXXpCWBNftP2Cl4CyL7m0vH/UYJHozP EPGBHuCf+ZGiyBHmLd8qgr9yZEqxY5KQbXGYHmBJBB6lSx54e8dVME+Z9nX6yHWy3fXf cYeFgfiQgzvF5wwSd6PyigOWgGAJxUpMkB3U6nbxqZob35hioRYgrTorB+8+Zm+AV7CN mrI5BB86KCZH+X5ROVT9tSaA5/TFsSwA944J8RapoeFBXOptdHauX0AmuAi46b5P1z01 4jZA== 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 n14si6436836pfq.108.2019.08.13.12.00.17; Tue, 13 Aug 2019 12:00:33 -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 S1726479AbfHMR36 (ORCPT + 99 others); Tue, 13 Aug 2019 13:29:58 -0400 Received: from mga12.intel.com ([192.55.52.136]:27763 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726007AbfHMR35 (ORCPT ); Tue, 13 Aug 2019 13:29:57 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Aug 2019 10:29:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,382,1559545200"; d="scan'208";a="177864759" Received: from crojewsk-mobl1.ger.corp.intel.com (HELO [10.252.1.240]) ([10.252.1.240]) by fmsmga007.fm.intel.com with ESMTP; 13 Aug 2019 10:29:52 -0700 Subject: Re: [PATCH v2 3/5] ASoC: core: add support to snd_soc_dai_get_sdw_stream() To: Srinivas Kandagatla Cc: vkoul@kernel.org, broonie@kernel.org, bgoswami@codeaurora.org, plai@codeaurora.org, pierre-louis.bossart@linux.intel.com, robh+dt@kernel.org, devicetree@vger.kernel.org, lgirdwood@gmail.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, spapothi@codeaurora.org References: <20190813083550.5877-1-srinivas.kandagatla@linaro.org> <20190813083550.5877-4-srinivas.kandagatla@linaro.org> <95c517ab-7c63-5d13-a03a-1db01812bb69@intel.com> <71fb21d0-3083-e590-db83-dbe489a4357e@linaro.org> From: Cezary Rojewski Message-ID: <34a1a317-ac6b-bb1e-6b1b-08209f0d1923@intel.com> Date: Tue, 13 Aug 2019 19:29:50 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <71fb21d0-3083-e590-db83-dbe489a4357e@linaro.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019-08-13 18:52, Srinivas Kandagatla wrote: > Thanks for the review, > > On 13/08/2019 17:03, Cezary Rojewski wrote: >> On 2019-08-13 10:35, Srinivas Kandagatla wrote: >>> On platforms which have smart speaker amplifiers connected via >>> soundwire and modeled as aux devices in ASoC, in such usecases machine >>> driver should be able to get sdw master stream from dai so that it can >>> use the runtime stream to setup slave streams. >>> >>> soundwire already as a set function, get function would provide more >>> flexibility to above configurations. >>> >>> Signed-off-by: Srinivas Kandagatla >>> --- >>> +static inline void *snd_soc_dai_get_sdw_stream(struct snd_soc_dai *dai, >>> +                           int direction) >>> +{ >>> +    if (dai->driver->ops->get_sdw_stream) >>> +        return dai->driver->ops->get_sdw_stream(dai, direction); >>> +    else >>> +        return ERR_PTR(-ENOTSUPP); >>> +} >> >> Drop redundant else. > Not all the dai drivers would implement this function, I guess else is > not redundant here! > > --srini >> Eh. By that I meant dropping "else" keyword and reducing indentation for "return ERR_PTR(-ENOTSUPP);" Czarek