Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2161749ybi; Sun, 9 Jun 2019 05:19:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqyZgGCbslb5JXVX6urKTibBDemEB12DafzwFZNJjDRa0GM/tefS4JZbRaogI0KNCnhkWlQ6 X-Received: by 2002:a63:db4e:: with SMTP id x14mr11738457pgi.119.1560082767722; Sun, 09 Jun 2019 05:19:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560082767; cv=none; d=google.com; s=arc-20160816; b=xEVlpnmq3dInVY3y0y82vcpkh22isLtE2cYb+9QmZIDu0r6X66JzrK2LC0nXAdf2Y2 iv5GAQ5koEOS9UWbntQwuxgsfJG1XaZoSEmON6+D2RwOMdfWPSb1CNI3S2U2LDQJWeZJ GwrfMggs6zlTJ2tjrOroLSqG/xOa8YKqE7sD1OiOG9xsvGoikLpdRdsKEPKn0g+8tTGS 16pOsv+5fDapHI/CoouwiHzp4lx/22t70HfUx91oarqkeuhDf6sp76WovCWq+MkpgSl7 BYrgZCwng3hmzBYrSanWmDWk2yqSyl1qsLU3WawEL6o2zYJZ/mjOvZYeaIwJfnQSYqg1 1xnw== 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:dkim-signature; bh=LpQBsLxOpX37xTANohRbpLZWsHdkz9zKfiLJ8/LUdwA=; b=KhfmGClj/KxA719/6x8ie4mMLmknnCxcFuH4C3W8B232Fl8TKDDuV4PNfcK8QRQhZL nSSNIE5vHC6802WKolWZ9b5fNkbDpx9+rJY4UZkOiiJCX/y4LWlki4AK42D3Qt/LHzGw M857QKMQJhjHafGESIpcmvYP3ovr00a/UlWwCZ4l39NcmTMYoKAkq0po8vs66kVOfgLc l+AzQjWs3dTX+LidLnfwYBc1k4muXQjav/ZU7nY/MJt5bUUIUSL1zNe268FdAcQsNGlV lFELG/y6/6gY0Q3wyNKwD15+W0NsGxFt8tjkb9ngkyrGJXx519/4/fHucFTJhsS3jgxd iX4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FYLVfUtK; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o37si2770118pjb.20.2019.06.09.05.19.11; Sun, 09 Jun 2019 05:19:27 -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=@linaro.org header.s=google header.b=FYLVfUtK; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728545AbfFIMQ1 (ORCPT + 99 others); Sun, 9 Jun 2019 08:16:27 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:36326 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728462AbfFIMQ1 (ORCPT ); Sun, 9 Jun 2019 08:16:27 -0400 Received: by mail-wm1-f65.google.com with SMTP id u8so5713912wmm.1 for ; Sun, 09 Jun 2019 05:16:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=LpQBsLxOpX37xTANohRbpLZWsHdkz9zKfiLJ8/LUdwA=; b=FYLVfUtKWyeWJSTHK/1+iRBkE/d4V2jWSZ9c2lLXRAsfbgdl8xTBokfr+yFBwU3evv otb4miQ9PfF92NNm3rgFTkfQP2s8sgCNfPDW9UceQvrUGMTKudjrdLH4To9umrIrVIoS 3Pwg94HQ75Ec42mt+5CrbnOvIDPH321+eYILQucaMjnSvtpYD1n5u8qVaIsgzIeAxAhH rvEBIBK0DofGd+yPHdkI9JgUD38Yx++IptYksvylyOPOFgynBvhhQzVyeN8XyIDJuzkI F5Kz/wFM/f0y1iB8XOOLuuvhTL9Cey6q2hRQHjh+X9cM+x+vY7UO4NTYb6AXNnuCmheu bN/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=LpQBsLxOpX37xTANohRbpLZWsHdkz9zKfiLJ8/LUdwA=; b=p2kudk3f2UVGMrRxbrbcXcaDAyRWOtNlEwUHrVvhUYfCgeEgZJ5zTCqqpq+6846kQg 3Rw3eyHQARTWNZJuTuuyWEJ/5rmZy/Fh1IK0qtX549Qn1viFxXM0+/IhGSRS/6H/MYj4 LOX312f8JOmMcfFE2J2MgTP0+JtHWcJ2PLoI5HhEvsQyWKYGdos5jgymg2OYWgAVsfgL PlzZXCMtHoiiwpV2ep8qcHOJVAAxj1I7kNGsOhnwNiAKk57Ezua+8bmdLFGv+pPPTYCu 4soaIj3Zv7KM0JU9uYx4WukfJWxC4QcYkcT6fHznfkr0UZsbILFIqPkLqwW4QIjzYS2L Tx4A== X-Gm-Message-State: APjAAAWSl4vve1S+PgN1Ntf3NK4QVFFFllxe/B9gdFwDucu2RhOEGqKg aFMXi6IPMy2iNdaFjAR+oK7iW974waRiNg== X-Received: by 2002:a7b:c842:: with SMTP id c2mr9970774wml.28.1560082584755; Sun, 09 Jun 2019 05:16:24 -0700 (PDT) Received: from [192.168.86.29] (cpc89974-aztw32-2-0-cust43.18-1.cable.virginm.net. [86.30.250.44]) by smtp.googlemail.com with ESMTPSA id 32sm18825130wra.35.2019.06.09.05.16.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 09 Jun 2019 05:16:24 -0700 (PDT) Subject: Re: [RFC PATCH 1/6] ASoC: core: add support to snd_soc_dai_get_sdw_stream() To: Cezary Rojewski Cc: broonie@kernel.org, vkoul@kernel.org, robh+dt@kernel.org, devicetree@vger.kernel.org, mark.rutland@arm.com, pierre-louis.bossart@linux.intel.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org References: <20190607085643.932-1-srinivas.kandagatla@linaro.org> <20190607085643.932-2-srinivas.kandagatla@linaro.org> <13bfb632-f743-c416-2224-c7acb5b28604@intel.com> From: Srinivas Kandagatla Message-ID: Date: Sun, 9 Jun 2019 13:16:23 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <13bfb632-f743-c416-2224-c7acb5b28604@intel.com> 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 Thanks for taking time to review, On 08/06/2019 20:22, Cezary Rojewski wrote: > On 2019-06-07 10:56, 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 >> --- >>   include/sound/soc-dai.h | 10 ++++++++++ >>   1 file changed, 10 insertions(+) >> >> diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h >> index f5d70041108f..9f90b936fd9a 100644 >> --- a/include/sound/soc-dai.h >> +++ b/include/sound/soc-dai.h >> @@ -177,6 +177,7 @@ struct snd_soc_dai_ops { >>       int (*set_sdw_stream)(struct snd_soc_dai *dai, >>               void *stream, int direction); >> +    void *(*get_sdw_stream)(struct snd_soc_dai *dai, int direction); >>       /* >>        * DAI digital mute - optional. >>        * Called by soc-core to minimise any pops. >> @@ -385,4 +386,13 @@ static inline int >> snd_soc_dai_set_sdw_stream(struct snd_soc_dai *dai, >>           return -ENOTSUPP; >>   } >> +static inline void *snd_soc_dai_get_sdw_stream(struct snd_soc_dai >> *dai, int direction) > > Exceeds character limit? > >> +{ >> +    if (dai->driver->ops->get_sdw_stream) >> +        return dai->driver->ops->get_sdw_stream(dai, direction); >> +    else >> +        return NULL; > > set_ equivalent returns -ENOTSUPP instead. > ERR_PTR seems to make more sense here. > >> + > > Unnecessary newline. I agree with all the comment, will fix this in next version. thanks, srini > >> +} >> + >>   #endif >>