mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 03:23:53 -04:00
ALSA: firewire: Replace runtime->status->state reference to runtime->state
The recent change in ALSA core allows drivers to get the current PCM state directly from runtime object. Replace the calls accordingly. Reviewed-by: Jaroslav Kysela <perex@perex.cz> Link: https://lore.kernel.org/r/20220926135558.26580-5-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
@@ -210,7 +210,7 @@ static int pcm_hw_params(struct snd_pcm_substream *substream,
|
||||
struct snd_motu *motu = substream->private_data;
|
||||
int err = 0;
|
||||
|
||||
if (substream->runtime->status->state == SNDRV_PCM_STATE_OPEN) {
|
||||
if (substream->runtime->state == SNDRV_PCM_STATE_OPEN) {
|
||||
unsigned int rate = params_rate(hw_params);
|
||||
unsigned int frames_per_period = params_period_size(hw_params);
|
||||
unsigned int frames_per_buffer = params_buffer_size(hw_params);
|
||||
@@ -232,7 +232,7 @@ static int pcm_hw_free(struct snd_pcm_substream *substream)
|
||||
|
||||
mutex_lock(&motu->mutex);
|
||||
|
||||
if (substream->runtime->status->state != SNDRV_PCM_STATE_OPEN)
|
||||
if (substream->runtime->state != SNDRV_PCM_STATE_OPEN)
|
||||
--motu->substreams_counter;
|
||||
|
||||
snd_motu_stream_stop_duplex(motu);
|
||||
|
||||
Reference in New Issue
Block a user