diff options
Diffstat (limited to 'sound/pci/hda/hda_codec.c')
-rw-r--r-- | sound/pci/hda/hda_codec.c | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 720a81d711e..dd8fb86c842 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
@@ -1261,12 +1261,17 @@ void snd_hda_codec_setup_stream(struct hda_codec *codec, hda_nid_t nid, | |||
1261 | } | 1261 | } |
1262 | EXPORT_SYMBOL_HDA(snd_hda_codec_setup_stream); | 1262 | EXPORT_SYMBOL_HDA(snd_hda_codec_setup_stream); |
1263 | 1263 | ||
1264 | static void really_cleanup_stream(struct hda_codec *codec, | ||
1265 | struct hda_cvt_setup *q); | ||
1266 | |||
1264 | /** | 1267 | /** |
1265 | * snd_hda_codec_cleanup_stream - clean up the codec for closing | 1268 | * __snd_hda_codec_cleanup_stream - clean up the codec for closing |
1266 | * @codec: the CODEC to clean up | 1269 | * @codec: the CODEC to clean up |
1267 | * @nid: the NID to clean up | 1270 | * @nid: the NID to clean up |
1271 | * @do_now: really clean up the stream instead of clearing the active flag | ||
1268 | */ | 1272 | */ |
1269 | void snd_hda_codec_cleanup_stream(struct hda_codec *codec, hda_nid_t nid) | 1273 | void __snd_hda_codec_cleanup_stream(struct hda_codec *codec, hda_nid_t nid, |
1274 | int do_now) | ||
1270 | { | 1275 | { |
1271 | struct hda_cvt_setup *p; | 1276 | struct hda_cvt_setup *p; |
1272 | 1277 | ||
@@ -1274,14 +1279,19 @@ void snd_hda_codec_cleanup_stream(struct hda_codec *codec, hda_nid_t nid) | |||
1274 | return; | 1279 | return; |
1275 | 1280 | ||
1276 | snd_printdd("hda_codec_cleanup_stream: NID=0x%x\n", nid); | 1281 | snd_printdd("hda_codec_cleanup_stream: NID=0x%x\n", nid); |
1277 | /* here we just clear the active flag; actual clean-ups will be done | ||
1278 | * in purify_inactive_streams() | ||
1279 | */ | ||
1280 | p = get_hda_cvt_setup(codec, nid); | 1282 | p = get_hda_cvt_setup(codec, nid); |
1281 | if (p) | 1283 | if (p) { |
1282 | p->active = 0; | 1284 | /* here we just clear the active flag when do_now isn't set; |
1285 | * actual clean-ups will be done later in | ||
1286 | * purify_inactive_streams() called from snd_hda_codec_prpapre() | ||
1287 | */ | ||
1288 | if (do_now) | ||
1289 | really_cleanup_stream(codec, p); | ||
1290 | else | ||
1291 | p->active = 0; | ||
1292 | } | ||
1283 | } | 1293 | } |
1284 | EXPORT_SYMBOL_HDA(snd_hda_codec_cleanup_stream); | 1294 | EXPORT_SYMBOL_HDA(__snd_hda_codec_cleanup_stream); |
1285 | 1295 | ||
1286 | static void really_cleanup_stream(struct hda_codec *codec, | 1296 | static void really_cleanup_stream(struct hda_codec *codec, |
1287 | struct hda_cvt_setup *q) | 1297 | struct hda_cvt_setup *q) |