Commit ff5468c7 authored by Pavel Hofman's avatar Pavel Hofman Committed by Treehugger Robot
Browse files

UPSTREAM: usb: gadget: f_uac2: Add suspend callback



When USB cable gets disconnected, the undergoing playback/capture
stalls, without any notification to u_audio about the change.
Experiments with a dwc2 gadget revealed that Suspend interrupt is
thrown at cable disconnection, which the gadget framework translates to
calling suspend callback of a function, if it is defined.

Add the suspend callback to f_uac2 function, calling
corresponding method of u_audio in order to stop the respective PCM
streams and to notify subscribed clients at cable disconnection.

Signed-off-by: default avatarPavel Hofman <pavel.hofman@ivitera.com>
Link: https://lore.kernel.org/r/20220121155308.48794-10-pavel.hofman@ivitera.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Bug: 235196743
(cherry picked from commit 7ff4a3b5)
Change-Id: I43f5ccd6f84771bd63462ba9b2419a9e42f45746
Signed-off-by: default avatarLuiz Matheus <luizmmat@motorola.com>
parent 31e6d620
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment