summaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python/parallel-perf.py
diff options
context:
space:
mode:
authorWesley Cheng <quic_wcheng@quicinc.com>2025-04-09 12:47:51 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-04-11 13:02:31 +0200
commitf98cd6ecda1d32d4c7f8a238a49e9ce71db89a2d (patch)
treee45edc72f5608707525b1f2a612c188e053a2846 /tools/perf/scripts/python/parallel-perf.py
parent234ed325920c4441090e4dd5441d4e424c1804c9 (diff)
downloadlinux-f98cd6ecda1d32d4c7f8a238a49e9ce71db89a2d.tar.gz
linux-f98cd6ecda1d32d4c7f8a238a49e9ce71db89a2d.zip
ASoC: usb: Rediscover USB SND devices on USB port add
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. The chip array entries are all populated and removed while under the register_mutex, so going over potential race conditions: Thread#1: q6usb_component_probe() --> snd_soc_usb_add_port() --> snd_usb_rediscover_devices() --> mutex_lock(register_mutex) Thread#2 --> usb_audio_disconnect() --> mutex_lock(register_mutex) So either thread#1 or thread#2 will complete first. If Thread#1 completes before thread#2: SOC USB will notify DPCM backend of the device connection. Shortly after, once thread#2 runs, we will get a disconnect event for the connected device. Thread#2 completes before thread#1: Then during snd_usb_rediscover_devices() it won't notify of any connection for that particular chip index. Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com> Acked-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20250409194804.3773260-19-quic_wcheng@quicinc.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/parallel-perf.py')
0 files changed, 0 insertions, 0 deletions