Message ID | 20231025144601.268645-2-krzysztof.kozlowski@linaro.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:d641:0:b0:403:3b70:6f57 with SMTP id cy1csp1224vqb; Wed, 25 Oct 2023 07:47:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEYSJtDvcGuSewgLLvyM8e9ay5Ha0I/L9Ata6URSKciuGhvENeWruz5Eu70wiNLbgb+iFxC X-Received: by 2002:a0d:d8cd:0:b0:5a7:af65:4ec6 with SMTP id a196-20020a0dd8cd000000b005a7af654ec6mr18689417ywe.32.1698245226234; Wed, 25 Oct 2023 07:47:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698245226; cv=none; d=google.com; s=arc-20160816; b=WJe9jL2co1KBGhmLQ78Y9VZuZHFBMCsB5ESSFoAimS+Gw18MKPwMOyKrNwu/xuJ6BL FCtyqPzrdba9jtr90LjAVTvW3EGN9G4c1Ww2YlhaIh13LT0pfxrvqmftJIFmxM95TllO cAH0inTJgzI/lVM0vH7q7le0nU05/N6uQjxoy+i7/YSHM10NGDvjzvRKKdUpS2QkFFZI eNoNFsW44YmBUj8xFe2BTg4w4mFsZ0nnUGxMLXkGbgmUZXOzTK6xq09PQA+KQdSXW+z9 f7FH1+xhaV1gLZNanp9rBL4+dOQO20oFkfA96DMIB85ma2VLfKR0pajgHOK4wavKQSJO JmPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=UXAGRRDQU3qBmM4PuKRmO3omKxsrPu1G2pV7PjgXi9w=; fh=0IMklXoNDxSQfUW/sO2WqdlCNejaMsImVRlXPU3ckDY=; b=Fd7cpWEYyfy4yUqjTbzPwccjAA3vlsD8Hv+JSvu+bglaHKyrYVEv9joiwfZ5i9R/6a IBvLsJRH+rJXuPyeavVXR4RQ0gaCLZOVygfNcxxurVqH/D0cZxDNXOq0pKefyRKNqFTH QFOsdm9kTdHWDNBS1Rb2TTci9Po/4Pyxr2mYTUQxFW7z1sx4oGsfA8JjqPWm+aluJmOu UsEfl+aP5NFJNogzuKK9MBrLARF+S27oDSumObvSbpMEoYI3g17FvXhZQhTbZXj7c1Ab DYcG1UFTXkO6+5QNeRnjAuiiBIjOLDimhqRj1471EiZXwJrs4pPllqLA6u5FzCuylkFp 6yhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PMHCUUkv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id j65-20020a0de044000000b005a210c4511dsi11376872ywe.488.2023.10.25.07.46.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 07:47:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PMHCUUkv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 6AC6B801C9C8; Wed, 25 Oct 2023 07:46:57 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344403AbjJYOqf (ORCPT <rfc822;aposhian.dev@gmail.com> + 26 others); Wed, 25 Oct 2023 10:46:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344178AbjJYOq0 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 25 Oct 2023 10:46:26 -0400 Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 697541B8 for <linux-kernel@vger.kernel.org>; Wed, 25 Oct 2023 07:46:11 -0700 (PDT) Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-5079f9675c6so9043637e87.2 for <linux-kernel@vger.kernel.org>; Wed, 25 Oct 2023 07:46:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698245170; x=1698849970; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=UXAGRRDQU3qBmM4PuKRmO3omKxsrPu1G2pV7PjgXi9w=; b=PMHCUUkvrSK1fb6li3YzbfhtQFF+2mSVW9sqvnHEJ2NsjD/4R5TY2D3PVukGooQgY4 8J/KsbHB5enFa2DAYE7098OvQk1e6rPQYcBZjWd+fx1eOd3+V3+8fXV8QxzuXZX24jU0 bqiCr3YCTIGmyZMqTZCgwkUoHWrkyoTa3qCWMuWh7aN9s1IqDkwBsyM7eLuUzcOx5pxx gjfZHzZEW3fE4mhhwXkKbu7nAAAF8jRlYjbDeuwpp9DiZTqt0Rk8hzLadAVJ3NaA3ZJ0 zxY9YHeNZIhJz85YnpRTv47KrZisUFzLSsSLb5QCei4DuKeEZ7LhR6EGaGQ5d0v0Mzld dmug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698245170; x=1698849970; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UXAGRRDQU3qBmM4PuKRmO3omKxsrPu1G2pV7PjgXi9w=; b=cYpoVAZL4JCrDWbV0hGVjjPWbhPsLY/OoWSoKyAph3LMplQcNvXkrDhVGGj1XP7CzY t+1/OZ5ODsAi1dxKQMdzyitEWiMFQ+715KQGWaL/eYVfhvW6L6w7eruT9Ku79aIDbR6D 0feo59Xv/ZmlKbe1Ig1Qf2i9T8yY7t/D/XsHAp1h+We5O39y5oAAPH8dPUXMRD/C9qHb 2XpVoRhQfyTypeBCnEO5IZ3Msm49lX3qbeo5Hd2ePwjivicS1LcFCsSVUg8g9ebMAI1I UTIDDNpjtj7syt9f1B1aF88RnL0CtE7/rVjAz8KpOgcNZbMzgy76iw6+B7ZuVn6iJoUc eXLQ== X-Gm-Message-State: AOJu0Yy+wslxkjSudONAP4HYPV0IvUKmsHFp0Ysvh/aWXOyjK+woH85l eckR/LHlp9DDtUaeC0976gGp/Q== X-Received: by 2002:ac2:597a:0:b0:507:9623:8ae8 with SMTP id h26-20020ac2597a000000b0050796238ae8mr11125024lfp.29.1698245169886; Wed, 25 Oct 2023 07:46:09 -0700 (PDT) Received: from krzk-bin.. ([178.197.218.126]) by smtp.gmail.com with ESMTPSA id i1-20020a05600011c100b0032dcb08bf94sm12267138wrx.60.2023.10.25.07.46.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 07:46:09 -0700 (PDT) From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> To: Andy Gross <agross@kernel.org>, Bjorn Andersson <andersson@kernel.org>, Konrad Dybcio <konrad.dybcio@linaro.org>, Vinod Koul <vkoul@kernel.org>, Bard Liao <yung-chuan.liao@linux.intel.com>, Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>, Sanyog Kale <sanyog.r.kale@intel.com>, Srinivas Kandagatla <srinivas.kandagatla@linaro.org>, Banajit Goswami <bgoswami@quicinc.com>, Liam Girdwood <lgirdwood@gmail.com>, Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>, linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Subject: [PATCH 2/3] soundwire: qcom: set owner device of runtime stream Date: Wed, 25 Oct 2023 16:46:00 +0200 Message-Id: <20231025144601.268645-2-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231025144601.268645-1-krzysztof.kozlowski@linaro.org> References: <20231025144601.268645-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Wed, 25 Oct 2023 07:46:57 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780739186410243130 X-GMAIL-MSGID: 1780739186410243130 |
Series |
[1/3] soundwire: qcom: drop unneeded DAI .set_stream callback
|
|
Commit Message
Krzysztof Kozlowski
Oct. 25, 2023, 2:46 p.m. UTC
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Store the pointer to struct device of Soundwire controller owning this runtime stream. This can be later used by Soundwire devices, to check if their DAI prepare callback is called for the same bus, in cases where multiple Soundwire buses are used in same soundcard codec list. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Co-developed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> --- drivers/soundwire/qcom.c | 1 + include/linux/soundwire/sdw.h | 2 ++ 2 files changed, 3 insertions(+)
Comments
On 10/25/23 09:46, Krzysztof Kozlowski wrote: > From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> > > Store the pointer to struct device of Soundwire controller owning this > runtime stream. This can be later used by Soundwire devices, to check > if their DAI prepare callback is called for the same bus, in cases where > multiple Soundwire buses are used in same soundcard codec list. > > Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> > Co-developed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > --- > drivers/soundwire/qcom.c | 1 + > include/linux/soundwire/sdw.h | 2 ++ > 2 files changed, 3 insertions(+) > > diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c > index fe65c26c5281..a95f39563b47 100644 > --- a/drivers/soundwire/qcom.c > +++ b/drivers/soundwire/qcom.c > @@ -1298,6 +1298,7 @@ static int qcom_swrm_startup(struct snd_pcm_substream *substream, > goto err_alloc; > } > > + sruntime->dev = ctrl->bus.dev; > ctrl->sruntime[dai->id] = sruntime; > > for_each_rtd_codec_dais(rtd, i, codec_dai) { > diff --git a/include/linux/soundwire/sdw.h b/include/linux/soundwire/sdw.h > index 4f3d14bb1538..650334adc261 100644 > --- a/include/linux/soundwire/sdw.h > +++ b/include/linux/soundwire/sdw.h > @@ -1023,6 +1023,7 @@ struct sdw_stream_params { > * master_list can contain only one m_rt per Master instance > * for a stream > * @m_rt_count: Count of Master runtime(s) in this stream > + * @dev: SoundWire controller owning this runtime stream A stream connects multiple managers and multiple peripherals. The definition above does not make a lot of sense and doesn't work in general since there's no 'owner' really. And nothing prevents the use of multiple controllers, there are not restrictions in the MIPI DisCo spec that prevent a stream from relying on different controllers. > */ > struct sdw_stream_runtime { > const char *name; > @@ -1031,6 +1032,7 @@ struct sdw_stream_runtime { > enum sdw_stream_type type; > struct list_head master_list; > int m_rt_count; > + struct device *dev; > }; > > struct sdw_stream_runtime *sdw_alloc_stream(const char *stream_name);
diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c index fe65c26c5281..a95f39563b47 100644 --- a/drivers/soundwire/qcom.c +++ b/drivers/soundwire/qcom.c @@ -1298,6 +1298,7 @@ static int qcom_swrm_startup(struct snd_pcm_substream *substream, goto err_alloc; } + sruntime->dev = ctrl->bus.dev; ctrl->sruntime[dai->id] = sruntime; for_each_rtd_codec_dais(rtd, i, codec_dai) { diff --git a/include/linux/soundwire/sdw.h b/include/linux/soundwire/sdw.h index 4f3d14bb1538..650334adc261 100644 --- a/include/linux/soundwire/sdw.h +++ b/include/linux/soundwire/sdw.h @@ -1023,6 +1023,7 @@ struct sdw_stream_params { * master_list can contain only one m_rt per Master instance * for a stream * @m_rt_count: Count of Master runtime(s) in this stream + * @dev: SoundWire controller owning this runtime stream */ struct sdw_stream_runtime { const char *name; @@ -1031,6 +1032,7 @@ struct sdw_stream_runtime { enum sdw_stream_type type; struct list_head master_list; int m_rt_count; + struct device *dev; }; struct sdw_stream_runtime *sdw_alloc_stream(const char *stream_name);