aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/pcm_native.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/core/pcm_native.c')
-rw-r--r--sound/core/pcm_native.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index 964e4c47a7f1..0860c5a84502 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -2007,14 +2007,16 @@ static void pcm_release_private(struct snd_pcm_substream *substream)
2007void snd_pcm_release_substream(struct snd_pcm_substream *substream) 2007void snd_pcm_release_substream(struct snd_pcm_substream *substream)
2008{ 2008{
2009 snd_pcm_drop(substream); 2009 snd_pcm_drop(substream);
2010 if (substream->pcm_release)
2011 substream->pcm_release(substream);
2012 if (substream->hw_opened) { 2010 if (substream->hw_opened) {
2013 if (substream->ops->hw_free != NULL) 2011 if (substream->ops->hw_free != NULL)
2014 substream->ops->hw_free(substream); 2012 substream->ops->hw_free(substream);
2015 substream->ops->close(substream); 2013 substream->ops->close(substream);
2016 substream->hw_opened = 0; 2014 substream->hw_opened = 0;
2017 } 2015 }
2016 if (substream->pcm_release) {
2017 substream->pcm_release(substream);
2018 substream->pcm_release = NULL;
2019 }
2018 snd_pcm_detach_substream(substream); 2020 snd_pcm_detach_substream(substream);
2019} 2021}
2020 2022