Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp163832pxk; Tue, 1 Sep 2020 19:58:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwK/z2R5DhQEEb+lfsltGqV5PD1V+CP57iFcEwrNGi21ndXZjgyZb+cNQF925zeFaXKbGbw X-Received: by 2002:a05:6402:3193:: with SMTP id di19mr3140609edb.211.1599015505933; Tue, 01 Sep 2020 19:58:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599015505; cv=none; d=google.com; s=arc-20160816; b=UyfLxKG5NXItI4ElPQ6LdCPIEWu2Ro5tymuTeNxkOTRHa0YmODnVcG2dsN0mBTApGi glMu8F6k4pO/HJht6zzzDA6GRSzo2Q5y8ml3+txGQVXn3KPg3qBhkoNcwwYhaJN1ok99 SmRkgiQyavE4FcC4hSx5kLU8eZDG3eelmYuD4r045L/od7TvjD4qezeV58q6IA5kslpu 7gTi1SZaJZVcuUjWLqJ1m/bdMnEmf/bcT5dXupWzerWXL8DO5/H+0JjsulYxREkTrpl4 +3q+NIDGLnUR0hq8v8P/PjpHAA3VrQm0IN1zW5WDLMguPh8iCNCUOjoIorhdmVnslW47 mRQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:ironport-sdr:ironport-sdr; bh=MPFaeKvEFVV77owPI322uIzBZKQJea3ps75jRpLNZ9M=; b=iq2XwPwV2GEwukV85mpC6bJ62AJMUT8U7hgRMzYtD+wdPpQOEcE6jIr0WKG+d9OopK fM9zZV7F/yZBTKzqnZuatB5mo61w9xVRTFLpK3o/hpJGmcYFVl55K8MrdgutE9/R5kLV jrf69FUjyJR5bF/nz+Aru/3BgATXv59eHcdeBnHQNwbQIb1MnKH9Mebt1eLtmoaNDgpZ L6jmbuCWPm/lZF17UAZA8D+Fv1cUkI6Sb4BygMgDaR+H5GC6jm3IeCNy6WbbUeg2kzDP d7OuwnY9cuFV9ZTB+7VUXYu8mINRkWHMkvbREj+GZs8J85bUen+g4XVHMC1F5Tr09ktG cjHA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id ci4si1708491ejc.612.2020.09.01.19.58.03; Tue, 01 Sep 2020 19:58:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1727025AbgIBC46 (ORCPT + 99 others); Tue, 1 Sep 2020 22:56:58 -0400 Received: from mga07.intel.com ([134.134.136.100]:49594 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726724AbgIBC4s (ORCPT ); Tue, 1 Sep 2020 22:56:48 -0400 IronPort-SDR: H4K2c5vdM4dNHduGkgBHxhmJxVJyPiZJbRQzentWvzhk5JazkWQdx/+MNcbc4vbqcJ9SSKl/5H zJBAUX4e9kVA== X-IronPort-AV: E=McAfee;i="6000,8403,9731"; a="221528387" X-IronPort-AV: E=Sophos;i="5.76,381,1592895600"; d="scan'208";a="221528387" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Sep 2020 19:56:47 -0700 IronPort-SDR: vENoVZho5q0tjfgz/0WduM04h9mHi5k60nxyL1OATxWm9K0T1eqriCsAtqoWo8cMD1BaBAjjT+ MkE0noA68WOw== X-IronPort-AV: E=Sophos;i="5.76,381,1592895600"; d="scan'208";a="477457317" Received: from bard-ubuntu.sh.intel.com ([10.239.13.33]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Sep 2020 19:56:43 -0700 From: Bard Liao To: alsa-devel@alsa-project.org, vkoul@kernel.org Cc: vinod.koul@linaro.org, linux-kernel@vger.kernel.org, tiwai@suse.de, broonie@kernel.org, gregkh@linuxfoundation.org, jank@cadence.com, srinivas.kandagatla@linaro.org, rander.wang@linux.intel.com, ranjani.sridharan@linux.intel.com, hui.wang@canonical.com, pierre-louis.bossart@linux.intel.com, sanyog.r.kale@intel.com, mengdong.lin@intel.com, bard.liao@intel.com Subject: [PATCH 6/7] soundwire: intel: remove .trigger operation Date: Tue, 1 Sep 2020 23:02:39 +0800 Message-Id: <20200901150240.19288-7-yung-chuan.liao@linux.intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200901150240.19288-1-yung-chuan.liao@linux.intel.com> References: <20200901150240.19288-1-yung-chuan.liao@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Pierre-Louis Bossart Now that the stream trigger is handled at the dai-link level, there is no need for a dai-level trigger any longer. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao --- drivers/soundwire/intel.c | 39 --------------------------------------- 1 file changed, 39 deletions(-) diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c index bbfb86ffa653..39d3186335ac 100644 --- a/drivers/soundwire/intel.c +++ b/drivers/soundwire/intel.c @@ -977,43 +977,6 @@ static int intel_prepare(struct snd_pcm_substream *substream, return ret; } -static int intel_trigger(struct snd_pcm_substream *substream, int cmd, - struct snd_soc_dai *dai) -{ - struct sdw_cdns_dma_data *dma; - int ret; - - dma = snd_soc_dai_get_dma_data(dai, substream); - if (!dma) { - dev_err(dai->dev, "failed to get dma data in %s", __func__); - return -EIO; - } - - switch (cmd) { - case SNDRV_PCM_TRIGGER_START: - case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: - case SNDRV_PCM_TRIGGER_RESUME: - ret = sdw_enable_stream(dma->stream); - break; - - case SNDRV_PCM_TRIGGER_PAUSE_PUSH: - case SNDRV_PCM_TRIGGER_SUSPEND: - case SNDRV_PCM_TRIGGER_STOP: - ret = sdw_disable_stream(dma->stream); - break; - - default: - ret = -EINVAL; - break; - } - - if (ret) - dev_err(dai->dev, - "%s trigger %d failed: %d", - __func__, cmd, ret); - return ret; -} - static int intel_hw_free(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) { @@ -1115,7 +1078,6 @@ static const struct snd_soc_dai_ops intel_pcm_dai_ops = { .startup = intel_startup, .hw_params = intel_hw_params, .prepare = intel_prepare, - .trigger = intel_trigger, .hw_free = intel_hw_free, .shutdown = intel_shutdown, .set_sdw_stream = intel_pcm_set_sdw_stream, @@ -1126,7 +1088,6 @@ static const struct snd_soc_dai_ops intel_pdm_dai_ops = { .startup = intel_startup, .hw_params = intel_hw_params, .prepare = intel_prepare, - .trigger = intel_trigger, .hw_free = intel_hw_free, .shutdown = intel_shutdown, .set_sdw_stream = intel_pdm_set_sdw_stream, -- 2.17.1