···1261}1262EXPORT_SYMBOL_HDA(snd_hda_codec_setup_stream);12630001264/**1265- * snd_hda_codec_cleanup_stream - clean up the codec for closing1266 * @codec: the CODEC to clean up1267 * @nid: the NID to clean up01268 */1269-void snd_hda_codec_cleanup_stream(struct hda_codec *codec, hda_nid_t nid)01270{1271 struct hda_cvt_setup *p;1272···1279 return;12801281 snd_printdd("hda_codec_cleanup_stream: NID=0x%x\n", nid);1282- /* here we just clear the active flag; actual clean-ups will be done1283- * in purify_inactive_streams()1284- */1285 p = get_hda_cvt_setup(codec, nid);1286- if (p)1287- p->active = 0;000000001288}1289-EXPORT_SYMBOL_HDA(snd_hda_codec_cleanup_stream);12901291static void really_cleanup_stream(struct hda_codec *codec,1292 struct hda_cvt_setup *q)
···1261}1262EXPORT_SYMBOL_HDA(snd_hda_codec_setup_stream);12631264+static void really_cleanup_stream(struct hda_codec *codec,1265+ struct hda_cvt_setup *q);1266+1267/**1268+ * __snd_hda_codec_cleanup_stream - clean up the codec for closing1269 * @codec: the CODEC to clean up1270 * @nid: the NID to clean up1271+ * @do_now: really clean up the stream instead of clearing the active flag1272 */1273+void __snd_hda_codec_cleanup_stream(struct hda_codec *codec, hda_nid_t nid,1274+ int do_now)1275{1276 struct hda_cvt_setup *p;1277···1274 return;12751276 snd_printdd("hda_codec_cleanup_stream: NID=0x%x\n", nid);0001277 p = get_hda_cvt_setup(codec, nid);1278+ if (p) {1279+ /* here we just clear the active flag when do_now isn't set;1280+ * actual clean-ups will be done later in1281+ * purify_inactive_streams() called from snd_hda_codec_prpapre()1282+ */1283+ if (do_now)1284+ really_cleanup_stream(codec, p);1285+ else1286+ p->active = 0;1287+ }1288}1289+EXPORT_SYMBOL_HDA(__snd_hda_codec_cleanup_stream);12901291static void really_cleanup_stream(struct hda_codec *codec,1292 struct hda_cvt_setup *q)
+4-1
sound/pci/hda/hda_codec.h
···963void snd_hda_codec_setup_stream(struct hda_codec *codec, hda_nid_t nid,964 u32 stream_tag,965 int channel_id, int format);966-void snd_hda_codec_cleanup_stream(struct hda_codec *codec, hda_nid_t nid);000967unsigned int snd_hda_calc_stream_format(unsigned int rate,968 unsigned int channels,969 unsigned int format,
···963void snd_hda_codec_setup_stream(struct hda_codec *codec, hda_nid_t nid,964 u32 stream_tag,965 int channel_id, int format);966+void __snd_hda_codec_cleanup_stream(struct hda_codec *codec, hda_nid_t nid,967+ int do_now);968+#define snd_hda_codec_cleanup_stream(codec, nid) \969+ __snd_hda_codec_cleanup_stream(codec, nid, 0)970unsigned int snd_hda_calc_stream_format(unsigned int rate,971 unsigned int channels,972 unsigned int format,