From: Mark Brown <broonie@kernel.org>
To: Akshu Agrawal <akshu.agrawal@amd.com>
Cc: djkurtz@chromium.org, Alexander.Deucher@amd.com,
Liam Girdwood <lgirdwood@gmail.com>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
"Mukunda, Vijendar" <Vijendar.Mukunda@amd.com>,
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
Wei Yongjun <weiyongjun1@huawei.com>,
"moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER
MANAGEM..." <alsa-devel@alsa-project.org>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] ASoC: AMD: Fix simultaneous playback and capture on different channel
Date: Mon, 10 Sep 2018 12:38:20 +0100 [thread overview]
Message-ID: <20180910113820.GD5856@sirena.org.uk> (raw)
In-Reply-To: <1536566815-3271-1-git-send-email-akshu.agrawal@amd.com>
[-- Attachment #1: Type: text/plain, Size: 1126 bytes --]
On Mon, Sep 10, 2018 at 01:36:29PM +0530, Akshu Agrawal wrote:
> If capture and playback are started on different channel (I2S/BT)
> there is a possibilty that channel information passed from machine driver
> is overwritten before the configuration is done in dma driver.
> Example:
> 113.597588: cz_max_startup: ---playback sets BT channel
> 113.597694: cz_dmic1_startup: ---capture sets I2S channel
> 113.597979: acp_dma_hw_params: ---configures capture for I2S channel
> 113.598114: acp_dma_hw_params: ---configures playback for I2S channel
>
> This is fixed by having lock between startup and prepare. This ensures
> no other codec startup gets called between a codec's startup(where channel
> info is set) and hw_params(where channel info is read).
This isn't viable - the driver will deadlock if the application hits an
error and never gets to startup, or if the application tries to
simultaneously configure two channels (ie, do all the prepares and then
all the parameter configuration and then startup). The DMA driver needs
to remember the configurations for the different channels separately.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2018-09-10 11:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-10 8:06 Akshu Agrawal
2018-09-10 8:06 ` [PATCH 2/2] ASoC: AMD: Ensure reset bit is cleared before configuring Akshu Agrawal
2018-09-10 11:35 ` Applied "ASoC: AMD: Ensure reset bit is cleared before configuring" to the asoc tree Mark Brown
2018-09-10 11:38 ` Mark Brown [this message]
2018-09-10 17:21 ` [PATCH 1/2] ASoC: AMD: Fix simultaneous playback and capture on different channel Agrawal, Akshu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180910113820.GD5856@sirena.org.uk \
--to=broonie@kernel.org \
--cc=Alexander.Deucher@amd.com \
--cc=Vijendar.Mukunda@amd.com \
--cc=akshu.agrawal@amd.com \
--cc=alsa-devel@alsa-project.org \
--cc=djkurtz@chromium.org \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.com \
--cc=weiyongjun1@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome