audio_info("alsa_stream=%p substream=%p\n", alsa_stream,
alsa_stream ? alsa_stream->substream : 0);
- if (alsa_stream->open)
- consumed = bcm2835_audio_retrieve_buffers(alsa_stream);
+ consumed = bcm2835_audio_retrieve_buffers(alsa_stream);
/* We get called only if playback was triggered, So, the number of buffers we retrieve in
* each iteration are the buffers that have been played out already
chip->alsa_stream[idx] = alsa_stream;
chip->opened |= (1 << idx);
- alsa_stream->open = 1;
alsa_stream->draining = 1;
out:
alsa_stream->period_size = 0;
alsa_stream->buffer_size = 0;
- if (alsa_stream->open) {
- alsa_stream->open = 0;
- bcm2835_audio_close(alsa_stream);
- }
+ bcm2835_audio_close(alsa_stream);
if (alsa_stream->chip)
alsa_stream->chip->alsa_stream[alsa_stream->idx] = NULL;
/*