From patchwork Tue Jul 2 12:11:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Keyon Jie X-Patchwork-Id: 11027763 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CD09C138B for ; Tue, 2 Jul 2019 12:07:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B2C7B288E2 for ; Tue, 2 Jul 2019 12:07:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A4B81288E5; Tue, 2 Jul 2019 12:07:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CEA25288E2 for ; Tue, 2 Jul 2019 12:07:31 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 2E87A1662; Tue, 2 Jul 2019 14:06:39 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 2E87A1662 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1562069249; bh=XokA50JOtZvlyvoLAyFZnTOaHi27g/7sgXA38CU/API=; h=From:To:Date:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=HV9r6pYFx3oqBt3RMVUvizcyyJmRemXDt/WO9AYb54njWB+jL4/+AHLuInF2koolN oPd8dVrdHebjiwsGOOlk62pEBYG/Ds0vZhG4g1Gs4i/Hm3J8Ui5y8K8aDPDwm4t6iF G80sDMSCh7WwaWnjWMzNduixz0iAOwr6zgFi3Ef0= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 9FBD4F800C9; Tue, 2 Jul 2019 14:06:38 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5AD92F800C9; Tue, 2 Jul 2019 14:06:37 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 7E84CF80058 for ; Tue, 2 Jul 2019 14:06:33 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7E84CF80058 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Jul 2019 05:06:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,443,1557212400"; d="scan'208";a="362199749" Received: from keyon-x299.sh.intel.com ([10.239.159.75]) by fmsmga005.fm.intel.com with ESMTP; 02 Jul 2019 05:06:30 -0700 From: Keyon Jie To: alsa-devel@alsa-project.org Date: Tue, 2 Jul 2019 20:11:43 +0800 Message-Id: <20190702121144.7809-1-yang.jie@linux.intel.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Cc: marcin.rajwa@intel.com, Keyon Jie , ranjani.sridharan@linux.intel.com, Marcin Rajwa , pierre-louis.bossart@linux.intel.com Subject: [alsa-devel] [PATCH 1/2] ASoC: SOF: ipc: update sof_ipc_stream_params X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Marcin Rajwa The host period bytes needs to be passed to firmware. Currently this field is used as notification for host about period copy completion. Therefore we need to split these two informations. Signed-off-by: Marcin Rajwa Signed-off-by: Keyon Jie --- include/sound/sof/stream.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/sound/sof/stream.h b/include/sound/sof/stream.h index 643f175cb479..44acfa62fa69 100644 --- a/include/sound/sof/stream.h +++ b/include/sound/sof/stream.h @@ -83,10 +83,10 @@ struct sof_ipc_stream_params { uint16_t sample_valid_bytes; uint16_t sample_container_bytes; - /* for notifying host period has completed - 0 means no period IRQ */ uint32_t host_period_bytes; + uint16_t no_period_irq; /* 1 means period IRQ mode OFF */ - uint32_t reserved[2]; + uint16_t reserved[3]; uint16_t chmap[SOF_IPC_MAX_CHANNELS]; /**< channel map - SOF_CHMAP_ */ } __packed; From patchwork Tue Jul 2 12:11:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Keyon Jie X-Patchwork-Id: 11027765 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C6E4A138B for ; Tue, 2 Jul 2019 12:08:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ADA26281F9 for ; Tue, 2 Jul 2019 12:08:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A22F6288ED; Tue, 2 Jul 2019 12:08:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 05340281F9 for ; Tue, 2 Jul 2019 12:08:26 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id E1FAD1690; Tue, 2 Jul 2019 14:07:33 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E1FAD1690 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1562069304; bh=mtZv9B1fMV12B4Ur4khSFQrHJnqqv4m1mUAdtJqkYgk=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=vpqOhSqWkN/ocWcmnc3o8iJYibjLz+kHS+0DzQNs+j3mYtE+i8eeewNNG98l3CIvf gGuymxuNeBS0hitPWtIw+yiqYsWAQ0Q4B6+Mf0D3LWSbAQzF+aAjDhzlLiPgSyqEXY jAWDj1CZq9nGnATZwXL9l9BmP8iPd12q9NLHzP/o= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id B6304F800DF; Tue, 2 Jul 2019 14:06:40 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4C03BF800DF; Tue, 2 Jul 2019 14:06:39 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 67A9EF80058 for ; Tue, 2 Jul 2019 14:06:36 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 67A9EF80058 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Jul 2019 05:06:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,443,1557212400"; d="scan'208";a="362199753" Received: from keyon-x299.sh.intel.com ([10.239.159.75]) by fmsmga005.fm.intel.com with ESMTP; 02 Jul 2019 05:06:32 -0700 From: Keyon Jie To: alsa-devel@alsa-project.org Date: Tue, 2 Jul 2019 20:11:44 +0800 Message-Id: <20190702121144.7809-2-yang.jie@linux.intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190702121144.7809-1-yang.jie@linux.intel.com> References: <20190702121144.7809-1-yang.jie@linux.intel.com> MIME-Version: 1.0 Cc: marcin.rajwa@intel.com, Keyon Jie , ranjani.sridharan@linux.intel.com, Marcin Rajwa , pierre-louis.bossart@linux.intel.com Subject: [alsa-devel] [PATCH 2/2] ASoC: SOF: Intel: fix reset of host_period_bytes X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Marcin Rajwa This patch prevents the reset of host period bytes. The parameter has been used to keep information about completion of period copy. Right now we keep this information in period_irq. Signed-off-by: Marcin Rajwa Signed-off-by: Keyon Jie --- sound/soc/sof/intel/hda-pcm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/sof/intel/hda-pcm.c b/sound/soc/sof/intel/hda-pcm.c index 9b730f183529..c7022346aba0 100644 --- a/sound/soc/sof/intel/hda-pcm.c +++ b/sound/soc/sof/intel/hda-pcm.c @@ -116,9 +116,9 @@ int hda_dsp_pcm_hw_params(struct snd_sof_dev *sdev, /* disable SPIB, to enable buffer wrap for stream */ hda_dsp_stream_spib_config(sdev, stream, HDA_DSP_SPIB_DISABLE, 0); - /* set host_period_bytes to 0 if no IPC position */ + /* update no_period_irq flag for ipc params */ if (hda && hda->no_ipc_position) - ipc_params->host_period_bytes = 0; + ipc_params->no_period_irq = 1; ipc_params->stream_tag = hstream->stream_tag;