The chip->audio_mutex is used basically for protecting the opened
stream assignment, and the prepare callback is irrelevant with it.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Tested-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
- mutex_lock(&chip->audio_mutex);
-
/* notify the vchiq that it should enter spdif passthrough mode by
* setting channels=0 (see
* https://github.com/raspberrypi/linux/issues/528)
/* notify the vchiq that it should enter spdif passthrough mode by
* setting channels=0 (see
* https://github.com/raspberrypi/linux/issues/528)
runtime->rate,
snd_pcm_format_width(runtime->format));
if (err < 0)
runtime->rate,
snd_pcm_format_width(runtime->format));
if (err < 0)
memset(&alsa_stream->pcm_indirect, 0, sizeof(alsa_stream->pcm_indirect));
memset(&alsa_stream->pcm_indirect, 0, sizeof(alsa_stream->pcm_indirect));
alsa_stream->pos = 0;
alsa_stream->draining = false;
alsa_stream->pos = 0;
alsa_stream->draining = false;
- out:
- mutex_unlock(&chip->audio_mutex);
- return err;
}
static void snd_bcm2835_pcm_transfer(struct snd_pcm_substream *substream,
}
static void snd_bcm2835_pcm_transfer(struct snd_pcm_substream *substream,