int idx, int direction, int tag);
 struct hdac_stream *snd_hdac_stream_assign(struct hdac_bus *bus,
                                           struct snd_pcm_substream *substream);
+void snd_hdac_stream_release_locked(struct hdac_stream *azx_dev);
 void snd_hdac_stream_release(struct hdac_stream *azx_dev);
 struct hdac_stream *snd_hdac_get_stream(struct hdac_bus *bus,
                                        int dir, int stream_tag);
 
                spin_lock_irq(&bus->reg_lock);
                if (hext_stream->decoupled && !hext_stream->link_locked)
                        snd_hdac_ext_stream_decouple_locked(bus, hext_stream, false);
+               snd_hdac_stream_release_locked(&hext_stream->hstream);
                spin_unlock_irq(&bus->reg_lock);
-               snd_hdac_stream_release(&hext_stream->hstream);
                break;
 
        case HDAC_EXT_STREAM_TYPE_LINK:
 
 }
 EXPORT_SYMBOL_GPL(snd_hdac_stream_assign);
 
+/**
+ * snd_hdac_stream_release_locked - release the assigned stream
+ * @azx_dev: HD-audio core stream to release
+ *
+ * Release the stream that has been assigned by snd_hdac_stream_assign().
+ * The bus->reg_lock needs to be taken at a higher level
+ */
+void snd_hdac_stream_release_locked(struct hdac_stream *azx_dev)
+{
+       azx_dev->opened = 0;
+       azx_dev->running = 0;
+       azx_dev->substream = NULL;
+}
+EXPORT_SYMBOL_GPL(snd_hdac_stream_release_locked);
+
 /**
  * snd_hdac_stream_release - release the assigned stream
  * @azx_dev: HD-audio core stream to release
        struct hdac_bus *bus = azx_dev->bus;
 
        spin_lock_irq(&bus->reg_lock);
-       azx_dev->opened = 0;
-       azx_dev->running = 0;
-       azx_dev->substream = NULL;
+       snd_hdac_stream_release_locked(azx_dev);
        spin_unlock_irq(&bus->reg_lock);
 }
 EXPORT_SYMBOL_GPL(snd_hdac_stream_release);