[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180430151004.edal7xei4okf7hao@localhost.localdomain>
Date: Mon, 30 Apr 2018 16:10:04 +0100
From: Charles Keepax <ckeepax@...nsource.cirrus.com>
To: Jerome Brunet <jbrunet@...libre.com>
CC: Mark Brown <broonie@...nel.org>,
Liam Girdwood <lgirdwood@...il.com>,
Kevin Hilman <khilman@...libre.com>,
<alsa-devel@...a-project.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [alsa-devel] [PATCH RFC] ASoC: dai playback_active and
capture_active may be greater than 1
On Thu, Apr 19, 2018 at 04:06:12PM +0200, Jerome Brunet wrote:
> At the moment playback_active and capture_active are using only 1 bit so
> the maximum active count is 1.
>
> However, snd_soc_runtime_activate() may be called several time on the
> same dai. This happens when a dai is part of several dai_links. It is
> often the case for "snd-soc-dummy-dai".
>
> This is a problem if snd_soc_runtime_activate() is called an even number
> of times on a dai. In this case the active count overflow back to 0. As
> consequence, ASoC functions, such as soc_dpcm_runtime_update(), won't run
> correctly.
>
> Storing these usage counts on plain 'unsigned int' solves the problem.
>
> Fixes: f0fba2ad1b6b ("ASoC: multi-component - ASoC Multi-Component Support")
> Signed-off-by: Jerome Brunet <jbrunet@...libre.com>
> ---
Reviewed-by: Charles Keepax <ckeepax@...nsource.cirrus.com>
Thanks,
Charles
Powered by blists - more mailing lists