Revert "ASoC: soc-pcm: Fix DPCM lockdep warning due to nested stream locks"

This reverts commit a536c367b0 which is
commit 3c75c0ea5da749bd1efebd1387f2e5011b8c7d78 upstream.

It is part of a series of ASoC patches that break the Android abi.  If
they are needed in the future they can be brought back in an ABI-safe
way.

Bug: 161946584
Change-Id: I2f47c6ca1b7b011db47e9bc0922e6762adbd5116
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Greg Kroah-Hartman
2023-06-24 10:32:04 +00:00
parent f5a2ab8902
commit 511999460b
3 changed files with 3 additions and 31 deletions

View File

@@ -624,7 +624,6 @@ void snd_pcm_stream_unlock(struct snd_pcm_substream *substream);
void snd_pcm_stream_lock_irq(struct snd_pcm_substream *substream);
void snd_pcm_stream_unlock_irq(struct snd_pcm_substream *substream);
unsigned long _snd_pcm_stream_lock_irqsave(struct snd_pcm_substream *substream);
unsigned long _snd_pcm_stream_lock_irqsave_nested(struct snd_pcm_substream *substream);
/**
* snd_pcm_stream_lock_irqsave - Lock the PCM stream
@@ -643,20 +642,6 @@ unsigned long _snd_pcm_stream_lock_irqsave_nested(struct snd_pcm_substream *subs
void snd_pcm_stream_unlock_irqrestore(struct snd_pcm_substream *substream,
unsigned long flags);
/**
* snd_pcm_stream_lock_irqsave_nested - Single-nested PCM stream locking
* @substream: PCM substream
* @flags: irq flags
*
* This locks the PCM stream like snd_pcm_stream_lock_irqsave() but with
* the single-depth lockdep subclass.
*/
#define snd_pcm_stream_lock_irqsave_nested(substream, flags) \
do { \
typecheck(unsigned long, flags); \
flags = _snd_pcm_stream_lock_irqsave_nested(substream); \
} while (0)
/**
* snd_pcm_group_for_each_entry - iterate over the linked substreams
* @s: the iterator

View File

@@ -172,19 +172,6 @@ unsigned long _snd_pcm_stream_lock_irqsave(struct snd_pcm_substream *substream)
}
EXPORT_SYMBOL_GPL(_snd_pcm_stream_lock_irqsave);
unsigned long _snd_pcm_stream_lock_irqsave_nested(struct snd_pcm_substream *substream)
{
unsigned long flags = 0;
if (substream->pcm->nonatomic)
mutex_lock_nested(&substream->self_group.mutex,
SINGLE_DEPTH_NESTING);
else
spin_lock_irqsave_nested(&substream->self_group.lock, flags,
SINGLE_DEPTH_NESTING);
return flags;
}
EXPORT_SYMBOL_GPL(_snd_pcm_stream_lock_irqsave_nested);
/**
* snd_pcm_stream_unlock_irqrestore - Unlock the PCM stream
* @substream: PCM substream

View File

@@ -46,8 +46,8 @@ static inline void snd_soc_dpcm_stream_lock_irq(struct snd_soc_pcm_runtime *rtd,
snd_pcm_stream_lock_irq(snd_soc_dpcm_get_substream(rtd, stream));
}
#define snd_soc_dpcm_stream_lock_irqsave_nested(rtd, stream, flags) \
snd_pcm_stream_lock_irqsave_nested(snd_soc_dpcm_get_substream(rtd, stream), flags)
#define snd_soc_dpcm_stream_lock_irqsave(rtd, stream, flags) \
snd_pcm_stream_lock_irqsave(snd_soc_dpcm_get_substream(rtd, stream), flags)
static inline void snd_soc_dpcm_stream_unlock_irq(struct snd_soc_pcm_runtime *rtd,
int stream)
@@ -2118,7 +2118,7 @@ int dpcm_be_dai_trigger(struct snd_soc_pcm_runtime *fe, int stream,
be = dpcm->be;
be_substream = snd_soc_dpcm_get_substream(be, stream);
snd_soc_dpcm_stream_lock_irqsave_nested(be, stream, flags);
snd_soc_dpcm_stream_lock_irqsave(be, stream, flags);
/* is this op for this BE ? */
if (!snd_soc_dpcm_be_can_update(fe, be, stream))