Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp697273pxv; Thu, 8 Jul 2021 11:52:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx9ZPIuqy30tz9jAWK8uIvmXHQCCehJAdlVW9OIDY+8fl5CTpjmrr1/Hg/nHs8DyUX+grI/ X-Received: by 2002:a05:6402:4388:: with SMTP id o8mr22423120edc.338.1625770372575; Thu, 08 Jul 2021 11:52:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1625770372; cv=pass; d=google.com; s=arc-20160816; b=uWU8PLXQnKGqomxpAH1ZbdUM0EAmIPU170C97Z0z9825IqF7HLYJneHaKFRl3IlFqk 6ZUP4Cq26Za+RUqHs2TG8HbwYBol5j1mk0UXcw614MlMvjtpuLd6Y6I3XO6z9aU2lJOe VIqhwqqgAfWB9rE2k+yIIcmqDPIY9d7Eb+SazvDq48MhR+IH3m1lo+0tp1tbgAucdfem 2vr0ZJ1PEm1SM74cHB83XvOm8Azzd+PZE6Z70M4WgJjEHR77jFuWFpl3xpxbZ0dWuWVk V+sM4HOwwWGTJRCJvSF+A853UEPafvwhj1Bcw/eodbziUjUX1ACsMgsGzNn/agG3q9Gt 02eg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :msip_labels:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature; bh=5s07dK1jW8U0nnAGP3v46WAsnuceVJFhPefLyDb9IZE=; b=gXPrLTo0RXH4rJPtNvb9bL6LtGijzv1SzbN06C+Cf3QSzmHK264GbqepjFPkW0HIBp v54VZaeKNnU1aCRgDEvhHI57/iXfy+9DVcDbL/XyLIEeaQpp7LOAs+m9hJDCvT0YXuMk HzAM1u01iAghXZS8v+3vrvywUGwz3aGQU+fpkSuNw/N4V+yfOgOBxT9KeiVzMwXJVQo5 Ip6qy/gXF1OIknlxwzUnGI3MHZp7BoqpgChS9CI9sD5V+NblfpidYdtQ5TAkMadQnBc5 OcrMjhrXyVKvzzXu2ndyEGICbRzkDxIV58gKFEI5k/WwGRFjQZeo9u5iXvPKUn9FoaIj f0fQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b="CDkdx/pY"; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bx2si3731373edb.442.2021.07.08.11.52.29; Thu, 08 Jul 2021 11:52:52 -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; dkim=pass header.i=@amd.com header.s=selector1 header.b="CDkdx/pY"; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229631AbhGHSyS (ORCPT + 99 others); Thu, 8 Jul 2021 14:54:18 -0400 Received: from mail-sn1anam02on2083.outbound.protection.outlook.com ([40.107.96.83]:42615 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229497AbhGHSyS (ORCPT ); Thu, 8 Jul 2021 14:54:18 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CJkWv3KIAlWHi4ljt6bjpS3cvLWcqqVefcdo3e14MnyuLWwcYG/qadT1k1w8zZl5DHzpsxxkMH18UOwjOv+inBWMrsCF5/3OZEB1rOBh9Zh68MkH/atBm2u4qaaQ6gt8DEi/HZmWG+4RXoaYh1hAqyaKXTwJ8GPs/FwtsQa8JV2yhuFF+pJBXnzDjUk0VToANcNjT53H+jZBW3vAggcLAgI77hdat8kuRog5zWoQxmhmsCDfXrM9ClT8evvBXEwboCsuIbw3e/o1YPVrdec9x/jSi6R6wwZIvEbIjljUvxHPPeYvwRlwSPikqJpiqPH2Gj+o03SeKwuieOIRhKkLxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5s07dK1jW8U0nnAGP3v46WAsnuceVJFhPefLyDb9IZE=; b=J0PNZ6URp3aH1PdfZh1ufAfqYxHfDo0Y9UvnSRa9WCgFDBBQI8aywJfot3SeHbMVwkSRM4YW+IGM4th1v1MWaw3Hhjc4lHA/qR+vtSg6TS1TTqpUFtfxorKT4YgRBnJTjRLpFTuZKgtcif02IgKdimOcLQMc3RuzFDhL20feUjEuAy8c0j+Eddlw42DNjis3TuPK4ZAYG5yK77BK7rNYcS+JuuJNUwUsH3AB535V69UzB5psM3deIAaILtpM2ecJCRQ5EnYwpykrLckU/HADM7mXUt2Lf8X+kmZ+SOgjJWJWRzdIS0x6PAQleTZBnSsrYzUI2BWRPKeeWsbdpx1QCQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5s07dK1jW8U0nnAGP3v46WAsnuceVJFhPefLyDb9IZE=; b=CDkdx/pYw/PKxjRoeSmN6wsfsaOdeHCh0liGm0rj9qzZdJ89GQA2r0xEWvvvuoT9Ge4s9w/dtsNJxs/NkU9RCFAGfnBswSidqlOUS5Lp2lIMCBO3Xxqg540VaLJ8w4ZpLl15BOlaX2Kvp5fAWXCI3GOn9OSwrcAsOi1osGFOBnI= Received: from BL1PR12MB5144.namprd12.prod.outlook.com (2603:10b6:208:316::6) by BL1PR12MB5176.namprd12.prod.outlook.com (2603:10b6:208:311::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.22; Thu, 8 Jul 2021 18:51:34 +0000 Received: from BL1PR12MB5144.namprd12.prod.outlook.com ([fe80::8cb6:59d6:24d0:4dc3]) by BL1PR12MB5144.namprd12.prod.outlook.com ([fe80::8cb6:59d6:24d0:4dc3%9]) with mapi id 15.20.4308.023; Thu, 8 Jul 2021 18:51:34 +0000 From: "Deucher, Alexander" To: "Mukunda, Vijendar" , "broonie@kernel.org" , "alsa-devel@alsa-project.org" CC: "amistry@google.com" , "nartemiev@google.com" , "Hiregoudar, Basavaraj" , "Dommati, Sunil-kumar" , "Mukunda, Vijendar" , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Chuhong Yuan , Kuninori Morimoto , open list Subject: RE: [PATCH V3] ASoC: add a flag to reverse the stop sequence Thread-Topic: [PATCH V3] ASoC: add a flag to reverse the stop sequence Thread-Index: AQHXdB/6HEHmc54rmk+tVDXa3KeHvas5a2nA Date: Thu, 8 Jul 2021 18:51:33 +0000 Message-ID: References: <20210708175529.13313-1-vijendar.mukunda@amd.com> In-Reply-To: <20210708175529.13313-1-vijendar.mukunda@amd.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_0d814d60-469d-470c-8cb0-58434e2bf457_Enabled=true; MSIP_Label_0d814d60-469d-470c-8cb0-58434e2bf457_SetDate=2021-07-08T18:51:30Z; MSIP_Label_0d814d60-469d-470c-8cb0-58434e2bf457_Method=Privileged; MSIP_Label_0d814d60-469d-470c-8cb0-58434e2bf457_Name=Public_0; MSIP_Label_0d814d60-469d-470c-8cb0-58434e2bf457_SiteId=3dd8961f-e488-4e60-8e11-a82d994e183d; MSIP_Label_0d814d60-469d-470c-8cb0-58434e2bf457_ActionId=72815fa9-2c5f-4d3b-9ebc-b81447d54a8d; MSIP_Label_0d814d60-469d-470c-8cb0-58434e2bf457_ContentBits=1 authentication-results: amd.com; dkim=none (message not signed) header.d=none;amd.com; dmarc=none action=none header.from=amd.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 488ac769-885c-45ff-1277-08d942416852 x-ms-traffictypediagnostic: BL1PR12MB5176: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4714; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: mumReqmDUmpTFETaXm4Wf5Cbmr5/olVxsCGElx4gEjFq6eQoC60wkUsHDTxYc8KhotQoUA/rmsJc6YxwM5E/Jw8HqkDNHlBBhC3E5GTgLgdwHryjZTigcWpMlRjtn9+eTpA5XEUIDsmJws42vawfFeUkKsbnMvh4eI53FYc4Xkit/ZgOzKFXlealmRFxSCQ33WmFpQMMKMw/szUxT4cwkmfPwwxJVqX013D5mb2JHjXR+TpO2O52H46m+io6Qr1vHpTzUsCrsoiACUgs2RqkyBRIjkpgI0l/aT1xtxVZB5+cEMAhUqX3fpeNB8kycd8256EpbS8QSFx9K/kZ2i5o6lALqh7PsaWJWFax+95qfHLTqYEodJsn/qaqOh4tOQ8+Zr/jvrAca7OMHlvzgNg57dBQOEOEaygzUcMbwtsaRVWvEofBVCtRY2Mhy9q5SpML5Esc9i9WeBln7edql86Ploj00Pwklhsi8VbPnsHbb+e54WXyHv6laQWMw6XYkMxLWK2DdXbEfVOVpZ4TK/JbQw9/x3OD7FX3wL1obIh6HLvFg3Y87XwHAV1XJjP13rRx8JhoZp1BA6//vZ2M1bIPip6ZMY7zuVvG6Y19ZQ8bFvA0yVFeeSkFfAVPc278pjYZFnpyBdZDV3uDC46D3xIIjw== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BL1PR12MB5144.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(376002)(346002)(396003)(39860400002)(136003)(366004)(7696005)(2906002)(5660300002)(71200400001)(83380400001)(110136005)(54906003)(55016002)(53546011)(8936002)(8676002)(6506007)(316002)(64756008)(66476007)(66556008)(66446008)(478600001)(66946007)(7416002)(76116006)(9686003)(122000001)(26005)(33656002)(4326008)(186003)(52536014)(38100700002)(86362001);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?Jbog7hr4tpXPFLg+6X9SDxiXa5Hiw/9J7RJC9mNF3ir5ze4CGyrnrg+Xyc0b?= =?us-ascii?Q?SfSfyG5nXbAGMOvXBVpwFDVyx6jcS7GEwtXOzh3oZy1QHEx25jgakyGTox9A?= =?us-ascii?Q?hFfDEcSQNTHglb4Mu3KdphOqVYVS9aKp/n96djoMPhFZqoWG1JPwtM7M67sf?= =?us-ascii?Q?N/UlqUZU3kMHMLsrNHM2LyMvnlMIQthmQ5ge7tghmpT9vFOBHI4v6HGZyy9W?= =?us-ascii?Q?xlFyH2drPk9o/EKvCebt454lVNkZ50ta8hzZRJc++cufagjooFtZTf+WvAFs?= =?us-ascii?Q?Zk+vS9peyCHhuDWSr1e8loTz/GreKf3S38CyxrZ7z95mK/j9tXMy8nNQIIcT?= =?us-ascii?Q?RDtuaOq5js3Th16QWwnfJeD+lEYd4ONQR68ky5Kt7TQYPJgGaLOsg2od0L/s?= =?us-ascii?Q?qL2oM00GL35Mc5y2bWgs9mZPq88kmPdfI6CgPDpjgWMaVkzDkaxEmx+hq2B6?= =?us-ascii?Q?uGzPAmH4/JSBR2qZ0wM0jmdBdrJuKThCws08keD4F/eZ95cSgCfIF5qmdQ91?= =?us-ascii?Q?+AFXhuCj7jk3v/ZZA0CWHDTbUVFbxjaIAwUzuTf2H51Y/QTksEUlUdwY04eZ?= =?us-ascii?Q?k6sXXPLPZvhWZvvvjbxFFLn5bt7flrbroKMh0xJJbmmNZ7T8tRPkrkuMubht?= =?us-ascii?Q?iZhTCe58QD2LRgJ6MHufBWyZB9ozWHuMN95mEgVdskdtg6UIuLABWn2f+Kzj?= =?us-ascii?Q?VQc0i0jV6BPjlbmgZbP5sdhsb7VV6lAWZ1/smk0CceUF/Jsbh6kq+BKtPT19?= =?us-ascii?Q?Tqw6QnlnS3LimYBCj2KaC0mMz2M+2D7FbMqvNbOpUFH9igV1f8NmgUCeNhYu?= =?us-ascii?Q?0xydR/3N3AIoySe/DAextSEaElrm0CBByluD8kyVvptXB2UrU9jJyr8CtVRN?= =?us-ascii?Q?9PArwemHl5P8+4PNvlyLHDyo6Whc+Zr9/VgYHP0Haf9udfEETY5z20Tpm+aP?= =?us-ascii?Q?Wr5RQT4d8bIJTv9eO9qb/n2unBpZ5hOsj6eO566MFGNFczt1T08yCikKhCp9?= =?us-ascii?Q?5sFIrNIykjF7bPtzPZWkFIApvHLVoK1JKIPQNflELTOncCfEtWw0JC/q17oc?= =?us-ascii?Q?3j9HuAIyJ2F47aleyIamn/9AXtxogxYMkin+LVS0VCBdwZZrMbiZV9rfwDXj?= =?us-ascii?Q?F+FfxcdVLs0nwAmUsfz5Al2OGVQViZwXcd858vwdfWXZspDrB4f7bu2tT1gk?= =?us-ascii?Q?/2Os39MXtgoKgL//p9vkqIs47BlXNs3rwuttdZ5STfSQicwgcLVFNsgo0lgA?= =?us-ascii?Q?UZ3a7Z2aKVXLpOWXwZByBSa2y4Wv0s18T3Mq4rOnWdVW2JPtGz+G356UfUCI?= =?us-ascii?Q?F78zmlsBYe8zIwrR72djgq/t?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BL1PR12MB5144.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 488ac769-885c-45ff-1277-08d942416852 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Jul 2021 18:51:33.8907 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: +qh3Eaw+o2DjhyI7ENqoqFdRLW7A5w/iP3TksU1of4dOMvQ9zOSL1LT/A5sTrBIc74jOvXXeWGosm1QoYTFWlA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR12MB5176 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [AMD Public Use] > -----Original Message----- > From: Vijendar Mukunda > Sent: Thursday, July 8, 2021 1:55 PM > To: broonie@kernel.org; alsa-devel@alsa-project.org > Cc: amistry@google.com; nartemiev@google.com; Deucher, Alexander > ; Hiregoudar, Basavaraj > ; Dommati, Sunil-kumar kumar.Dommati@amd.com>; Mukunda, Vijendar > ; Liam Girdwood ; > Jaroslav Kysela ; Takashi Iwai ; > Chuhong Yuan ; Kuninori Morimoto > ; open list kernel@vger.kernel.org> > Subject: [PATCH V3] ASoC: add a flag to reverse the stop sequence >=20 > From: Vijendar Mukunda >=20 > On stream stop, currently CPU DAI stop sequence invoked first followed by > DMA. For Few platforms, it is required to stop the DMA first before stopp= ing > CPU DAI. >=20 > For Stoneyridge platform, it is required to invoke DMA driver stop first = rather > than invoking DWC I2S controller stop. > Introduced new flag in dai_link structure for reordering stop sequence. > Based on flag check, ASoC core will re-order the stop sequence. >=20 You should add a fixes tag as well for stable: Fixes: 4378f1fbe92405 ("ASoC: soc-pcm: Use different sequence for start/sto= p trigger") Alex > Signed-off-by: Vijendar Mukunda > --- > v2 -> v3: moved "stop_dma_first" flag from card structure > to dai_link structure and modified code to use > "stop_dma_first" flag. > v1 -> v2: renamed flag as "stop_dma_fist" > fixed build error by removing extra + symbol > sound/soc/soc-pcm.c:1019:3: error: expected expression before '= struct' > 1019 | + struct snd_soc_card *card =3D rtd->card; >=20 > include/sound/soc.h | 6 ++++++ > sound/soc/amd/acp-da7219-max98357a.c | 5 +++++ > sound/soc/soc-pcm.c | 22 ++++++++++++++++------ > 3 files changed, 27 insertions(+), 6 deletions(-) >=20 > diff --git a/include/sound/soc.h b/include/sound/soc.h index > 675849d07284..8e6dd8a257c5 100644 > --- a/include/sound/soc.h > +++ b/include/sound/soc.h > @@ -712,6 +712,12 @@ struct snd_soc_dai_link { > /* Do not create a PCM for this DAI link (Backend link) */ > unsigned int ignore:1; >=20 > + /* This flag will reorder stop sequence. By enabling this flag > + * DMA controller stop sequence will be invoked first followed by > + * CPU DAI driver stop sequence > + */ > + unsigned int stop_dma_first:1; > + > #ifdef CONFIG_SND_SOC_TOPOLOGY > struct snd_soc_dobj dobj; /* For topology */ #endif diff --git > a/sound/soc/amd/acp-da7219-max98357a.c b/sound/soc/amd/acp-da7219- > max98357a.c > index 84e3906abd4f..9449fb40a956 100644 > --- a/sound/soc/amd/acp-da7219-max98357a.c > +++ b/sound/soc/amd/acp-da7219-max98357a.c > @@ -576,6 +576,7 @@ static struct snd_soc_dai_link cz_dai_5682_98357[] = =3D { > | SND_SOC_DAIFMT_CBM_CFM, > .init =3D cz_rt5682_init, > .dpcm_playback =3D 1, > + .stop_dma_first =3D 1, > .ops =3D &cz_rt5682_play_ops, > SND_SOC_DAILINK_REG(designware1, rt5682, platform), > }, > @@ -585,6 +586,7 @@ static struct snd_soc_dai_link cz_dai_5682_98357[] = =3D { > .dai_fmt =3D SND_SOC_DAIFMT_I2S | > SND_SOC_DAIFMT_NB_NF > | SND_SOC_DAIFMT_CBM_CFM, > .dpcm_capture =3D 1, > + .stop_dma_first =3D 1, > .ops =3D &cz_rt5682_cap_ops, > SND_SOC_DAILINK_REG(designware2, rt5682, platform), > }, > @@ -594,6 +596,7 @@ static struct snd_soc_dai_link cz_dai_5682_98357[] = =3D { > .dai_fmt =3D SND_SOC_DAIFMT_I2S | > SND_SOC_DAIFMT_NB_NF > | SND_SOC_DAIFMT_CBM_CFM, > .dpcm_playback =3D 1, > + .stop_dma_first =3D 1, > .ops =3D &cz_rt5682_max_play_ops, > SND_SOC_DAILINK_REG(designware3, mx, platform), > }, > @@ -604,6 +607,7 @@ static struct snd_soc_dai_link cz_dai_5682_98357[] = =3D { > .dai_fmt =3D SND_SOC_DAIFMT_I2S | > SND_SOC_DAIFMT_NB_NF > | SND_SOC_DAIFMT_CBM_CFM, > .dpcm_capture =3D 1, > + .stop_dma_first =3D 1, > .ops =3D &cz_rt5682_dmic0_cap_ops, > SND_SOC_DAILINK_REG(designware3, adau, platform), > }, > @@ -614,6 +618,7 @@ static struct snd_soc_dai_link cz_dai_5682_98357[] = =3D { > .dai_fmt =3D SND_SOC_DAIFMT_I2S | > SND_SOC_DAIFMT_NB_NF > | SND_SOC_DAIFMT_CBM_CFM, > .dpcm_capture =3D 1, > + .stop_dma_first =3D 1, > .ops =3D &cz_rt5682_dmic1_cap_ops, > SND_SOC_DAILINK_REG(designware2, adau, platform), > }, > diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index > 46513bb97904..d1c570ca21ea 100644 > --- a/sound/soc/soc-pcm.c > +++ b/sound/soc/soc-pcm.c > @@ -1015,6 +1015,7 @@ static int soc_pcm_hw_params(struct > snd_pcm_substream *substream, >=20 > static int soc_pcm_trigger(struct snd_pcm_substream *substream, int cmd) > { > + struct snd_soc_pcm_runtime *rtd =3D > asoc_substream_to_rtd(substream); > int ret =3D -EINVAL, _ret =3D 0; > int rollback =3D 0; >=20 > @@ -1055,14 +1056,23 @@ static int soc_pcm_trigger(struct > snd_pcm_substream *substream, int cmd) > case SNDRV_PCM_TRIGGER_STOP: > case SNDRV_PCM_TRIGGER_SUSPEND: > case SNDRV_PCM_TRIGGER_PAUSE_PUSH: > - ret =3D snd_soc_pcm_dai_trigger(substream, cmd, rollback); > - if (ret < 0) > - break; > + if (rtd->dai_link->stop_dma_first) { > + ret =3D snd_soc_pcm_component_trigger(substream, > cmd, rollback); > + if (ret < 0) > + break; >=20 > - ret =3D snd_soc_pcm_component_trigger(substream, cmd, > rollback); > - if (ret < 0) > - break; > + ret =3D snd_soc_pcm_dai_trigger(substream, cmd, > rollback); > + if (ret < 0) > + break; > + } else { > + ret =3D snd_soc_pcm_dai_trigger(substream, cmd, > rollback); > + if (ret < 0) > + break; >=20 > + ret =3D snd_soc_pcm_component_trigger(substream, > cmd, rollback); > + if (ret < 0) > + break; > + } > ret =3D snd_soc_link_trigger(substream, cmd, rollback); > break; > } > -- > 2.17.1