lkml.org 
[lkml]   [2023]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v3 28/28] sound: soc: soc-usb: Rediscover USB SND devices on USB port add
Date
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 --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);
\
 
 \ /
  Last update: 2023-03-27 00:50    [W:1.214 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site