diff mbox series

[v3,28/28] sound: soc: soc-usb: Rediscover USB SND devices on USB port add

Message ID 20230308235751.495-29-quic_wcheng@quicinc.com (mailing list archive)
State New, archived
Headers show
Series Introduce QC USB SND audio offloading support | expand

Commit Message

Wesley Cheng March 8, 2023, 11:57 p.m. UTC
In case the USB backend device has not been initialized/probed, USB SND
device connections can still occur.  When the USB backend is eventually
made available, previous USB SND device connections are not communicated to
the USB backend.  Call snd_usb_rediscover_devices() to generate the connect
callbacks for all USB SND devices connected.  This will allow for the USB
backend to be updated with the current set of devices available.

Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com>
---
 sound/soc/soc-usb.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/sound/soc/soc-usb.c b/sound/soc/soc-usb.c
index 84dc6d0b2eab..a9413e3d18df 100644
--- a/sound/soc/soc-usb.c
+++ b/sound/soc/soc-usb.c
@@ -111,6 +111,8 @@  struct snd_soc_usb *snd_soc_usb_add_port(struct device *dev, void *priv,
 	list_add_tail(&usb->list, &usb_ctx_list);
 	mutex_unlock(&ctx_mutex);
 
+	snd_usb_rediscover_devices();
+
 	return usb;
 }
 EXPORT_SYMBOL_GPL(snd_soc_usb_add_port);