summaryrefslogtreecommitdiffstats
path: root/sound/usb/stream.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2022-09-01 15:09:12 +0200
committerTakashi Iwai <tiwai@suse.de>2022-09-01 15:09:12 +0200
commit041af76890ba66f6222dd910807fe0b170109e7d (patch)
treefb2a4ea4b38544b843da103c1273127ef9969edd /sound/usb/stream.c
parentf51ba1148a810a16eead9f0b29bfa2a8f8ab3afb (diff)
parentff878b408a03bef5d610b7e2302702e16a53636e (diff)
downloadlinux-041af76890ba66f6222dd910807fe0b170109e7d.tar.bz2
Merge branch 'for-linus' into for-next
Diffstat (limited to 'sound/usb/stream.c')
-rw-r--r--sound/usb/stream.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sound/usb/stream.c b/sound/usb/stream.c
index 99578e9a8af0..224d39638820 100644
--- a/sound/usb/stream.c
+++ b/sound/usb/stream.c
@@ -495,6 +495,10 @@ static int __snd_usb_add_audio_stream(struct snd_usb_audio *chip,
return 0;
}
}
+
+ if (chip->card->registered)
+ chip->need_delayed_register = true;
+
/* look for an empty stream */
list_for_each_entry(as, &chip->pcm_list, list) {
if (as->fmt_type != fp->fmt_type)
@@ -502,9 +506,6 @@ static int __snd_usb_add_audio_stream(struct snd_usb_audio *chip,
subs = &as->substream[stream];
if (subs->ep_num)
continue;
- if (snd_device_get_state(chip->card, as->pcm) !=
- SNDRV_DEV_BUILD)
- chip->need_delayed_register = true;
err = snd_pcm_new_stream(as->pcm, stream, 1);
if (err < 0)
return err;