mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 11:19:37 +00:00
ALSA: hda - Don't set up active streams twice
We don't have to set up a stream that has been already set up previously. Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
50b1548775
commit
affdb62b81
1 changed files with 2 additions and 2 deletions
|
@ -1493,7 +1493,7 @@ void snd_hda_codec_setup_stream(struct hda_codec *codec, hda_nid_t nid,
|
||||||
"NID=0x%x, stream=0x%x, channel=%d, format=0x%x\n",
|
"NID=0x%x, stream=0x%x, channel=%d, format=0x%x\n",
|
||||||
nid, stream_tag, channel_id, format);
|
nid, stream_tag, channel_id, format);
|
||||||
p = get_hda_cvt_setup(codec, nid);
|
p = get_hda_cvt_setup(codec, nid);
|
||||||
if (!p)
|
if (!p || p->active)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (codec->pcm_format_first)
|
if (codec->pcm_format_first)
|
||||||
|
@ -1540,7 +1540,7 @@ void __snd_hda_codec_cleanup_stream(struct hda_codec *codec, hda_nid_t nid,
|
||||||
|
|
||||||
snd_printdd("hda_codec_cleanup_stream: NID=0x%x\n", nid);
|
snd_printdd("hda_codec_cleanup_stream: NID=0x%x\n", nid);
|
||||||
p = get_hda_cvt_setup(codec, nid);
|
p = get_hda_cvt_setup(codec, nid);
|
||||||
if (p) {
|
if (p && p->active) {
|
||||||
/* here we just clear the active flag when do_now isn't set;
|
/* here we just clear the active flag when do_now isn't set;
|
||||||
* actual clean-ups will be done later in
|
* actual clean-ups will be done later in
|
||||||
* purify_inactive_streams() called from snd_hda_codec_prpapre()
|
* purify_inactive_streams() called from snd_hda_codec_prpapre()
|
||||||
|
|
Loading…
Reference in a new issue